ITK  4.2.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  itkGetConstObjectMacro(FixedCalculator, FixedImageCalculatorType);
134  itkGetConstObjectMacro(MovingCalculator, MovingImageCalculatorType);
135 protected:
139 
140  void PrintSelf(std::ostream & os, Indent indent) const;
141 
142  itkGetObjectMacro(Transform, TransformType);
143 private:
144  CenteredTransformInitializer(const Self &); //purposely not implemented
145  void operator=(const Self &); //purposely not implemented
146 
148 
150 
152 
154 
157 }; //class CenteredTransformInitializer
158 } // namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkCenteredTransformInitializer.hxx"
162 #endif
163 
164 #endif /* __itkCenteredTransformInitializer_h */
165