NotImplementedError: The pixel data with transfer syntax JPEG 20
【摘要】 File "C:\Users\shuyuan0\Desktop\PoolFormer_Demo\aa.py", line 24, in <module> plt.imshow(ds.pixel_array,cmap='bone') File "C:\Users\shuyuan0\AppData\Roaming\Python\Python39\site-packages\pydic...
File "C:\Users\shuyuan0\Desktop\PoolFormer_Demo\aa.py", line 24, in <module>
plt.imshow(ds.pixel_array,cmap='bone')
File "C:\Users\shuyuan0\AppData\Roaming\Python\Python39\site-packages\pydicom\dataset.py", line 1887, in pixel_array
self.convert_pixel_data()
File "C:\Users\shuyuan0\AppData\Roaming\Python\Python39\site-packages\pydicom\dataset.py", line 1444, in convert_pixel_data
self._convert_pixel_data_without_handler()
File "C:\Users\shuyuan0\AppData\Roaming\Python\Python39\site-packages\pydicom\dataset.py", line 1556, in _convert_pixel_data_without_handler
raise last_exception # type: ignore[misc]
File "C:\Users\shuyuan0\AppData\Roaming\Python\Python39\site-packages\pydicom\dataset.py", line 1536, in _convert_pixel_data_without_handler
self._do_pixel_data_conversion(handler)
File "C:\Users\shuyuan0\AppData\Roaming\Python\Python39\site-packages\pydicom\dataset.py", line 1563, in _do_pixel_data_conversion
arr = handler.get_pixeldata(self)
File "C:\Users\shuyuan0\AppData\Roaming\Python\Python39\site-packages\pydicom\pixel_data_handlers\pillow_handler.py", line 174, in get_pixeldata
raise NotImplementedError(
NotImplementedError: The pixel data with transfer syntax JPEG 2000 Image Compression (Lossless Only), cannot be read because Pillow lacks the JPEG 2000 plugin
Process finished with exit code 1
解决方法
pip install --upgrade pillow
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)