[Insight-users] Physical point to index conversion consistency

Karthik Krishnan karthik.krishnan at kitware.com
Tue Dec 16 11:07:18 EST 2008


Andriy Fedorov wrote:
> Hi,
>
> I was observing some strange visual artifacts produced by my ITK code,
> and here's what I found out.
>
> In some cases it is possible that the conversion point->index and back
> to index->point is not always consistent: if index1 maps to point1, it
> doesn't mean point1 will map to index1.
>
> I seems to me this error is introduced during cast truncations. Is
> this normal/expected behavior?
>   
Yes.

If you wish to convert to structured coordinates while preserving the 
parametric coordinates within a voxel, you should use the 
ContinuousIndex instead.

There are the methods Image::TransformPhysicalPointToContinuousIndex and 
Image::TransformContinuousIndexToPhysicalPoint
> Andriy Fedorov
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>   

-- 
Karthik Krishnan
R & D Engineer,
Kitware Inc,
Ph:  518 371 3971 x119
Fax: 518 371 3971



More information about the Insight-users mailing list