一套用于操作医学图像的有用工具。
I2T2的Python项目详细描述
智能成像工具和任务(I2T2)
Library of useful tools for Medical Imaging Handling
安装说明和使用示例如下所示。在
安装
强烈建议您在虚拟环境(conda或其他)中安装I2T2
及其依赖项,这样就不会干扰系统范围内的python包。在
- 通过github下载安装:
gitclonehttps://github.com/UCSF-intelligent-imaging/I2T2/cdI2T2condacreate-nI2T2python=3.7condaactivateI2T2pipinstallnbdevjupyterpipinstall-e.condainstall-cconda-forgegdcm
- 通过pip安装(最新稳定版本)
测试您的安装
condaactivateI2T2python>>>importI2T2
注:
I2T2
使用GDCM来解压缩某些dicom。在
确保通过conda install -c conda-forge gdcm
在conda环境中安装了GDCM
condaactivateI2T2python>>>importgdcm
使用I2T2
# example usage:
from I2T2.io import *
import matplotlib.pyplot as plt
data_path = '../data/knee/'
try:
array = load_dcm(path_to_dicom_dir = data_path, sort_by_slice_location=True)
plt.imshow(array[:,:,0])
plt.show()
except:
print('could not load array')
- 项目
标签: