Can't compile ITKElastix with python bindings:

Hi,

I started compiling ITKElastix with python bindings but I keep getting errors like these:

  elxParameterObject: warning(4): ITK type not wrapped, or currently not known: itk::DataObject
  elxParameterObject: warning(4): ITK type not wrapped, or currently not known: itk::SmartPointer< itk::LightObject >
  itkElastixRegistrationMethod: warning(4): ITK type not wrapped, or currently not known: itk::ImageSource< itk::Image< float, 2 > >
  itkElastixRegistrationMethod: warning(4): ITK type not wrapped, or currently not known: itk::ImageSource< itk::Image< float, 3 > >
  itkElastixRegistrationMethod: warning(4): ITK type not wrapped, or currently not known: itk::SmartPointer< itk::LightObject >

I’m compiling on Windows with shared libraries enabled. It seems like the issue is that it’s not finding the “include” (I’m not sure what the right terms is).

What are the cmake variables that affect the exporting or importing of other known types?
What am I missing for the compilation?

Eric

What version of ITKElastix are you trying to compile? And what version of ITK are you pairing it with?

@Niels_Dekker @Tom_Birdsong might have more questions or answers :smiley:

Hi @eric , could you please confirm that you have previously built ITK with Python wrappings enabled?

ITK_WRAP_PYTHON=ON

Thanks for the replies.

I have compiled with ITK with ITK_WRAP_PYTHON=ON with itk 5.2.1 with ITKElastix v0.13.0.
I recently noticed that there’s now an official ITK v5.3.0 tag so I might try and compile with that and see if there are fixes there that I don’t have with ITK 5.2.1 and the older elastix.

I think I just did it wrong, but I guess I don’t know where to go now.
So I’ve now compiled ITK 5.3 but I have a similar issue.

So what happened is that I compiled ITK with ITK_WRAP_PYTHON=ON.
Then, I try to compile ITKElastix and it doesn’t compile the python porition.

It feels as though there’s some interactions between Elastix and ITKElastix that might stem from the fact that Elastix expects an installed ITK and uses find_package(ITK) in it’s cmakelist where as ITKElastix expects to build against the ITK source.

And the errors I got before were from me just adding manually the Wrapping folder of ITKElastix with add_subfolder but that seems like that’s the wrong approach and I don’t know what I’m missing.