![]()  | 
  
    zxhproj v 2.2 
   zxhproj 
   | 
 
FFD GetValue: DO NOT call PreComputeTransformField DO NOT assume this anymore: ComputeConstanceForFFDGradient will resample testimage using m_afSamplingPhysical can do line-search in optimization, however line-search time consuming, NOT used not SIEMI. More...
#include <zxhMetricFFD2Base.h>
  
 Public Member Functions | |
| zxhMetricFFD2Base (void) | |
| constructor  | |
| ~zxhMetricFFD2Base (void) | |
| virtual std::string | GetMetricType () | 
| virtual zxhMetricFFDBase * | Clone (zxhMetricFFDBase *&pRet) | 
| virtual int | GetValueByFFDGrid (zxhlfloat &fValue, int aiCtrPnt[ImageDimensionMax]) | 
| virtual int | ComputeConstanceForFFDGradient () | 
| virtual int | GetDiffByFFDGrid (float *afPD, zxhTransformFFDBase *pFFDGrid, int *aiCtrPnt, zxhTransformFFDBase *pDifferential) | 
| virtual int | GetDerivativeFFDGrid (float *afPD, zxhTransformFFDBase *pFFDGrid, int *aiCtrPnt, zxhTransformFFDBase *pDifferential) | 
Protected Member Functions | |
| virtual bool | EvaluateAllPixelOnTargetForceForMetric ()=0 | 
| virtual bool | ComputeAllControlPointDerivativeBySumLocalEstimation () | 
| virtual void | InitMetricFFDConstant () | 
| constant variables for FFD related  | |
Protected Attributes | |
| zxhImageDataT< float > | m_imgVoxelForceConst [ImageDimensionMax] | 
FFD GetValue: DO NOT call PreComputeTransformField DO NOT assume this anymore: ComputeConstanceForFFDGradient will resample testimage using m_afSamplingPhysical can do line-search in optimization, however line-search time consuming, NOT used not SIEMI.
| zxhMetricFFD2Base::~zxhMetricFFD2Base | ( | void | ) | 
| zxhMetricFFDBase * zxhMetricFFD2Base::Clone | ( | zxhMetricFFDBase *& | pRet | ) |  [virtual] | 
        
Reimplemented from zxhMetricFFDBase.
| bool zxhMetricFFD2Base::ComputeAllControlPointDerivativeBySumLocalEstimation | ( | ) |  [protected, virtual] | 
        
sum m_imgVoxelForceConst and add to -> m_pCtrPntDerivativeConst, DO NOT need the control points coordinate to be on a voxel in order to use the bspline convolution quickly here we only use "coCenter = zxh::round(World2coCenter[0])" to find the round points
| virtual int zxhMetricFFD2Base::ComputeConstanceForFFDGradient | ( | ) |  [inline, virtual] | 
        
Call 1. EvaluateOnPixelOnTargetForce for EvaluateAllPixelOnTargetForceForMetric 2. InitMetricFFDConstant 3. ComputeAllControlPointDerivativeBySumLocalEstimation 4. AddAllCtrPntOnTargetForceForBendingEnergy adding the bending energy force to -> m_pCtrPntDerivativeConst
Implements zxhMetricFFDBase.
Reimplemented in zxhMetricCCFFD2, zxhMetricCCFFD2ConstDiscretePath, zxhMetricMIFFD2, zxhMetricMIFFD2ConstDiscretePath, and zxhMetricMIFFD2MultiImage.
| virtual bool zxhMetricFFD2Base::EvaluateAllPixelOnTargetForceForMetric | ( | ) |  [protected, pure virtual] | 
        
1. call EvaluateOnPixelSource2TargetForce to compute each voxel and minus the force direction 2. add weight info from m_pWeightModelTest(Ref)
Implemented in zxhMetricCCFFD2, and zxhMetricMIFFD2.
| virtual int zxhMetricFFD2Base::GetDiffByFFDGrid | ( | float * | afPD, | 
| zxhTransformFFDBase * | pFFDGrid, | ||
| int * | aiCtrPnt, | ||
| zxhTransformFFDBase * | pDifferential | ||
| ) |  [inline, virtual] | 
        
Diff = (forward-backward)/2steplength ( 2009-10-01) should compute the constant (call ComputeConstanceForFFDGradient) before calling this already including penalty terms (AddFiniteDiffPenaltyByFFDGrid)
for each dimension
2 forward
3 backward 2 steps
4 return to current position
compute the value
Reimplemented from zxhMetricFFDBase.
| virtual int zxhMetricFFD2Base::GetValueByFFDGrid | ( | zxhlfloat & | fValue, | 
| int | aiCtrPnt[ImageDimensionMax] | ||
| ) |  [inline, virtual] | 
        
for GetDiffByFFDGrid and GetDiffByFFDGridOnFFDPhysicalVector SHOULD be implemented in derived class when using zxhMetricFFDBase::GetDiffByFFDGrid and GetDiffByFFDGridOnFFDPhysicalVector To compute local similarity
Implements zxhMetricFFDBase.
zxhImageDataT<float> zxhMetricFFD2Base::m_imgVoxelForceConst[ImageDimensionMax] [protected] | 
        
store forces, same extent (or slightly bigger) as FFD and test image image spacing is the same as physical sampling interval