ITK  5.4.0
Insight Toolkit
itkImageToSpatialObjectRegistrationMethod.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  * https://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 itkImageToSpatialObjectRegistrationMethod_h
19 #define itkImageToSpatialObjectRegistrationMethod_h
20 
21 #include "itkProcessObject.h"
22 #include "itkImage.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace itk
28 {
83 template <typename TFixedImage, typename TMovingSpatialObject>
84 class ITK_TEMPLATE_EXPORT ImageToSpatialObjectRegistrationMethod : public ProcessObject
85 {
86 public:
87  ITK_DISALLOW_COPY_AND_MOVE(ImageToSpatialObjectRegistrationMethod);
88 
94 
96  itkNewMacro(Self);
97 
99  itkOverrideGetNameOfClassMacro(ImageToSpatialObjectRegistrationMethod);
100 
102  using FixedImageType = TFixedImage;
104 
106  using MovingSpatialObjectType = TMovingSpatialObject;
108 
112 
116 
122 
126 
129 
133 
136 
138  itkSetConstObjectMacro(FixedImage, FixedImageType);
139  itkGetConstObjectMacro(FixedImage, FixedImageType);
143  itkSetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
144  itkGetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
148  itkSetObjectMacro(Optimizer, OptimizerType);
149  itkGetModifiableObjectMacro(Optimizer, OptimizerType);
153  itkSetObjectMacro(Metric, MetricType);
154  itkGetModifiableObjectMacro(Metric, MetricType);
158  itkSetObjectMacro(Transform, TransformType);
159  itkGetModifiableObjectMacro(Transform, TransformType);
163  itkSetObjectMacro(Interpolator, InterpolatorType);
164  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
168  itkSetMacro(InitialTransformParameters, ParametersType);
169  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
174  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
175 
177  const TransformOutputType *
178  GetOutput() const;
179 
183  using Superclass::MakeOutput;
185  MakeOutput(DataObjectPointerArraySizeType output) override;
186 
190  GetMTime() const override;
191 
192 protected:
194  ~ImageToSpatialObjectRegistrationMethod() override = default;
195  void
196  PrintSelf(std::ostream & os, Indent indent) const override;
197 
200  void
201  GenerateData() override;
202 
204  void
205  Initialize();
206 
207  ParametersType m_InitialTransformParameters{};
208  ParametersType m_LastTransformParameters{};
209 
210 private:
211  MetricPointer m_Metric{};
212  OptimizerType::Pointer m_Optimizer{};
213 
214  MovingSpatialObjectConstPointer m_MovingSpatialObject{};
215  FixedImageConstPointer m_FixedImage{};
216 
217  TransformPointer m_Transform{};
218  InterpolatorPointer m_Interpolator{};
219 };
220 } // end namespace itk
221 
222 #ifndef ITK_MANUAL_INSTANTIATION
223 # include "itkImageToSpatialObjectRegistrationMethod.hxx"
224 #endif
225 
226 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::ImageToSpatialObjectRegistrationMethod::MovingSpatialObjectConstPointer
typename MovingSpatialObjectType::ConstPointer MovingSpatialObjectConstPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:107
itk::ImageToSpatialObjectRegistrationMethod
Base class for Image Registration Methods.
Definition: itkImageToSpatialObjectRegistrationMethod.h:84
itkImageToSpatialObjectMetric.h
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::SingleValuedNonLinearOptimizer
This class is a base for the Optimization methods that optimize a single valued function.
Definition: itkSingleValuedNonLinearOptimizer.h:35
itk::ImageToSpatialObjectRegistrationMethod::MovingSpatialObjectType
TMovingSpatialObject MovingSpatialObjectType
Definition: itkImageToSpatialObjectRegistrationMethod.h:106
itk::ModifiedTimeType
SizeValueType ModifiedTimeType
Definition: itkIntTypes.h:102
itk::ImageToSpatialObjectRegistrationMethod::InterpolatorType
typename MetricType::InterpolatorType InterpolatorType
Definition: itkImageToSpatialObjectRegistrationMethod.h:124
itk::Optimizer
Generic representation for an optimization method.
Definition: itkOptimizer.h:38
itkImage.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:194
itk::ImageToSpatialObjectRegistrationMethod::FixedImageConstPointer
typename FixedImageType::ConstPointer FixedImageConstPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:103
itk::DataObjectDecorator
Decorates any subclass of itkObject with a DataObject API.
Definition: itkDataObjectDecorator.h:66
itk::ImageToSpatialObjectRegistrationMethod::TransformType
typename MetricType::TransformType TransformType
Definition: itkImageToSpatialObjectRegistrationMethod.h:114
itk::LinearInterpolateImageFunction
Linearly interpolate an image at specified positions.
Definition: itkLinearInterpolateImageFunction.h:51
itk::ImageToSpatialObjectRegistrationMethod::TransformOutputConstPointer
typename TransformOutputType::ConstPointer TransformOutputConstPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:121
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::ImageToSpatialObjectRegistrationMethod::InterpolatorPointer
typename InterpolatorType::Pointer InterpolatorPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:125
itkProcessObject.h
itk::ImageToSpatialObjectRegistrationMethod::TransformPointer
typename TransformType::Pointer TransformPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:115
itkDataObjectDecorator.h
itk::ImageToSpatialObjectRegistrationMethod::FixedImageType
TFixedImage FixedImageType
Definition: itkImageToSpatialObjectRegistrationMethod.h:102
itk::ImageToSpatialObjectRegistrationMethod::ParametersType
typename MetricType::TransformParametersType ParametersType
Definition: itkImageToSpatialObjectRegistrationMethod.h:132
itk::ImageToSpatialObjectRegistrationMethod::MetricPointer
typename MetricType::Pointer MetricPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:111
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:139
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::ImageToSpatialObjectMetric::TransformParametersType
typename TransformType::ParametersType TransformParametersType
Definition: itkImageToSpatialObjectMetric.h:91
itk::Transform
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
itk::ImageToSpatialObjectRegistrationMethod::TransformOutputPointer
typename TransformOutputType::Pointer TransformOutputPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:120
itkSingleValuedNonLinearOptimizer.h
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301
itk::ImageToSpatialObjectMetric
Computes similarity between a moving spatial object and an Image to be registered.
Definition: itkImageToSpatialObjectMetric.h:60