我试图使用image_slicer函数将DICOM图像分割成平铺,但它无法识别DICOM。在
我已经阅读了DICOM并将其转换为np数组:
dcm_文件[0]
array([[-1024, -1024, -1024, ..., -1024, -1024, -1024],
[-1024, -1024, -1024, ..., -1024, -1024, -1024],
[-1024, -1024, -1024, ..., -1024, -1024, -1024],
...,
[-1024, -1024, -1024, ..., -1024, -1024, -1024],
[-1024, -1024, -1024, ..., -1024, -1024, -1024],
[-1024, -1024, -1024, ..., -1024, -1024, -1024]], dtype=int16)
并且能够通过以下方式查看图像:
^{pr2}$然后试着把它切开:
import image_slicer
image_slicer.slice(img, 64)
错误:“Image”对象没有属性“read”
谢谢!在
模块} module 。在
image_slicer
使用文件名,而不是文件实例。因此,必须将数组保存到某个局部。您可以为此使用^{相关问题 更多 >
编程相关推荐