[英]Install SimpleElastix for Python3 on macOS
我正在使用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上使用。
感谢您的任何建议,
TomD
您可以按照以下链接进行安装: https : //simpleelastix.readthedocs.io/GettingStarted.html#compiling-on-linux
请注意最后一次安装python,我使用Ubuntu16.04,并且我的python在我的用户的anaconda下,您应该使用不带sudo的python安装,但它将无法工作。 所以您需要在运行python setup.py install之前将build文件夹的权限更改为777。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.