av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術文章
文章詳情頁

在python中讀取* .mhd / *。raw格式

瀏覽:3日期:2022-08-07 14:08:13
如何解決在python中讀取* .mhd / *。raw格式?

最簡單的方法是使用SimpleITK(MedPy也將ITK用于.mhd / .raw文件)。命令

pip install SimpleITK

適用于許多python版本。要讀取.mhd /.raw,可以從kaggle使用此代碼

import SimpleITK as sitkimport numpy as np’’’This funciton reads a ’.mhd’ file using SimpleITK and return the image array, origin and spacing of the image.’’’def load_itk(filename): # Reads the image using SimpleITK itkimage = sitk.ReadImage(filename) # Convert the image to a numpy array first and then shuffle the dimensions to get axis in the order z,y,x ct_scan = sitk.GetArrayFromImage(itkimage) # Read the origin of the ct_scan, will be used to convert the coordinates from world to voxel and vice versa. origin = np.array(list(reversed(itkimage.Getorigin()))) # Read the spacing along each dimension spacing = np.array(list(reversed(itkimage.GetSpacing()))) return ct_scan, origin, spacing解決方法

誰能告訴我如何讀取包含python中的 .mhd / .raw文件的數據集的方式?

標簽: Python 編程
相關文章:
主站蜘蛛池模板: 日日操av| 日韩免费一区二区三区 | 欧美一级片 | 99热99re6国产在线播放 | 日韩二区三区 | 亚洲精彩视频 | 午夜大片 | 曰本一级片 | 亚洲综合伊人 | 99精品网站 | 国产成人精品一区二区 | 欧美一级做性受免费大片免费 | 成人一级黄色片 | 黄色a级网站| 欧美日韩黄 | 夜色在线影院 | 俺去俺来也在线www色官网 | 欧美黄色网 | 中文字幕av一区二区三区谷原希美 | 久草手机在线视频 | 女人久久久 | 一级黄色片免费观看 | 午夜精品福利视频 | 国产精品网站在线观看 | 女同一区二区 | 国产精品免费一区二区三区 | 高清一区二区 | 九九国产视频 | 日本香蕉视频 | 毛片毛片毛片 | 国产一区二区在线播放 | 欧美日韩国产三级 | 国产一区精品在线观看 | 精品久久久久久久 | 国产午夜视频在线观看 | 中文字幕国产视频 | 日本黄a三级三级三级 | www.青青草 | 午夜网| 免费看的黄色片 | 国产97视频 |