freImageClassificationSOMetric.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: freImageClassificationSOMetric.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 __freImageClassificationSOMetric_h
00023 #define __freImageClassificationSOMetric_h
00024 
00025 #include "freSetupOptimizationMultiThreadMetric.h"
00026 #include "freImageClassificationSOMetricMonitor.h"
00027 #include "freImageClassificationSOMetricThread.h"
00028 
00029 #include "freIDPath.h"
00030 
00031 namespace FREE
00032 {
00033 
00081 template <unsigned int VImageDimension>
00082 class ITK_EXPORT ImageClassificationSOMetric : 
00083   public SetupOptimizationMultiThreadMetric<ImageClassificationSOMetricMonitor, ImageClassificationSOMetricThread<VImageDimension> >
00084 {
00085 public:
00087   typedef ImageClassificationSOMetric<VImageDimension>   Self;
00088   typedef SetupOptimizationMultiThreadMetric<ImageClassificationSOMetricMonitor,
00089                                              ImageClassificationSOMetricThread<VImageDimension> >  Superclass;
00090         typedef itk::SmartPointer<Self>           Pointer;
00091   typedef itk::SmartPointer<const Self>     ConstPointer;
00092 
00093   typedef typename Superclass::MonitorType    MonitorType;
00094   typedef typename Superclass::MonitorPointer MonitorPointer;
00095   typedef typename Superclass::ThreadType     ThreadType;
00096   typedef typename Superclass::ThreadPointer  ThreadPointer;
00097   typedef typename Superclass::EvaluationResultType EvaluationResultType;
00098   typedef typename Superclass::DecomposedMeasureType DecomposedMeasureType;
00099 
00101   itkTypeMacro( ImageClassificationSOMetric, SetupOptimizationMultiThreadMetric );
00102 
00103         itkNewMacro( Self );
00104  
00105   void SetResultImagePath(const IDPath& path);
00106   IDPath& GetResultImagePath() const {return m_ResultImagePath;};
00107 
00108   void SetReferenceImagePath(const IDPath& path);
00109   IDPath& GetReferenceImagePath() const {return m_ReferenceImagePath;};
00110 
00111   itkSetMacro(LowerClassThreshold,double);
00112   itkGetMacro(LowerClassThreshold,double);
00113 
00114   itkSetMacro(UpperClassThreshold,double);
00115   itkGetMacro(UpperClassThreshold,double);
00116 
00117   itkSetMacro(FMeasureWeight,double);
00118   itkGetMacro(FMeasureWeight,double);
00119 
00120   virtual unsigned int GetNumberOfValues(void) const {return 25;};
00121 
00122 protected:
00123   ImageClassificationSOMetric();
00124 
00125   virtual ~ImageClassificationSOMetric() {};
00126 
00127         virtual void InitializeValueComputation() const;
00128         virtual void InitializeMonitor(MonitorType& monitor) const;
00129   virtual void InitializeThread(ThreadType& thread) const;
00130   virtual DecomposedMeasureType ComputeMeasure(MonitorType& monitor) const;
00131 
00132         mutable double m_dMinSensitivity;
00133         mutable double m_dMaxSensitivity;
00134         mutable double m_dSensitivityMean;
00135         mutable double m_dSensitivityDev;
00136 
00137         mutable double m_dMinSpec;
00138         mutable double m_dMaxSpec;
00139         mutable double m_dSpecMean;
00140         mutable double m_dSpecDev;
00141 
00142         mutable double m_dMinPPV;
00143         mutable double m_dMaxPPV;
00144         mutable double m_dPPVMean;
00145         mutable double m_dPPVDev;
00146 
00147         mutable double m_dMinNPV;
00148         mutable double m_dMaxNPV;
00149         mutable double m_dNPVMean;
00150         mutable double m_dNPVDev;
00151 
00152         mutable double m_dMinFM;
00153         mutable double m_dMaxFM;
00154         mutable double m_dFMMean;
00155         mutable double m_dFMDev;
00156 
00157   mutable unsigned long m_lFailedProcessings;
00158 
00159   mutable double m_dDurMean;
00160         mutable double m_dDurDev;
00161         mutable double m_dMinDur;
00162         mutable double m_dMaxDur;
00163 
00164         mutable std::vector<unsigned long> m_TPs;
00165         mutable std::vector<unsigned long> m_FPs;
00166         mutable std::vector<unsigned long> m_TNs;
00167         mutable std::vector<unsigned long> m_FNs;
00168   mutable std::vector<long> m_Durations;
00169 
00170   IDPath m_ReferenceImagePath;
00171   IDPath m_ResultImagePath;
00172 
00173   double m_LowerClassThreshold;
00174   double m_UpperClassThreshold;
00175   double m_FMeasureWeight;
00176 
00177 private:
00178   ImageClassificationSOMetric(const Self&); //purposely not implemented
00179   void operator=(const Self&); //purposely not implemented
00180 };
00181 
00182 } // end namespace FREE
00183 
00184 #ifndef ITK_MANUAL_INSTANTIATION
00185 #include "freImageClassificationSOMetric.txx"
00186 #endif
00187 
00188 #endif
00189 
00190 
00191 

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