go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkCenteredTransformInitializer2.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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/*=========================================================================
19
20 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkCenteredTransformInitializer2.h,v $
22 Date: $Date: 2010-07-04 10:30:49 $
23 Version: $Revision: 1.11 $
24
25 Copyright (c) Insight Software Consortium. All rights reserved.
26 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
27
28 This software is distributed WITHOUT ANY WARRANTY; without even
29 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
30 PURPOSE. See the above copyright notices for more information.
31
32=========================================================================*/
33#ifndef itkCenteredTransformInitializer2_h
34#define itkCenteredTransformInitializer2_h
35
36#include "itkObject.h"
37#include "itkObjectFactory.h"
38#include "itkSpatialObject.h"
40
41#include <iostream>
42
43namespace itk
44{
45
90template <class TTransform, class TFixedImage, class TMovingImage>
91class ITK_TEMPLATE_EXPORT CenteredTransformInitializer2 : public Object
92{
93public:
95
98 using Superclass = Object;
99 using Pointer = SmartPointer<Self>;
100 using ConstPointer = SmartPointer<const Self>;
101
103 itkNewMacro(Self);
104
106 itkTypeMacro(CenteredTransformInitializer2, Object);
107
109 using TransformType = TTransform;
110 using TransformPointer = typename TransformType::Pointer;
111
113 itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
114 itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
115
117 using FixedImageType = TFixedImage;
118 using MovingImageType = TMovingImage;
119
120 using FixedImagePointer = typename FixedImageType::ConstPointer;
121 using MovingImagePointer = typename MovingImageType::ConstPointer;
122
125 using FixedImageMaskPointer = typename FixedImageMaskType::ConstPointer;
126 using MovingImageMaskPointer = typename MovingImageMaskType::ConstPointer;
127
131
134
136 using OffsetType = typename TransformType::OffsetType;
137
139 using InputPointType = typename TransformType::InputPointType;
140
142 using OutputVectorType = typename TransformType::OutputVectorType;
143
144 using InputPixelType = typename FixedImageType::PixelType;
145
147 itkSetObjectMacro(Transform, TransformType);
148
150 itkSetConstObjectMacro(FixedImage, FixedImageType);
151
153 itkSetConstObjectMacro(MovingImage, MovingImageType);
154
156 itkSetConstObjectMacro(FixedImageMask, FixedImageMaskType);
157 itkSetConstObjectMacro(MovingImageMask, MovingImageMaskType);
158
160 itkSetMacro(NumberOfSamplesForCenteredTransformInitialization, SizeValueType);
161 itkSetMacro(LowerThresholdForCenterGravity, InputPixelType);
162 itkSetMacro(CenterOfGravityUsesLowerThreshold, bool);
163
165 virtual void
167
170 void
172 {
173 m_UseMoments = false;
174 m_UseOrigins = false;
175 m_UseTop = false;
176 }
177 void
179 {
180 m_UseMoments = true;
181 m_UseOrigins = false;
182 m_UseTop = false;
183 }
184 void
186 {
187 m_UseMoments = false;
188 m_UseOrigins = true;
189 m_UseTop = false;
190 }
191 void
193 {
194 m_UseMoments = false;
195 m_UseOrigins = false;
196 m_UseTop = true;
197 }
198
200 itkGetConstObjectMacro(FixedCalculator, FixedImageCalculatorType);
201 itkGetConstObjectMacro(MovingCalculator, MovingImageCalculatorType);
202
203protected:
205 ~CenteredTransformInitializer2() override = default;
206
207 void
208 PrintSelf(std::ostream & os, Indent indent) const override;
209
211
216
217private:
219
224
228
231};
232
233} // namespace itk
234
235#ifndef ITK_MANUAL_INSTANTIATION
236# include "itkCenteredTransformInitializer2.hxx"
237#endif
238
239#endif /* itkCenteredTransformInitializer2_h */
Compute moments of an n-dimensional image.
CenteredTransformInitializer2 is a helper class intended to initialize the center of rotation and the...
itkGetModifiableObjectMacro(Transform, TransformType)
typename TransformType::OffsetType OffsetType
typename FixedImageType::PixelType InputPixelType
void PrintSelf(std::ostream &os, Indent indent) const override
typename TransformType::InputPointType InputPointType
itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension)
typename TransformType::OutputVectorType OutputVectorType
typename MovingImageMaskType::ConstPointer MovingImageMaskPointer
typename MovingImageType::ConstPointer MovingImagePointer
typename FixedImageType::ConstPointer FixedImagePointer
typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer
ITK_DISALLOW_COPY_AND_MOVE(CenteredTransformInitializer2)
typename FixedImageMaskType::ConstPointer FixedImageMaskPointer
typename TransformType::Pointer TransformPointer
~CenteredTransformInitializer2() override=default
typename MovingImageCalculatorType::Pointer MovingImageCalculatorPointer
itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension)


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo