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>
40class ITK_TEMPLATE_EXPORT GridScheduleComputer : public Object
41{
42public:
44
47 using Superclass = Object;
48 using Pointer = SmartPointer<Self>;
49 using ConstPointer = SmartPointer<const Self>;
50
52 itkNewMacro(Self);
53
55 itkTypeMacro(GridScheduleComputer, Object);
56
58 itkStaticConstMacro(Dimension, unsigned int, VImageDimension);
59
61 using TransformScalarType = TTransformScalarType;
62 using ImageBaseType = ImageBase<Self::Dimension>;
63 using PointType = typename ImageBaseType::PointType;
64 using OriginType = typename ImageBaseType::PointType;
65 using SpacingType = typename ImageBaseType::SpacingType;
66 using DirectionType = typename ImageBaseType::DirectionType;
67 using SizeType = typename ImageBaseType::SizeType;
68 using SizeValueType = typename ImageBaseType::SizeValueType;
69 using RegionType = typename ImageBaseType::RegionType;
71 using VectorOriginType = std::vector<OriginType>;
72 using VectorSpacingType = std::vector<SpacingType>;
73 using VectorDirectionType = std::vector<DirectionType>;
74 using VectorRegionType = std::vector<RegionType>;
75 using VectorGridSpacingFactorType = std::vector<GridSpacingFactorType>;
76
78 using TransformType = Transform<TransformScalarType, Self::Dimension, Self::Dimension>;
79 using TransformPointer = typename TransformType::Pointer;
80 using TransformConstPointer = typename TransformType::ConstPointer;
81
83 itkSetMacro(ImageOrigin, OriginType);
84
86 itkGetConstMacro(ImageOrigin, OriginType);
87
89 itkSetMacro(ImageSpacing, SpacingType);
90
92 itkGetConstMacro(ImageSpacing, SpacingType);
93
95 itkSetMacro(ImageDirection, DirectionType);
96
98 itkGetConstMacro(ImageDirection, DirectionType);
99
101 itkSetMacro(ImageRegion, RegionType);
102
104 itkGetConstMacro(ImageRegion, RegionType);
105
107 itkSetClampMacro(BSplineOrder, unsigned int, 0, 5);
108
110 itkGetConstMacro(BSplineOrder, unsigned int);
111
113 itkSetMacro(FinalGridSpacing, SpacingType);
114
116 itkGetConstMacro(FinalGridSpacing, SpacingType);
117
119 virtual void
120 SetDefaultSchedule(unsigned int levels, double upsamplingFactor);
121
123 virtual void
125
127 virtual void
129
131 itkSetConstObjectMacro(InitialTransform, TransformType);
132
134 virtual void
136
138 virtual void
139 GetBSplineGrid(unsigned int level,
140 RegionType & gridRegion,
141 SpacingType & gridSpacing,
142 OriginType & gridOrigin,
143 DirectionType & gridDirection);
144
145protected:
148
150 ~GridScheduleComputer() override = default;
151
159
161 void
162 PrintSelf(std::ostream & os, Indent indent) const override;
163
165 itkGetConstMacro(NumberOfLevels, unsigned int);
166
168 virtual void
170 SpacingType & imageSpacing,
171 DirectionType & imageDirection,
172 SpacingType & finalGridSpacing) const;
173
174private:
180 unsigned int m_BSplineOrder;
181 unsigned int m_NumberOfLevels;
183
185 itkSetClampMacro(UpsamplingFactor, float, 1.0, NumericTraits<float>::max());
186
189};
190
191} // end namespace itk
192
193#ifndef ITK_MANUAL_INSTANTIATION
194# include "itkGridScheduleComputer.hxx"
195#endif
196
197#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
std::vector< RegionType > VectorRegionType
typename ImageBaseType::RegionType RegionType
Transform< TransformScalarType, Self::Dimension, Self::Dimension > TransformType
typename ImageBaseType::DirectionType DirectionType
TransformConstPointer m_InitialTransform
typename TransformType::Pointer TransformPointer
std::vector< DirectionType > VectorDirectionType
typename ImageBaseType::SpacingType SpacingType
typename ImageBaseType::PointType PointType
std::vector< OriginType > VectorOriginType
virtual void SetSchedule(const VectorGridSpacingFactorType &schedule)
typename ImageBaseType::SizeType SizeType
~GridScheduleComputer() override=default
virtual void GetBSplineGrid(unsigned int level, RegionType &gridRegion, SpacingType &gridSpacing, OriginType &gridOrigin, DirectionType &gridDirection)
std::vector< GridSpacingFactorType > VectorGridSpacingFactorType
typename TransformType::ConstPointer TransformConstPointer
virtual void ApplyInitialTransform(OriginType &imageOrigin, SpacingType &imageSpacing, DirectionType &imageDirection, SpacingType &finalGridSpacing) const
TTransformScalarType TransformScalarType
virtual void SetDefaultSchedule(unsigned int levels, double upsamplingFactor)
itkStaticConstMacro(Dimension, unsigned int, VImageDimension)
virtual void ComputeBSplineGrid()
ITK_DISALLOW_COPY_AND_MOVE(GridScheduleComputer)
ImageBase< Self::Dimension > ImageBaseType
VectorDirectionType m_GridDirections
typename ImageBaseType::SizeValueType SizeValueType
void PrintSelf(std::ostream &os, Indent indent) const override
VectorGridSpacingFactorType m_GridSpacingFactors
virtual void GetSchedule(VectorGridSpacingFactorType &schedule) const
typename ImageBaseType::PointType OriginType
std::vector< SpacingType > VectorSpacingType


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo