go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGridScheduleComputer.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef __itkGridScheduleComputer_H__
19#define __itkGridScheduleComputer_H__
20
21#include "itkObject.h"
22#include "itkImageBase.h"
23#include "itkTransform.h"
24
25namespace itk
26{
27
39template< typename TTransformScalarType, unsigned int VImageDimension >
41 public Object
42{
43public:
44
47 typedef Object Superclass;
49 typedef SmartPointer< const Self > ConstPointer;
50
52 itkNewMacro( Self );
53
55 itkTypeMacro( GridScheduleComputer, Object );
56
58 itkStaticConstMacro( Dimension, unsigned int, VImageDimension );
59
61 typedef TTransformScalarType TransformScalarType;
62 typedef ImageBase<
63 itkGetStaticConstMacro( Dimension ) > ImageBaseType;
64 typedef typename ImageBaseType::PointType PointType;
65 typedef typename ImageBaseType::PointType OriginType;
66 typedef typename ImageBaseType::SpacingType SpacingType;
67 typedef typename ImageBaseType::DirectionType DirectionType;
68 typedef typename ImageBaseType::SizeType SizeType;
69 typedef typename ImageBaseType::SizeValueType SizeValueType;
70 typedef typename ImageBaseType::RegionType RegionType;
72 typedef std::vector< OriginType > VectorOriginType;
73 typedef std::vector< SpacingType > VectorSpacingType;
74 typedef std::vector< DirectionType > VectorDirectionType;
75 typedef std::vector< RegionType > VectorRegionType;
76 typedef std::vector< GridSpacingFactorType > VectorGridSpacingFactorType;
77
79 typedef Transform<
81 itkGetStaticConstMacro( Dimension ),
82 itkGetStaticConstMacro( Dimension ) > TransformType;
83 typedef typename TransformType::Pointer TransformPointer;
84 typedef typename TransformType::ConstPointer TransformConstPointer;
85
87 itkSetMacro( ImageOrigin, OriginType );
88
90 itkGetConstMacro( ImageOrigin, OriginType );
91
93 itkSetMacro( ImageSpacing, SpacingType );
94
96 itkGetConstMacro( ImageSpacing, SpacingType );
97
99 itkSetMacro( ImageDirection, DirectionType );
100
102 itkGetConstMacro( ImageDirection, DirectionType );
103
105 itkSetMacro( ImageRegion, RegionType );
106
108 itkGetConstMacro( ImageRegion, RegionType );
109
111 itkSetClampMacro( BSplineOrder, unsigned int, 0, 5 );
112
114 itkGetConstMacro( BSplineOrder, unsigned int );
115
117 itkSetMacro( FinalGridSpacing, SpacingType );
118
120 itkGetConstMacro( FinalGridSpacing, SpacingType );
121
123 virtual void SetDefaultSchedule(
124 unsigned int levels,
125 double upsamplingFactor );
126
128 virtual void SetSchedule(
129 const VectorGridSpacingFactorType & schedule );
130
132 virtual void GetSchedule( VectorGridSpacingFactorType & schedule ) const;
133
135 itkSetConstObjectMacro( InitialTransform, TransformType );
136
138 virtual void ComputeBSplineGrid( void );
139
141 virtual void GetBSplineGrid( unsigned int level,
142 RegionType & gridRegion,
143 SpacingType & gridSpacing,
144 OriginType & gridOrigin,
145 DirectionType & gridDirection );
146
147protected:
148
151
154
162
164 void PrintSelf( std::ostream & os, Indent indent ) const override;
165
167 itkGetConstMacro( NumberOfLevels, unsigned int );
168
171 OriginType & imageOrigin,
172 SpacingType & imageSpacing,
173 DirectionType & imageDirection,
174 SpacingType & finalGridSpacing ) const;
175
176private:
177
178 GridScheduleComputer( const Self & ); // purposely not implemented
179 void operator=( const Self & ); // purposely not implemented
180
186 unsigned int m_BSplineOrder;
187 unsigned int m_NumberOfLevels;
189
191 itkSetClampMacro( UpsamplingFactor, float, 1.0, NumericTraits< float >::max() );
192
195
196};
197
198} // end namespace itk
199
200#ifndef ITK_MANUAL_INSTANTIATION
201#include "itkGridScheduleComputer.hxx"
202#endif
203
204#endif // end #ifndef __itkGridScheduleComputer_H__
This class computes all information about the B-spline grid, given the image information and the desi...
SmartPointer< const Self > ConstPointer
Transform< TransformScalarType, itkGetStaticConstMacro(Dimension), itkGetStaticConstMacro(Dimension) > TransformType
TransformConstPointer m_InitialTransform
ImageBaseType::SizeValueType SizeValueType
ImageBase< itkGetStaticConstMacro(Dimension) > ImageBaseType
ImageBaseType::PointType OriginType
TTransformScalarType TransformScalarType
TransformType::Pointer TransformPointer
ImageBaseType::SizeType SizeType
ImageBaseType::PointType PointType
virtual void SetSchedule(const VectorGridSpacingFactorType &schedule)
std::vector< GridSpacingFactorType > VectorGridSpacingFactorType
std::vector< SpacingType > VectorSpacingType
virtual void GetBSplineGrid(unsigned int level, RegionType &gridRegion, SpacingType &gridSpacing, OriginType &gridOrigin, DirectionType &gridDirection)
std::vector< RegionType > VectorRegionType
ImageBaseType::RegionType RegionType
std::vector< DirectionType > VectorDirectionType
ImageBaseType::DirectionType DirectionType
GridScheduleComputer(const Self &)
virtual void ApplyInitialTransform(OriginType &imageOrigin, SpacingType &imageSpacing, DirectionType &imageDirection, SpacingType &finalGridSpacing) const
TransformType::ConstPointer TransformConstPointer
virtual void SetDefaultSchedule(unsigned int levels, double upsamplingFactor)
itkStaticConstMacro(Dimension, unsigned int, VImageDimension)
void operator=(const Self &)
VectorDirectionType m_GridDirections
virtual void ComputeBSplineGrid(void)
void PrintSelf(std::ostream &os, Indent indent) const override
VectorGridSpacingFactorType m_GridSpacingFactors
virtual void GetSchedule(VectorGridSpacingFactorType &schedule) const
ImageBaseType::SpacingType SpacingType
std::vector< OriginType > VectorOriginType


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo