当我在python3.6中使用pydicom时,出现一些问题:
import pydicom
import matplotlib.pyplot as plt
import os
import pylab
filePath = "/Users/zhuangrui/Documents/Python/Dicom/dicoms/zhang_bo/0001.dcm"
dataSet_1 = pydicom.dcmread(filePath)
plt.imshow(dataSet_1.pixel_array)
plt.show()
这是问题所在:
请问这个问题如何解决?非常感谢!
在对上面建议的链接进行一些研究后,我遇到了同样的问题。我已经通过更新到最新的 pydicom 模块“1.2.0”并安装 gdcm 设法解决了这个问题。您可以使用以下命令更新 pydicompip install -U git+https://github.com/pydicom/pydicom.git
你可以找到最新的gdcmhere and this链接解释了安装。
我使用anaconda,更容易安装gdcm包并解决问题。如果你使用蟒蛇
只需从您的环境中输入:conda install pydicom --channel conda-forge
获取 pydicom 的最新版本
conda install -c conda-forge gdcm
获取 gdcm。这样就解决了问题。希望这些会有所帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)