Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkCenteredTransformInitializer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCenteredTransformInitializer.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/04/26 02:17:29 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkCenteredTransformInitializer_h
00019 #define __itkCenteredTransformInitializer_h
00020 
00021 #include "itkObject.h"
00022 #include "itkObjectFactory.h"
00023 #include "itkImageMomentsCalculator.h"
00024 
00025 #include <iostream>
00026 
00027 namespace itk
00028 {
00029 
00059 template < class TTransform,     
00060            class TFixedImage,
00061            class TMovingImage > 
00062 class ITK_EXPORT CenteredTransformInitializer : 
00063             public Object
00064 {
00065 public:
00067   typedef CenteredTransformInitializer     Self;
00068   typedef Object                           Superclass;
00069   typedef SmartPointer<Self>               Pointer;
00070   typedef SmartPointer<const Self>         ConstPointer;
00071     
00073   itkNewMacro( Self );
00074 
00076   itkTypeMacro( CenteredTransformInitializer, Object );
00077 
00079   typedef TTransform                        TransformType;
00080   typedef typename TransformType::Pointer   TransformPointer;
00081 
00083   itkStaticConstMacro(SpaceDimension, unsigned int, TransformType::SpaceDimension);
00084   itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
00085   itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
00086 
00087   
00089   typedef   TFixedImage              FixedImageType;
00090   typedef   TMovingImage             MovingImageType;
00091 
00092   typedef   typename FixedImageType::ConstPointer   FixedImagePointer;
00093   typedef   typename MovingImageType::ConstPointer  MovingImagePointer;
00094 
00096   typedef ImageMomentsCalculator< FixedImageType >   FixedImageCalculatorType;
00097   typedef ImageMomentsCalculator< MovingImageType >  MovingImageCalculatorType;
00098 
00099   typedef   typename FixedImageCalculatorType::Pointer    FixedImageCalculatorPointer;
00100   typedef   typename MovingImageCalculatorType::Pointer   MovingImageCalculatorPointer;
00101 
00102 
00104   typedef typename TransformType::OffsetType  OffsetType;
00105 
00107   typedef typename TransformType::InputPointType   InputPointType;
00108   
00110   typedef typename TransformType::OutputVectorType  OutputVectorType;
00111   
00113   itkSetObjectMacro( Transform,   TransformType   );
00114 
00116   itkSetConstObjectMacro( FixedImage,  FixedImageType  );
00117 
00119   itkSetConstObjectMacro( MovingImage, MovingImageType );
00120 
00121 
00123   virtual void InitializeTransform() const;
00124 
00127   void GeometryOn() { m_UseMoments = false; }
00128   void MomentsOn()  { m_UseMoments = true; }
00129 
00131   itkGetConstObjectMacro( FixedCalculator,  FixedImageCalculatorType  );
00132   itkGetConstObjectMacro( MovingCalculator, MovingImageCalculatorType );
00133 
00134 protected:
00135   CenteredTransformInitializer();
00136   ~CenteredTransformInitializer(){};
00137 
00138   void PrintSelf(std::ostream &os, Indent indent) const;
00139 
00140 private:
00141   CenteredTransformInitializer(const Self&); //purposely not implemented
00142   void operator=(const Self&); //purposely not implemented
00143 
00144   TransformPointer    m_Transform;
00145 
00146   FixedImagePointer   m_FixedImage;
00147 
00148   MovingImagePointer  m_MovingImage;
00149 
00150   bool                m_UseMoments;
00151 
00152   FixedImageCalculatorPointer    m_FixedCalculator;
00153   MovingImageCalculatorPointer   m_MovingCalculator;
00154 
00155 }; //class CenteredTransformInitializer
00156 
00157 
00158 }  // namespace itk
00159 
00160 
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkCenteredTransformInitializer.txx"
00163 #endif
00164 
00165 #endif /* __itkCenteredTransformInitializer_h */

Generated at Wed May 24 22:55:08 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000