ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMultiResolutionImageRegistrationMethod.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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_ASSIGN(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 StopRegistration();
139 
141  itkSetConstObjectMacro(FixedImage, FixedImageType);
142  itkGetConstObjectMacro(FixedImage, FixedImageType);
144 
146  itkSetConstObjectMacro(MovingImage, MovingImageType);
147  itkGetConstObjectMacro(MovingImage, MovingImageType);
149 
151  itkSetObjectMacro(Optimizer, OptimizerType);
152  itkGetModifiableObjectMacro(Optimizer, OptimizerType);
154 
156  itkSetObjectMacro(Metric, MetricType);
157  itkGetModifiableObjectMacro(Metric, MetricType);
159 
161  itkSetMacro(FixedImageRegion, FixedImageRegionType);
162  itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
164 
166  itkSetObjectMacro(Transform, TransformType);
167  itkGetModifiableObjectMacro(Transform, TransformType);
169 
171  itkSetObjectMacro(Interpolator, InterpolatorType);
172  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
174 
176  itkSetObjectMacro(FixedImagePyramid, FixedImagePyramidType);
177  itkGetModifiableObjectMacro(FixedImagePyramid, FixedImagePyramidType);
179 
181  itkSetObjectMacro(MovingImagePyramid, MovingImagePyramidType);
182  itkGetModifiableObjectMacro(MovingImagePyramid, MovingImagePyramidType);
184 
186  void SetSchedules(const ScheduleType & fixedSchedule,
187  const ScheduleType & movingSchedule);
188 
189  itkGetConstMacro(FixedImagePyramidSchedule, ScheduleType);
190  itkGetConstMacro(MovingImagePyramidSchedule, ScheduleType);
191 
193  void SetNumberOfLevels(SizeValueType numberOfLevels);
194 
195  itkGetConstMacro(NumberOfLevels, SizeValueType);
196 
198  itkGetConstMacro(CurrentLevel, SizeValueType);
199 
201  itkSetMacro(InitialTransformParameters, ParametersType);
202  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
204 
208  itkSetMacro(InitialTransformParametersOfNextLevel, ParametersType);
209  itkGetConstReferenceMacro(InitialTransformParametersOfNextLevel, ParametersType);
211 
214  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
215 
217  const TransformOutputType * GetOutput() const;
218 
222  using Superclass::MakeOutput;
223  DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override;
224 
227  ModifiedTimeType GetMTime() const override;
228 
229 protected:
231  ~MultiResolutionImageRegistrationMethod() override = default;
232  void PrintSelf(std::ostream & os, Indent indent) const override;
233 
236  void GenerateData() override;
237 
242  void Initialize();
243 
245  void PreparePyramids();
246 
248  itkSetMacro(CurrentLevel, SizeValueType);
249 
250 private:
253 
256 
259 
262 
266 
268  std::vector< FixedImageRegionType > m_FixedImageRegionPyramid;
269 
272 
273  bool m_Stop;
274 
277 
280 };
281 } // end namespace itk
282 
283 #ifndef ITK_MANUAL_INSTANTIATION
284 #include "itkMultiResolutionImageRegistrationMethod.hxx"
285 #endif
286 
287 #endif
Light weight base class for most itk classes.
typename TransformOutputType::ConstPointer TransformOutputConstPointer
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
This class is a base for the Optimization methods that optimize a single valued function.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename MovingImagePyramidType::Pointer MovingImagePyramidPointer
Framework for creating images in a multi-resolution pyramid.
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
typename MetricType::TransformParametersType ParametersType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
Decorates any subclass of itkObject with a DataObject API.
typename TransformType::ParametersType TransformParametersType
Generic representation for an optimization method.
Definition: itkOptimizer.h:38
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:104
Base class for multi-resolution image registration methods.
Base class for all image interpolaters.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Computes similarity between regions of two images.
SmartPointer< Self > Pointer