ITK  5.3.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  * 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 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 
100 
102  using FixedImageType = TFixedImage;
103  using FixedImageConstPointer = typename FixedImageType::ConstPointer;
104 
106  using MovingSpatialObjectType = TMovingSpatialObject;
107  using MovingSpatialObjectConstPointer = typename MovingSpatialObjectType::ConstPointer;
108 
112 
115  using TransformPointer = typename TransformType::Pointer;
116 
122 
125  using InterpolatorPointer = typename InterpolatorType::Pointer;
126 
129 
133 
136 
138  itkSetConstObjectMacro(FixedImage, FixedImageType);
139  itkGetConstObjectMacro(FixedImage, FixedImageType);
141 
143  itkSetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
144  itkGetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
146 
148  itkSetObjectMacro(Optimizer, OptimizerType);
149  itkGetModifiableObjectMacro(Optimizer, OptimizerType);
151 
153  itkSetObjectMacro(Metric, MetricType);
154  itkGetModifiableObjectMacro(Metric, MetricType);
156 
158  itkSetObjectMacro(Transform, TransformType);
159  itkGetModifiableObjectMacro(Transform, TransformType);
161 
163  itkSetObjectMacro(Interpolator, InterpolatorType);
164  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
166 
168  itkSetMacro(InitialTransformParameters, ParametersType);
169  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
171 
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 
209 
210 private:
213 
216 
219 };
220 } // end namespace itk
221 
222 #ifndef ITK_MANUAL_INSTANTIATION
223 # include "itkImageToSpatialObjectRegistrationMethod.hxx"
224 #endif
225 
226 #endif
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
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::ImageToSpatialObjectRegistrationMethod::m_InitialTransformParameters
ParametersType m_InitialTransformParameters
Definition: itkImageToSpatialObjectRegistrationMethod.h:207
itk::Optimizer
Generic representation for an optimization method.
Definition: itkOptimizer.h:38
itkImage.h
itk::ImageToSpatialObjectRegistrationMethod::m_Metric
MetricPointer m_Metric
Definition: itkImageToSpatialObjectRegistrationMethod.h:211
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::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::m_LastTransformParameters
ParametersType m_LastTransformParameters
Definition: itkImageToSpatialObjectRegistrationMethod.h:208
itk::ImageToSpatialObjectRegistrationMethod::TransformType
typename MetricType::TransformType TransformType
Definition: itkImageToSpatialObjectRegistrationMethod.h:114
itk::LinearInterpolateImageFunction
Linearly interpolate an image at specified positions.
Definition: itkLinearInterpolateImageFunction.h:50
itk::ImageToSpatialObjectRegistrationMethod::TransformOutputConstPointer
typename TransformOutputType::ConstPointer TransformOutputConstPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:121
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
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::m_MovingSpatialObject
MovingSpatialObjectConstPointer m_MovingSpatialObject
Definition: itkImageToSpatialObjectRegistrationMethod.h:214
itk::ImageToSpatialObjectRegistrationMethod::ParametersType
typename MetricType::TransformParametersType ParametersType
Definition: itkImageToSpatialObjectRegistrationMethod.h:132
itk::ImageToSpatialObjectRegistrationMethod::m_Transform
TransformPointer m_Transform
Definition: itkImageToSpatialObjectRegistrationMethod.h:217
itk::ImageToSpatialObjectRegistrationMethod::MetricPointer
typename MetricType::Pointer MetricPointer
Definition: itkImageToSpatialObjectRegistrationMethod.h:111
itk::ImageToSpatialObjectRegistrationMethod::m_FixedImage
FixedImageConstPointer m_FixedImage
Definition: itkImageToSpatialObjectRegistrationMethod.h:215
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ImageToSpatialObjectRegistrationMethod::m_Interpolator
InterpolatorPointer m_Interpolator
Definition: itkImageToSpatialObjectRegistrationMethod.h:218
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::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
itk::ImageToSpatialObjectRegistrationMethod::m_Optimizer
OptimizerType::Pointer m_Optimizer
Definition: itkImageToSpatialObjectRegistrationMethod.h:212