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:
64  typedef Object Superclass;
65  typedef SmartPointer<Self> Pointer;
66  typedef SmartPointer<const Self> ConstPointer;
67 
69  itkNewMacro( Self );
70 
72  itkTypeMacro( TranslationTransformInitializer, Object );
73 
75  typedef TTransform TransformType;
76  typedef typename TransformType::Pointer TransformPointer;
77 
79  itkStaticConstMacro(SpaceDimension, unsigned int, TransformType::SpaceDimension);
80  itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
81  itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
82 
84  typedef TFixedImage FixedImageType;
85  typedef TMovingImage MovingImageType;
86  typedef typename FixedImageType::ConstPointer FixedImagePointer;
87  typedef typename MovingImageType::ConstPointer MovingImagePointer;
88  typedef Image< unsigned char, InputSpaceDimension > FixedMaskType;
89  typedef Image< unsigned char, OutputSpaceDimension > MovingMaskType;
90  typedef typename FixedMaskType::ConstPointer FixedMaskPointer;
91  typedef typename MovingMaskType::ConstPointer MovingMaskPointer;
92 
94  typedef ImageMomentsCalculator< FixedImageType > FixedImageCalculatorType;
95  typedef ImageMomentsCalculator< MovingImageType > MovingImageCalculatorType;
96 
97  typedef typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer;
98  typedef typename MovingImageCalculatorType::Pointer MovingImageCalculatorPointer;
99 
101  typedef typename TransformType::InputPointType InputPointType;
102 
104  typedef typename TransformType::OutputVectorType OutputVectorType;
105 
107  itkSetObjectMacro( Transform, TransformType );
108 
110  itkSetConstObjectMacro( FixedImage, FixedImageType );
111 
113  itkSetConstObjectMacro( MovingImage, MovingImageType );
114 
116  itkSetConstObjectMacro( FixedMask, FixedMaskType );
117 
119  itkSetConstObjectMacro( MovingMask, MovingMaskType );
120 
122  virtual void InitializeTransform() const;
123 
126  void GeometryOn() { m_UseMoments = false; }
127  void MomentsOn() { m_UseMoments = true; }
128 
130  itkGetConstObjectMacro( FixedCalculator, FixedImageCalculatorType );
131  itkGetConstObjectMacro( MovingCalculator, MovingImageCalculatorType );
132 
133 protected:
136 
137  void PrintSelf(std::ostream &os, Indent indent) const;
138 
139 private:
140  TranslationTransformInitializer(const Self&); //purposely not implemented
141  void operator=(const Self&); //purposely not implemented
142 
149 
152 
153 }; //class TranslationTransformInitializer
154 
155 
156 } // namespace itk
157 
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkTranslationTransformInitializer.hxx"
161 #endif
162 
163 #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 05-01-2014 for elastix by doxygen 1.8.5 elastix logo