【问题标题】:I read nifti image (.nii) using simpleITK. Image is in Image<float,3> format. How to convert this image into C# array and display it on unity?我使用 simpleITK 阅读了 nifti 图像 (.nii)。图像采用 Image<float,3> 格式。如何将此图像转换为 C# 数组并统一显示?
【发布时间】:2021-10-01 08:39:06
【问题描述】:
    void ReadImage(string path)
    {
        eText.text = path;   
        itk.simple.Image input = SimpleITK.ReadImage(path);
        Debug.Log(input);
    }

Debug.Log 给出 Image 我需要将此图像转换为类似于 python 中可用的 sitk.GetArrayFromImage() 方法的 C# 数组。

【问题讨论】:

    标签: c# unity3d image-processing itk


    【解决方案1】:

    在 CSharp(和其他封装语言)中,您可以使用 GetBufferAsFloat 方法获取图像的副本。

    您可以在 SimpleITK CSharp 集成示例中看到它的使用情况:

    https://simpleitk.readthedocs.io/en/master/link_CSharp_docs.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-03
      • 2011-02-09
      • 1970-01-01
      相关资源
      最近更新 更多