我正在尝试学习如何使用pydicom
来读取和处理dicom
图像。我正在使用 Python 3。
import dicom
import numpy
ds = pydicom.read_file(lstFilesDCM[0])
print(ds.pixel_array)`
我得到一个错误NameError: name 'pydicom' is not defined
。如果我改变
ds = pydicom.read_file(lstFilesDCM[0])
至
ds = dicom.read_file(lstFilesDCM[0])
(dicom.read_file
改为使用),我收到以下错误:
NotImplementedError: Pixel Data is compressed in a format
pydicom does not yet handle. Cannot return array
我还验证了它pydicom
已正确安装和更新。
我该如何解决?