Slicer 4.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 "itkImage.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   // Local Typedefs
00064   //
00065   typedef Point<double, itkGetStaticConstMacro(ImageDimension)>
00066   LandmarkPointType;
00067   typedef std::vector<LandmarkPointType> LandmarkPointContainer;
00068 
00069   //
00070   // Custom Methods
00071   //
00072 
00079   TransformType * GetTypedTransform( void );
00080 
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 
00101   void SetMovingLandmarks( const LandmarkPointContainer& movingLandmarks );
00102 
00103 protected:
00104 
00105   InitialImageToImageRegistrationMethod( void );
00106   virtual ~InitialImageToImageRegistrationMethod( void );
00107 
00108   void PrintSelf( std::ostream & os, Indent indent ) const;
00109 
00110   //
00111   //  Methods from Superclass. Only the GenerateData() method should be
00112   //  overloaded. The Update() method must not be overloaded.
00113   //
00114   void    GenerateData();
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 #endif // __ImageToImageRegistrationMethod_h
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines