[ITK] Problem with Writing Dicom Series

Sara Gh sg.ele.eng at gmail.com
Fri Jun 23 11:47:12 EDT 2017


Dear Ziv,

Thank you for your reply.

I tried the sample code; however, I am getting below error:
'ImageSeriesReader' object has no attribute 'MetaDataDictionaryArrayUpdateOn'.
Do you know how I should fix that? I have installed SimpleITK using python
binary package for the Anaconda and currently, its version is
simpleitk 1.0.0-py27_0.

Sincerely,
Sara


On Wed, Jun 21, 2017 at 10:41 AM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] <
zivrafael.yaniv at nih.gov> wrote:

> Hello Sara,
>
>
>
> Please take a look at this example on readthedocs (part of the Examples
> found in the SimpleITK source):
>
> http://simpleitk.readthedocs.io/en/latest/Examples/
> DicomSeriesReadModifyWrite/Documentation.html
>
>
>
> 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.).
>
>
>
> 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.
>
>
>
>       hope this helps
>
>               Ziv
>
>
>
> *From: *Sara Gh <sg.ele.eng at gmail.com>
> *Date: *Wednesday, June 21, 2017 at 10:19 AM
> *To: *"community at itk.org" <community at itk.org>
> *Subject: *[ITK] Problem with Writing Dicom Series
>
>
>
> Hello,
>
>
>
> 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.
>
>
>
> Here is my write method:
>
>
>
> def WriteDicomSeries(imagein,outDir):
>
>     writer = sitk.ImageSeriesWriter()
>
>     filenames = [ outDir+'MR_{0:04}.dcm'.format(i) for i in
> range(imagein.GetSize()[2])]
>
>     writer.SetFileNames(filenames)
>
>     writer.Execute(imagein)
>
>
>
> Thanks,
>
> Sara
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170623/f3e00cac/attachment.html>


More information about the Community mailing list