Convert coordinates


(wonny) #1

Hello all!

I am a beginner to learn ITK.
I want to know how do I convert image coordinates into world coordinates. For example, I have a coordinate, (-57.81263, -0.0006029, -529.4), and I want to express this coordinate in image into coordinate in world.

Thank you for your any help.


(Matt McCormick) #2

Welcome to ITK!

Great question.

As explained in The ITK Software Guide,

For a given index I3X1, the physical location P3X1 is calculated as following:

(4.1)

where D is an orthonormal direction cosines matrix and S is the image spacing diagonal matrix.)

See also,

Figure 4.1: Geometrical concepts associated with the ITK image.


(Matt McCormick) #3

Also, the function to call is TransformContinuousIndexToPhysicalPoint on an itk::Image.