[Insight-users] Boundary nodes for cubic BSplineDeformableTransform?

Luis Ibanez luis.ibanez at kitware.com
Thu Oct 22 21:04:28 EDT 2009


Hi Motes,

Yes, I see your point too, regarding the right side.

My recolection is that the reason relates to the
fact that the domain inside every cell of the BSpline
grid is Open in one side and Closed on the other.

That is, something like

            G(i-1)      <=      X     <   Gi

but, that being said,
This may have changed with the recent revision
of the pixel-centered coordinates computation.

It may be that now the extra node on the right side
is not really being used.

I would suggest to write a minimal 1-D to test
this assumption. (e.g. whether that BSpline node
on the right is needed or not).

Would you like to give it a try at writing that test ?


Please let us know,


      Thanks


           Luis


----------------------------------------------------------
On Thu, Oct 22, 2009 at 3:40 PM, motes motes <mort.motes at gmail.com> wrote:
> On Wed, Oct 21, 2009 at 6:42 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>> Hi Motes,
>>
>> From your diagram,
>>
>>> http://img21.imageshack.us/img21/2756/nodes2.jpg
>>
>> If you number the nodes from left to right as:
>>
>> * 1 to 3 for the first three empty circles on the left,
>> * 4 to 8 for the full (black) circles in the middle,  and
>> * 9 to 11 for the last three empty circles on the right
>>
>> Note that the BSpline kernels that contribute to the
>> a point located t an epsilon distance to the right of
>> node #4, are only the once centered in nodes:
>>
>>                        3,4,5,6
>>
>> (The BSpline kernels have finite support, they don't
>>  bounce back once they have touched zero.)
>>
>> Therefore you don't need more that one extra node
>> to the left of the grid.
>
>
> Ok I think I see your point, but the same argument would also satisfy
> on the right side. When a pixel is just a little to the left of the
> last full black circle #8 only the nodes:
>
>                          6,7,8,9
>
> contribute.  So why are two extra kernels needed on the right side
> instead of only one as on the left side?
>
>
>
>>
>>
>>     Regards,
>>
>>
>>           Luis
>>
>>
>> -----------------------------------------------------------
>> On Sat, Oct 17, 2009 at 4:36 PM, motes motes <mort.motes at gmail.com> wrote:
>>> I have asked this question before but it still seems to cause me
>>> problems. From the theory of BSplines at most k k-order basisfunctions
>>> are non-zero:
>>>
>>> http://cse.taylor.edu/~btoll/s99/424/res/mtu/Notes/spline/bspline-property.htm
>>>
>>> A cubic basisfunction has order k=4 where order = degree+1. Which
>>> means that at most 4 cubic bspline basisfunctions are non-zero.
>>>
>>> In ITK I have declared a 2D BSplineDeformableTransform like this:
>>>
>>> ....
>>> ....
>>>    // Specifying the degree not the order!
>>>    typedef itk::BSplineDeformableTransform<double, 2 , 3>
>>> BSplineTransformType;
>>>    typedef typename BSplineTransformType::RegionType           RegionType;
>>>    typedef typename BSplineTransformType::SpacingType          SpacingType;
>>>    typedef typename BSplineTransformType::OriginType             OriginType;
>>>    typename BSplineTransformType::Pointer transform =
>>> BSplineTransformType::New();
>>>    typename FixedImageType::RegionType fixedRegion =
>>> imageF->GetBufferedRegion();
>>>    RegionType bsplineRegion;
>>>    typename RegionType::SizeType gridSizeOnImage;
>>>    typename RegionType::SizeType gridBorderSize;
>>>    typename RegionType::SizeType totalGridSize;
>>>
>>>    // B-spline stuff
>>>    gridSizeOnImage.Fill(5);
>>>    gridBorderSize.Fill(3);    // Border for spline order = 3 ( 1
>>> lower, 2 upper )
>>>    ....
>>>    ....
>>>
>>> From the itkSoftwareGuide this gives a bspline grid of 8*8 nodes where
>>> only 5*5 covers the image. I have tried to illustrate this in the
>>> below figure:
>>>
>>> http://img26.imageshack.us/img26/5585/nodes.jpg
>>>
>>> But in that case only the pixels in the image that are located between
>>> the 3. and 4. BSpline node will have full support. But is that not
>>> wrong?
>>>
>>> To my understanding a correct approach would be to specify 3 extra
>>> nodes outside the image on both sides. I have tried to illustrate this
>>> below:
>>>
>>> http://img21.imageshack.us/img21/2756/nodes2.jpg
>>>
>>> Using this BSpline grid will gurantee that all pixels in the image
>>> will have full support.
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>


More information about the Insight-users mailing list