freMeanReciprocalSquaresMetricController.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: freMeanReciprocalSquaresMetricController.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 __freMeanReciprocalSquaresMetricController_h
00023 #define __freMeanReciprocalSquaresMetricController_h
00024 
00025 #include "freImageToImageMetricControllerBase.h"
00026 
00027 #include "itkMeanReciprocalSquareDifferenceImageToImageMetric.h"
00028 
00029 namespace FREE
00030 {
00031 
00041   freControllerIDMacro(MeanReciprocalSquaresMetricControllerBase, "MeanReciprocalSquaresMetricBase");
00042 template <class TImageType>
00043 class MeanReciprocalSquaresMetricControllerBase : public ImageToImageMetricControllerBase< itk::MeanReciprocalSquareDifferenceImageToImageMetric<TImageType,TImageType> >
00044 {
00045 public:  
00046   typedef itk::MeanReciprocalSquareDifferenceImageToImageMetric<TImageType,TImageType> ComponentType;
00047   typedef ImageToImageMetricControllerBase<ComponentType> Superclass;
00048 
00049   itkTypeMacro(MeanReciprocalSquaresMetricControllerBase, ImageToImageMetricControllerBase);
00050 
00051 protected:
00054   MeanReciprocalSquaresMetricControllerBase()
00055   {
00056                 //Profile settings
00057     this->UpdateControllerID(ControllerID::MeanReciprocalSquaresMetricControllerBase);
00058     this->m_Description = "Controls a mean reciprocal square metric.";
00059         };
00060 
00061   virtual void GenerateProfile(CtrlProfile::ControllerProfile& profile,
00062                                  const SessionComponentCache* pComponentCache,
00063                                  bool bRegardOldSetup) const
00064   {
00065       Superclass::GenerateProfile(profile,pComponentCache,bRegardOldSetup);
00066 
00067       //Parameters
00068       profile.Parameters().AddParameter(cParam_Lambda,Parameter::PVTDouble,cParamDsc_Lambda,1,"1.0",-1,true);
00069       profile.Parameters().AddParameter(cParam_MetricMinimize,Parameter::PVTBool,cParamDsc_MetricMinimize,1,"false",1,false,0,DAGet);   
00070   };
00071 
00076         virtual void ActualizeMainComponent(ComponentType* pMainComponent,
00077                                       SessionComponentCache* pComponentCache,
00078                                       SessionInfo* pSessionInfo,
00079                                                                                                                                                         const unsigned int& iActLevel) const
00080         {
00081                 double dLambda;
00082     try
00083     {
00084       SessionAccessor::GetParameterValue(pComponentCache,cParam_Lambda,dLambda,0,iActLevel,true);
00085     }
00086     catchAllNPassMacro("Error while retrieving parameter values.");       
00087     pMainComponent->SetLambda( dLambda );
00088   };
00089 };
00090 
00100   freControllerIDMacro(MeanReciprocalSquares2DMetricController, "Mean Reciprocal Squares 2D Metric");
00101 class MeanReciprocalSquares2DMetricController : public MeanReciprocalSquaresMetricControllerBase<InternalImage2DType>
00102 {
00103 public:  
00104   itkTypeMacro(MeanReciprocalSquares2DMetricController, MeanReciprocalSquaresMetricControllerBase);
00105 
00106   MeanReciprocalSquares2DMetricController();
00107 };
00108 
00118   freControllerIDMacro(MeanReciprocalSquares3DMetricController, "Mean Reciprocal Squares 3D Metric");
00119 class MeanReciprocalSquares3DMetricController : public MeanReciprocalSquaresMetricControllerBase<InternalImage3DType>
00120 {
00121 public:  
00122   itkTypeMacro(MeanReciprocalSquares3DMetricController, MeanReciprocalSquaresMetricControllerBase);
00123 
00124   MeanReciprocalSquares3DMetricController();
00125 };
00126 
00127 } //end of namespace free
00128 
00129 #endif

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