PyDICOM can't read pixel data and needs GDCM or Pillow

╄→尐↘猪︶ㄣ 提交于 2019-12-02 02:13:52

问题


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.


回答1:


If GDCM is giving you problems, give Pillow a go.
python -m pip install pillow
Make sure to install in the correct environment.



来源:https://stackoverflow.com/questions/54657768/pydicom-cant-read-pixel-data-and-needs-gdcm-or-pillow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!