faustomilletari / VNet

GNU General Public License v3.0
284 stars 123 forks source link

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

Open SunGaofeng opened 7 years ago

SunGaofeng commented 7 years ago

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 commented 7 years ago

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