freCenteredAffineTransformController.h

Go to the documentation of this file.
00001 /*=========================================================================
00002  
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.1.0.0
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile: freCenteredAffineTransformController.h,v $
00007   Language:  C++
00008  
00009  
00010  
00011   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00012   Institute for Medical Biometry and Informatics, University of Heidelberg,
00013   Germany). All rights reserved.
00014   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00015   for details.
00016  
00017      This software is distributed WITHOUT ANY WARRANTY; without even 
00018      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00019      PURPOSE.  See the above copyright notices for more information.
00020  
00021 =========================================================================*/
00022 #ifndef __freCenteredAffineTransformController_h
00023 #define __freCenteredAffineTransformController_h
00024 
00025 #include "freMatrixOffsetTransformControllerBase.h"
00026 #include "freTransformInitializer.h"
00027 
00028 #include "freIntensityImageMediaController.h"
00029 
00030 #include "itkCenteredAffineTransform.h"
00031 
00032 namespace FREE
00033 {
00034 
00046 freControllerIDMacro(CenteredAffineTransformControllerBase, "CenteredAffineTransformBase");
00047 template <int iDimension>
00048 class CenteredAffineTransformControllerBase : public MatrixOffsetTransformControllerBase< itk::CenteredAffineTransform<ScalarType,iDimension>, iDimension>
00049 {
00050 public:
00051     typedef itk::CenteredAffineTransform<ScalarType,iDimension> ComponentType;
00052     typedef MatrixOffsetTransformControllerBase<ComponentType, iDimension> Superclass;
00053 
00054     itkTypeMacro(CenteredAffineTransformControllerBase, MatrixOffsetTransformControllerBase);
00055 
00056 protected:
00057     CenteredAffineTransformControllerBase()
00058     {
00059         //Profile settings
00060         this->UpdateControllerID(ControllerID::CenteredAffineTransformControllerBase);
00061         this->m_Description = "A affine transformation, composed of rotation (around a specified center), scaling, shearing and translation.";
00062     };
00063 
00064     virtual void GenerateProfile(CtrlProfile::ControllerProfile& profile, 
00065                                const SessionComponentCache* pComponentCache,
00066                                bool bRegardOldSetup) const
00067     {
00068         //Parameters
00069         profile.Parameters().AddParameter("CenterType",Parameter::PVTInteger,"Type of rotation center computation.\n0: Centers are defined by the first pair of references.\n1: use geometrical center for calculation\n2: center of mass for calculation.",1,"1");
00070         profile.Parameters().AddParameter(cParam_InitialisationMethod,Parameter::PVTInteger,std::string(cParamDsc_InitialisationMethod)+"\n1: matrix is set by itv\n2: center is set by itv\n3: matrix and center are set by itv\n4: translation is set by itv\n5: matrix and translation are set by itv\n6: center and translation are set by itv\n7: all are set by itv",1,"0");
00071 
00072         //Media
00073         profile.MediaMap().AddMedia("movingInitialImage",ControllerID::IntensityImageMediaControllerBase, DASet,iDimension,0);
00074         profile.MediaMap().AddMedia("fixedInitialImage",ControllerID::IntensityImageMediaControllerBase, DASet,iDimension,0);
00075     };
00076 };
00077 
00089 freControllerIDMacro(CenteredAffine2DTransformController, "Centered Affine 2D Transform");
00090 class CenteredAffine2DTransformController : public CenteredAffineTransformControllerBase<2>
00091 {
00092 public:
00093 
00094     itkTypeMacro(CenteredAffine2DTransformController, CenteredAffineTransformControllerBase);
00095 
00096     CenteredAffine2DTransformController();
00097 
00098 protected:
00099   virtual bool SetInitialTransformValues( ComponentType* pTransformComponent,
00100                                           SessionComponentCache* pComponentCache,
00101                                           SessionInfo* pSessionInfo,
00102                                                                                                                                                             const int& iInitializeByITV) const;
00103 
00104   virtual void GenerateProfile(CtrlProfile::ControllerProfile& profile, 
00105                                const SessionComponentCache* pComponentCache,
00106                                bool bRegardOldSetup) const;
00107 };
00108 
00120 freControllerIDMacro(CenteredAffine3DTransformController, "Centered Affine 3D Transform");
00121 class CenteredAffine3DTransformController : public CenteredAffineTransformControllerBase<3>
00122 {
00123 public:
00124     itkTypeMacro(CenteredAffine3DTransformController, CenteredAffineTransformControllerBase);
00125 
00126     CenteredAffine3DTransformController();
00127 
00128 protected:
00129   virtual bool SetInitialTransformValues( ComponentType* pTransformComponent,
00130                                           SessionComponentCache* pComponentCache,
00131                                           SessionInfo* pSessionInfo,
00132                                                                                                                                                             const int& iInitializeByITV) const;
00133 
00134   virtual void GenerateProfile(CtrlProfile::ControllerProfile& profile, 
00135                                const SessionComponentCache* pComponentCache,
00136                                bool bRegardOldSetup) const;
00137 };
00138 } //end of namespace free
00139 
00140 #endif

Generated at Sat Oct 13 15:27:41 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000