itkInitialImageToImageRegistrationMethod.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: RigidRegistrator.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/11/06 14:39:34 $
00007   Version:   $Revision: 1.15 $
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 __InitialImageToImageRegistrationMethod_h
00019 #define __InitialImageToImageRegistrationMethod_h
00020 
00021 #include "itkOrientedImage.h"
00022 #include "itkCommand.h"
00023 
00024 #include "itkImageToImageRegistrationMethod.h"
00025 
00026 #include "itkAffineTransform.h"
00027 
00028 #include "itkAnisotropicSimilarity3DTransform.h"
00029 #include "itkAnisotropicSimilarityLandmarkBasedTransformInitializer.h"
00030 
00031 namespace itk
00032 {
00033 
00034 template< class TImage >
00035 class InitialImageToImageRegistrationMethod 
00036 : public ImageToImageRegistrationMethod< TImage >
00037   {
00038 
00039   public:
00040 
00041     typedef InitialImageToImageRegistrationMethod     Self;
00042     typedef ImageToImageRegistrationMethod< TImage >  Superclass;
00043     typedef SmartPointer< Self >                      Pointer;
00044     typedef SmartPointer< const Self >                ConstPointer;
00045 
00046     itkTypeMacro( InitialImageToImageRegistrationMethod,
00047                   ImageToImageRegistrationMethod );
00048 
00049     itkNewMacro( Self );
00050 
00051     //
00052     // Typedefs from Superclass
00053     //
00054     itkStaticConstMacro( ImageDimension, unsigned int,
00055                          TImage::ImageDimension );
00056     
00057     typedef AffineTransform< double, itkGetStaticConstMacro( ImageDimension ) >
00058                                                       TransformType;
00059 
00060     typedef typename TransformType::Pointer           TransformPointer;
00061 
00062 
00063     //
00064     // Local Typedefs
00065     //
00066     typedef Point< double, itkGetStaticConstMacro(ImageDimension) >
00067                                                 LandmarkPointType;
00068     typedef std::vector< LandmarkPointType >    LandmarkPointContainer;
00069     
00070     //
00071     // Custom Methods
00072     //
00073 
00080     TransformType * GetTypedTransform( void );
00081     const TransformType * GetTypedTransform( void ) const;
00082 
00088     TransformPointer GetAffineTransform( void ) const;
00089 
00090     itkSetMacro( NumberOfMoments, unsigned int );
00091     itkGetConstMacro( NumberOfMoments, unsigned int );
00092 
00093     itkSetMacro( ComputeCenterOfRotationOnly, bool );
00094     itkGetConstMacro( ComputeCenterOfRotationOnly, bool );
00095 
00096     itkSetMacro( UseLandmarks, bool );
00097     itkGetConstMacro( UseLandmarks, bool );
00098     
00099     void SetFixedLandmarks ( const LandmarkPointContainer& fixedLandmarks );
00100     void SetMovingLandmarks ( const LandmarkPointContainer& movingLandmarks );
00101 
00102   protected:
00103 
00104     InitialImageToImageRegistrationMethod( void );
00105     virtual ~InitialImageToImageRegistrationMethod( void );
00106 
00107     void PrintSelf( std::ostream & os, Indent indent ) const;
00108 
00109     //
00110     //  Methods from Superclass. Only the GenerateData() method should be
00111     //  overloaded. The Update() method must not be overloaded.
00112     //
00113     void    GenerateData();
00114 
00115    
00116   private:
00117 
00118     InitialImageToImageRegistrationMethod( const Self & );  // Purposely not implemented
00119     void operator = ( const Self & );                       // Purposely not implemented
00120 
00121     unsigned int            m_NumberOfMoments;
00122     bool                    m_ComputeCenterOfRotationOnly;
00123     bool                    m_UseLandmarks;
00124     LandmarkPointContainer  m_FixedLandmarks;
00125     LandmarkPointContainer  m_MovingLandmarks;
00126   };
00127 
00128 } // end namespace itk
00129 
00130 #ifndef ITK_MANUAL_INSTANTIATION
00131 #include "itkInitialImageToImageRegistrationMethod.txx"
00132 #endif
00133 
00134 
00135 #endif //__ImageToImageRegistrationMethod_h
00136 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1