ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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;
80 using TransformPointer = typename TransformType::Pointer;
81
85
87 using FixedImageType = TFixedImage;
88 using MovingImageType = TMovingImage;
89
90 using FixedImagePointer = typename FixedImageType::ConstPointer;
91 using MovingImagePointer = typename MovingImageType::ConstPointer;
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 }
134
135
137 itkGetModifiableObjectMacro(FixedCalculator, FixedImageCalculatorType);
138 itkGetModifiableObjectMacro(MovingCalculator, MovingImageCalculatorType);
140
141protected:
143 ~CenteredTransformInitializer() override = default;
144
145 void
146 PrintSelf(std::ostream & os, Indent indent) const override;
147
148 itkGetModifiableObjectMacro(Transform, TransformType);
149
150private:
152
154
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 */
typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer
ImageMomentsCalculator< FixedImageType > FixedImageCalculatorType
ImageMomentsCalculator< MovingImageType > MovingImageCalculatorType
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
Implements transparent reference counting.
Transform points and vectors from an input space to an output space.
static constexpr unsigned int InputSpaceDimension
static constexpr unsigned int OutputSpaceDimension
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....