ITK  5.2.0
Insight Toolkit
itkMultiResolutionImageRegistrationMethod.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 itkMultiResolutionImageRegistrationMethod_h
19 #define itkMultiResolutionImageRegistrationMethod_h
20 
21 #include "itkProcessObject.h"
22 #include "itkImageToImageMetric.h"
25 #include "itkNumericTraits.h"
26 #include "itkDataObjectDecorator.h"
27 
28 namespace itk
29 {
71 template <typename TFixedImage, typename TMovingImage>
72 class ITK_TEMPLATE_EXPORT MultiResolutionImageRegistrationMethod : public ProcessObject
73 {
74 public:
75  ITK_DISALLOW_COPY_AND_MOVE(MultiResolutionImageRegistrationMethod);
76 
82 
84  itkNewMacro(Self);
85 
88 
90  using FixedImageType = TFixedImage;
91  using FixedImageConstPointer = typename FixedImageType::ConstPointer;
93 
95  using MovingImageType = TMovingImage;
96  using MovingImageConstPointer = typename MovingImageType::ConstPointer;
97 
101 
104  using TransformPointer = typename TransformType::Pointer;
105 
111 
114  using InterpolatorPointer = typename InterpolatorType::Pointer;
115 
118 
122 
125 
129 
133 
136 
138  void
139  StopRegistration();
140 
142  itkSetConstObjectMacro(FixedImage, FixedImageType);
143  itkGetConstObjectMacro(FixedImage, FixedImageType);
145 
147  itkSetConstObjectMacro(MovingImage, MovingImageType);
148  itkGetConstObjectMacro(MovingImage, MovingImageType);
150 
152  itkSetObjectMacro(Optimizer, OptimizerType);
153  itkGetModifiableObjectMacro(Optimizer, OptimizerType);
155 
157  itkSetObjectMacro(Metric, MetricType);
158  itkGetModifiableObjectMacro(Metric, MetricType);
160 
162  itkSetMacro(FixedImageRegion, FixedImageRegionType);
163  itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
165 
167  itkSetObjectMacro(Transform, TransformType);
168  itkGetModifiableObjectMacro(Transform, TransformType);
170 
172  itkSetObjectMacro(Interpolator, InterpolatorType);
173  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
175 
177  itkSetObjectMacro(FixedImagePyramid, FixedImagePyramidType);
178  itkGetModifiableObjectMacro(FixedImagePyramid, FixedImagePyramidType);
180 
182  itkSetObjectMacro(MovingImagePyramid, MovingImagePyramidType);
183  itkGetModifiableObjectMacro(MovingImagePyramid, MovingImagePyramidType);
185 
187  void
188  SetSchedules(const ScheduleType & fixedImagePyramidSchedule, const ScheduleType & movingImagePyramidSchedule);
189 
190  itkGetConstMacro(FixedImagePyramidSchedule, ScheduleType);
191  itkGetConstMacro(MovingImagePyramidSchedule, ScheduleType);
192 
194  void
195  SetNumberOfLevels(SizeValueType numberOfLevels);
196 
197  itkGetConstMacro(NumberOfLevels, SizeValueType);
198 
200  itkGetConstMacro(CurrentLevel, SizeValueType);
201 
203  itkSetMacro(InitialTransformParameters, ParametersType);
204  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
206 
210  itkSetMacro(InitialTransformParametersOfNextLevel, ParametersType);
211  itkGetConstReferenceMacro(InitialTransformParametersOfNextLevel, ParametersType);
213 
216  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
217 
219  const TransformOutputType *
220  GetOutput() const;
221 
225  using Superclass::MakeOutput;
227  MakeOutput(DataObjectPointerArraySizeType output) override;
228 
232  GetMTime() const override;
233 
234 protected:
236  ~MultiResolutionImageRegistrationMethod() override = default;
237  void
238  PrintSelf(std::ostream & os, Indent indent) const override;
239 
242  void
243  GenerateData() override;
244 
249  void
250  Initialize();
251 
253  void
254  PreparePyramids();
255 
257  itkSetMacro(CurrentLevel, SizeValueType);
258 
259 private:
262 
265 
268 
271 
275 
277  std::vector<FixedImageRegionType> m_FixedImageRegionPyramid;
278 
281 
282  bool m_Stop;
283 
286 
289 };
290 } // end namespace itk
291 
292 #ifndef ITK_MANUAL_INSTANTIATION
293 # include "itkMultiResolutionImageRegistrationMethod.hxx"
294 #endif
295 
296 #endif
itk::MultiResolutionImageRegistrationMethod::FixedImageType
TFixedImage FixedImageType
Definition: itkMultiResolutionImageRegistrationMethod.h:90
itk::ImageToImageMetric
Computes similarity between regions of two images.
Definition: itkImageToImageMetric.h:52
itk::SingleValuedNonLinearOptimizer
This class is a base for the Optimization methods that optimize a single valued function.
Definition: itkSingleValuedNonLinearOptimizer.h:35
itkMultiResolutionPyramidImageFilter.h
itk::ModifiedTimeType
SizeValueType ModifiedTimeType
Definition: itkIntTypes.h:102
itk::MultiResolutionImageRegistrationMethod::m_FixedImageRegionPyramid
std::vector< FixedImageRegionType > m_FixedImageRegionPyramid
Definition: itkMultiResolutionImageRegistrationMethod.h:277
itk::MultiResolutionImageRegistrationMethod::ScheduleType
typename FixedImagePyramidType::ScheduleType ScheduleType
Definition: itkMultiResolutionImageRegistrationMethod.h:124
itk::MultiResolutionImageRegistrationMethod::m_MovingImagePyramidSchedule
ScheduleType m_MovingImagePyramidSchedule
Definition: itkMultiResolutionImageRegistrationMethod.h:285
itk::MultiResolutionImageRegistrationMethod::m_Stop
bool m_Stop
Definition: itkMultiResolutionImageRegistrationMethod.h:282
itk::ImageToImageMetric::TransformParametersType
typename TransformType::ParametersType TransformParametersType
Definition: itkImageToImageMetric.h:90
itk::MultiResolutionImageRegistrationMethod::m_FixedImageRegion
FixedImageRegionType m_FixedImageRegion
Definition: itkMultiResolutionImageRegistrationMethod.h:276
itk::MultiResolutionImageRegistrationMethod::m_FixedImagePyramidSchedule
ScheduleType m_FixedImagePyramidSchedule
Definition: itkMultiResolutionImageRegistrationMethod.h:284
itk::MultiResolutionImageRegistrationMethod
Base class for multi-resolution image registration methods.
Definition: itkMultiResolutionImageRegistrationMethod.h:72
itk::MultiResolutionImageRegistrationMethod::m_FixedImagePyramid
FixedImagePyramidPointer m_FixedImagePyramid
Definition: itkMultiResolutionImageRegistrationMethod.h:270
itk::Optimizer
Generic representation for an optimization method.
Definition: itkOptimizer.h:38
itk::MultiResolutionImageRegistrationMethod::FixedImageConstPointer
typename FixedImageType::ConstPointer FixedImageConstPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:91
itk::MultiResolutionImageRegistrationMethod::m_LastTransformParameters
ParametersType m_LastTransformParameters
Definition: itkMultiResolutionImageRegistrationMethod.h:274
itk::MultiResolutionImageRegistrationMethod::m_Metric
MetricPointer m_Metric
Definition: itkMultiResolutionImageRegistrationMethod.h:257
itk::MultiResolutionImageRegistrationMethod::MovingImagePyramidPointer
typename MovingImagePyramidType::Pointer MovingImagePyramidPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:128
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::MultiResolutionImageRegistrationMethod::InterpolatorPointer
typename InterpolatorType::Pointer InterpolatorPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:114
itk::DataObjectDecorator
Decorates any subclass of itkObject with a DataObject API.
Definition: itkDataObjectDecorator.h:66
itk::MultiResolutionImageRegistrationMethod::m_MovingImage
MovingImageConstPointer m_MovingImage
Definition: itkMultiResolutionImageRegistrationMethod.h:263
itk::MultiResolutionImageRegistrationMethod::m_NumberOfLevels
SizeValueType m_NumberOfLevels
Definition: itkMultiResolutionImageRegistrationMethod.h:279
itk::MultiResolutionImageRegistrationMethod::ParametersType
typename MetricType::TransformParametersType ParametersType
Definition: itkMultiResolutionImageRegistrationMethod.h:132
itk::MultiResolutionImageRegistrationMethod::MovingImageConstPointer
typename MovingImageType::ConstPointer MovingImageConstPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:96
itk::MultiResolutionImageRegistrationMethod::MovingImageType
TMovingImage MovingImageType
Definition: itkMultiResolutionImageRegistrationMethod.h:95
itk::MultiResolutionImageRegistrationMethod::m_FixedImage
FixedImageConstPointer m_FixedImage
Definition: itkMultiResolutionImageRegistrationMethod.h:264
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::MultiResolutionImageRegistrationMethod::TransformPointer
typename TransformType::Pointer TransformPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:104
itk::MultiResolutionImageRegistrationMethod::m_InitialTransformParameters
ParametersType m_InitialTransformParameters
Definition: itkMultiResolutionImageRegistrationMethod.h:272
itk::MultiResolutionImageRegistrationMethod::MetricPointer
typename MetricType::Pointer MetricPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:100
itkImageToImageMetric.h
itkProcessObject.h
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itkDataObjectDecorator.h
itk::MultiResolutionImageRegistrationMethod::FixedImagePyramidPointer
typename FixedImagePyramidType::Pointer FixedImagePyramidPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:121
itk::MultiResolutionImageRegistrationMethod::m_NumberOfLevelsSpecified
bool m_NumberOfLevelsSpecified
Definition: itkMultiResolutionImageRegistrationMethod.h:288
itk::MultiResolutionImageRegistrationMethod::TransformOutputConstPointer
typename TransformOutputType::ConstPointer TransformOutputConstPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:110
itk::MultiResolutionImageRegistrationMethod::m_Optimizer
OptimizerType::Pointer m_Optimizer
Definition: itkMultiResolutionImageRegistrationMethod.h:261
itk::MultiResolutionImageRegistrationMethod::TransformType
typename MetricType::TransformType TransformType
Definition: itkMultiResolutionImageRegistrationMethod.h:103
itk::MultiResolutionImageRegistrationMethod::FixedImageRegionType
typename FixedImageType::RegionType FixedImageRegionType
Definition: itkMultiResolutionImageRegistrationMethod.h:92
itk::MultiResolutionPyramidImageFilter
Framework for creating images in a multi-resolution pyramid.
Definition: itkMultiResolutionPyramidImageFilter.h:109
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::MultiResolutionImageRegistrationMethod::m_ScheduleSpecified
bool m_ScheduleSpecified
Definition: itkMultiResolutionImageRegistrationMethod.h:287
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::MultiResolutionImageRegistrationMethod::InterpolatorType
typename MetricType::InterpolatorType InterpolatorType
Definition: itkMultiResolutionImageRegistrationMethod.h:113
itk::MultiResolutionImageRegistrationMethod::m_MovingImagePyramid
MovingImagePyramidPointer m_MovingImagePyramid
Definition: itkMultiResolutionImageRegistrationMethod.h:269
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::MultiResolutionImageRegistrationMethod::m_Transform
TransformPointer m_Transform
Definition: itkMultiResolutionImageRegistrationMethod.h:266
itkNumericTraits.h
itk::Transform
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
itk::MultiResolutionImageRegistrationMethod::m_InitialTransformParametersOfNextLevel
ParametersType m_InitialTransformParametersOfNextLevel
Definition: itkMultiResolutionImageRegistrationMethod.h:273
itk::MultiResolutionImageRegistrationMethod::m_CurrentLevel
SizeValueType m_CurrentLevel
Definition: itkMultiResolutionImageRegistrationMethod.h:280
itk::Array2D< unsigned int >
itkSingleValuedNonLinearOptimizer.h
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301
itk::MultiResolutionImageRegistrationMethod::m_Interpolator
InterpolatorPointer m_Interpolator
Definition: itkMultiResolutionImageRegistrationMethod.h:267
itk::InterpolateImageFunction
Base class for all image interpolators.
Definition: itkInterpolateImageFunction.h:45
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::MultiResolutionImageRegistrationMethod::TransformOutputPointer
typename TransformOutputType::Pointer TransformOutputPointer
Definition: itkMultiResolutionImageRegistrationMethod.h:109