freConstrainedMetricInterface.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: freConstrainedMetricInterface.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 __freConstrainedMetricInterface_h
00023 #define __freConstrainedMetricInterface_h
00024 
00025 #include "freSetupOptimizationMetric.h"
00026 #include "freIDPath.h"
00027 
00028 #include "freSetupParameterConstraints.h"
00029 #include "freControllerBase.h"
00030 
00031 namespace FREE
00032 {
00033 
00066 class ITK_EXPORT ConstrainedMetricInterface
00067 {
00068 public:
00069   virtual const char *GetNameOfClass() const
00070         {return "ConstrainedMetricInterface";};
00071 
00073         void ResetConstraints();
00074 
00076         void AddConstraint(const SetupParameterConstraint& constraint, double dBarrierSize);
00077 
00078   void SetMaxConstraintPenalty (double dPenalty) { m_MaxConstraintPenalty = dPenalty;};
00079   double GetMaxConstraintPenalty () {return m_MaxConstraintPenalty;};
00080 
00081         virtual unsigned int GetNumberOfConstrainedValues(void) const {return m_Constraints.Size();};
00082 
00083   void SetFailureThreshold (double dThreshold) { m_FailureThreshold = dThreshold;};
00084   double GetFailureThreshold () {return m_FailureThreshold;};
00085 
00086 protected:
00088   typedef  SetupOptimizationMetric::ParametersType           CnstrParametersType;
00089   typedef  SetupOptimizationMetric::DecomposedMeasureType    CnstrDecomposedMeasureType;
00090 
00091   ConstrainedMetricInterface();
00092 
00099   bool ComputeConstraintPenalties( const CnstrParametersType & parameters, CnstrDecomposedMeasureType & penalties ) const;
00100         
00101         double ComputeConstraintPenalty( const unsigned int iConstraintID,
00102                                                                                                                                          const CnstrParametersType & parameters ) const;
00103 
00104         SetupParameterConstraints m_Constraints;
00105         std::vector<double> m_BarrierSizes;
00106 
00107         double m_MaxConstraintPenalty;
00108         double m_FailureThreshold;
00109 };
00110 
00111 freControllerIDMacro(ConstrainedSetupOptimizationMetricControllerBase, "ConstrainedSetupOptimizationMetricBase");
00112 
00113 } // end namespace FREE
00114 
00115 #endif
00116 
00117 
00118 

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