[ITK] Problem with Writing Dicom Series

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


Dear Ziv,

Thank you for your reply. Should I change the version of SimpleITK to 1.1.0
<https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageSeriesReader.html>
or 1.0.0?

Thanks,
Sara

On Fri, Jun 23, 2017 at 11:57 AM, Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] <
zivrafael.yaniv at nih.gov> wrote:

> Hello Sara,
>
>
>
> As you correctly identified, the problem is with the version of SimpleITK.
> The addition of the meta-data dictionaries to the series reader was done
> after the release of version 1.0.0.
>
>
>
> As an immediate solution, you will need to build SimpleITK yourself. For
> Anaconda we have a build recipe on github: https://github.com/SimpleITK/
> SimpleITKCondaRecipe#process
>
>
>
> Please follow the detailed instructions there (read all of the
> instructions before you start the build as you will need to change the
> version of SimpleITK you are building, currently set to 1.0.0 and you need
> master).
>
>       regards
>
>            Ziv
>
>
>
> *From: *Sara Gh <sg.ele.eng at gmail.com>
> *Date: *Friday, June 23, 2017 at 11:47 AM
> *To: *"Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]" <zivrafael.yaniv at nih.gov>
> *Cc: *"community at itk.org" <community at itk.org>
> *Subject: *Re: [ITK] Problem with Writing Dicom Series
>
>
>
> 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/22830263/attachment.html>


More information about the Community mailing list