<div dir="ltr">ITK uses a right handed coordinate system. That is why in this case, the last slice is the origin slice. At last that&#39;s what I recall.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Aug 8, 2013 at 1:10 PM, marianabb <span dir="ltr">&lt;<a href="mailto:marianabb@gmail.com" target="_blank">marianabb@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I am using ITK-4.3.2 to create a volume from a stack of DICOM single-frame<br>
images of the heart.<br>
<br>
Most of the code is taken from the example DicomSeriesReadImageWrite2.cxx,<br>
and the basics work, but I&#39;m confused about whether the volume origin<br>
produced is correct.<br>
<br>
The volume is composed of 14 slices, with spacing [1.0, 1.0, 8.0], the first<br>
and last slices have the following origins (Image Position Patient, DICOM<br>
tag 0020,0032):<br>
- First slice: 42.021, -174.562, 159.592<br>
- Last slice: -27.608, -102.908, 188.461<br>
<br>
The resulting file created with ITK has the last slice IPP as the image<br>
origin, but if I open the original DICOM files with Slicer or Matlab the<br>
resulting image has the first slice IPP as the origin.<br>
<br>
I thought that maybe ITK was just using the IPP of the last file it read,<br>
but if I read the slices in the opposite order (last slice as first as so<br>
on) the resulting origin is still the same as before.<br>
<br>
I understand also that Slicer and DICOM files use the top-left voxel as the<br>
origin, while ITK uses the bottom-left voxel, but this still doesn&#39;t explain<br>
using the last slice IPP.<br>
<br>
Any thoughts on this matter would be of great help.<br>
<br>
Thanks!<br>
--<br>
Mariana<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/is-DICOM-volume-origin-calculation-correct-tp7583709.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/is-DICOM-volume-origin-calculation-correct-tp7583709.html</a><br>

Sent from the ITK Insight Users mailing list archive at Nabble.com.<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.php" target="_blank">http://www.kitware.com/products/protraining.php</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><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>