[Insight-users] convert between the point position in GLSliceView and index in the image

Sajendra N sajendra at gmail.com
Wed Dec 10 17:23:52 EST 2008


Luis,

Thanks for the quick answer, however it wasn't quite what I was
asking. I meant to ask what is the appropriate instance to use
    TransformPhysicalPointToContinuousIndex (point,  index);
vs
    TransformPhysicalPointToIndex( point, index );
and vice versa. I believe I understand when to use each, and normally
use continuousindex, but I don't believe it's spelled out in the
software guide. I may have missed it, so if you could point it out
that would be great.

Thanks again for your help,
Sajendra




On Wed, Dec 10, 2008 at 3:43 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> Sajendra,
>
>
> A) You will use:
>
>   image->TransformContinuousIndexToPhysicalPoint (index, point);
>
>   When you have the position of an index and you need to convert it
>   to the physical coordinates corresponding to taht index.
>
>
>
> B) You will use:
>
>    image->TransformPhysicalPointToContinuousIndex (point,  index);
>
>
>   When you have the position of a point in physical coordinates
>   and you need to convert it the image grid index coordinates.
>
>
> Please read the ITK Software Guide
>
>
>   http://www.itk.org/ItkSoftwareGuide.pdf
>
>
> in particular, you MUST read section:
>
>
>      4.1.4 "Defining Origin and Spacing"
>
> in pdf pages: 71-75.
>
>
>
>   Regards,
>
>
>      Luis
>
>
> ------------------
> Sajendra N wrote:
>>
>> Luis,
>>
>> Can you please elaborate on when one should use the methods you
>> mentioned, and one when should use:
>>   image->TransformContinuousIndexToPhysicalPoint (index, point);
>>   image->TransformPhysicalPointToContinuousIndex (point,  index);
>> I've found these methods more useful for my purposes, but the
>> documentation is lacking on when to use one and the other.
>>
>> Thank you
>>


More information about the Insight-users mailing list