<div dir="ltr">Hi Francois,<div><br></div><div>Even after explicitly setting the geometry metadata before saving the DICOM series, the metadata is not loaded back when I read the saved image in ITK. I believe ITK saves the metadata (I can see it when I load the saved series in ImageJ), but it's just not loaded back.</div><div><br></div><div>It seems to me that ITK/GDCM saves the DICOM series under Secondary Capture SOP class by default, and since the geometry metadata are not mandatory for this class, ITK just doesn't load it back. When I change the SOP class (see Stackoverflow post below), the geometry metadata are indeed loaded back.</div><div><br></div><div>Do you or anyone else here know if there is another appropriate SOP class that we can save images coming from non-DICOM sources such that the geometry metadata are saved & loaded by ITK/GDCM?</div><div><br></div><div><a href="https://stackoverflow.com/questions/40462879/image-position-orientation-not-written-when-saving-itkimage-as-dicom">https://stackoverflow.com/questions/40462879/image-position-orientation-not-written-when-saving-itkimage-as-dicom</a></div><div><br></div><div>Thanks,</div><div>--Fijoy<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 7, 2017 at 12:43 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hello Fijoy,<br><br></div>As far as I know this example is the best way to do what you are trying to do. ITK does not currently have an easy way to save an itk::Image as a DICOM series.<br></div>Thanks,<br><br></div>Francois<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-h5">On Fri, Jul 7, 2017 at 11:04 AM, Fijoy Vadakkumpadan <span dir="ltr"><<a href="mailto:tofijoy@gmail.com" target="_blank">tofijoy@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div dir="ltr">Hello,<div><br></div><div>What is the best way to write a 3D itk::Image to DICOM series in a way that preserves geometry metadata (slice positions, orientation, and spacing)?</div><div><br></div><div>The itk::Image I'm referring to is coming from a non-DICOM source. I tried to use itk::ImageSeriesWriter with itk::GDCMImageIO as the IO type to do the above writing. But that does not seem to automatically pick up the metadata from the image object - when I read the written series back (using itk::ImageSeriesReader), only the in-plane spacing is correctly set. After some research, I found this example</div><div><br></div><div><a href="https://itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM" target="_blank">https://itk.org/Wiki/ITK/Examp<wbr>les/DICOM/ResampleDICOM</a><br></div><div><br></div><div>which explicitly sets the metadata dictionary for each slice before writing. Is this the best way?</div><div><br></div><div>Thanks,</div><div>--Fijoy</div></div>
<br></div></div>______________________________<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>
</blockquote></div><br></div></div></div>