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: freConsistencySOMetric.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 __freConsistencyRegistrationMetric_h 00023 #define __freConsistencyRegistrationMetric_h 00024 00025 #include "freSetupOptimizationMetric.h" 00026 #include "freIDPath.h" 00027 00028 namespace FREE 00029 { 00030 00050 template <unsigned int VImageDimension> 00051 class ITK_EXPORT ConsistencyRegistrationMetric : 00052 public SetupOptimizationMetric 00053 { 00054 public: 00056 typedef ConsistencyRegistrationMetric<VImageDimension> Self; 00057 typedef SetupOptimizationMetric Superclass; 00058 typedef itk::SmartPointer<Self> Pointer; 00059 typedef itk::SmartPointer<const Self> ConstPointer; 00060 00061 00063 itkTypeMacro( ConsistencyRegistrationMetric, SetupOptimizationMetric ); 00064 00065 itkNewMacro( Self ); 00066 00067 virtual unsigned int GetNumberOfValues(void) const {return 5;}; 00068 00069 protected: 00070 ConsistencyRegistrationMetric(); 00071 00072 virtual ~ConsistencyRegistrationMetric() {}; 00073 00074 typename IterationEvent< ConsistencyRegistrationMetric<VImageDimension> >::Pointer m_IterationEvent; 00075 00082 void OnNextIteration(const long lIteration, Statistics* pStatistic, void* pSender); 00083 00084 virtual DecomposedMeasureType ComputeDecomposedValue( const ParametersType & parameters ) const; 00085 00086 mutable Setup::Pointer m_smpSetup; 00087 00088 mutable double m_dMinError; 00089 mutable double m_dMaxError; 00090 mutable unsigned long m_lFailedRegistrations; 00091 mutable unsigned long m_lActAdaptation; 00092 mutable double m_dErrorMean; 00093 mutable double m_dErrorVar; 00094 00095 mutable std::vector<double> m_Errors; 00096 mutable std::vector<double> m_Vars; 00097 mutable std::vector<long> m_Samplesize; 00098 00099 virtual void ComputeRegistrations(Setup* pSetup, Setup* pReverseSetup) const; 00100 00101 private: 00102 ConsistencyRegistrationMetric(const Self&); //purposely not implemented 00103 void operator=(const Self&); //purposely not implemented 00104 }; 00105 00106 } // end namespace FREE 00107 00108 #ifndef ITK_MANUAL_INSTANTIATION 00109 #include "freConsistencySOMetric.txx" 00110 #endif 00111 00112 #endif 00113 00114 00115
1.5.3 written by Dimitri van Heesch,
© 1997-2000