ITK  4.4.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< class TTransform,
61  class TFixedImage,
62  class TMovingImage >
63 class ITK_EXPORT CenteredTransformInitializer:public Object
64 {
65 public:
68  typedef Object Superclass;
71 
73  itkNewMacro(Self);
74 
77 
79  typedef TTransform TransformType;
80  typedef typename TransformType::Pointer TransformPointer;
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  void PrintSelf(std::ostream & os, Indent indent) const;
142 
143  itkGetModifiableObjectMacro(Transform, TransformType);
144 
145 private:
146  CenteredTransformInitializer(const Self &); //purposely not implemented
147  void operator=(const Self &); //purposely not implemented
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 */
167