Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DICOM Structure Files
#1
Hello!
Would anyone be able to suggest a way to read in and display DICOM medical structure files such as those exported on Eclipse™? While traditional DICOM images are easily converted to arrays with .pixel_array, DICOM structure files are not presentable in this way. Thanks for any help and suggestion of libraries with this capability!
The following does not run:

import pydicom
import numpy
import matplotlib.pyplot as plt 
from PIL import Image

DCM = pydicom.dcmread(“Structure.dcm”)
grid = DCM.pixel_array
plt.imshow(grid)
Thanks again!!
Reply
#2
You probably need to explore what other methods DCM-instance has? May be this file contains several raster bands like gis-data files.
As far as I understood, line #6 in your code was executed without any errors. So, everything should be inside DCM variable.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dicom Files spillai 2 2,006 Oct-12-2021, 06:00 PM
Last Post: menator01
  Looping through Folder structure and get files mfkzolo 0 1,889 Nov-02-2020, 08:31 AM
Last Post: mfkzolo
  Dicom image reading smitha 2 3,206 Feb-09-2020, 03:12 AM
Last Post: Larz60+
  Trying to invert DICOM image with Python 3.6 newmanf 1 5,710 Feb-28-2018, 08:49 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020