I have a numpy array and you want to convert it to an ITK image for further processing. How to do this without using the PyBuffer extension for WrapITK. I cannot use this because when compiling I get a bunch of errors:
.../ExternalProjects/PyBuffer/itkPyBuffer.txx: In static member function ‘static PyObject* itk::PyBuffer<TImage>::GetArrayFromImage(TImage*) [with TImage = itk::Image<float, 2u>]’:
.../ExternalProjects/PyBuffer/wrap_itkPyBufferPython.cxx:1397: instantiated from here
.../ExternalProjects/PyBuffer/itkPyBuffer.txx:64: error: cannot convert ‘int*’ to ‘npy_intp*’ in argument passing
I could use the idea of how to fix compilation errors or another way to convert my python objects.
source
share