[Insight-users] Image to world coordinates

Vincent Garcia Vincent.Garcia at sophia.inria.fr
Mon Jun 28 09:08:54 EDT 2010


Thank you. The only problem here is that you have to check the source 
code to interpret the origin, spacing, and direction cosine value.
It should be written into the programming guide, or at least somewhere. 
When you know the correct formula, the answer is straight forward.
I'll try to write something about that in a next email if anyone wants 
to know the answer to my question.
One more time, thank you!

Vincent


Dan Mueller wrote:
> 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
>>
>>     
> _____________________________________
> 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