[Insight-users] Linear interpolator bug in IsInsideBuffer()
Ivan Macia
imacia at vicomtech.org
Thu Jun 17 13:18:19 EDT 2010
2010/6/17 Luis Ibanez <luis.ibanez at kitware.com>
> On Wed, Jun 16, 2010 at 11:36 AM, Simon Warfield <
> simon.warfield at childrens.harvard.edu> wrote:
>
>> insight-users-request at itk.org wrote:
>>
>>> Date: Wed, 16 Jun 2010 09:46:09 -0400
>>> From: Luis Ibanez <luis.ibanez at kitware.com>
>>> Subject: Re: [Insight-users] Interpolation and centered pixel
>>> coordinates
>>> To: D?enan Zuki? <dzenanz at gmail.com>
>>> Cc: insight-users at itk.org
>>> Message-ID:
>>> <AANLkTikQna2jtbdcwpMTZtWmGC5KZnEMf1dTN2_9fOY- at mail.gmail.com>
>>> Content-Type: text/plain; charset="utf-8"
>>>
>>> D?enan,
>>>
>>> We did quite a heavy testing when we fixed
>>> the problem of centered pixel coordinates.
>>>
>>> The Dashboard was green when we released
>>> ITK 3.18, which give us some confidence on
>>> the correctness of the code.
>>>
>>> --
>>>
>>> Please note that it is your responsibility to call
>>>
>>> interpolator->IsInsideBuffer( point )
>>>
>>>
>>>
>>
>> There is a bug in the interpolator API. The expectation of the API is
>> that if the interpolator can legally address the coordinates of the point
>> then all of the surrounding discrete indexes can be legally addressed. Of
>> course this is not always true, but last time I looked, none of the
>> interpolators check that the discrete coordinates they look up are still
>> inside the image. It is a problem for interpolation near the boundaries of
>> the image. This is particularly a problem for interpolators with a large
>> window region.
>>
>> --Simon
>>
>> ------------------------------------------------------------------
>
>
> Simon,
>
> Thanks for pointing this out.
>
> This seems to be the same problem that Ivan is reporting.
>
>
> Dzenan,
>
> Please to log a bug entry for this issue:
> http://public.kitware.com/Bug/my_view_page.php
>
>
> Thanks
>
>
> Luis
>
>
>
Hi again,
Just to let Simon know, I answered in another post that it was my fault this
time, sorry. A bounds check is performed when using
ITK_USE_CENTERED_PIXEL_COORDINATES_CONSISTENTLY. This was introduced by Luis
in revision 1.42 of itkLinearInterpolateImageFunction.txx. However there
seems to be no check when this is not defined. I will check my old failing
programs again.
Best regards
Iván
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100617/acf37465/attachment.htm>
More information about the Insight-users
mailing list