ITK  5.2.0
Insight Toolkit
itkImageRegistrationMethod.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 itkImageRegistrationMethod_h
19 #define itkImageRegistrationMethod_h
20 
21 #include "itkProcessObject.h"
22 #include "itkImage.h"
23 #include "itkImageToImageMetric.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace itk
28 {
69 template <typename TFixedImage, typename TMovingImage>
70 class ITK_TEMPLATE_EXPORT ImageRegistrationMethod : public ProcessObject
71 {
72 public:
73  ITK_DISALLOW_COPY_AND_MOVE(ImageRegistrationMethod);
74 
80 
82  itkNewMacro(Self);
83 
86 
88  using FixedImageType = TFixedImage;
89  using FixedImageConstPointer = typename FixedImageType::ConstPointer;
90 
92  using MovingImageType = TMovingImage;
93  using MovingImageConstPointer = typename MovingImageType::ConstPointer;
94 
99 
102  using TransformPointer = typename TransformType::Pointer;
103 
109 
112  using InterpolatorPointer = typename InterpolatorType::Pointer;
113 
116 
120 
123 
125  void
126  SetFixedImage(const FixedImageType * fixedImage);
127  itkGetConstObjectMacro(FixedImage, FixedImageType);
129 
131  void
132  SetMovingImage(const MovingImageType * movingImage);
133  itkGetConstObjectMacro(MovingImage, MovingImageType);
135 
137  itkSetObjectMacro(Optimizer, OptimizerType);
138  itkGetModifiableObjectMacro(Optimizer, OptimizerType);
140 
142  itkSetObjectMacro(Metric, MetricType);
143  itkGetModifiableObjectMacro(Metric, MetricType);
145 
147  itkSetObjectMacro(Transform, TransformType);
148  itkGetModifiableObjectMacro(Transform, TransformType);
150 
152  itkSetObjectMacro(Interpolator, InterpolatorType);
153  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
155 
157  virtual void
158  SetInitialTransformParameters(const ParametersType & param);
159 
160  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
161 
164  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
165 
173  void
174  SetFixedImageRegion(const FixedImageRegionType & region);
175 
180  itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
181 
184  itkGetConstMacro(FixedImageRegionDefined, bool);
185 
190  itkSetMacro(FixedImageRegionDefined, bool);
191 
193  virtual void
194  Initialize();
195 
197  const TransformOutputType *
198  GetOutput() const;
199 
203  using Superclass::MakeOutput;
205  MakeOutput(DataObjectPointerArraySizeType output) override;
206 
210  GetMTime() const override;
211 
212 protected:
214  ~ImageRegistrationMethod() override = default;
215  void
216  PrintSelf(std::ostream & os, Indent indent) const override;
219  void
220  GenerateData() override;
221 
223  itkSetMacro(LastTransformParameters, ParametersType);
224 
225  /* Start the Optimization */
226  void
227  StartOptimization();
228 
229 private:
232 
235 
238 
241 
244 };
245 } // end namespace itk
246 
247 #ifndef ITK_MANUAL_INSTANTIATION
248 # include "itkImageRegistrationMethod.hxx"
249 #endif
250 
251 #endif
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
itk::ModifiedTimeType
SizeValueType ModifiedTimeType
Definition: itkIntTypes.h:102
itk::ImageRegistrationMethod::MovingImageConstPointer
typename MovingImageType::ConstPointer MovingImageConstPointer
Definition: itkImageRegistrationMethod.h:93
itk::ImageToImageMetric::TransformParametersType
typename TransformType::ParametersType TransformParametersType
Definition: itkImageToImageMetric.h:90
itk::ImageRegistrationMethod::TransformOutputPointer
typename TransformOutputType::Pointer TransformOutputPointer
Definition: itkImageRegistrationMethod.h:107
itk::Optimizer
Generic representation for an optimization method.
Definition: itkOptimizer.h:38
itk::ImageRegistrationMethod::FixedImageConstPointer
typename FixedImageType::ConstPointer FixedImageConstPointer
Definition: itkImageRegistrationMethod.h:89
itkImage.h
itk::ImageRegistrationMethod
Base class for Image Registration Methods.
Definition: itkImageRegistrationMethod.h:70
itk::ImageRegistrationMethod::InterpolatorPointer
typename InterpolatorType::Pointer InterpolatorPointer
Definition: itkImageRegistrationMethod.h:112
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageRegistrationMethod::m_FixedImage
FixedImageConstPointer m_FixedImage
Definition: itkImageRegistrationMethod.h:234
itk::ImageRegistrationMethod::MetricPointer
typename MetricType::Pointer MetricPointer
Definition: itkImageRegistrationMethod.h:97
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::ImageRegistrationMethod::m_InitialTransformParameters
ParametersType m_InitialTransformParameters
Definition: itkImageRegistrationMethod.h:239
itk::DataObjectDecorator
Decorates any subclass of itkObject with a DataObject API.
Definition: itkDataObjectDecorator.h:66
itk::ImageRegistrationMethod::TransformOutputConstPointer
typename TransformOutputType::ConstPointer TransformOutputConstPointer
Definition: itkImageRegistrationMethod.h:108
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itkImageToImageMetric.h
itkProcessObject.h
itk::ImageRegistrationMethod::TransformType
typename MetricType::TransformType TransformType
Definition: itkImageRegistrationMethod.h:101
itkDataObjectDecorator.h
itk::ImageRegistrationMethod::m_Metric
MetricPointer m_Metric
Definition: itkImageRegistrationMethod.h:230
itk::ImageRegistrationMethod::FixedImageType
TFixedImage FixedImageType
Definition: itkImageRegistrationMethod.h:88
itk::ImageRegistrationMethod::FixedImageRegionType
typename MetricType::FixedImageRegionType FixedImageRegionType
Definition: itkImageRegistrationMethod.h:98
itk::ImageRegistrationMethod::m_Transform
TransformPointer m_Transform
Definition: itkImageRegistrationMethod.h:236
itk::ImageRegistrationMethod::m_FixedImageRegionDefined
bool m_FixedImageRegionDefined
Definition: itkImageRegistrationMethod.h:242
itk::ImageRegistrationMethod::TransformPointer
typename TransformType::Pointer TransformPointer
Definition: itkImageRegistrationMethod.h:102
itk::ImageRegistrationMethod::m_Optimizer
OptimizerType::Pointer m_Optimizer
Definition: itkImageRegistrationMethod.h:231
itk::ImageRegistrationMethod::m_MovingImage
MovingImageConstPointer m_MovingImage
Definition: itkImageRegistrationMethod.h:233
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::ImageRegistrationMethod::InterpolatorType
typename MetricType::InterpolatorType InterpolatorType
Definition: itkImageRegistrationMethod.h:111
itk::ImageRegistrationMethod::MovingImageType
TMovingImage MovingImageType
Definition: itkImageRegistrationMethod.h:92
itk::ImageRegistrationMethod::ParametersType
typename MetricType::TransformParametersType ParametersType
Definition: itkImageRegistrationMethod.h:119
itk::Transform
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
itk::ImageRegistrationMethod::m_LastTransformParameters
ParametersType m_LastTransformParameters
Definition: itkImageRegistrationMethod.h:240
itkSingleValuedNonLinearOptimizer.h
itk::ImageRegistrationMethod::m_Interpolator
InterpolatorPointer m_Interpolator
Definition: itkImageRegistrationMethod.h:237
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301
itk::ImageRegistrationMethod::m_FixedImageRegion
FixedImageRegionType m_FixedImageRegion
Definition: itkImageRegistrationMethod.h:243
itk::InterpolateImageFunction
Base class for all image interpolators.
Definition: itkInterpolateImageFunction.h:45
itk::ImageToImageMetric::FixedImageRegionType
typename FixedImageType::RegionType FixedImageRegionType
Definition: itkImageToImageMetric.h:78