Skip to content

Get Func

Source

Module to get write functions.

WriteFunc

Bases: Protocol

Protocol for type hinting write functions.

__call__(file_path, img, *args, **kwargs)

Type hinted callables must match this function signature (not including self).

Parameters:

  • file_path (Path) –

    Path to file.

  • img (ndarray) –

    Image data to save.

  • *args

    Other positional arguments.

  • **kwargs

    Other keyword arguments.

get_write_func(data_type)

Get the write function for the data type.

Parameters:

  • data_type ((tiff, custom), default: "tiff" ) –

    Data type.

Returns: