Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python open dicom

import pydicom as dicom
import matplotlib.pylab as plt

# specify your image path
image_path = 'data/train_images/sample.dcm'
ds = dicom.dcmread(image_path)

plt.imshow(ds.pixel_array)
Comment

PREVIOUS NEXT
Code Example
Python :: zermelo python 
Python :: seasonal_decompose python 
Python :: how to get current time in milliseconds in python 
Python :: check cuda available tensorflow 
Python :: python generate list alphabet 
Python :: plt ax title 
Python :: exit python script 
Python :: how to make any player hit a ball using python turtle 
Python :: github black badge 
Python :: how to use datetime to tell your age in python 
Python :: python turtle window not responding 
Python :: python template generics 
Python :: python sort dataframe by one column 
Python :: how to reset a variable in python 
Python :: how to make a pygame window 
Python :: reject invalid input using a loop in python 
Python :: how to add subplots for histogram in pandas 
Python :: where to find python interpreter 
Python :: python random phone number 
Python :: adaptive thresholding cv2 python 
Python :: tkinter text in canvas 
Python :: leaky relu keras 
Python :: django update increment 
Python :: python yaml parser 
Python :: how to stop running code in python 
Python :: python tkinter delete label 
Python :: check if coroutine python 
Python :: python print exception 
Python :: python if else short version 
Python :: how to download a file in python using idm 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =