<div dir="ltr">Hi Bill,<div><br></div><div>Thanks for the answer.</div><div><br></div><div>Maybe that makes sense when reading the image with ITK, but the problem remains when I write the volume to another file, since ITK modifies the IPP tag of the DICOM file to be the last slice. As a result, if I open this new file with Slicer for example, the new origin is the last slice and the image is in the incorrect position. </div>
<div><br></div><div>Shouldn't ITK use the DICOM standard when writing a DICOM file and use the first slice origin as the IPP?</div><div><br></div><div>Regards,</div><div class="gmail_extra"><div><div dir="ltr"><div>--</div>
Mariana<br></div></div>
<br><br><div class="gmail_quote">On Thu, Aug 8, 2013 at 10:11 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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's what I recall.<br><br></div><div class="gmail_extra"><div><div class="h5"><br><br>
<div class="gmail_quote">
On Thu, Aug 8, 2013 at 1:10 PM, marianabb <span dir="ltr"><<a href="mailto:marianabb@gmail.com" target="_blank">marianabb@gmail.com</a>></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'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'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></div></div><span class="HOEnZb"><font color="#888888">-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</font></span></div>
</blockquote></div><br></div></div>