callback_algorithm

callback_algorithm#

callback_algorithm(
inp,
callback: Callable[[DataSet], DataSet],
output_type: str | type | None = None,
) CallbackFilterAlgorithm[source]#

Add a filter that delegates to a user-supplied callable.

Parameters:
inppyvista.DataSet | vtkAlgorithm

Input data or algorithm.

callbackcallable()

callback(dataset) -> dataset.

output_typestr | type[pyvista.DataSet] | None, default: None

Fixed output type. Accepts a VTK class name string or a PyVista DataSet subclass. When None, the output type matches the input type.

Returns:
CallbackFilterAlgorithm

The callback filter wired to inp.