Open ntatsisk opened 1 year ago
Maybe the first argument needs to be positional instead of keyword? @thewtex might know.
Yes, we dispatch based on the type of the first positional argument (the fixed image).
Thanks for the replies. If I understand correctly there is no plan for this to change for the moment so I guess only better documentation is required.
Related to that, in an ubuntu machine with a fresh environment and installing the ./binder/requirements.txt
, I notice that testing the notebooks with pytest --nbmake --nbmake-timeout=3000 examples/*.ipynb
leads to a similar error:
========================================================================================== short test summary info ===========================================================================================
FAILED examples/ITK_Example12_DifferentSizeTransformation.ipynb:: - TypeError: Expecting argument of type itkImageSS2 or itkImageSourceISS2.
FAILED examples/ITK_UnitTestExample6_PointSetTransformation.ipynb:: - TypeError: Expecting argument of type itkImageSS2 or itkImageSourceISS2.
I see kwargs instead of args are being used in ITK_Example12_DifferentSizeTransformation.ipynb so the error makes sense:
result_image_large = itk.transformix_filter( moving_image=moving_image_dense, transform_parameter_object=result_transform_parameters, log_to_console=False)
What is puzzling: how do these notebook tests pass in the CI?
It seems that
itk.elastix_registration_method
doesn't deduce image types correctly when keyword arguments are used for the images instead of just arguments. See minimal example:And the output is:
I am not sure if it is discussed/documented somewhere else.