[Insight-users] Weird physical coordinates

Bill Lorensen bill.lorensen at gmail.com
Tue Oct 18 13:22:10 EDT 2011


Floating point round-off. Since .2 is not a multiple of 1/16. If the spacing
were .25, I would expect a 0.0.


On Tue, Oct 18, 2011 at 12:52 PM, Panagiotis Foteinos <pafotein at gmail.com>wrote:

> Hello users.
>
> I noticed that whenever the coordinates of a voxel center should be
> zero, the value 2.26498e-07 is computed instead. For example, I have
> an image of spacing [0.2, 0.2, 0.2], and iterating though it gives the
> following result for the physical coordinates of 5 consecutive pixels:
> ******************************
> [-0.4, -15.2, -5.2]
> [-0.2, -15.2, -5.2]
> [2.26498e-07, -15.2, -5.2]
> [0.2, -15.2, -5.2]
> [0.4, -15.2, -5.2]
> ******************************
>
> The increment happens along the x-axis, and you can see the patern:
> -0.4 -> -0.2 -> 2.26498e-07 -> 0.2 -> 0.4. Why 2.26498e-07 and not 0
> as it is supposed to be?
>
>
> Any comments?
>
>
> Best Regards,
> Panagiotis Foteinos
> _____________________________________
> 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/20111018/eeb35c38/attachment.htm>


More information about the Insight-users mailing list