freBSplineInterpolateController.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: freBSplineInterpolateController.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 __freBSplineInterpolateController_h
00023 #define __freBSplineInterpolateController_h
00024 
00025 #include "freInterpolatorControllerBase.h"
00026 
00027 #include "itkBSplineInterpolateImageFunction.h"
00028 
00029 namespace FREE
00030 {
00031 
00041 freControllerIDMacro(BSplineInterpolateControllerBase, "BSplineInterpolationBase");
00042 template <class TImageType>
00043 class BSplineInterpolateControllerBase : public InterpolatorControllerBase< itk::BSplineInterpolateImageFunction<TImageType,ScalarType,ScalarType> >
00044 {
00045 public:
00046   itkTypeMacro(BSplineInterpolateControllerBase, InterpolatorControllerBase);
00047 
00048   typedef itk::BSplineInterpolateImageFunction<TImageType,ScalarType,ScalarType>  ComponentType;
00049   typedef InterpolatorControllerBase<ComponentType> Superclass;
00050 
00051   virtual ~BSplineInterpolateControllerBase()
00052   {
00053   };
00054 
00055 protected:
00058   BSplineInterpolateControllerBase()
00059   {
00060                 //Profile settings
00061                 this->UpdateControllerID(ControllerID::BSplineInterpolateControllerBase);
00062                 this->m_Description = "Interpolates point values with bsplines.";
00063   };
00064 
00065   virtual void GenerateProfile(CtrlProfile::ControllerProfile& profile,
00066                                  const SessionComponentCache* pComponentCache,
00067                                  bool bRegardOldSetup) const
00068   {
00069     Superclass::GenerateProfile(profile,pComponentCache,bRegardOldSetup);
00070 
00071     profile.Parameters().AddParameter(cParam_SplinOrder,Parameter::PVTInteger,cParamDsc_SplinOrder,1,"0",-1,true);
00072   };
00073 
00078         virtual void ActualizeMainComponent(ComponentType* pMainComponent,
00079                                       SessionComponentCache* pComponentCache,
00080                                       SessionInfo* pSessionInfo,
00081                                                                                                                                                         const unsigned int& iActLevel) const
00082   {
00083     int iOrder;
00084     try
00085     {
00086       SessionAccessor::GetParameterValue(pComponentCache,cParam_SplinOrder,iOrder,0,iActLevel,true);
00087     }
00088     catchAllNPassMacro("Error while retrieving parameter values.");
00089           pMainComponent->SetSplineOrder(iOrder);
00090   };
00091  
00092 };
00093 
00103 freControllerIDMacro(BSpline2DInterpolateController, "BSpline 2D Interpolation");
00104 class BSpline2DInterpolateController : public BSplineInterpolateControllerBase<InternalImage2DType>
00105 {
00106 public:  
00107   itkTypeMacro(BSpline2DInterpolateController, BSplineInterpolateControllerBase);
00108 
00109   BSpline2DInterpolateController();
00110 
00111   virtual ~BSpline2DInterpolateController();
00112 };
00113 
00123 freControllerIDMacro(BSpline3DInterpolateController, "BSpline 3D Interpolation");
00124 class BSpline3DInterpolateController : public BSplineInterpolateControllerBase<InternalImage3DType>
00125 {
00126 public:  
00127   itkTypeMacro(BSpline3DInterpolateController, BSplineInterpolateControllerBase);
00128 
00129   BSpline3DInterpolateController();
00130 
00131   virtual ~BSpline3DInterpolateController();
00132 };
00133 
00134 } //end of namespace free
00135 
00136 #endif

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