go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMultiInputMultiResolutionImageRegistrationMethodBase.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 itkMultiInputMultiResolutionImageRegistrationMethodBase_h
19#define itkMultiInputMultiResolutionImageRegistrationMethodBase_h
20
23#include <vector>
24
28#define itkSimpleSetMacro(_name, _type) \
29 virtual void Set##_name(_type _arg) { this->Set##_name(_arg, 0); }
30
31#define elxOverrideSimpleSetMacro(_name, _type) \
32 void Set##_name(_type _arg) override { this->Set##_name(_arg, 0); }
33
35#define itkSetNumberOfMacro(_name) \
36 virtual void SetNumberOf##_name##s(unsigned int _arg) \
37 { \
38 if (this->m_##_name##s.size() != _arg) \
39 { \
40 this->m_##_name##s.resize(_arg); \
41 this->Modified(); \
42 } \
43 }
44
46#define itkGetNumberOfMacro(_name) \
47 virtual unsigned int GetNumberOf##_name##s() const { return this->m_##_name##s.size(); }
48
49namespace itk
50{
51
72template <typename TFixedImage, typename TMovingImage>
74 : public MultiResolutionImageRegistrationMethod2<TFixedImage, TMovingImage>
75{
76public:
78
82 using Pointer = SmartPointer<Self>;
83 using ConstPointer = SmartPointer<const Self>;
84
86 itkNewMacro(Self);
87
90
92 using typename Superclass::FixedImageType;
96 using typename Superclass::MovingImageType;
98
99 using typename Superclass::MetricType;
100 using typename Superclass::MetricPointer;
101 using typename Superclass::TransformType;
102 using typename Superclass::TransformPointer;
103 using typename Superclass::InterpolatorType;
104 using typename Superclass::InterpolatorPointer;
105 using typename Superclass::OptimizerType;
106 using OptimizerPointer = typename OptimizerType::Pointer;
111
112 using typename Superclass::TransformOutputType;
115
116 using typename Superclass::ParametersType;
117 using typename Superclass::DataObjectPointer;
118
119 using FixedImageRegionPyramidVectorType = std::vector<FixedImageRegionPyramidType>;
120
124 using FixedImageVectorType = typename MultiInputMetricType ::FixedImageVectorType;
125 using FixedImageRegionVectorType = typename MultiInputMetricType ::FixedImageRegionVectorType;
126 using MovingImageVectorType = typename MultiInputMetricType ::MovingImageVectorType;
127 using InterpolatorVectorType = typename MultiInputMetricType ::InterpolatorVectorType;
128 using FixedImageInterpolatorType = typename MultiInputMetricType ::FixedImageInterpolatorType;
129 using FixedImageInterpolatorVectorType = typename MultiInputMetricType ::FixedImageInterpolatorVectorType;
130 using FixedImagePyramidVectorType = std::vector<FixedImagePyramidPointer>;
131 using MovingImagePyramidVectorType = std::vector<MovingImagePyramidPointer>;
132
141 virtual void
142 SetFixedImage(const FixedImageType * _arg, unsigned int pos);
143
144 virtual const FixedImageType *
145 GetFixedImage(unsigned int pos) const;
146
147 const FixedImageType *
148 GetFixedImage() const override
149 {
150 return this->GetFixedImage(0);
151 }
155
157 virtual void
159
160 virtual const FixedImageRegionType &
161 GetFixedImageRegion(unsigned int pos) const;
162
164 GetFixedImageRegion() const override
165 {
166 return this->GetFixedImageRegion(0);
167 }
169 itkSetNumberOfMacro(FixedImageRegion);
170 itkGetNumberOfMacro(FixedImageRegion);
171
173 virtual void
175
176 virtual FixedImagePyramidType *
177 GetFixedImagePyramid(unsigned int pos) const;
178
181 {
182 return this->GetFixedImagePyramid(0);
183 }
185 itkSetNumberOfMacro(FixedImagePyramid);
186 itkGetNumberOfMacro(FixedImagePyramid);
187
189 virtual void
190 SetMovingImage(const MovingImageType * _arg, unsigned int pos);
191
192 virtual const MovingImageType *
193 GetMovingImage(unsigned int pos) const;
194
195 const MovingImageType *
196 GetMovingImage() const override
197 {
198 return this->GetMovingImage(0);
199 }
203
205 virtual void
207
208 virtual MovingImagePyramidType *
209 GetMovingImagePyramid(unsigned int pos) const;
210
213 {
214 return this->GetMovingImagePyramid(0);
215 }
217 itkSetNumberOfMacro(MovingImagePyramid);
218 itkGetNumberOfMacro(MovingImagePyramid);
219
221 virtual void
222 SetInterpolator(InterpolatorType * _arg, unsigned int pos);
223
224 virtual InterpolatorType *
225 GetInterpolator(unsigned int pos) const;
226
229 {
230 return this->GetInterpolator(0);
231 }
233 itkSetNumberOfMacro(Interpolator);
234 itkGetNumberOfMacro(Interpolator);
235
237 virtual void
239
241 GetFixedImageInterpolator(unsigned int pos) const;
242
245 {
246 return this->GetFixedImageInterpolator(0);
247 }
249 itkSetNumberOfMacro(FixedImageInterpolator);
250 itkGetNumberOfMacro(FixedImageInterpolator);
251
253 void
254 SetMetric(MetricType * _arg) override;
255
258
262 ModifiedTimeType
263 GetMTime() const override;
264
265protected:
268
271
273 void
274 PrintSelf(std::ostream & os, Indent indent) const override;
275
279 void
280 GenerateData() override;
281
286 void
287 Initialize() override;
288
290 void
291 PreparePyramids() override;
292
296 virtual void
298
300 virtual void
302
311
314
317
318private:
320};
321
322} // end namespace itk
323
324#undef itkSetNumberOfMacro
325#undef itkGetNumberOfMacro
326#undef elxOverrideSimpleSetMacro
327
328#ifndef ITK_MANUAL_INSTANTIATION
329# include "itkMultiInputMultiResolutionImageRegistrationMethodBase.hxx"
330#endif
331
332#endif // end #ifndef itkMultiInputMultiResolutionImageRegistrationMethodBase_h
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
Implements a metric base class that takes multiple inputs.
virtual InterpolatorType * GetInterpolator(unsigned int pos) const
elxOverrideSimpleSetMacro(FixedImage, const FixedImageType *)
elxOverrideSimpleSetMacro(Interpolator, InterpolatorType *)
virtual void SetMovingImage(const MovingImageType *_arg, unsigned int pos)
virtual const FixedImageRegionType & GetFixedImageRegion(unsigned int pos) const
elxOverrideSimpleSetMacro(MovingImagePyramid, MovingImagePyramidType *)
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
elxOverrideSimpleSetMacro(FixedImagePyramid, FixedImagePyramidType *)
virtual void SetFixedImagePyramid(FixedImagePyramidType *_arg, unsigned int pos)
void PrintSelf(std::ostream &os, Indent indent) const override
itkGetModifiableObjectMacro(MultiInputMetric, MultiInputMetricType)
virtual FixedImagePyramidType * GetFixedImagePyramid(unsigned int pos) const
virtual const FixedImageType * GetFixedImage(unsigned int pos) const
itkSimpleSetMacro(FixedImageInterpolator, FixedImageInterpolatorType *)
elxOverrideSimpleSetMacro(FixedImageRegion, const FixedImageRegionType)
ITK_DISALLOW_COPY_AND_MOVE(MultiInputMultiResolutionImageRegistrationMethodBase)
typename MultiInputMetricType ::FixedImageInterpolatorVectorType FixedImageInterpolatorVectorType
virtual void SetFixedImage(const FixedImageType *_arg, unsigned int pos)
virtual const MovingImageType * GetMovingImage(unsigned int pos) const
virtual FixedImageInterpolatorType * GetFixedImageInterpolator(unsigned int pos) const
virtual void SetFixedImageInterpolator(FixedImageInterpolatorType *_arg, unsigned int pos)
virtual MovingImagePyramidType * GetMovingImagePyramid(unsigned int pos) const
virtual void SetInterpolator(InterpolatorType *_arg, unsigned int pos)
elxOverrideSimpleSetMacro(MovingImage, const MovingImageType *)
virtual void SetFixedImageRegion(FixedImageRegionType _arg, unsigned int pos)
virtual void SetMovingImagePyramid(MovingImagePyramidType *_arg, unsigned int pos)
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType
Base class for multi-resolution image registration methods.
typename TransformOutputType::ConstPointer TransformOutputConstPointer
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType


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