ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkCenteredTransformInitializer.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 itkCenteredTransformInitializer_h
19 #define itkCenteredTransformInitializer_h
20 
21 #include "itkObject.h"
22 #include "itkObjectFactory.h"
24 
25 #include <iostream>
26 
27 namespace itk
28 {
60 template< typename TTransform,
61  typename TFixedImage,
62  typename TMovingImage >
63 class ITK_TEMPLATE_EXPORT CenteredTransformInitializer:public Object
64 {
65 public:
66  ITK_DISALLOW_COPY_AND_ASSIGN(CenteredTransformInitializer);
67 
70  using Superclass = Object;
73 
75  itkNewMacro(Self);
76 
78  itkTypeMacro(CenteredTransformInitializer, Object);
79 
81  using TransformType = TTransform;
83 
85  static constexpr unsigned int InputSpaceDimension = TransformType::InputSpaceDimension;
86  static constexpr unsigned int OutputSpaceDimension = TransformType::OutputSpaceDimension;
87 
89  using FixedImageType = TFixedImage;
90  using MovingImageType = TMovingImage;
91 
92  using FixedImagePointer = typename FixedImageType::ConstPointer;
93  using MovingImagePointer = typename MovingImageType::ConstPointer;
94 
98 
101 
104 
107 
110 
112  itkSetObjectMacro(Transform, TransformType);
113 
115  itkSetConstObjectMacro(FixedImage, FixedImageType);
116 
118  itkSetConstObjectMacro(MovingImage, MovingImageType);
119 
121  virtual void InitializeTransform();
122 
125  void GeometryOn() { m_UseMoments = false; }
126  void MomentsOn() { m_UseMoments = true; }
128 
130  itkGetModifiableObjectMacro(FixedCalculator, FixedImageCalculatorType);
131  itkGetModifiableObjectMacro(MovingCalculator, MovingImageCalculatorType);
133 
134 protected:
136  ~CenteredTransformInitializer() override = default;
137 
138  void PrintSelf(std::ostream & os, Indent indent) const override;
139 
140  itkGetModifiableObjectMacro(Transform, TransformType);
141 
142 private:
144 
146 
148 
150 
153 }; //class CenteredTransformInitializer
154 } // namespace itk
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 #include "itkCenteredTransformInitializer.hxx"
158 #endif
159 
160 #endif /* itkCenteredTransformInitializer_h */
Light weight base class for most itk classes.
VersorRigid3DTransform of a vector space (e.g. space coordinates)
typename Superclass::OutputVectorType OutputVectorType
typename Superclass::OffsetType OffsetType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
Compute moments of an n-dimensional image.
typename Superclass::InputPointType InputPointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
CenteredTransformInitializer is a helper class intended to initialize the center of rotation and the ...