[Insight-users] Image to world coordinates

Dženan Zukić dzenanz at gmail.com
Wed Jun 30 07:45:07 EDT 2010


Yes, I am interested in a plain formula for those conversions. The code in
ITK is very convoluted - optimized for performance not for clarity.

Dženan

On Mon, Jun 28, 2010 at 15:08, Vincent Garcia <
Vincent.Garcia at sophia.inria.fr> wrote:

> 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
>>
>>
> _____________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100630/7c95f44e/attachment.htm>


More information about the Insight-users mailing list