首页 > 学院 > 开发设计 > 正文

1 pydicom使用体验

2019-11-08 19:26:43
字体:
来源:转载
供稿:网友

1 安装 http://pydicom.readthedocs.io/en/stable/getting_started.html windows需要下载exe文件安装,linux直接命令安装即可 2 使用 https://pyscience.WordPRess.com/2014/09/08/dicom-in-python-importing-medical-image-data-into-numpy-with-pydicom-and-vtk/ 3 测试

# coding: utf-8# In[66]:import dicom# In[67]:plan = dicom.read_file('C://Users//hx133330//Documents//Python Scripts//digest_article//brain_001.dcm')# In[68]:plan# In[69]:plan.PixelSpacing# In[70]:31.2500//0.859375# In[71]:cd digest_article/# In[72]:print plan.pixel_array[167][170]# In[73]:print plan.pixel_array# In[74]:import matplotlib.pyplot as plt# In[75]:plt.figure()# In[76]:plt.imshow(plan.pixel_array)# In[77]:plt.show()

效果图 这里写图片描述


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表