NotImplementedError: The pixel data with transfer syntax JPEG 2000 Image Compression (Lossless Only)

Posted AI浩

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了NotImplementedError: The pixel data with transfer syntax JPEG 2000 Image Compression (Lossless Only)相关的知识,希望对你有一定的参考价值。

  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

以上是关于NotImplementedError: The pixel data with transfer syntax JPEG 2000 Image Compression (Lossless Only)的主要内容,如果未能解决你的问题,请参考以下文章

NotImplementedError: Only the following pseudo-classes are implemented: nth-of-type.

YOLOv5 报错:“NotImplementedError: Could not run ‘torchvision::nms‘ with arguments from the ‘CUDA‘ back

YOLOv5 报错:“NotImplementedError: Could not run ‘torchvision::nms‘ with arguments from the ‘CUDA‘ back

NotImplementedError:无法转换符号张量

为啥返回 NotImplemented 而不是引发 NotImplementedError

NotImplementedError:分配中的无效类型