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 
87  typedef typename FixedImageType::ConstPointer FixedImagePointer;
88  typedef typename MovingImageType::ConstPointer MovingImagePointer;
89 
91  typedef ImageMomentsCalculator< FixedImageType > FixedImageCalculatorType;
92  typedef ImageMomentsCalculator< MovingImageType > MovingImageCalculatorType;
93 
94  typedef typename FixedImageCalculatorType::Pointer FixedImageCalculatorPointer;
95  typedef typename MovingImageCalculatorType::Pointer MovingImageCalculatorPointer;
96 
98  typedef typename TransformType::InputPointType InputPointType;
99 
101  typedef typename TransformType::OutputVectorType OutputVectorType;
102 
104  itkSetObjectMacro( Transform, TransformType );
105 
107  itkSetConstObjectMacro( FixedImage, FixedImageType );
108 
110  itkSetConstObjectMacro( MovingImage, MovingImageType );
111 
113  virtual void InitializeTransform() const;
114 
117  void GeometryOn() { m_UseMoments = false; }
118  void MomentsOn() { m_UseMoments = true; }
119 
121  itkGetConstObjectMacro( FixedCalculator, FixedImageCalculatorType );
122  itkGetConstObjectMacro( MovingCalculator, MovingImageCalculatorType );
123 
124 protected:
127 
128  void PrintSelf(std::ostream &os, Indent indent) const;
129 
130 private:
131  TranslationTransformInitializer(const Self&); //purposely not implemented
132  void operator=(const Self&); //purposely not implemented
133 
135 
137 
139 
141 
144 
145 }; //class TranslationTransformInitializer
146 
147 
148 } // namespace itk
149 
150 
151 #ifndef ITK_MANUAL_INSTANTIATION
152 #include "itkTranslationTransformInitializer.hxx"
153 #endif
154 
155 #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...
FixedImageCalculatorType::Pointer FixedImageCalculatorPointer


Generated on 05-12-2013 for elastix by doxygen 1.8.5 elastix logo