zxhproj v 2.2
zxhproj
|
00001 00002 /*========================================================================= 00003 00004 Program: ZXH Registration Software 00005 Author: Xiahai Zhuang 00006 Module: $RCSfle: zxhMetricMIFFDSEMI.h $ 00007 Language: C++ 00008 Date: $Date: From 2011-03 $ 00009 Version: $Revision: 2.2.1 $ 00010 revision: 00011 =========================================================================*/ 00012 #ifndef zxhMetricMIFFDSEMI_h 00013 #define zxhMetricMIFFDSEMI_h 00014 00015 #ifndef ZXH_HISTOGRAMMAXSIZE 00016 #define ZXH_HISTOGRAMMAXSIZE 1024 00017 #endif 00018 00019 #include "zxh.h" 00020 #include "zxhMetricMIFFD.h" 00032 00033 class zxhMetricMIFFDSEMI : public zxhMetricMIFFD 00034 { 00035 public: 00037 zxhMetricMIFFDSEMI(void); 00039 ~zxhMetricMIFFDSEMI(void); 00040 00042 virtual std::string GetMetricType() {return zxhMetricMIFFD::GetMetricType()+"_SEMIFFD_"; } ; 00043 00045 virtual zxhMetricBase* Clone( zxhMetricBase * & pRet ); 00046 00048 virtual int ComputeConstanceForFFDGradient() ; 00050 virtual int GetValue( zxhlfloat & fvalue ) {fvalue=0;return 0;} ; 00051 00052 00054 virtual int GetDiffByFFDGrid(float * afPD, // output partial differentiation 00055 zxhTransformFFDBase * pFFDGrid, 00056 int * aiCtrPnt, 00057 zxhTransformFFDBase * pDifferential ); 00058 protected: 00060 virtual void GetFFDControlPointSupportVolumeTest(float * afSemiRegionTest, float *afCtrVolumeTest, const int aiCtrPnt[] ) ; 00062 virtual void ComputeHistAndDerivativeHist(const zxhTransformFFDBase*pFFDGrid, const int *aiCtrPnt, 00063 zxhlfloat *pPartialHx,zxhlfloat*pPartialHy,zxhlfloat*pPartialHz,zxhlfloat*pPartialHt, 00064 bool*bJointHistogramUpdated ) ; 00066 virtual void ComputeDerivativeMIFromHistAndDerivativeHist( float * afPD, const bool*bJointHistogramUpdated, 00067 const zxhlfloat *pPartialHx,const zxhlfloat*pPartialHy,const zxhlfloat*pPartialHz,const zxhlfloat*pPartialHt ); 00068 00070 //bool m_bJointHistogramUpdated[ZXH_HISTOGRAMMAXSIZE][ZXH_HISTOGRAMMAXSIZE] ; 00071 }; 00072 00073 #endif 00074 00075 00076 00077