读取DICOM并使用matplotlib进行绘图时,没有可用的图像处理程序可以解码此传输语法JPEG无损 [英] No available image handler could decode this transfer syntax JPEG Lossless when read DICOM and ploting using matplotlib

查看:200
本文介绍了读取DICOM并使用matplotlib进行绘图时,没有可用的图像处理程序可以解码此传输语法JPEG无损的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在python3.6中使用pydicom时,出现了一些问题:

When i use pydicom in python3.6, there are some problem:

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()

问题出在这里:

该问题如何解决?非常感谢!

How can this problem be solved? Thank you very much!

推荐答案

在对上面建议的链接进行了一些研究之后,我遇到了同样的问题.我设法通过更新到最新的pydicom模块"1.2.0"并安装gdcm来解决了该问题.您可以使用以下方式更新pydicom pip install -U git+https://github.com/pydicom/pydicom.git

I've faced with the same problem, after doing some research on the suggested link above. I've managed to solve it by updating to the latest pydicom module "1.2.0" and installing gdcm. You can update the pydicom with pip install -U git+https://github.com/pydicom/pydicom.git

您可以在此处链接说明了安装过程.

You can find the latest gdcm here and this link explains the installation.

我使用anaconda,安装gdcm软件包并解决问题更加容易.如果您使用水蟒 只需从您的环境中输入: conda install pydicom --channel conda-forge获取pydicom的最新消息和

I use anaconda and it's easier to install the gdcm package and solve the problem. If you use anaconda just type inside from your environment: conda install pydicom --channel conda-forge to get pydicom's latest and

conda install -c conda-forge gdcm

获取gdcm.这样可以解决问题.希望这些会有所帮助.

to get the gdcm. This resolves the problem. Hope these will help.

这篇关于读取DICOM并使用matplotlib进行绘图时,没有可用的图像处理程序可以解码此传输语法JPEG无损的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆