zxhproj v 2.2
zxhproj

zxhMetricMIFFD2 Class Reference

MIconstraint + FFD2 GetValue: call PreComputeTransformField assume this : ComputeConstanceForFFDGradient will resample testimage using m_afSamplingPhysical can do line-search in optimization, however line-search time consuming, NOT used not SIEMI. More...

#include <zxhMetricMIFFD2.h>

Inheritance diagram for zxhMetricMIFFD2:
zxhMetricMIConstraint zxhMetricFFD2Base zxhMetricMI zxhMetricFFDBase zxhMetricBase zxhMetricMIFFD2ConstDiscretePath zxhMetricMIFFD2MultiImage

List of all members.

Public Member Functions

 zxhMetricMIFFD2 (void)
 constructor
 ~zxhMetricMIFFD2 (void)
virtual std::string GetMetricType ()
virtual zxhMetricBaseClone (zxhMetricBase *&pRet)
virtual int GetValue (zxhlfloat &fvalue)
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 ComputeConstanceForFFDGradient ()
 pre compute:
virtual void SetAlwaysUpdateGetValue (bool b)
virtual bool GetAlwaysUpdateGetValue (void)

Protected Member Functions

virtual void SetFFDMetricBase ()
 this function is to remind of setting m_pMetricBase in non-abstract derived class
virtual void EvaluateOnPixelSource2TargetForce (zxhlfloat *afForce, int iLengthOfHistogramDim, const float *gridCoTest, const float *gridCoRef) const
virtual bool EvaluateAllPixelOnTargetForceForMetric ()

Protected Attributes

bool m_bAlwaysUpdateGetValue

Detailed Description

MIconstraint + FFD2 GetValue: call PreComputeTransformField assume this : ComputeConstanceForFFDGradient will resample testimage using m_afSamplingPhysical can do line-search in optimization, however line-search time consuming, NOT used not SIEMI.


Constructor & Destructor Documentation

zxhMetricMIFFD2::~zxhMetricMIFFD2 ( void  )
Returns:

Member Function Documentation

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

Reimplemented from zxhMetricMIConstraint.

Reimplemented in zxhMetricMIFFD2ConstDiscretePath, and zxhMetricMIFFD2MultiImage.

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

1) To reimplement this func in zxhMetricMI, in order to use TransformPointToWorldUsingPreComputed 2) assumes sample physical = test image sp = pre-transform field image sp

Reimplemented from zxhMetricMI.

bool zxhMetricMIFFD2::EvaluateAllPixelOnTargetForceForMetric ( ) [protected, virtual]

Call 1. EvaluateOnPixelOnTargetForce for NMI 2. 3. ComputeAllControlPointDerivativeBySumLocalEstimation 4. AddAllCtrPntOnTargetForceForBendingEnergy adding the bending energy force to -> m_pCtrPntDerivativeConst 1. call EvaluateOnPixelSource2TargetForce to compute each voxel and minus the force direction 2. add weight info from m_pWeightModelTest(Ref)

1. call EvaluateOnPixelSource2TargetForce to compute each voxel and minus the force direction (test image sp = sampling = pre-transform sp = voxel force const sp) 2. add weight info from m_pWeightModelTest(Ref)

Implements zxhMetricFFD2Base.

void zxhMetricMIFFD2::EvaluateOnPixelSource2TargetForce ( zxhlfloat *  afForce,
int  iLengthOfHistogramDim,
const float *  gridCoTest,
const float *  gridCoRef 
) const [protected, virtual]

CrumIPMI03's idea, the force to transform source image toward target using parzen window PDF estimation, only give NMI derivatves 1. ComputeConstanceForGradient() called with m_afC_H? and m_afFreqTotal, m_fNormalisedMutualInformation, m_fEntropyJ 2. gridCoTest are integral 3. DHist/du = sum_{all (x,y) related p()}(1+logp)Dp/du ; sum_{all (x,y) related p()} = sum_{-2,2bspline p()} 4. Dp()_{x,y}/du = Bspline(It(x))Dbspline(Ir(y))GradientRef(y)[]*(1/Binsize), 1/Binsize is omitted 5. The weight info from m_pWeightModelTest(Ref) should be computed here, however to improve the computation, we include that in EvaluateAllPixelOnTargetForceForNMI

1. ComputeConstanceForGradient() called with m_afC_H? and m_afFreqTotal 2. gridCoTest are integral 3. DHist/du = sum_{all (x,y) related p()}(1+logp)Dp/du ; sum_{all (x,y) related p()} = sum_{-2,2bspline p()} 4. Dp()_{x,y}/du = 1/(fTotalFreq)* Bspline(It(x))Dbspline(Ir(y))GradientRef(y)[]*(1/Binsize), NOTE some softwares do not have 1/Binsize because they normalized the image intensity using the binsize this in effect is equivalent to ours because they will result in using 1/Binsize in the image gradient values.

Reimplemented from zxhMetricMI.

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

Reimplemented from zxhMetricMIConstraint.

Reimplemented in zxhMetricMIFFD2MultiImage.


Member Data Documentation

in gradient descent optimization, ComputeConstanceForFFDGradient is called and metric value has been computed therefore, unless m_bAlwaysUpdateGetValue is set to true, GetValue should not recompute the metric again default: true


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