pydicom and my code is pretty straightforward:
image = np.stack([s.pixel_array for s in scans])
But this gives a runtime error:
RuntimeError: The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. GDCM), Pillow (req. Pillow)
I'm not sure what to do. Any help would be.. helpful.
If GDCM is giving you problems, give Pillow a go.
python -m pip install pillow
Make sure to install in the correct environment.