首页 > 其他分享 >花了两天时间搞定的bug:Unable to convert the Pixel Data as the 'pylibjpeg-libjpeg' plugin is not ins

花了两天时间搞定的bug:Unable to convert the Pixel Data as the 'pylibjpeg-libjpeg' plugin is not ins

时间:2022-08-31 18:12:05浏览次数:67  
标签:convert 读取 libjpeg pylibjpeg installed gdcm 安装

BUG发生场景:在使用Pydicom包读取含下列压缩类型中的JPEG Lossless (Process 14, SV1)的dcm图像时,由下图可知需要安装GDCM或者pylibjpeg才能进行正常读取。然而,笔者不仅仅安装了教程中的所有包,还用import进行导入,在读取时仍然提示没有安装pylibjpeg-libjpeg插件。

解决办法:使用GDCM解压->先安装pip install "python-gdcm",然后导入import gdcm。接下来,使用Pydicom官网提示的decompress函数进行解压,即ds.decompress(handler_name="gdcm"),即可解决上述报错。

当搜遍全网都没有相应的这类帮助时,不妨多看看官网,真的leimu。

标签:convert,读取,libjpeg,pylibjpeg,installed,gdcm,安装
From: https://www.cnblogs.com/Andy-huang/p/16644081.html

相关文章