Unhandled exit code when loading Nifti with SimpleITK in python

跟風遠走 提交于 2020-01-25 21:26:10

问题


I am trying to load .nii.gz files using SimpleITK in python using PyCharm. Ideally, ITK has a NIFTI class and I followed these tutorials, so I presume SimpleITK has a wrapper for NIFTI class in ITK. The issue is I get a weird exit code which has no documentation (as per google) like this

Process finished with exit code -1073741819 (0xC0000005)

The code is as simple as it gets :

import numpy as np
import SimpleITK as sitk

image = sitk.ReadImage(filename)
imageSize = image.GetSize()

I also tried using nibabel library to load the same image format but I always get a MemoryError, even though, TaskManager (not the best approach) says I have sufficient memory.

The file is ~123 Mb. Any help would be appreciated!


回答1:


So to anyone who might land onto this problem, it was an issue with the version of python. I was using 32 bit Python on a 64 bit Windows PC, when I changed it to 64 bit Python and installed the wheels files here, the strange exit code was gone. I would also recommend following this.



来源:https://stackoverflow.com/questions/39921855/unhandled-exit-code-when-loading-nifti-with-simpleitk-in-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!