[Insight-users] Image to world coordinates

Dan Mueller dan.muel at gmail.com
Mon Jun 28 04:58:37 EDT 2010


Hi Vincent,

The following will convert an index in "image" coordinates to a
physical point in "world" coordinates:
    image->TransformIndexToPhysicalPoint( index, point );

This function is specified in Common/itkImageBase.h

HTH

Cheers, Dan

On 28 June 2010 09:48, Vincent Garcia <Vincent.Garcia at sophia.inria.fr> wrote:
> Hi all,
>
> When you read a medical image (let's say 3D), you have a 3D matrix
> containing image data and some information about the position/orientation of
> the image in the world coordinates. Given the image coordinates (i,j,k), I'd
> like to understand how to compute the corresponding world coordinates
> (x,y,z).
> I have access to some information from the itk::Image object:
>
> GetOrigin () : (vector) position of the first voxel in the world coordinates
> GetSpacing () : (vector) size of the voxels in mm
> GetDirection () : (matrix) direction cosine
>
> I've tried to search on the documentation but I haven't found the way to use
> these vectors and matrix to compute the world coordinates.
> The formula should be very simple but I just can't found it.
>
> Many thanks,
>
> Vincent Garcia
> _____________________________________
> 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
>


More information about the Insight-users mailing list