Build errors : ITK Module Python Wrapping

Hi everyone,

Image processing scientist, I’m pretty used to ITK pipelines. However, I’m new to ITK development…
Recently converted to Python (really nice for scripting/prototyping) I’m trying to wrap some Insight Journal contributions prior to implement my own filters.

My first try is the 3D skeleton image filter : ITKbinaryThinningImageFilter3D

After some struggle with the *.wrap files, I think I managed to have something almost presentable.

My module wont build but I’m pretty stuck in finding the reason why …

appveyor log

[18/24] Completed 'swig'
[19/24] Generating itkBinaryThinningImageFilter3DPython.cpp, C:/P/IPP/ITK-win_35-x64/lib/itkBinaryThinningImageFilter3DPython.py
[20/24] Generating BinaryThinningImageFilter3DPython.cpp, C:/P/IPP/ITK-win_35-x64/lib/BinaryThinningImageFilter3DPython.py
[21/24] Building CXX object Wrapping\Modules\BinaryThinningImageFilter3D\CMakeFiles\BinaryThinningImageFilter3DPython.dir\BinaryThinningImageFilter3DPython.cpp.obj
[22/24] Building CXX object Wrapping\Modules\BinaryThinningImageFilter3D\CMakeFiles\BinaryThinningImageFilter3DPython.dir\itkBinaryThinningImageFilter3DPython.cpp.obj
[23/24] Linking CXX shared module C:\P\IPP\ITK-win_35-x64\lib\_BinaryThinningImageFilter3DPython.pyd
FAILED: C:/P/IPP/ITK-win_35-x64/lib/_BinaryThinningImageFilter3DPython.pyd 
cmd.exe /C "cd . && C:\P\IPP\venv-35-x64\Lib\site-packages\cmake\data\bin\cmake.exe -E vs_link_dll --intdir=Wrapping\Modules\BinaryThinningImageFilter3D\CMakeFiles\BinaryThinningImageFilter3DPython.dir --manifests  -- C:\PROGRA~2\MI0E91~1.0\VC\bin\X86_AM~1\link.exe /nologo @CMakeFiles/BinaryThinningImageFilter3DPython.rsp  /out:C:\P\IPP\ITK-win_35-x64\lib\_BinaryThinningImageFilter3DPython.pyd /implib:C:\P\IPP\ITK-win_35-x64\lib\BinaryThinningImageFilter3DPython.lib /pdb:C:\P\IPP\ITK-win_35-x64\lib\_BinaryThinningImageFilter3DPython.pdb /dll /version:0.0 /machine:x64   /INCREMENTAL:NO   && cd ."
LINK: command "C:\PROGRA~2\MI0E91~1.0\VC\bin\X86_AM~1\link.exe /nologo @CMakeFiles/BinaryThinningImageFilter3DPython.rsp /out:C:\P\IPP\ITK-win_35-x64\lib\_BinaryThinningImageFilter3DPython.pyd /implib:C:\P\IPP\ITK-win_35-x64\lib\BinaryThinningImageFilter3DPython.lib /pdb:C:\P\IPP\ITK-win_35-x64\lib\_BinaryThinningImageFilter3DPython.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:C:\P\IPP\ITK-win_35-x64\lib\_BinaryThinningImageFilter3DPython.pyd.manifest" failed (exit code 1181) with the following output:
LINK : fatal error LNK1181: cannot open input file 'BinaryThinningImageFilter3D.lib'
ninja: build stopped: subcommand failed.

circleci log

[[15/16] Linking CXX shared module ../../ITK-cp27-cp27m-manylinux1_x64/lib/_BinaryThinningImageFilter3DPython.so
FAILED: ../../ITK-cp27-cp27m-manylinux1_x64/lib/_BinaryThinningImageFilter3DPython.so 
: && /opt/rh/devtoolset-2/root/usr/bin/g++ -fPIC -Wno-array-bounds  -Wno-array-bounds -Os -DNDEBUG   -shared  -o ../../ITK-cp27-cp27m-manylinux1_x64/lib/_BinaryThinningImageFilter3DPython.so Wrapping/Modules/BinaryThinningImageFilter3D/CMakeFiles/BinaryThinningImageFilter3DPython.dir/BinaryThinningImageFilter3DPython.cpp.o Wrapping/Modules/BinaryThinningImageFilter3D/CMakeFiles/BinaryThinningImageFilter3DPython.dir/itkBinaryThinningImageFilter3DPython.cpp.o  ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkdouble-conversion-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitksys-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkvnl_algo-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkvnl-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkv3p_netlib-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitknetlib-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkvcl-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKCommon-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkNetlibSlatec-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKStatistics-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKTransform-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKLabelMap-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKMesh-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkzlib-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKMetaIO-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKSpatialObjects-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKPath-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKQuadEdgeMesh-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOImageBase-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKOptimizers-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKPolynomials-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKBiasCorrection-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKDICOMParser-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKEXPAT-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmDICT-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmMSFF-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKznz-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKniftiio-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKgiftiio-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkhdf5_cpp.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkhdf5.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOBMP-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOBioRad-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOBruker-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOCSV-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOGDCM-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOIPL-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOGE-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOGIPL-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOHDF5-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkjpeg-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOJPEG-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitktiff-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOTIFF-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOLSM-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkminc2-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMINC-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMRC-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMeshBase-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMeshBYU-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMeshVTK-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMesh-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMeta-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIONIFTI-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKNrrdIO-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIONRRD-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkpng-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOPNG-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOSiemens-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOXML-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOSpatialObjects-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOStimulate-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKTransformFactory-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOTransformBase-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOTransformHDF5-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOTransformInsightLegacy-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOTransformMatlab-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOVTK-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKKLMRegionGrowing-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitklbfgs-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKOptimizersv4-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKVTK-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKVideoCore-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKVideoIO-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKWatersheds-5.0.a -lBinaryThinningImageFilter3D ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmMSFF-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmDICT-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmIOD-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmDSED-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmCommon-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmjpeg8-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmjpeg12-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmjpeg16-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmopenjp2-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmcharls-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkgdcmuuid-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOTIFF-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitktiff-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkjpeg-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkminc2-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKgiftiio-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMeshBYU-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMeshVTK-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOMeshBase-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKQuadEdgeMesh-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKMetaIO-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKniftiio-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKznz-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKNrrdIO-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkpng-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOIPL-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOXML-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKEXPAT-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkhdf5_cpp.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkhdf5.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkzlib-5.0.a -lrt ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOTransformBase-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKTransformFactory-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKOptimizers-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitklbfgs-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKIOImageBase-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKVideoCore-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKStatistics-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkNetlibSlatec-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKSpatialObjects-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKMesh-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKTransform-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKPath-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKCommon-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkdouble-conversion-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitksys-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libITKVNLInstantiation-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkvnl_algo-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkvnl-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkv3p_netlib-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitknetlib-5.0.a ../../ITK-cp27-cp27m-manylinux1_x64/lib/libitkvcl-5.0.a -lm -lpthread -ldl -lm && :
/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: cannot find -lBinaryThinningImageFilter3D
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/opt/python/cp27-cp27m/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 409, in setup
    cmkr.make(make_args, env=env)
  File "/opt/python/cp27-cp27m/lib/python2.7/site-packages/skbuild/cmaker.py", line 417, in make
    os.path.abspath(CMAKE_BUILD_DIR)))

An error occurred while building with CMake.
  Command:
    "cmake" "--build" "." "--target" "install" "--config" "MinSizeRel" "--"
  Source directory:
    /work
  Working directory:
    /work/_skbuild/cmake-build
Please see CMake's output for more information.
+ exit 1
Exited with code 1

Welcome @T4mmi,

That is excellent!

Great work :+1:

These errors occur because the library for the module, created in the src folder, was removed. We can fix the issue by removing the declaration of the libraries that the module creates here:

https://github.com/T4mmi/ITKBinaryThinningImageFilter3D/blob/2a47008e8f65e538fa907f5e52acdffd8b55dfe4/CMakeLists.txt#L4

Hope this helps,
Matt

1 Like

Oh wow thanks a lot !

it solved the issue

1 Like

Hi again !
First problem solved,

BUT Travis CI seems broken ATM so I might need to compile it locally for PyPI deployment. The manual packaging of a python module git clone http://XXX; cd XX; pip install . might require some ‘tuned’ ITK installation that might be a turn-down for many scientists especially among python users.

No big deal, I understand that this is not a top priority question and for sure the easiest workaround would be to DL and manually compile ITK with the ITKModuleExternal param set to on in the cmake configuration.

my question is:

Is there a way to ‘force/add’ the compilation of non-essential/remote ITK modules when using a package manager (pip, conda, homebrew, chocolatey, etc …) ?

Hi there,

[This change] should address the macOS Python package upload issue. We will also update the documentation to account for this change.

It is best if users can use the pre-built binaries. What modules do you need that are not available in the default build?

Thanks a lot for you support !

everything seems to work,
I still need to test the Python wrapping and see if it actually works…

@matt.mccormick:
It is best if users can use the pre-built binaries. What modules do you need that are not available in the default build?

When I try to build locally I got this error:

CMake Error at CMakeLists.txt:7 (include):
  include could not find load file:

    ITKModuleExternal

So I assumed it comes from the lack of the ModuleExternal from the pre-built distribution of PyPI but I might be wrong on this…

Great!

Ah, correct. The binary packages on PyPI cannot be used to build additional module packages. There are some limitations on the build location, but the ITKPythonPackage scripts could be used locally, e.g. macpython-download-cache-and-build-module-wheels.sh. These scripts download the build trees that were used to generate the PyPI packages. But, these are not intended to be used locally, and GitHub CI generated packages are preferred.

1 Like

@matt.mccormick :
Ah, correct. The binary packages on PyPI cannot be used to build additional module packages. There are some limitations on the build location, but the ITKPythonPackage scripts could be used locally, e.g. macpython-download-cache-and-build-module-wheels.sh. These scripts download the build trees that were used to generate the PyPI packages. But, these are not intended to be used locally, and GitHub CI generated packages are preferred.

Ok, thats what I thought. I would not recommend using macpython-download-cache-and-build-module-wheels.sh outside a container as it might mess with your setup …

Bad news, Python test of the wrapped module ends up with a nice:
Bus error: 10
Have to look into the debugging part of the wrapping
:slight_smile:

Hmm, is this for the macOS binaries? All the binaries?

Yes, it seems so,

macOS: Bus error: 10
windows: runtime error Python has stopped working
linux: did not tried yet

what’s bothers me is that it does not seems to be linked to the C++ code/module as it passes the CTests with success… still learning pdb to investigate the python module

so far, the PyPI module can be imported, seems like the instanciation of the BinaryThinningImageFiltrer3D throw a seg fault… digging into SWIG atm

I don’t know if it related, but these lines should be removed:

https://github.com/T4mmi/ITKBinaryThinning3D/blob/91d7526747862631dafec65b22cffaa6d8650439/include/itkBinaryThinningImageFilter3D.hxx#L40-L41

The output is already created by the itk::ImageSource base class:

https://github.com/InsightSoftwareConsortium/ITK/blob/fe02f8a96627bad5694a9920f54fe2e91d5fd336/Modules/Core/Common/include/itkImageSource.hxx#L49-L50

and not creating it with MakeOutput could cause issues.

@T4mmi the CI builds were recently updated to use ITK 5.0, whose binaries will not be compatible with ITK 4.0 because of the transition to C++11. This is likely causing the issue.

I will follow-up in another thread with instructions on how to address this.

In the meantime, you could try running your Python packages against the ITK 5.0 Python packages by installing itk with the --pre option for pip:

python -m pip install --upgrade --pre itk
1 Like

Great, I’ll try this as soon as I come back to the office.

Thanks a lot for your help !

No luck, even with itk v5 still got the Bus error: 10

:frowning: That is interesting.

Build configuration for ITK v4 is described here. Do the ITKv4 packages result in the same error?

1 Like

Sorry for the delay, I was out of the office last 2 weeks.

Yes, that seems to fix the problem with the ITKv4 build. I manage to create a filter object :

In [7]: itk.BinaryThinningImageFilter3D[UnsignedCharImageType, UnsignedCharImageType].New()
Out[7]: <itkBinaryThinningImageFilter3DPython.itkBinaryThinningImageFilter3DIUC3IUC3; proxy of <Swig Object of type 'itkBinaryThinningImageFilter3DIUC3IUC3 *' at 0x10848bae0> >

I will stick with this solution for now since ITKv5 is still in beta,
Thanks a lot for your help

I also added a simple python test file that mimics the CTest.
However, it ends with a Floating point exception: 8, something I already experienced using the itk.AffineTransform but never solved…
Could it come from a difference between the itkCtype and the itk.ImagePython ?

In [5]: InputPixelType
Out[5]: <itkCType unsigned char>

In [6]: UnsignedCharImageType
Out[6]: itkImagePython.itkImageUC3

in

# IO buffer
imageIO = itk.ImageIOFactory.CreateImageIO(source, itk.ImageIOFactory.ReadMode)
imageIO.SetFileName(source)
imageIO.ReadImageInformation()
# Typedef
Dimension = imageIO.GetNumberOfDimensions()
InputPixelType = itk.ctype(itk.ImageIOBase.GetComponentTypeAsString(
    imageIO.GetComponentType()).replace('_', ' '))  # prevent 'unsigned_char' error
InputImageType = itk.Image[InputPixelType, Dimension]
UnsignedCharImageType = itk.Image[itk.UC, Dimension]
# Image reader
imageFileReader = itk.ImageFileReader[InputImageType].New()
imageFileReader.SetFileName(source)
1 Like

Very nice!

Interesting.

This can be written much more succinctly,

image = itk.imread(source)
InputImageType = type(image)

Overall, the entire pipeline can be written,

input_image = itk.imread(source)
# By passing the input_image to .New(), it sets it as the filter input and picks the required filter type automatically
thinning_filter = itk.BinaryThinningImageFilter3D.New(input_image)
itk.imwrite(thinning_filter, outputFilePath)

Thanks for the tip, I thought such syntax only applied to simpleITK…
This is far easier to read :slight_smile:

I end up with a Segmentation fault: 11 that should correspond to the previous Floating point exception: 8.
I blindly trusted the CTest that passed on CI tools, but is it possible that it succeed even with a segfault ?

I will try to extract the test resulting output image to see if the C++ module performs correctly…

Ok even stranger,
I tried the under Windows, everything works fine !

I’ll try to reinstall python from scratch under macOS to see if the error is not related to my own installation. I should also try under Linux…

1 Like