[Insight-users] SupportIndex in BSplineInterpolationWeightFunction
Bing Jian
bjian at cise.ufl.edu
Tue, 3 Feb 2004 20:58:56 -0500 (EST)
Hi, Luis,
I came across some code in itkBSplineDeformableTransform and
itkBSplineInterpolationWeightFunction and got one question on
the support index.
In itkBSplineDeformableTransform::Transform(),
there is a call: m_WeightsFunction->Evaluate(index, weights,supportIndex).
I understand supportIndex is supposed to be used in extraction of the
supportRegion from CoefficientImage. But I am wondering the computation of
this supportindex which is implemented in
BSplineInterpolationWeightFunction::Evaluate().
The supportindex (or the startindex) is set to be
floor(index[j] - splineorder/2)
Is it correct? for example, if index = [0,0], splineorder = 3, then
supportindex will be negative number. In this case, I think, the
correct formula should be simply floor(index[j]) but their origins
are in different positions.
To make things clear, let me give a simple illustration below.
Suppose splineorder = 3, the size of real image is divided into 4*4
patches (denoted by +) and coefficient image is 7*7 (denoted by *)
The pixels in upperleft patch is controled by the upperleft 4*4
control points. In this case, floor(index) = 0 and supportindex
should also be 0. Am I right?
* * * * * * *
* * * * * * *
+ + + +
* * * * * * *
+ + + +
* * * * * * *
+ + + +
* * * * * * *
+ + + +
* * * * * * *
* * * * * * *
Thanks in advance!
--
Best wishes,
Bing Jian
bjian at cise.ufl.edu