码迷,mamicode.com
首页 > 其他好文 > 详细

SimpleITK中术语

时间:2020-03-20 11:00:38      阅读:84      评论:0      收藏:0      [点我收藏+]

标签:img   https   tail   pre   data   article   mic   target   csdn   

SimpleITK中,各术语对应如下:

Width: 宽度,X轴,矢状面
Height: 高度,Y轴,冠状面
Depth: 深度, Z轴,横断面

技术图片引用自:https://blog.csdn.net/JianJuly/article/details/99547691

GetArrayFromImage()可用于将SimpleITK对象转换为ndarray

import SimpleITK as sitk
# 实验用的图片大小为320*250*80,
# 即矢状面(x轴方向)切片数为320,冠状面(y轴方向)切片数为250,
# 横断面(z轴方向)片数为80 
# 如上图所示

path = ‘E:\COVID-19CTimageAnal\label\00018.dcm
image = sitk.ReadImage(path)# convert to ndarry
data = sitk.GetArrayFromImage(image)
shape_data = data.shape
print(fshape of data: {shape_data})

输出:

shape of data: (80, 250, 320)

原始SimpleITK数据的存储形式为(Width, Height, Depth)即(X,Y,Z),使用GetArrayFromImage()方法后,X轴与Z轴发生了对调,输出形状为:(Depth, Height, Width)即(Z,Y,X)。

SimpleITK中术语

标签:img   https   tail   pre   data   article   mic   target   csdn   

原文地址:https://www.cnblogs.com/dyc99/p/12529867.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!