Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the version of SimpleITK you use? #21

Open
SunGaofeng opened this issue Mar 20, 2017 · 1 comment
Open

What's the version of SimpleITK you use? #21

SunGaofeng opened this issue Mar 20, 2017 · 1 comment

Comments

@SunGaofeng
Copy link

Hi Fausto
I'm trying to use your 3D-caffe, but there turns to be several mistakes. I used SimpleITK version 0.10.0 installed by pip. My OS is CentOS 7.2, and python is 2.7.5.
Is there any require on the version of python or SimpleITK ?

  1. In the py script of DataManager, in line 107, resampler.SetSize(newSize) caused an error
    resampler.SetSize(newSize)
    File "/usr/lib/python2.7/site-packages/SimpleITK/SimpleITK.py", line 56846, in SetSize
    return _SimpleITK.ResampleImageFilter_SetSize(self, Size)
    TypeError: in method 'ResampleImageFilter_SetSize', argument 2 of type 'std::vector< uint32_t,std::allocator< uint32_t > > const &'

  2. In the same script, in line 112, resampler.Excute(img) also caused an error
    File "/home/sgf/vnet/VNet/DataManager.py", line 112, in getNumpyData
    imgResampled = resampler.Execute(img)
    File "/usr/lib/python2.7/site-packages/SimpleITK/SimpleITK.py", line 57097, in Execute
    return _SimpleITK.ResampleImageFilter_Execute(self, *args)
    RuntimeError: Exception thrown in SimpleITK ResampleImageFilter_Execute: /tmp/SimpleITK-build/ITK-prefix/include/ITK-4.10/itkImportImageContainer.hxx:199:
    Failed to allocate memory for image.

@xiedidan
Copy link

xiedidan commented May 8, 2017

@SunGaofeng
if you are using python 3, try resampler.SetSize(newSize.tolist())
it's a sitk problem:
204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants