【问题标题】:Install SimpleElastix for Python3 on macOS在 macOS 上为 Python3 安装 SimpleElastix
【发布时间】:2017-11-14 15:30:36
【问题描述】:

我正在使用 macOS Sierra 10.12.6,尝试安装 SimpleITK 的 SimpleElastix 扩展。我一直遵循here 的指示。在我让它工作之后,结果发现这个扩展似乎只包含在我使用 Python 2.7 时的 SimpleITK 中,而不是当我使用 Python 3.6 时,因为当我尝试时

import SimpleITK as sitk
resultImage = sitk.Elastix(sitk.ReadImage("fixedImage.nii"), sitk.ReadImage("movingImage.nii"))

我得到了错误

AttributeError: module 'SimpleITK' has no attribute 'Elastix'

我找到了这个suggestion,但无法让它在我的 Mac 上运行。

感谢您的建议,

TomD

【问题讨论】:

    标签: python python-3.x itk elastix simpleitk


    【解决方案1】:

    您可以点击此链接安装:https://simpleelastix.readthedocs.io/GettingStarted.html#compiling-on-linux

    注意上次的python安装,我用的是Ubuntu16.04,我的python在我用户的anaconda下,你应该使用不带sudo的python安装,但它不起作用。所以在运行python setup.py install之前需要将build文件夹的权限改为777

    【讨论】:

      猜你喜欢
      • 2021-04-27
      • 1970-01-01
      • 2019-11-13
      • 2019-12-22
      • 2022-11-15
      • 2013-06-30
      • 2017-12-19
      • 2018-03-27
      • 2015-08-20
      相关资源
      最近更新 更多