Reputation: 43609
I'm using 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.
Upvotes: 5
Views: 14432
Reputation: 561
Installing python-gdcm solved my problem
pip install python-gdcm
Upvotes: 2
Reputation: 2508
I have encountered the same problem and I already had pillow
installed. The solution was to update pydicom
and install gdcm
(see here) as pointed out in this post by @Ali Türkay Avci. Using anaconda, you do:
conda install -c conda-forge gdcm
Upvotes: 3
Reputation: 2041
If GDCM is giving you problems, give Pillow a go.
python -m pip install pillow
Make sure to install in the correct environment.
Upvotes: 6