freAccuracySOMetric.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: freAccuracySOMetric.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 __freAccuracySOMetric_h
00023 #define __freAccuracySOMetric_h
00024 
00025 #include "freSetupOptimizationMultiThreadMetric.h"
00026 #include "freAccuracySOMetricMonitor.h"
00027 #include "freAccuracySOMetricThread.h"
00028 
00029 #include "freImageTypes.h"
00030 
00031 namespace FREE
00032 {
00033 
00075   template <unsigned int VImageDimension>
00076   class ITK_EXPORT AccuracySOMetric : 
00077     public SetupOptimizationMultiThreadMetric<AccuracySOMetricMonitor, AccuracySOMetricThread<VImageDimension> >
00078   {
00079   public:
00081     typedef AccuracySOMetric<VImageDimension>   Self;
00082     typedef SetupOptimizationMultiThreadMetric<AccuracySOMetricMonitor,
00083       AccuracySOMetricThread<VImageDimension> > Superclass;
00084     typedef itk::SmartPointer<Self>             Pointer;
00085     typedef itk::SmartPointer<const Self>       ConstPointer;
00086 
00087     typedef typename Superclass::MonitorType    MonitorType;
00088     typedef typename Superclass::MonitorPointer MonitorPointer;
00089     typedef typename Superclass::ThreadType     ThreadType;
00090     typedef typename Superclass::ThreadPointer  ThreadPointer;
00091     typedef typename Superclass::EvaluationResultType EvaluationResultType;
00092     typedef typename Superclass::DecomposedMeasureType DecomposedMeasureType;
00094     itkTypeMacro( AccuracySOMetric, SetupOptimizationMultiThreadMetric );
00095 
00096     itkNewMacro( Self );
00097 
00098     void SetResultFieldPath(const IDPath& path);
00099     const IDPath& GetResultFieldPath() const {return m_ResultFieldPath;};
00100 
00101     void SetReferenceFieldPath(const IDPath& path);
00102     const IDPath& GetReferenceFieldPath() const {return m_ReferenceFieldPath;};
00103 
00104     void SetReferencePointsPath(const IDPath& path);
00105     const IDPath& GetReferencePointsPath() const {return m_ReferencePointsPath;};
00106 
00107     void SetMovingPointsPath(const IDPath& path);
00108     const IDPath& GetMovingPointsPath() const {return m_MovingPointsPath;};
00109 
00110     itkSetMacro( UseField, bool);
00111     itkGetMacro( UseField, bool);
00112 
00113     itkSetMacro( ComputeAdaptationMean, bool);
00114     itkGetMacro( ComputeAdaptationMean, bool);
00115 
00116     virtual unsigned int GetNumberOfValues(void) const {return 10;};
00117 
00118   protected:
00119     AccuracySOMetric();
00120 
00121     virtual ~AccuracySOMetric();
00122 
00123     virtual void InitializeValueComputation() const;
00124     virtual void InitializeMonitor(MonitorType& monitor) const;
00125     virtual void InitializeThread(ThreadType& thread) const;
00126     virtual DecomposedMeasureType ComputeMeasure(MonitorType& monitor) const;
00127 
00129     mutable double m_dMinError;
00131     mutable double m_dMaxError;
00133     mutable unsigned long m_lFailedProcessings;
00135     mutable unsigned long m_lCurAdaptation;
00137     mutable double m_dErrorMean;
00139     mutable double m_dErrorDev;
00141     mutable unsigned long m_lUnevaluatedPoints;
00142 
00144     mutable double m_dDurMean;
00146     mutable double m_dDurDev;
00148     mutable double m_dMinDur;
00150     mutable double m_dMaxDur;
00151 
00153     mutable std::vector<double> m_Errors;
00155     mutable std::vector<double> m_Vars;
00157     mutable std::vector<double> m_MinErrors;
00159     mutable std::vector<double> m_MaxErrors;
00160 
00162     mutable std::vector<double> m_PointErrors;
00163 
00165     mutable std::vector<long> m_Samplesize;
00167     mutable std::vector<long> m_Durations;
00168 
00169     IDPath m_ResultFieldPath;
00170     IDPath m_ReferenceFieldPath;
00171     IDPath m_ReferencePointsPath;
00172     IDPath m_MovingPointsPath;
00173 
00174     bool m_UseField;
00175     bool m_ComputeAdaptationMean;
00176 
00186     DecomposedMeasureType ComputeFieldMeasures() const;
00196     DecomposedMeasureType ComputePointsMeasures() const;
00197 
00198   private:
00199     AccuracySOMetric(const Self&); //purposely not implemented
00200     void operator=(const Self&); //purposely not implemented
00201   };
00202 
00203 } // end namespace FREE
00204 
00205 #ifndef ITK_MANUAL_INSTANTIATION
00206 #include "freAccuracySOMetric.txx"
00207 #endif
00208 
00209 #endif
00210 
00211 
00212 

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