花了两天时间搞定的bug:Unable to convert the Pixel Data as the 'pylibjpeg-libjpeg' plugin is not installed
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。

浙公网安备 33010602011771号