<div dir="ltr">Hi Francois,<div><br></div><div>Does ITK use the tag (0020,0032) to read the image position of patient? Actually, we already update this information after the interpolation on each of slices.</div><div><br></div><div>The original image, </div><div>1st slice,  (0020,0032) DS [-99.730746057061\-117.69366503814\-55.15114060703] #  50, 3 ImagePositionPatient</div><div>2nd slice, (0020,0032) DS [-99.730746057061\-117.56660042109\-54.159246165521] #  50, 3 ImagePositionPatient</div><div>That's mean the slice thickness is 1mm/pixel.</div><div><br></div><div>While after interpolation, we saved the image,</div><div>1st slice, (0020,0032) DS [-99.7307\-117.694\-55.1511]             #  26, 3 ImagePositionPatient</div><div>2nd slice,(0020,0032) DS [-99.7307\-117.44\-53.1674]              #  26, 3 ImagePositionPatient</div><div>That's mean the slice thickness is 2mm/pixel.</div><div><br></div><div>Does these right? we want to know which tag are you using and we can modify our software for writing DICOM. Thanks again!</div><div><br></div><div>Ying</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 6, 2017 at 4:01 PM, Francois Budin <span dir="ltr"><<a href="mailto:francois.budin@kitware.com" target="_blank">francois.budin@kitware.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"><div><div><div><div>Hello Sean,<br><br></div>As Bill said, it is the slice location that is used to compute the image spacing: The average spacing between all slices is computed and sets as your output image interslice spacing.<br></div>For the order of the files though, it is based on the order in which the files are given to the image reader. Typically, one uses "itk::GDCMSeriesFileNames" and sets an input directory. This will create a list of all the files contained in that directory and these files will be ordered alphabetically. That means that 1.dcm is after 01.dcm, 2.dcm is after 11.dcm, and so on. You can either rename your files to make sure that they are ordered correctly, as you did, or use a customized function to generate your series of files to read that fits your need.<br><br></div>Hope this helps,<br></div>François<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 6, 2017 at 3:42 PM, Sean Sethi <span dir="ltr"><<a href="mailto:sethisea@gmail.com" target="_blank">sethisea@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">Hi Bill, <div><br></div><div>I shared this information with our developer. We already rewrite image position in our processed data. Can you please look at the data sets which I linked?<div><br></div><div>And I have to disagree about the display of the image. I attached image showing ITK's display of dicoms before and after I renamed the filenames only. You can see the beforehand image where the discontinuities are in coronal and sagittal view. Those headers should be the same since I did not change them.</div><span class="m_-6079054011010671672HOEnZb"><font color="#888888"><div><br></div><div>Sean<br></div></font></span></div></div><div class="m_-6079054011010671672HOEnZb"><div class="m_-6079054011010671672h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 6, 2017 at 2:59 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="auto"><div>It's uses the image position patient tag to determine slice location. Image spacing is not used. Also, it does not use the name of them for ordering. Once again it uses Ipp.</div><div id="m_-6079054011010671672m_8873317590970711626m_-2027775201008624747AppleMailSignature"><br></div><div id="m_-6079054011010671672m_8873317590970711626m_-2027775201008624747AppleMailSignature">This is common practice in medical image processing software.<br><br>Sent from my iPad</div><div><div class="m_-6079054011010671672m_8873317590970711626h5"><div><br>On Jul 6, 2017, at 12:11 PM, Sean Sethi <<a href="mailto:sethisea@gmail.com" target="_blank">sethisea@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi everyone,<div><br></div><div>I am encountering a dicom read issue with data that was processed using a collapsing filter by our software. The <a href="https://www.dropbox.com/s/wsf6rb3edoritj9/02-MPRAGE%20T1.zip?dl=0" target="_blank">original data</a> is 0.5x0.5x1 mm^3 which is collapsed to a <a href="https://www.dropbox.com/s/7f34ahrmho938gb/KCROP1X1X2.zip?dl=0" target="_blank">dataset of  1x1x2 mm^3.</a></div><div><br></div><div>The first error that is noticed is the data appear squished axially, and the slice thickness is incorrectly read, even though the header file has the correct information. (slice thickness=2, spacing between slices=2). </div><div><br></div><div><div>The second error that I see is due to it incorrectly reading the numbering of the dicoms. It shows every 11th or so image as out of order, which is coming from reading the numbers in order of 1, 10, 11, 12 etc instead of 1, 2,3. When the files are number 01, 02, 03, the issue is corrected, but image still appears squashed.</div><div><br></div><div>Both the issues are also corrected when the collapsed data is converted to NIFTI. So my question is how should we write our DICOM files so they are read correctly? Are the thicknesses and spacings computed from other tag(s)? </div><div><br></div><div>Thank you for consideration,</div><div><br></div><div><span style="font-size:12.8px">Sean</span><br style="font-size:12.8px" clear="all"></div></div><div><span style="font-size:12.8px"><br></span></div><div><br></div>-- <br><div class="m_-6079054011010671672m_8873317590970711626m_-2027775201008624747gmail_signature"><div dir="ltr"><div>Sean Sethi, M.S.<br>Research, The MRI Institute for Biomedical Research </div><div>Data processing, Magnetic Resonance Innovations, Inc.<br>440 East Ferry Street, Unit #1<br>Detroit, MI 48202<br><a href="tel:(313)%20758-0065" value="+13137580065" target="_blank">(313) 758-0065</a>  - Tel<br><a href="tel:(313)%20758-0068" value="+13137580068" target="_blank">(313) 758-0068</a> - Fax<br><a href="mailto:sethisea@gmail.com" target="_blank">sethisea@gmail.com</a><br><a href="http://www.mrimaging.com/" style="font-size:12.8px" target="_blank">http://www.mrimaging.com/</a><br></div><div><a href="http://www.mrinnovations.com" target="_blank">http://<span style="font-size:12.8px">www.mrinnovations.com</span></a><br></div></div></div>
</div>
</div></blockquote></div></div><blockquote type="cite"><div><span>______________________________<wbr>_________________</span><br><span>Community mailing list</span><br><span><a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a></span><br><span><a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/community</a></span><br></div></blockquote></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-6079054011010671672m_8873317590970711626gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Sean Sethi, M.S.<br>Research, The MRI Institute for Biomedical Research </div><div>Data processing, Magnetic Resonance Innovations, Inc.<br>440 East Ferry Street, Unit #1<br>Detroit, MI 48202<br><a href="tel:(313)%20758-0065" value="+13137580065" target="_blank">(313) 758-0065</a>  - Tel<br><a href="tel:(313)%20758-0068" value="+13137580068" target="_blank">(313) 758-0068</a> - Fax<br><a href="mailto:sethisea@gmail.com" target="_blank">sethisea@gmail.com</a><br><a href="http://www.mrimaging.com/" style="font-size:12.8px" target="_blank">http://www.mrimaging.com/</a><br></div><div><a href="http://www.mrinnovations.com" target="_blank">http://<span style="font-size:12.8px">www.mrinnovations.com</span></a><br></div></div></div>
</div>
</div></div><br>______________________________<wbr>_________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/community</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="color:rgb(136,136,136)">Ying Wang</span><br><span style="color:rgb(153,153,153)">Research Assistant</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Department of Biomedical Engineering</span><br></div><span style="color:rgb(153,153,153)"><span style="background-color:rgb(255,255,255)">Wayne State University</span></span><br style="color:rgb(136,136,136)"><div><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">440 East Ferry Street </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Detroit, MI 48202</span><br style="color:rgb(136,136,136)"><a style="color:rgb(136,136,136)" value="+13137580065">313-758-0065</a><span style="color:rgb(136,136,136)"> - Tel Ext: 30</span><br style="color:rgb(136,136,136)"><a style="color:rgb(136,136,136)" value="+13137580068">313-758-0068</a><span style="color:rgb(136,136,136)"> - Fax </span><br style="color:rgb(136,136,136)"><a href="mailto:neuying@gmail.com" target="_blank">neuying@gmail.com</a><span style="color:rgb(136,136,136)"> - Email</span>
</div></div></div>
</div>