VNet icon indicating copy to clipboard operation
VNet copied to clipboard

What's the version of SimpleITK you use?

Open SunGaofeng opened this issue 7 years ago • 1 comments

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.

SunGaofeng avatar Mar 20 '17 07:03 SunGaofeng

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

xiedidan avatar May 08 '17 15:05 xiedidan