ITK  4.9.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 >
64 {
65 public:
68  typedef Object Superclass;
71 
73  itkNewMacro(Self);
74 
77 
79  typedef TTransform TransformType;
81 
83  itkStaticConstMacro(InputSpaceDimension, unsigned int,
84  TransformType::InputSpaceDimension);
85  itkStaticConstMacro(OutputSpaceDimension, unsigned int,
86  TransformType::OutputSpaceDimension);
88 
90  typedef TFixedImage FixedImageType;
91  typedef TMovingImage MovingImageType;
92 
93  typedef typename FixedImageType::ConstPointer FixedImagePointer;
94  typedef typename MovingImageType::ConstPointer MovingImagePointer;
95 
99 
100  typedef typename FixedImageCalculatorType::Pointer
102  typedef typename MovingImageCalculatorType::Pointer
104 
107 
110 
113 
115  itkSetObjectMacro(Transform, TransformType);
116 
118  itkSetConstObjectMacro(FixedImage, FixedImageType);
119 
121  itkSetConstObjectMacro(MovingImage, MovingImageType);
122 
124  virtual void InitializeTransform();
125 
128  void GeometryOn() { m_UseMoments = false; }
129  void MomentsOn() { m_UseMoments = true; }
131 
133  itkGetModifiableObjectMacro(FixedCalculator, FixedImageCalculatorType);
134  itkGetModifiableObjectMacro(MovingCalculator, MovingImageCalculatorType);
136 
137 protected:
140 
141  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
142 
143  itkGetModifiableObjectMacro(Transform, TransformType);
144 
145 private:
146  CenteredTransformInitializer(const Self &) ITK_DELETE_FUNCTION;
147  void operator=(const Self &) ITK_DELETE_FUNCTION;
148 
150 
152 
154 
156 
159 }; //class CenteredTransformInitializer
160 } // namespace itk
161 
162 #ifndef ITK_MANUAL_INSTANTIATION
163 #include "itkCenteredTransformInitializer.hxx"
164 #endif
165 
166 #endif /* itkCenteredTransformInitializer_h */
Superclass::InputPointType InputPointType
MovingImageType::ConstPointer MovingImagePointer
Light weight base class for most itk classes.
VersorRigid3DTransform of a vector space (e.g. space coordinates)
FixedImageCalculatorType::Pointer FixedImageCalculatorPointer
ImageMomentsCalculator< MovingImageType > MovingImageCalculatorType
Superclass::OutputVectorType OutputVectorType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
TransformType::OutputVectorType OutputVectorType
ImageMomentsCalculator< FixedImageType > FixedImageCalculatorType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Compute moments of an n-dimensional image.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
MovingImageCalculatorType::Pointer MovingImageCalculatorPointer
Base class for most ITK classes.
Definition: itkObject.h:57
CenteredTransformInitializer is a helper class intended to initialize the center of rotation and the ...