ITK  6.0.0
Insight Toolkit
itkCenteredTransformInitializer.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 itkCenteredTransformInitializer_h
19#define itkCenteredTransformInitializer_h
20
21#include "itkObject.h"
22#include "itkObjectFactory.h"
24
25#include <iostream>
26
27namespace itk
28{
60template <typename TTransform, typename TFixedImage, typename TMovingImage>
61class ITK_TEMPLATE_EXPORT CenteredTransformInitializer : public Object
62{
63public:
64 ITK_DISALLOW_COPY_AND_MOVE(CenteredTransformInitializer);
65
71
73 itkNewMacro(Self);
74
76 itkOverrideGetNameOfClassMacro(CenteredTransformInitializer);
77
79 using TransformType = TTransform;
81
83 static constexpr unsigned int InputSpaceDimension = TransformType::InputSpaceDimension;
84 static constexpr unsigned int OutputSpaceDimension = TransformType::OutputSpaceDimension;
85
87 using FixedImageType = TFixedImage;
88 using MovingImageType = TMovingImage;
89
92
96
99
101 using OffsetType = typename TransformType::OffsetType;
102
104 using InputPointType = typename TransformType::InputPointType;
105
107 using OutputVectorType = typename TransformType::OutputVectorType;
108
110 itkSetObjectMacro(Transform, TransformType);
111
113 itkSetConstObjectMacro(FixedImage, FixedImageType);
114
116 itkSetConstObjectMacro(MovingImage, MovingImageType);
117
119 virtual void
121
124 void
126 {
127 m_UseMoments = false;
128 }
129 void
131 {
132 m_UseMoments = true;
133 }
137 itkGetModifiableObjectMacro(FixedCalculator, FixedImageCalculatorType);
138 itkGetModifiableObjectMacro(MovingCalculator, MovingImageCalculatorType);
141protected:
143 ~CenteredTransformInitializer() override = default;
144
145 void
146 PrintSelf(std::ostream & os, Indent indent) const override;
147
148 itkGetModifiableObjectMacro(Transform, TransformType);
149
150private:
151 TransformPointer m_Transform{};
152
153 FixedImagePointer m_FixedImage{};
154
155 MovingImagePointer m_MovingImage{};
156
157 bool m_UseMoments{ false };
158
161}; // class CenteredTransformInitializer
162} // namespace itk
163
164#ifndef ITK_MANUAL_INSTANTIATION
165# include "itkCenteredTransformInitializer.hxx"
166#endif
167
168#endif /* itkCenteredTransformInitializer_h */
CenteredTransformInitializer is a helper class intended to initialize the center of rotation and the ...
typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer
typename MovingImageType::ConstPointer MovingImagePointer
typename TransformType::OffsetType OffsetType
void PrintSelf(std::ostream &os, Indent indent) const override
typename TransformType::OutputVectorType OutputVectorType
typename TransformType::InputPointType InputPointType
typename MovingImageCalculatorType::Pointer MovingImageCalculatorPointer
typename TransformType::Pointer TransformPointer
~CenteredTransformInitializer() override=default
typename FixedImageType::ConstPointer FixedImagePointer
Compute moments of an n-dimensional image.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:84
SmartPointer< const Self > ConstPointer
static Pointer New()
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....