<div dir="ltr"><div><font face="arial, helvetica, sans-serif">Dear Ziv,</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><font face="arial, helvetica, sans-serif">Thank you for your reply.</font><div><font face="arial, helvetica, sans-serif"><br></font><div><font face="arial, helvetica, sans-serif">I tried the sample code; however, I am getting below error:</font></div><div><font face="arial, helvetica, sans-serif">'ImageSeriesReader' object has no attribute '<wbr>MetaDataDictionaryArrayUpdateO<wbr>n'. Do you know how I should fix that? I have installed SimpleITK using python binary package for the Anaconda and currently, its version is <span style="font-variant-ligatures:no-common-ligatures">simpleitk 1.0.0-py27_0</span><span style="font-variant-ligatures:no-common-ligatures">.</span></font></div><div><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, helvetica, sans-serif">Sincerely,</font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, helvetica, sans-serif">Sara</font></span></div>
<div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 21, 2017 at 10:41 AM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] <span dir="ltr"><<a href="mailto:zivrafael.yaniv@nih.gov" target="_blank">zivrafael.yaniv@nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_6899714350900973977WordSection1">
<p class="MsoNormal">Hello Sara,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Please take a look at this example on readthedocs (part of the Examples found in the SimpleITK source):<u></u><u></u></p>
<p class="MsoNormal"><a href="http://simpleitk.readthedocs.io/en/latest/Examples/DicomSeriesReadModifyWrite/Documentation.html" target="_blank">http://simpleitk.readthedocs.<wbr>io/en/latest/Examples/<wbr>DicomSeriesReadModifyWrite/<wbr>Documentation.html</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Writing a valid DICOM series which contains all of the tag information you need may be tricky, depending on the information you need to encode in the meta-data dictionary (private tags etc.).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">As a side note, the problem you have with the series writer is that it is writing each of the images into its own series.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> hope this helps<u></u><u></u></p>
<p class="MsoNormal"> Ziv<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Sara Gh <<a href="mailto:sg.ele.eng@gmail.com" target="_blank">sg.ele.eng@gmail.com</a>><br>
<b>Date: </b>Wednesday, June 21, 2017 at 10:19 AM<br>
<b>To: </b>"<a href="mailto:community@itk.org" target="_blank">community@itk.org</a>" <<a href="mailto:community@itk.org" target="_blank">community@itk.org</a>><br>
<b>Subject: </b>[ITK] Problem with Writing Dicom Series<u></u><u></u></span></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hello, <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have a question regarding writing Dicom series using SimpleITK in Python. I read a 3D scan, resampled it, and stored it as a Dicom series. However, when I try to read the stored data, I am unable to load the whole 3D images and it only
displays one of the slices. It seems that the header is corrupted. I would be thankful if someone could help me to fix this issue. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Here is my write method:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">def WriteDicomSeries(imagein,<wbr>outDir):<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> writer = sitk.ImageSeriesWriter()<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> filenames = [ outDir+'MR_{0:04}.dcm'.format(<wbr>i) for i in range(imagein.GetSize()[2])] <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> writer.SetFileNames(filenames)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> writer.Execute(imagein)<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Sara<u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>
</blockquote></div><br></div></div></div>