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: 2006/03/19 23:22:26 $
00007   Version:   $Revision: 1.9 $
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 
00060 template < class TTransform,
00061            class TFixedImage,
00062            class TMovingImage > 
00063 class ITK_EXPORT CenteredTransformInitializer : 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, 
00084                       TransformType::SpaceDimension);
00085   itkStaticConstMacro(InputSpaceDimension, unsigned int, 
00086                       TransformType::InputSpaceDimension);
00087   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 
00088                       TransformType::OutputSpaceDimension);
00090 
00092   typedef   TFixedImage              FixedImageType;
00093   typedef   TMovingImage             MovingImageType;
00094 
00095   typedef   typename FixedImageType::ConstPointer   FixedImagePointer;
00096   typedef   typename MovingImageType::ConstPointer  MovingImagePointer;
00097 
00099   typedef ImageMomentsCalculator< FixedImageType >   FixedImageCalculatorType;
00100   typedef ImageMomentsCalculator< MovingImageType >  MovingImageCalculatorType;
00101 
00102   typedef typename FixedImageCalculatorType::Pointer
00103                                                  FixedImageCalculatorPointer;
00104   typedef typename MovingImageCalculatorType::Pointer 
00105                                                  MovingImageCalculatorPointer;
00106 
00107 
00109   typedef typename TransformType::OffsetType  OffsetType;
00110 
00112   typedef typename TransformType::InputPointType   InputPointType;
00113 
00115   typedef typename TransformType::OutputVectorType  OutputVectorType;
00116 
00118   itkSetObjectMacro( Transform,   TransformType   );
00119 
00121   itkSetConstObjectMacro( FixedImage,  FixedImageType  );
00122 
00124   itkSetConstObjectMacro( MovingImage, MovingImageType );
00125 
00126 
00128   virtual void InitializeTransform() const;
00129 
00132   void GeometryOn() { m_UseMoments = false; }
00133   void MomentsOn()  { m_UseMoments = true; }
00135 
00137   itkGetConstObjectMacro( FixedCalculator,  FixedImageCalculatorType  );
00138   itkGetConstObjectMacro( MovingCalculator, MovingImageCalculatorType );
00140 
00141 protected:
00142   CenteredTransformInitializer();
00143   ~CenteredTransformInitializer(){};
00144 
00145   void PrintSelf(std::ostream &os, Indent indent) const;
00146 
00147 private:
00148   CenteredTransformInitializer(const Self&); //purposely not implemented
00149   void operator=(const Self&); //purposely not implemented
00150 
00151   TransformPointer    m_Transform;
00152 
00153   FixedImagePointer   m_FixedImage;
00154 
00155   MovingImagePointer  m_MovingImage;
00156 
00157   bool                m_UseMoments;
00158 
00159   FixedImageCalculatorPointer    m_FixedCalculator;
00160   MovingImageCalculatorPointer   m_MovingCalculator;
00161 
00162 }; //class CenteredTransformInitializer
00163 
00164 
00165 }  // namespace itk
00166 
00167 
00168 #ifndef ITK_MANUAL_INSTANTIATION
00169 #include "itkCenteredTransformInitializer.txx"
00170 #endif
00171 
00172 #endif /* __itkCenteredTransformInitializer_h */
00173 

Generated at Sun Mar 11 23:45:02 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000