zxhproj v 2.2
zxhproj

zxhMetricMIFFD Class Reference

MIconstraint + FFD (mainly for FFD+SEMI) For similarity/ gradient computation, apply ResampleTestImagesSpacingPhysIntervel first. More...

#include <zxhMetricMIFFD.h>

Inheritance diagram for zxhMetricMIFFD:
zxhMetricMIConstraint zxhMetricFFDBase zxhMetricMI zxhMetricBase zxhMetricMIFFDSEMI

List of all members.

Public Member Functions

 zxhMetricMIFFD (void)
 constructor
 ~zxhMetricMIFFD (void)
virtual std::string GetMetricType ()
virtual zxhMetricBaseClone (zxhMetricBase *&pRet)
virtual int ComputeConstanceForFFDGradient ()
 pre compute:
virtual int GetValue (zxhlfloat &fvalue)
virtual int GetValueByFFDGrid (zxhlfloat &fValue, int aiCtrPnt[ImageDimensionMax])
 for MixtureProbabilityModel ONLY
virtual int GetDiffByFFDGrid (float *afPD, zxhTransformFFDBase *pFFDGrid, int *aiCtrPnt, zxhTransformFFDBase *pDifferential)
 Re-implemented: for semi (GetDiffByFFDGridForMMI); for mi (GetFiniteDiffByFFDGrid)
virtual int GetDiffByFFDGridOnFFDPhysicalVector (float *afPD, zxhTransformFFDBase *pFFDGrid, int *aiCtrPnt, zxhTransformFFDBase *pDifferential, float *vector)
 currently using finite difference(no AddFiniteDiffPenaltyByFFDGrid yet)

Protected Member Functions

virtual int GetFiniteDiffByFFDGrid (float *afPD, zxhTransformFFDBase *pFFDGrid, int *aiCtrPnt, zxhTransformFFDBase *pDifferential)
virtual int GetFiniteDiffByFFDGridOnVector (float *afPD, zxhTransformFFDBase *pFFDGrid, int *aiCtrPnt, zxhTransformFFDBase *pDifferential, float *vector)
virtual int GetDiffByFFDGridForMMI (float *afPD, zxhTransformFFDBase *pFFDGrid, int *aiCtrPnt, zxhTransformFFDBase *pDifferential)
virtual int ComputeHistogramFromPDF4DFFD (zxhlfloat *&afPDF, zxhlfloat &fTotalFreq, float xfTestFrom, float xfTestTo, float yfTestFrom, float yfTestTo, float zfTestFrom, float zfTestTo, float tfTestFrom, float tfTestTo)
virtual int ComputeHistogramForControlPoint (zxhlfloat *&afPDF, zxhlfloat &fTotalFreq, int aiCtrPnt[ImageDimensionMax])
virtual void SetFFDMetricBase ()
 this function is to remind of setting m_pMetricBase in non-abstract derived class

Detailed Description

MIconstraint + FFD (mainly for FFD+SEMI) For similarity/ gradient computation, apply ResampleTestImagesSpacingPhysIntervel first.


Constructor & Destructor Documentation

zxhMetricMIFFD::~zxhMetricMIFFD ( void  )
Returns:

Member Function Documentation

zxhMetricBase * zxhMetricMIFFD::Clone ( zxhMetricBase *&  pRet) [virtual]
Returns:

Reimplemented from zxhMetricMIConstraint.

Reimplemented in zxhMetricMIFFDSEMI.

int zxhMetricMIFFD::ComputeHistogramForControlPoint ( zxhlfloat *&  afPDF,
zxhlfloat &  fTotalFreq,
int  aiCtrPnt[ImageDimensionMax] 
) [protected, virtual]

all point in control point local support volume are treated, if outlier or masked-out, then treated as background -> MI (call ComputeHistogramFromPDF4DFFD); -> MMI implement again 1) Sample on test image grid and pre transform field image grid (xfTestFrom would be change to integral), assuming pre transform field images are the same Dim Size Spacing as resampled test image and samplephysical 2) Using pre compute instead of TransformWorldToWorld

1) Sample on test image grid and pre transform field image grid (xfTestFrom would be change to integral), assuming pre transform field images are the same Dim Size Spacing as resampled test image and samplephysical 2) Using pre compute instead of TransformWorldToWorld

int zxhMetricMIFFD::ComputeHistogramFromPDF4DFFD ( zxhlfloat *&  afPDF,
zxhlfloat &  fTotalFreq,
float  xfTestFrom,
float  xfTestTo,
float  yfTestFrom,
float  yfTestTo,
float  zfTestFrom,
float  zfTestTo,
float  tfTestFrom,
float  tfTestTo 
) [protected, virtual]

TO avoid border control points only for MI (not MMI) 1) Sample on test image grid and pre transform field image grid (xfTestFrom would be change to integral), assuming pre transform field images are the same Dim Size Spacing as resampled test image and samplephysical 2) Using pre compute instead of TransformWorldToWorld

1) Sample on test image grid and pre transform field image grid (xfTestFrom would be change to integral), assuming pre transform field images are the same Dim Size Spacing as resampled test image and samplephysical 2) Using pre compute instead of TransformWorldToWorld

int zxhMetricMIFFD::GetDiffByFFDGridOnFFDPhysicalVector ( float *  afPD,
zxhTransformFFDBase pFFDGrid,
int *  aiCtrPnt,
zxhTransformFFDBase pDifferential,
float *  vector 
) [virtual]

currently using finite difference(no AddFiniteDiffPenaltyByFFDGrid yet)

1 compute the current trans on current local volume : FreqCurr, PDFCurr = tatal - currentvolume

2 forward

3 backward

4 return to current position

compute the value

Reimplemented from zxhMetricFFDBase.

int zxhMetricMIFFD::GetFiniteDiffByFFDGrid ( float *  afPD,
zxhTransformFFDBase pFFDGrid,
int *  aiCtrPnt,
zxhTransformFFDBase pDifferential 
) [protected, virtual]

1 compute the current trans on current local volume : = tatal - currentvolume

for each dimension

2 forward

4 return to current position

compute the value

4 return to current position

compute the value

int zxhMetricMIFFD::GetFiniteDiffByFFDGridOnVector ( float *  afPD,
zxhTransformFFDBase pFFDGrid,
int *  aiCtrPnt,
zxhTransformFFDBase pDifferential,
float *  vector 
) [protected, virtual]

1 compute the current trans on current local volume : FreqCurr, PDFCurr = tatal - currentvolume

2 forward

return to current position

3 backward

return to current position

compute the value

int zxhMetricMIFFD::GetValue ( zxhlfloat &  fValue) [virtual]
Returns:
similarity and number of computed pixel pair

Reimplemented from zxhMetricMIConstraint.

Reimplemented in zxhMetricMIFFDSEMI.

int zxhMetricMIFFD::GetValueByFFDGrid ( zxhlfloat &  fValue,
int  aiCtrPnt[ImageDimensionMax] 
) [virtual]

for MixtureProbabilityModel ONLY

This is NOLY for MixtureProbabilityModel m_afHistogram, m_fTotalFreq have been precomputed for this control point in EvaluateMMIpositionWeightedHistogram() of GetDiffByFFDGridForMMI

Implements zxhMetricFFDBase.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs