If I remember correctly, X index varies quickest. But yes, setting proper values into the direction matrix should solve your problem.<div><br></div><div>Dženan<br><br><div class="gmail_quote">On Sat, Dec 18, 2010 at 01:16, David Nichols <span dir="ltr"><<a href="mailto:dnichols@sourcesignal.com">dnichols@sourcesignal.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div text="#000000" bgcolor="#ffffff">
Thanks for the clarification. So, it's always true that X is axis 0
(where the index varies most slowly), Y is axis 1 and Z is axis 2
(where the index varies most quickly). So, all I need to do if
apply an affine transform to change the axes to point into the
desired direction. For instance, something like <br>
[[ 0, 0, 1, 0 ]<br>
[ -1, 0, 0, 0 ]<br>
[ 0, 1, 0, 0 ]<br>
[ 0, 0, 0, 1 ] ]<br>
will do what I want.<br>
<br>
David<br>
<blockquote type="cite"><div><div></div><div class="h5">You need to use directions (transform matrix) in order
to achieve all that.
<div><br>
</div>
<div>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).</div>
<div><br>
</div>
<div>I am sure you can find much more info if you search for it.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Dženan<br>
<br>
<div class="gmail_quote">On Wed, Dec 15, 2010 at 19:20, David
Nichols <span dir="ltr"><<a href="mailto:dnichols@sourcesignal.com" target="_blank">dnichols@sourcesignal.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">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.<br>
<br>
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<br>
short int Image[120][128][110];<br>
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.<br>
<br>
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<br>
<br>
NDims = 3<br>
DimSize = 110 128 120<br>
ElementSize = 1 1 1<br>
<br>
but this doesn't give the x/y/z axes oriented as desired.<br>
<br>
I appreciate any advice you can provide.<br>
<br>
David<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information
visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote>
</div>
<br>
</div>
</div></div><pre><div><div></div><div class="h5">
<fieldset></fieldset>
_____________________________________
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>
Visit other Kitware open-source projects at
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>
Kitware offers ITK Training Courses, for more information visit:
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a>
Please keep messages on-topic and check the ITK FAQ at:
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a></div></div>
__________ NOD32 5708 (20101216) Information __________
This message was checked by NOD32 antivirus system.
<a href="http://www.eset.com" target="_blank">http://www.eset.com</a>
</pre>
</blockquote>
<br>
</div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>