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: freImageDifferenceSOMetric.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 __freImageDifferenceSOMetric_h 00023 #define __freImageDifferenceSOMetric_h 00024 00025 #include "freSetupOptimizationMultiThreadMetric.h" 00026 #include "freImageDifferenceSOMetricMonitor.h" 00027 #include "freImageDifferenceSOMetricThread.h" 00028 00029 #include "freIDPath.h" 00030 00031 namespace FREE 00032 { 00033 00064 template <unsigned int VImageDimension> 00065 class ITK_EXPORT ImageDifferenceSOMetric : 00066 public SetupOptimizationMultiThreadMetric<ImageDifferenceSOMetricMonitor, ImageDifferenceSOMetricThread<VImageDimension> > 00067 { 00068 public: 00070 typedef ImageDifferenceSOMetric<VImageDimension> Self; 00071 typedef SetupOptimizationMultiThreadMetric<ImageDifferenceSOMetricMonitor, 00072 ImageDifferenceSOMetricThread<VImageDimension> > Superclass; 00073 typedef itk::SmartPointer<Self> Pointer; 00074 typedef itk::SmartPointer<const Self> ConstPointer; 00075 00076 typedef typename Superclass::MonitorType MonitorType; 00077 typedef typename Superclass::MonitorPointer MonitorPointer; 00078 typedef typename Superclass::ThreadType ThreadType; 00079 typedef typename Superclass::ThreadPointer ThreadPointer; 00080 typedef typename Superclass::EvaluationResultType EvaluationResultType; 00081 typedef typename Superclass::DecomposedMeasureType DecomposedMeasureType; 00082 00084 itkTypeMacro( ImageDifferenceSOMetric, SetupOptimizationMultiThreadMetric ); 00085 00086 itkNewMacro( Self ); 00087 00088 void SetResultImagePath(const IDPath& path); 00089 IDPath& GetResultImagePath() const {return m_ResultImagePath;}; 00090 00091 void SetReferenceImagePath(const IDPath& path); 00092 IDPath& GetReferenceImagePath() const {return m_ReferenceImagePath;}; 00093 00094 virtual unsigned int GetNumberOfValues(void) const {return 13;}; 00095 00096 protected: 00097 ImageDifferenceSOMetric(); 00098 00099 virtual ~ImageDifferenceSOMetric() {}; 00100 00101 virtual void InitializeValueComputation() const; 00102 virtual void InitializeMonitor(MonitorType& monitor) const; 00103 virtual void InitializeThread(ThreadType& thread) const; 00104 virtual DecomposedMeasureType ComputeMeasure(MonitorType& monitor) const; 00105 00106 mutable double m_dMinError; 00107 mutable double m_dMaxError; 00108 mutable double m_dErrorMean; 00109 mutable double m_dErrorDev; 00110 00111 mutable double m_dMinImageError; 00112 mutable double m_dMaxImageError; 00113 mutable double m_dImageErrorMean; 00114 mutable double m_dImageErrorDev; 00115 00116 mutable unsigned long m_lFailedProcessings; 00117 00118 mutable double m_dDurMean; 00119 mutable double m_dDurDev; 00120 mutable double m_dMinDur; 00121 mutable double m_dMaxDur; 00122 00123 mutable std::vector<double> m_Errors; 00124 mutable std::vector<double> m_Vars; 00125 mutable std::vector<long> m_Samplesize; 00126 mutable std::vector<long> m_Durations; 00127 mutable std::vector<double> m_ImageErrors; 00128 00129 IDPath m_ReferenceImagePath; 00130 IDPath m_ResultImagePath; 00131 00132 private: 00133 ImageDifferenceSOMetric(const Self&); //purposely not implemented 00134 void operator=(const Self&); //purposely not implemented 00135 }; 00136 00137 } // end namespace FREE 00138 00139 #ifndef ITK_MANUAL_INSTANTIATION 00140 #include "freImageDifferenceSOMetric.txx" 00141 #endif 00142 00143 #endif 00144 00145 00146
1.5.3 written by Dimitri van Heesch,
© 1997-2000