(normalized) mutual information based on histogram or parzen window default is normalised mi and histogram gray level preprocess and PDF estimation weight pixel added 1. set test / ref image 2. set sample physical -> sample interval 3. compute similarity: 1) For SEMI/MMI +++++ resample test image -> sample physical ++++++ IMPORTANT (for FFD registration to use pre-transform) 2) reset sample interval
More...
Public Member Functions |
|
| zxhMetricMI (void) |
| | constructor
|
| | ~zxhMetricMI (void) |
|
virtual std::string | GetMetricType () |
| | GetMetricType()=0.
|
| virtual zxhMetricBase * | Clone (zxhMetricBase *&pRet) |
|
virtual bool | PreComputeImageGraylevel () |
| | pre-computation for Image GraySpan before using this object, this make the method better
|
| virtual bool | SetImage (zxhImageData *pImageTest, zxhImageData *pImageRef) |
| virtual int | ComputeHistogramFromPDF4D (zxhlfloat *&afPDF, zxhlfloat &fTotalFreq, float xfTestFrom, float xfTestTo, float yfTestFrom, float yfTestTo, float zfTestFrom, float zfTestTo, float tfTestFrom, float tfTestTo) |
|
virtual int | ComputeHistogramMaskRegionOnTest (zxhImageData *pMask, zxhlfloat *&afPDF, zxhlfloat &fFreq) |
| | within roi
|
|
virtual int | ComputeHistogram (zxhlfloat *&afHistogram, zxhlfloat &fTotalFreq) |
| virtual int | GetValue (zxhlfloat &fValue) |
|
virtual zxhlfloat | GetMIValue (const zxhlfloat *afHistogram, const zxhlfloat fTotalFreq) |
|
virtual void | AddHistogram (zxhlfloat *afHistogramDes, const zxhlfloat *afHistogramSrc, int times=1) |
|
virtual void | GetAddHistogram (zxhlfloat *afHistogramDes, zxhlfloat *afHistogramSrc1, zxhlfloat *afHistogramSrc2) |
| void | SetNumberOfHistogramBins (int i=32) |
| int | GetNumberOfHistogramBins () |
| void | SetPDFType (enum zxh::TypeHistogramCompute i) |
|
void | SetMMILambda (float f) |
|
float | GetMMILambda () |
|
void | SetMMISamplePhysical (float *f) |
|
const float * | GetMMISamplePhysical () |
|
void | SetMMILocalRegionSizeInMM (float f) |
|
void | SetMMIKernelType (enum zxh::TypeSEMIKernelFunction type) |
|
void | SetMMI (bool b) |
|
bool | GetIsMMI () |
| void | SetMIType (enum zxh::TypeMutualInformation i) |
|
enum zxh::TypeMutualInformation | GetMIType () |
| virtual std::string | GetPrintString () |
| virtual bool | SetMetricFromStream (std::ifstream &ifs) |
|
virtual int | ComputeConstanceForGradient () |
Static Public Attributes |
|
static const int | m_stc_iPaddedBins = BSplineHistogramPaddingBins |
| | padded bin for the parzen windows
|
Protected Member Functions |
|
float | SEMIKernelDistanceToWeight (float dis) |
|
int | GetLengthOfHistogramDim () |
|
void | IntensityBoundBk (float &gray, const short aiImageGraySpan[]) const |
|
void | IntensityBoundBk (zxhlfloat &gray, const short aiImageGraySpan[]) const |
|
void | IntensityBound (zxhlfloat &gray, const short aiImageGraySpan[]) const |
|
void | IntensityBound (float &gray, const short aiImageGraySpan[]) const |
|
virtual void | EvaluateOnJointHistogram (zxhlfloat &fTotalFreq, zxhlfloat *afPDF, int iLengthOfHistogramDim, zxhlfloat fGrayTest, zxhlfloat fGrayRef, zxhlfloat weight=1) |
| | evaluate the contribution of current pixel pair to the joint histogram table
|
| virtual void | EvaluateOnPixelSource2TargetForce (zxhlfloat *afForce, int iLengthOfHistogramDim, const float *gridCoTest, const float *gridCoRef) const |
| | sumup (1+log p)*w_l(I_t)*dw_k(I_s)*dI_s/d(T) without -1/N (have not test yet), NOT USED NOW
|
| float | BSplinei (int iOrd, float u) |
| float | DerivativeOfBSplinei (int iOrd, float u) |
|
zxhlfloat | ComputMMILocalRegionPDFValue (zxhlfloat *afHistL, zxhlfloat &fVl, const zxhlfloat *afHistG, const zxhlfloat fVg) |
| | MixtureMI fVg = fVALL-fVl.
|
|
void | EvaluateMMIpositionWeightedHistogram (int *roiFrom, int *roiTo, float *WorldCentre, zxhlfloat *afHistogram, zxhlfloat &fTotalFreq, int *excludeFrom, int *excludeTo) |
|
void | EvaluateMMIpositionWeightedHistogram (int *roiFrom, int *roiTo, float *WorldCentre, zxhlfloat *afHistogram, zxhlfloat &fTotalFreq, zxhImageData *pExcludeImageMask) |
Protected Attributes |
| enum zxh::TypeMutualInformation | m_iComputePDType |
|
float | m_fMMILambda |
|
float | m_afMMISamplePhysical [ImageDimensionMax] |
|
float | m_fMMILocalRegionSizeInMM |
| | mm local region size = 6*gausian sigma, 4*bspline spacing
|
|
enum zxh::TypeSEMIKernelFunction | m_iMMIKernelType |
|
zxhImageData | m_imgMMItestImage |
|
zxhImageData | m_imgMMIrefImage |
|
zxhImageDataT< float > | m_imgMMIWeighttestref |
| enum zxh::TypeHistogramCompute | m_iPDFType |
| enum zxh::TypeMutualInformation | m_iMIType |
| int | m_iNumberOfHistogramBins |
|
PixelTypeDefault | m_aiImageTestGraySpan [2] |
| | for test image gray level min and max
|
|
PixelTypeDefault | m_aiImageRefGraySpan [2] |
| | for ref image gray level min and max
|
|
zxhlfloat | m_fBinSizeTestImage |
|
zxhlfloat | m_fBinSizeRefImage |
| zxhlfloat | m_fEntropyT |
| zxhlfloat | m_fEntropyR |
| zxhlfloat | m_fEntropyJ |
|
zxhlfloat | m_fMutualInformation |
|
zxhlfloat | m_fNormalisedMutualInformation |
|
zxhlfloat * | m_afPDFt |
| | probability distribution function
|
| zxhlfloat * | m_afPDFr |
| zxhlfloat * | m_afPDFj |
| zxhlfloat * | m_afHistogram |
|
zxhlfloat | m_fTotalFreq |
| zxhlfloat * | m_afC_Ht |
| zxhlfloat * | m_afC_Hr |
| zxhlfloat * | m_afC_Hj |
(normalized) mutual information based on histogram or parzen window default is normalised mi and histogram gray level preprocess and PDF estimation weight pixel added 1. set test / ref image 2. set sample physical -> sample interval 3. compute similarity: 1) For SEMI/MMI +++++ resample test image -> sample physical ++++++ IMPORTANT (for FFD registration to use pre-transform) 2) reset sample interval