在 macOS 上安装 SimpleElastix for Python3



我正在使用macOS Sierra 10.12.6,试图安装SimpleITK的SimpleElastix扩展。我一直按照这里的说明进行操作。在我让它工作后,事实证明,当我使用 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'

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

感谢您的任何建议,

汤姆·

你可以点击这个链接来安装:https://simpleelastix.readthedocs.io/GettingStarted.html#compiling-on-linux

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

最新更新