ITK Python Wrapping error: void value not ignored as it ought to be

Thanks @phcerdan, that works like a charm. I have another question that might not be related to the original question on the thread. But I still want to ask here that when I use the ITKVtkGluePython.py like the below snippet code

import sys
import os
import itk
import vtk
itkToVtkFilter = ImageToVTKImageFilter[ImageType].New()

It throws exception:

╰─$ ~/workingspace/VTK-8.2.0/build/bin/vtkpython itk_vtk_server.py ~/tmp/dicom_data/CT_BVND2/1.3.46.670589.33.1.63686419356542268400001.5244014515565132624
Traceback (most recent call last):
File “itk_vtk_server.py”, line 58, in
ImageToVTKImageFilter = itk.ImageToVTKImageFilter[ImageType]
File “/home/phongtd/.local/lib/python3.6/site-packages/itkLazy.py”, line 52, in getattribute
itkBase.LoadModule(module, namespace)
File “/home/phongtd/.local/lib/python3.6/site-packages/itkBase.py”, line 128, in LoadModule
module = loader.load(swigModuleName)
File “/home/phongtd/.local/lib/python3.6/site-packages/itkBase.py”, line 253, in load
return importlib.import_module(name)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/phongtd/.local/lib/python3.6/site-packages/itk/Configuration/…/ITKVtkGluePython.py”, line 15, in
ctypes.CDLL(_vtkIOlib, ctypes.RTLD_GLOBAL)
File “/usr/lib/python3.6/ctypes/init.py”, line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libvtkIO-8.2.so.1: cannot open shared object file: No such file or directory

I have no idea where to find the “libvtkIO-8.2.so.1”, since it does not exist in my VTK build as well in my installing dir: /usr/local/lib. Those errors might be related to the question I asked before on this thread https://discourse.itk.org/t/itk-imagetovtkimagefilter-crashing-python/2018/4

@matt.mccormick, did you manage to isolate the issue ?