Functional Interface (Python) to itk::ExtractImageFilter, itk.extract_image_filter(img, ...) — What Are The Rest Of The Parameters?

I’m trying to play with the functional Python interface to ITK filters, but I’m a bit lost in trying to figure out what parameters to use.

For example, this doesn’t make things clear:

help(itk.extract_image_filter)
Help on function extract_image_filter in module itk.itkExtractImageFilterPython:
extract_image_filter(*args: Union[ForwardRef('itk.ImageBase'), collections.abc.Buffer, numpy._typing._array_like._SupportsArray[numpy.dtype[Any]], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype[Any]]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], direction_collapse_to_strategy=Ellipsis, extraction_region: 'itk.ImageRegion' = Ellipsis, **kwargs) -> Union[ForwardRef('itk.ImageBase'), collections.abc.Buffer, numpy._typing._array_like._SupportsArray[numpy.dtype[Any]], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype[Any]]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]], Tuple[Union[ForwardRef('itk.ImageBase'), collections.abc.Buffer, numpy._typing._array_like._SupportsArray[numpy.dtype[Any]], numpy._typing._nested_sequence._NestedSequence[numpy._typing._array_like._SupportsArray[numpy.dtype[Any]]], bool, int, float, complex, str, bytes, numpy._typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], ...]]
    Proxy of C++ itkExtractImageFilterIRGBUC2IRGBUC2 class.

Is there a way to figure this out?

Take a look at filter documentation, specifically “Public Member Functions” section. For this filter, the parameters should be direction_collapse_to_strategy and extraction_region, plus all the inherited stuff such as in_place etc.