go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkTranslationTransformInitializer.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkTranslationTransformInitializer_h
16 #define __itkTranslationTransformInitializer_h
17 
18 #include "itkObject.h"
19 #include "itkObjectFactory.h"
20 #include "itkImageMomentsCalculator.h"
21 
22 #include <iostream>
23 
24 namespace itk
25 {
26 
56 template< class TTransform,
57 class TFixedImage,
58 class TMovingImage >
59 class TranslationTransformInitializer : public Object
60 {
61 public:
62 
65  typedef Object Superclass;
66  typedef SmartPointer< Self > Pointer;
67  typedef SmartPointer< const Self > ConstPointer;
68 
70  itkNewMacro( Self );
71 
73  itkTypeMacro( TranslationTransformInitializer, Object );
74 
76  typedef TTransform TransformType;
77  typedef typename TransformType::Pointer TransformPointer;
78 
80  itkStaticConstMacro( SpaceDimension, unsigned int, TransformType::SpaceDimension );
81  itkStaticConstMacro( InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension );
82  itkStaticConstMacro( OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension );
83 
85  typedef TFixedImage FixedImageType;
86  typedef TMovingImage MovingImageType;
87  typedef typename FixedImageType::ConstPointer FixedImagePointer;
88  typedef typename MovingImageType::ConstPointer MovingImagePointer;
89  typedef Image< unsigned char, InputSpaceDimension > FixedMaskType;
90  typedef Image< unsigned char, OutputSpaceDimension > MovingMaskType;
91  typedef typename FixedMaskType::ConstPointer FixedMaskPointer;
92  typedef typename MovingMaskType::ConstPointer MovingMaskPointer;
93 
95  typedef ImageMomentsCalculator< FixedImageType > FixedImageCalculatorType;
96  typedef ImageMomentsCalculator< MovingImageType > MovingImageCalculatorType;
97 
98  typedef typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer;
99  typedef typename MovingImageCalculatorType::Pointer MovingImageCalculatorPointer;
100 
102  typedef typename TransformType::InputPointType InputPointType;
103 
105  typedef typename TransformType::OutputVectorType OutputVectorType;
106 
108  itkSetObjectMacro( Transform, TransformType );
109 
111  itkSetConstObjectMacro( FixedImage, FixedImageType );
112 
114  itkSetConstObjectMacro( MovingImage, MovingImageType );
115 
117  itkSetConstObjectMacro( FixedMask, FixedMaskType );
118 
120  itkSetConstObjectMacro( MovingMask, MovingMaskType );
121 
123  virtual void InitializeTransform() const;
124 
127  void GeometryOn() { m_UseMoments = false; }
128  void MomentsOn() { m_UseMoments = true; }
129 
131  itkGetConstObjectMacro( FixedCalculator, FixedImageCalculatorType );
132  itkGetConstObjectMacro( MovingCalculator, MovingImageCalculatorType );
133 
134 protected:
135 
138 
139  void PrintSelf( std::ostream & os, Indent indent ) const;
140 
141 private:
142 
143  TranslationTransformInitializer( const Self & ); // purposely not implemented
144  void operator=( const Self & ); // purposely not implemented
145 
152 
155 
156 };
157 
158 } // namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkTranslationTransformInitializer.hxx"
162 #endif
163 
164 #endif /* __itkTranslationTransformInitializer_h */
ImageMomentsCalculator< FixedImageType > FixedImageCalculatorType
itkStaticConstMacro(SpaceDimension, unsigned int, TransformType::SpaceDimension)
virtual void InitializeTransform() const
MovingImageCalculatorType::Pointer MovingImageCalculatorPointer
ImageMomentsCalculator< MovingImageType > MovingImageCalculatorType
void PrintSelf(std::ostream &os, Indent indent) const
TranslationTransformInitializer is a helper class intended to initialize the translation of a Transla...
Image< unsigned char, OutputSpaceDimension > MovingMaskType
Image< unsigned char, InputSpaceDimension > FixedMaskType
FixedImageCalculatorType::Pointer FixedImageCalculatorPointer


Generated on 27-04-2014 for elastix by doxygen 1.8.6 elastix logo