[ITK] Problem with Writing Dicom Series

Sara Gh sg.ele.eng at gmail.com
Wed Jun 21 10:19:12 EDT 2017


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/20170621/190280fe/attachment.html>


More information about the Community mailing list