[Insight-users] Matching physical axes correctly on image read

Dženan Zukić dzenanz at gmail.com
Thu Dec 16 10:35:45 EST 2010


You need to use directions (transform matrix) in order to achieve all that.

X is the axis 0, Y 1 and Z 2, in image space. In world space they get
transformed using the said transform matrix (or directions + spacing).

I am sure you can find much more info if you search for it.

Regards,
Dženan

On Wed, Dec 15, 2010 at 19:20, David Nichols <dnichols at sourcesignal.com>wrote:

> My 'natural', image index oriented coordinate system is left handed.  I'm
> thinking that manipulating the itk origin and spacing can put things in the
> correct order.
>
> First, it seems that itk uses the C language index order, with the
> rightmost index changing most quickly. So, if I had an image with 120
> slices, each of which had 128 rows and 110 columns, I would declare it in C
> as
> short int Image[120][128][110];
> I want to set the origin of the physical coordinate system at voxel
> [0,0,0], with the x axis pointing in the direction of decreasing row, the y
> axis pointing in the direction of increasing column and the z axis pointing
> in the direction of increasing slice.  If I look at Image[k][i][j], then
> increasing x decreases i, increasing y increases j and increasing z
> increases k.
>
> Two issues. First, the examples in The Guide seem to assume that x goes
> with index 0, y with index 1 and z with index 2.  How do I permute things to
> get them as described above?  Secondly, to make an advancing row index point
> in the negative x direction, does one make the spacing negative in that
> dimension?  (This seems logical in one way and perverse in another.)
>  Finally, what would be the correct entries to use in a metaheader file?
>  One can use
>
> NDims = 3
> DimSize = 110 128 120
> ElementSize = 1 1 1
>
> but this doesn't give the x/y/z axes oriented as desired.
>
> I appreciate any advice you can provide.
>
> David
>
> _____________________________________
> 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/20101216/b368f0cb/attachment.htm>


More information about the Insight-users mailing list