sitkUtils.PullVolumeFromSlicer makes Slicer crash

Hi all,

Snippet to reproduce:

import SampleData
import sitkUtils as su
sampleDataLogic = SampleData.SampleDataLogic()
node = sampleDataLogic.downloadMRHead()
su.PullVolumeFromSlicer(node)

Tried on latest nightly for macOS: r28728.

Actually, it seems to be a problem with SimpleITK, as sitk.ReadImage() makes Slicer crash as well.

@blowekamp

Yes, it appears that py_nomainwindow_test_sitkUtils is failing as you have also reported here. This is likely due to recent updates to ITK and SimpleITK in 28727. That SimpleITK version specifies to use ITK 5.1rc01 which is what we switched to so there in theory shouldn’t be an incompatibility between the two. There had to be a fix to Mac to fix an ITK compile error in the commit after the updated ITK one. Maybe @pieper can look into this on Mac?

I’ll have to test on Windows to see if it is across platforms, but the test appears to be passing on the Windows build machine.

That code works for me on my local mac build.

Maybe @pieper you can try to install the package from the nightly build machine to see if it is an issue specific to that package? The tests are showing some Slicer crash using that build.

Yes, you are right - the 2020-01-10 build crashes with that input.

I am able to attach Xcode to the release build but there’s not much stack info (maybe it gets trashed) but it says this is the function where the crash occurs:

#0	0x000000013a916aaa in itk::ImageFileReader<itk::Image<short, 3u>, itk::DefaultConvertPixelTraits<short> >::EnlargeOutputRequestedRegion(itk::DataObject*) ()