zxhproj v 2.2
zxhproj

zxhMetricMIMultiImage.h

00001 
00002 /*=========================================================================
00003 
00004   Program:   ZXH Registration Software
00005   Author:    Xiahai Zhuang
00006   Module:    $RCSfle: zxhMetricMIMultiImage.h    $
00007   Language:  C++
00008   Date:      $Date: From  2011-01 $
00009   Version:   $Revision: 2.1.4 $
00010   revision:
00011 =========================================================================*/
00012 #ifndef zxhMetricMIMultiImage_h
00013 #define zxhMetricMIMultiImage_h
00014 
00015 #include "zxh.h"
00016 #include <time.h>
00017 #include "zxhMetricMIConstraint.h"
00018 #include "zxhMetricMultiImageBase.h"
00019 #include <math.h>
00020 
00021 #ifndef ZXHOTHERIMAGEMAX
00022 #define ZXHOTHERIMAGEMAX 10
00023 #endif
00024 
00030 
00031 class zxhMetricMIMultiImage :   public zxhMetricMIConstraint, public zxhMetricMultiImageBase
00032 {
00033 public:
00035     zxhMetricMIMultiImage(void);
00037     ~zxhMetricMIMultiImage(void);
00038 
00040     virtual std::string GetMetricType() {return zxhMetricMIConstraint::GetMetricType()+"_"+zxhMetricMultiImageBase::GetMetricType(); } ;
00041 
00043     virtual zxhMetricBase* Clone( zxhMetricBase * & pRet ); 
00045     virtual int GetValue( zxhlfloat & fvalue ) ;
00046 
00047     //* need to update when SetImage, SetSampling, SetMask, SetTransform */
00048     ;
00050     virtual bool    SetImage(zxhImageData*pImageTest,zxhImageData*pImageRef)
00051     {   bool b=zxhMetricMIConstraint::SetImage(pImageTest,pImageRef); SetNeedToUpdateOtherImageMetric(true); return b ;} ;
00053     virtual bool    SetMaskImage(zxhImageData*pMaskTest,zxhImageData*pMaskRef)
00054     {   bool b=zxhMetricMIConstraint::SetMaskImage(pMaskTest,pMaskRef); SetNeedToUpdateOtherImageMetric(true); return b ;} ;
00056     virtual bool    SetTransform( zxhTransformBase* ptrans )
00057     {   bool b=zxhMetricMIConstraint::SetTransform(ptrans); SetNeedToUpdateOtherImageMetric(true); return b ;} ;
00059     virtual void SetSamplingPhysical(float x,float y=1.0f,float z=1.0f,float t=1.0f)
00060     {   zxhMetricMIConstraint::SetSamplingPhysical( x, y, z, t); SetNeedToUpdateOtherImageMetric(true);  } ;
00061 protected:
00062 
00065     virtual void    SetMultiMetricBase()
00066     {
00067         m_pMImgMetricBase=this;
00068         zxhMetricMIConstraint::Clone( m_pMImgMetricType ) ;
00069     };
00070 };
00071 
00072 #endif
00073 
00074 
00075 
00076 
 All Classes Namespaces Functions Variables Typedefs