ITK  5.2.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  * 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, typename TFixedImage, typename TMovingImage>
61 class ITK_TEMPLATE_EXPORT CenteredTransformInitializer : public Object
62 {
63 public:
64  ITK_DISALLOW_COPY_AND_MOVE(CenteredTransformInitializer);
65 
68  using Superclass = Object;
71 
73  itkNewMacro(Self);
74 
76  itkTypeMacro(CenteredTransformInitializer, Object);
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 
90  using FixedImagePointer = typename FixedImageType::ConstPointer;
91  using MovingImagePointer = typename MovingImageType::ConstPointer;
92 
96 
99 
102 
105 
108 
110  itkSetObjectMacro(Transform, TransformType);
111 
113  itkSetConstObjectMacro(FixedImage, FixedImageType);
114 
116  itkSetConstObjectMacro(MovingImage, MovingImageType);
117 
119  virtual void
120  InitializeTransform();
121 
124  void
126  {
127  m_UseMoments = false;
128  }
129  void
131  {
132  m_UseMoments = true;
133  }
135 
137  itkGetModifiableObjectMacro(FixedCalculator, FixedImageCalculatorType);
138  itkGetModifiableObjectMacro(MovingCalculator, MovingImageCalculatorType);
140 
141 protected:
143  ~CenteredTransformInitializer() override = default;
144 
145  void
146  PrintSelf(std::ostream & os, Indent indent) const override;
147 
148  itkGetModifiableObjectMacro(Transform, TransformType);
149 
150 private:
152 
154 
156 
158 
161 }; // class CenteredTransformInitializer
162 } // namespace itk
163 
164 #ifndef ITK_MANUAL_INSTANTIATION
165 # include "itkCenteredTransformInitializer.hxx"
166 #endif
167 
168 #endif /* itkCenteredTransformInitializer_h */
itkObjectFactory.h
itk::CenteredTransformInitializer::m_MovingImage
MovingImagePointer m_MovingImage
Definition: itkCenteredTransformInitializer.h:155
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::MovingImageType
TMovingImage MovingImageType
Definition: itkCenteredTransformInitializer.h:88
itk::CenteredTransformInitializer::m_FixedCalculator
FixedImageCalculatorPointer m_FixedCalculator
Definition: itkCenteredTransformInitializer.h:159
itk::VersorRigid3DTransform
VersorRigid3DTransform of a vector space (e.g. space coordinates)
Definition: itkVersorRigid3DTransform.h:46
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::InputPointType
typename TransformType::InputPointType InputPointType
Definition: itkCenteredTransformInitializer.h:104
itk::CenteredTransformInitializer::m_UseMoments
bool m_UseMoments
Definition: itkCenteredTransformInitializer.h:157
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::OffsetType
typename TransformType::OffsetType OffsetType
Definition: itkCenteredTransformInitializer.h:101
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::CenteredTransformInitializer::m_Transform
TransformPointer m_Transform
Definition: itkCenteredTransformInitializer.h:148
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::OutputVectorType
typename TransformType::OutputVectorType OutputVectorType
Definition: itkCenteredTransformInitializer.h:107
itkImageMomentsCalculator.h
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::TransformPointer
typename TransformType::Pointer TransformPointer
Definition: itkCenteredTransformInitializer.h:80
itk::CenteredTransformInitializer::GeometryOn
void GeometryOn()
Definition: itkCenteredTransformInitializer.h:125
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::FixedImageType
TFixedImage FixedImageType
Definition: itkCenteredTransformInitializer.h:87
itkObject.h
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::FixedImageCalculatorPointer
typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer
Definition: itkCenteredTransformInitializer.h:97
itk::CenteredTransformInitializer::MomentsOn
void MomentsOn()
Definition: itkCenteredTransformInitializer.h:130
itk::VersorRigid3DTransform::InputPointType
typename Superclass::InputPointType InputPointType
Definition: itkVersorRigid3DTransform.h:76
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::FixedImagePointer
typename FixedImageType::ConstPointer FixedImagePointer
Definition: itkCenteredTransformInitializer.h:90
itk::ImageMomentsCalculator
Compute moments of an n-dimensional image.
Definition: itkImageMomentsCalculator.h:60
itk::CenteredTransformInitializer::m_MovingCalculator
MovingImageCalculatorPointer m_MovingCalculator
Definition: itkCenteredTransformInitializer.h:160
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::MovingImagePointer
typename MovingImageType::ConstPointer MovingImagePointer
Definition: itkCenteredTransformInitializer.h:91
itk::CenteredTransformInitializer::m_FixedImage
FixedImagePointer m_FixedImage
Definition: itkCenteredTransformInitializer.h:153
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::Transform
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
itk::VersorRigid3DTransform::OutputVectorType
typename Superclass::OutputVectorType OutputVectorType
Definition: itkVersorRigid3DTransform.h:79
itk::CenteredTransformInitializer< VersorRigid3DTransform< double >, TFixedImage, TMovingImage >::MovingImageCalculatorPointer
typename MovingImageCalculatorType::Pointer MovingImageCalculatorPointer
Definition: itkCenteredTransformInitializer.h:98
itk::CenteredTransformInitializer
CenteredTransformInitializer is a helper class intended to initialize the center of rotation and the ...
Definition: itkCenteredTransformInitializer.h:61
itk::VersorRigid3DTransform::OffsetType
typename Superclass::OffsetType OffsetType
Definition: itkVersorRigid3DTransform.h:87