Dicom Image 3D Mainpulation
Dicom Image 3D Mainpulation
Use the first of the DICOM files to read in some of the metadata, specifically the image
dimensions, the pixel-spacing, and the slice-thickness
Load all the pixel data into an appropriate sized NumPy array named ArrayDicom
https://nbviewer.jupyter.org/urls/bitbucket.org/somada141/pyscience/raw/master/20140906_PythonDicom/Material/PythonDicomPy… 1/3
1/1/2021 Jupyter Notebook Viewer
Visualize
In [14]: pyplot.figure(dpi=300)
pyplot.axes().set_aspect('equal', 'datalim')
pyplot.set_cmap(pyplot.gray())
pyplot.pcolormesh(x, y, numpy.flipud(ArrayDicom[:, :, 80]))
https://nbviewer.jupyter.org/urls/bitbucket.org/somada141/pyscience/raw/master/20140906_PythonDicom/Material/PythonDicomPy… 2/3
1/1/2021 Jupyter Notebook Viewer
In [15]: pyplot.figure(dpi=300)
pyplot.axes().set_aspect('equal', 'datalim')
pyplot.set_cmap(pyplot.gray())
pyplot.pcolormesh(z, x, numpy.flipud(ArrayDicom[:, 115, :]))
In [ ]:
https://nbviewer.jupyter.org/urls/bitbucket.org/somada141/pyscience/raw/master/20140906_PythonDicom/Material/PythonDicomPy… 3/3