freFieldPrecisionSOMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.0.7.2
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile: frePrecisionSOMetric.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 __frePrecisionSOMetric_h
00023 #define __frePrecisionSOMetric_h
00024 
00025 #include "freSetupOptimizationMetric.h"
00026 
00027 namespace FREE
00028 {
00029 
00049 template <unsigned int VImageDimension>
00050 class ITK_EXPORT PrecisionSOMetric : 
00051   public SetupOptimizationMetric
00052 {
00053 public:
00055   typedef PrecisionSOMetric<VImageDimension>   Self;
00056   typedef SetupOptimizationMetric           Superclass;
00057         typedef itk::SmartPointer<Self>           Pointer;
00058   typedef itk::SmartPointer<const Self>     ConstPointer;
00059 
00060   typedef typename Superclass::DecomposedMeasureType DecomposedMeasureType;
00061 
00063   itkTypeMacro( PrecisionSOMetric, SetupOptimizationMetric );
00064 
00065         itkNewMacro( Self );
00066  
00067   void SetResultFieldPath(const IDPath& path);
00068   IDPath& GetResultFieldPath() const {return m_ResultFieldPath;};
00069 
00070   void SetInterimFieldPath(const std::string& path);
00071   IDPath& GetInterimFieldPath() const {return m_InterimFieldPath;};
00072 
00073   itkSetMacro( SaveInterimOnDisc, bool);
00074   itkGetMacro( SaveInterimOnDisc, bool);
00075 
00076   itkSetMacro( SampleSize, unsigned long);
00077   itkGetMacro( SampleSize, unsigned long);
00078 
00079   virtual unsigned int GetNumberOfValues(void) const {return 5;};
00080 
00081 protected:
00082   PrecisionSOMetric();
00083 
00084   virtual ~PrecisionSOMetric() {};
00085 
00086   typedef typename ImageTypes<VImageDimension>::TransformationFieldType TransformationFieldType;
00087 
00088         typename ProgressEvent< PrecisionSOMetric<VImageDimension> >::Pointer m_IterationEvent;
00089 
00096   void OnEvaluationProgress(const long status, const std::string& sComment, void* pSender, long threadID);
00097 
00098         virtual DecomposedMeasureType ComputeDecomposedValue( const ParametersType & parameters ) const;
00099 
00100   mutable Setup::Pointer m_smpSetup;
00101 
00102   mutable double m_dMinError;
00103         mutable double m_dMaxError;
00104         mutable unsigned long m_lFailedRegistrations;
00105         mutable unsigned long m_lActAdaptation;
00106         mutable double m_dErrorMean;
00107         mutable double m_dErrorVar;
00108 
00109   IDPath m_ResultFieldPath;
00110 
00111   std::string m_InterimFieldPath;
00112 
00113   bool m_SaveInterimOnDisc;
00114 
00115   unsigned long m_SampleSize;
00116 
00117 private:
00118   PrecisionSOMetric(const Self&); //purposely not implemented
00119   void operator=(const Self&); //purposely not implemented
00120 };
00121 
00122 } // end namespace FREE
00123 
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "frePrecisionSOMetric.txx"
00126 #endif
00127 
00128 #endif
00129 
00130 
00131 

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