[Insight-developers] Bug in BSplineInterpolateImageFunction

Cartik Sharma cartik.sharma at gmail.com
Wed Apr 24 10:46:51 EDT 2013


Thanks for clarifying this bug, bezier splines guarantee continuity with
value at derivative. I look forward
to applying differentiable and continuous interpolation (with knot wise
polarity) with this additional bug fix.

Best regards,
Cartik Sharma
http://about.me/sharmacartik


On Wed, Apr 24, 2013 at 9:33 AM, <M.Staring at lumc.nl> wrote:

>  Dear all,****
>
> ** **
>
> The BSplineInterpolateImageFunction class has two functions to compute
> the derivative:
> - EvaluateDerivativeAtContinuousIndex
> - EvaluateValueAndDerivativeAtContinuousIndex****
>
> The first one does take direction cosines into account, the other does
> not. When called while using an image with non-trivial direction
> cosines, the two derivatives are not equal.****
>
> I believe this bug was introduced a long time ago by commit
> 6abbc7969a90786c4c73f5d191f634db536c2d1d :****
>
> ** **
>
>
> http://itk.org/gitweb?p=ITK.git;a=commitdiff;h=6abbc7969a90786c4c73f5d191f634db536c2d1d#patch13
> ****
>
> ** **
>
> I attached a test program that simply calls the two functions. The input
> of the test program (set with interpolator->SetInputImage() ) is an image
> with direction cosines:****
>
> (-0, 7.48376e-009, -1, 7.48376e-009, 1, 7.48376e-009, 1, -7.48376e-009, 0)
> ****
>
> ** **
>
> Current output:****
>
> EvaluateDerivative:         [42.7697, -9.97885, 22.2913]****
>
> EvaluateValueAndDerivative: [-22.2913, -9.97885, 42.7697]****
>
> But that should really be the same. Note that the first and third entry
> are switched, and negated.****
>
> ** **
>
> I filed a gerrit entry which proposes a fix:****
>
> http://review.source.kitware.com/#/c/11016/****
>
> ** **
>
> After that fix the output is as follows:****
>
> EvaluateDerivative:         [42.7697, -9.97885, 22.2913]****
>
> EvaluateValueAndDerivative: [42.7697, -9.97885, 22.2913]****
>
> So, equal as it should be.****
>
> ** **
>
> Looking forward to your feedback,****
>
> Regards, Marius****
>
> ** **
>
> Marius Staring, PhD****
>
> Division of Image Processing (LKEB)****
>
> Department of Radiology****
>
> Leiden University Medical Center****
>
> PO Box 9600, 2300 RC Leiden, The Netherlands****
>
> phone: +31 (0)71 526 2137, fax: +31 (0)71 524 8256****
>
> m.staring at lumc.nl****
>
> ** **
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
>
> 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-developers
>
>


-- 
"There is plenty of room at the bottom!" R. Feynman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20130424/217303ff/attachment.htm>


More information about the Insight-developers mailing list