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.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 
00015 #ifndef __itkTranslationTransformInitializer_h
00016 #define __itkTranslationTransformInitializer_h
00017 
00018 #include "itkObject.h"
00019 #include "itkObjectFactory.h"
00020 #include "itkImageMomentsCalculator.h"
00021 
00022 #include <iostream>
00023 
00024 namespace itk
00025 {
00026 
00056 template < class TTransform,
00057            class TFixedImage,
00058            class TMovingImage >
00059 class TranslationTransformInitializer : public Object
00060 {
00061 public:
00063   typedef TranslationTransformInitializer     Self;
00064   typedef Object                           Superclass;
00065   typedef SmartPointer<Self>               Pointer;
00066   typedef SmartPointer<const Self>         ConstPointer;
00067 
00069   itkNewMacro( Self );
00070 
00072   itkTypeMacro( TranslationTransformInitializer, Object );
00073 
00075   typedef TTransform                        TransformType;
00076   typedef typename TransformType::Pointer   TransformPointer;
00077 
00079   itkStaticConstMacro(SpaceDimension, unsigned int, TransformType::SpaceDimension);
00080   itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
00081   itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
00082 
00084   typedef   TFixedImage              FixedImageType;
00085   typedef   TMovingImage             MovingImageType;
00086 
00087   typedef   typename FixedImageType::ConstPointer   FixedImagePointer;
00088   typedef   typename MovingImageType::ConstPointer  MovingImagePointer;
00089 
00091   typedef ImageMomentsCalculator< FixedImageType >   FixedImageCalculatorType;
00092   typedef ImageMomentsCalculator< MovingImageType >  MovingImageCalculatorType;
00093 
00094   typedef   typename FixedImageCalculatorType::Pointer    FixedImageCalculatorPointer;
00095   typedef   typename MovingImageCalculatorType::Pointer   MovingImageCalculatorPointer;
00096 
00098   typedef typename TransformType::InputPointType   InputPointType;
00099 
00101   typedef typename TransformType::OutputVectorType  OutputVectorType;
00102 
00104   itkSetObjectMacro( Transform,   TransformType   );
00105 
00107   itkSetConstObjectMacro( FixedImage,  FixedImageType  );
00108 
00110   itkSetConstObjectMacro( MovingImage, MovingImageType );
00111 
00113   virtual void InitializeTransform() const;
00114 
00117   void GeometryOn() { m_UseMoments = false; }
00118   void MomentsOn()  { m_UseMoments = true; }
00119 
00121   itkGetConstObjectMacro( FixedCalculator,  FixedImageCalculatorType  );
00122   itkGetConstObjectMacro( MovingCalculator, MovingImageCalculatorType );
00123 
00124 protected:
00125   TranslationTransformInitializer();
00126   ~TranslationTransformInitializer(){};
00127 
00128   void PrintSelf(std::ostream &os, Indent indent) const;
00129 
00130 private:
00131   TranslationTransformInitializer(const Self&); //purposely not implemented
00132   void operator=(const Self&); //purposely not implemented
00133 
00134   TransformPointer    m_Transform;
00135 
00136   FixedImagePointer   m_FixedImage;
00137 
00138   MovingImagePointer  m_MovingImage;
00139 
00140   bool                m_UseMoments;
00141 
00142   FixedImageCalculatorPointer    m_FixedCalculator;
00143   MovingImageCalculatorPointer   m_MovingCalculator;
00144 
00145 }; //class TranslationTransformInitializer
00146 
00147 
00148 }  // namespace itk
00149 
00150 
00151 #ifndef ITK_MANUAL_INSTANTIATION
00152 #include "itkTranslationTransformInitializer.hxx"
00153 #endif
00154 
00155 #endif /* __itkTranslationTransformInitializer_h */


Generated on 24-05-2012 for elastix by doxygen 1.7.6.1 elastix logo