[Insight-users] convert between the point position in GLSliceView and index in the image
Luis Ibanez
luis.ibanez at kitware.com
Wed Dec 10 14:02:36 EST 2008
Hi Yaoyaho,
Simply hit the "P" key and GLsliceview will show you the coordinates of
the clicked point in physical units (mm) instead of indices.
In general, whenever you need to convert between one an the other, you
can use the methods:
image->TransformIndexToPhysicalPoint( index, point );
image->TransformPhysicalPointToIndex( point, index );
Regards,
Luis
------------------
Yaoyao Zhu wrote:
> Hi, all,
>
>
>
> Does anyone know what is the relation between the real point position in
> GLSliceView and the index in the image shown. i.e., I can get the point
> position clicked
>
>
>
> X = Fl::event_x(),
>
> Y= h()-Fl::event_y()
>
>
>
> I know the corresponding the index of the image shown in the GLSliceView by
>
>
>
> getClickedPoint()
>
>
>
> But what about the opposite, i.e. from the index of the image to the
> real position of the window?
>
>
>
> Thanks in advance
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list