作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试实现该包:
https://pyradiomics.readthedocs.io/en/latest/usage.html
看起来非常简单,但他们需要 .nrrd 文件。我的文件是.nii.gz。我该如何解决这个问题?另外,有人尝试过在 TCIA 数据上应用 PyRadiomics 吗?如果是的话,我可以看看你的 github 或 Jupyter Notebook 吗?
非常感谢。
最佳答案
您可以先将 NII 转换为 numpy 数组,然后使用以下方法将其转换为 NRRD:
import numpy as np
import nibabel as nib
import nrrd
# Download NII
example_filename = "image.nii.gz"
image = nib.load(example_filename)
# Turn into numpy array
array = np.array(img.dataobj)
# Save NRRD
nrrd_path_to = "image.nrrd"
nrrd.write(image_path_to, array)
关于python - 带有 .nii.gz 文件的医学成像 (PyRadiomics),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50845524/
我正在尝试实现该包: https://pyradiomics.readthedocs.io/en/latest/usage.html 看起来非常简单,但他们需要 .nrrd 文件。我的文件是.nii.
我是一名优秀的程序员,十分优秀!