zxhproj v 2.2
zxhproj
|
00001 00002 /*========================================================================= 00003 00004 Program: ZXH Registration Software 00005 Author: Xiahai Zhuang 00006 Module: $RCSfle: zxhMetricMultiImageBase.h $ 00007 Language: C++ 00008 Date: $Date: From 2010-12 $ 00009 Version: $Revision: 2.1.2 $ 00010 revision: 00011 =========================================================================*/ 00012 #ifndef zxhMetricMultiImageBase_h 00013 #define zxhMetricMultiImageBase_h 00014 00015 #include "zxh.h" 00016 #include "zxhImageData.h" 00017 #include "zxhMetricBase.h" 00018 #include <time.h> 00019 #include <math.h> 00020 00021 #ifndef ZXHOTHERIMAGEMAX 00022 #define ZXHOTHERIMAGEMAX 10 00023 #endif 00024 00034 00035 class zxhMetricMultiImageBase 00036 { 00037 public: 00039 zxhMetricMultiImageBase(void); 00041 ~zxhMetricMultiImageBase(void); 00042 00044 virtual std::string GetMetricType() {return "_MULTIIMAGE_"; } ; 00045 00047 virtual zxhMetricMultiImageBase* Clone( zxhMetricMultiImageBase * & pRet ); 00048 00049 //* need to update when SetImage, SetSampling, SetMask, SetTransform */ 00050 ; 00051 00053 virtual void SetNeedToUpdateOtherImageMetric( const bool b ) { m_bNeedToUpdateOtherImageMetric = b ; } ; 00055 virtual bool GetNeedToUpdateOtherImageMetric() const { return m_bNeedToUpdateOtherImageMetric ; } ; 00056 00058 virtual void SetOtherImage3D( int n, zxhImageData* pt, zxhImageData *pr ) 00059 { m_nImage3D=n ; m_pImageTest3D=pt ; m_pImageRef3D=pr; } ; 00061 virtual void SetWeightOtherImage3D( int n, const float f[] ) 00062 { for (int i=0; i<n; ++i ) m_afWeightImage3D[i] = f[i] ; } ; 00064 virtual void SetNormalizedWithNumberSamplePoint(bool b) { m_bNormalizedWithNumberSamplePoint=b;}; 00066 virtual bool GetNormalizedWithNumberSamplePoint(void) {return m_bNormalizedWithNumberSamplePoint;}; 00067 protected: 00069 bool m_bNormalizedWithNumberSamplePoint ; 00070 00076 virtual bool UpdateOtherImageMetric( bool bupdate ) ; 00077 00087 virtual bool Project3DVectorTo2DPlane( float *fc, zxhImageData *pImageSlice ) ; 00088 00090 virtual float GetWeightedMetricValueOfOtherImages( zxhlfloat &fValue ) ; 00091 00092 /* variables */ 00093 protected: 00096 virtual void SetMultiMetricBase()=0; 00098 zxhMetricBase* m_pMImgMetricBase ; 00100 zxhMetricBase* m_pMImgMetricType ; 00102 bool m_bNeedToUpdateOtherImageMetric ; 00104 int m_nImage3D ; 00106 float m_afWeightImage3D[ZXHOTHERIMAGEMAX] ; 00108 zxhImageData * m_pImageTest3D ; 00110 zxhImageData m_imgTest3DResampled[2][ZXHOTHERIMAGEMAX] ; 00112 zxhImageData * m_pImageRef3D ; 00114 zxhImageData m_imgRef3D[ZXHOTHERIMAGEMAX] ; 00116 zxhMetricBase *m_apMetric3D[ZXHOTHERIMAGEMAX] ; 00117 00118 }; 00119 00120 #endif 00121 00122 00123 00124