[Insight-users] Interpolation and centered pixel coordinates

Luis Ibanez luis.ibanez at kitware.com
Wed Jun 16 09:46:09 EDT 2010


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 )

before you call

     interpolator->Evaluate( point );


That is, your code should take the form:


   if(    interpolator->IsInsideBuffer( p1 ) )
      {
      p2 = interpolator->Evaluate( p1 );
      }


--

If you still find run-time errors, please
post to the list a minimal code example
that displays the problem.


    Thanks


        Luis


----------------------------------------------------------
2010/6/11 Dženan Zukić <dzenanz at gmail.com>

> Hi everyone,
>
> I am running into some crashes in
> \InsightToolkit-3.18.0\Code\Common\itkLinearInterpolateImageFunction.txx
> (line 150), and I wonder could it be due to recent move to consistent use of
> centered pixels (physical coordinates going from -spacing/2 to
> (n-1)*spacing+spacing/2, instead of 0 to n*spacing). Did anyone have
> encounters with similar problems? More specifically, does
> TransformPhysicalPointToContinuousIndex in
> \InsightToolkit-3.18.0\Code\Common\itkImageBase.h honor the centered pixel
> coordinates?
>
> Regards,
> Dženan
>
> _____________________________________
> 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://www.kitware.com/products/protraining.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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100616/afd700f2/attachment.htm>


More information about the Insight-users mailing list