You can find the entire IPython Notebook here.
#View dcm file online series#
In this example I’m gonna use the MR dataset of my own head, discussed in the DICOM Datasets section, and the pydicom package, to load the entire series of DICOM data into a 3D NumPy array and visualize two slices through matplotlib.
#View dcm file online how to#
In this, first of two posts I will show how to use the pydicom package, which consists of pure-python code, is hosted on pypi, and can be easily installed through pip as such: pip install pydicomĪs is often the case with many Python packages, while this package is called pydicom it simply goes by dicom within Python and needs to be imported with import dicom. In order to follow this post extract the contents of this file alongside the IPython Notebooks, the contents of which I’ll be presenting in the pydicom Usage section and the VTK Usage section. Therefore, for the purposes of these posts I decided to use a dataset from an MR examination of my own fat head.