zxhproj v 2.2
zxhproj
|
00001 00002 /*========================================================================= 00003 00004 Program: ZXH Registration Software 00005 Author: Xiahai Zhuang 00006 Module: $RCSfle: zxhMetricMIFFD2MultiImage.h $ 00007 Language: C++ 00008 Date: $Date: From 2010-12 $ 00009 Version: $Revision: 2.1 $ 00010 revision: 00011 =========================================================================*/ 00012 #ifndef zxhMetricMIFFD2MultiImage_h 00013 #define zxhMetricMIFFD2MultiImage_h 00014 00015 #include "zxh.h" 00016 #include <time.h> 00017 #include "zxhMetricMIFFD2.h" 00018 #include "zxhMetricMultiImageBase.h" 00019 #include <math.h> 00020 00021 #ifndef ZXHOTHERIMAGEMAX 00022 #define ZXHOTHERIMAGEMAX 10 00023 #endif 00024 00030 00031 class zxhMetricMIFFD2MultiImage : public zxhMetricMIFFD2, public zxhMetricMultiImageBase 00032 { 00033 public: 00035 zxhMetricMIFFD2MultiImage(void); 00037 ~zxhMetricMIFFD2MultiImage(void); 00038 00040 virtual std::string GetMetricType() {return zxhMetricMIFFD2::GetMetricType()+"_"+zxhMetricMultiImageBase::GetMetricType(); } ; 00041 00043 virtual zxhMetricBase* Clone( zxhMetricBase * & pRet ); 00045 virtual int GetValue( zxhlfloat & fvalue ) ; 00047 virtual int ComputeConstanceForFFDGradient() ; 00048 00049 //* need to update when SetImage, SetSampling, SetMask, SetTransform */ 00050 ; 00052 virtual bool SetImage(zxhImageData*pImageTest,zxhImageData*pImageRef) 00053 { bool b=zxhMetricMIFFD2::SetImage(pImageTest,pImageRef); SetNeedToUpdateOtherImageMetric(true); return b ;} ; 00055 virtual bool SetMaskImage(zxhImageData*pMaskTest,zxhImageData*pMaskRef) 00056 { bool b=zxhMetricMIFFD2::SetMaskImage(pMaskTest,pMaskRef); SetNeedToUpdateOtherImageMetric(true); return b ;} ; 00058 virtual bool SetTransform( zxhTransformBase* ptrans ) 00059 { bool b=zxhMetricMIFFD2::SetTransform(ptrans); SetNeedToUpdateOtherImageMetric(true); return b ;} ; 00061 virtual void SetSamplingPhysical(float x,float y=1.0f,float z=1.0f,float t=1.0f) 00062 { zxhMetricMIFFD2::SetSamplingPhysical( x, y, z, t); SetNeedToUpdateOtherImageMetric(true); } ; 00063 00064 protected: 00068 virtual bool UpdateOtherImageMetric( bool bupdate ) ; 00071 virtual void SetMultiMetricBase() 00072 { 00073 m_pMImgMetricBase=this; 00074 zxhMetricMIFFD2::Clone( m_pMImgMetricType ) ; 00075 }; 00077 virtual bool SumupDrivingForceFromAllMetric( ); 00078 00079 }; 00080 00081 #endif 00082 00083 00084 00085