callback_algorithm#
- callback_algorithm(
- inp: _AlgorithmInput,
- callback: Callable[[DataSet], DataSet],
- *,
- output_type: str | type | None = None,
Add a filter that delegates to a user-supplied callable.
- Parameters:
- inp
pyvista.DataSet| vtkAlgorithm | vtkAlgorithmOutput Input data or algorithm.
- callback
callable() callback(dataset) -> dataset.- output_type
str|type[pyvista.DataSet] |None, default:None Fixed output type. Accepts a VTK class name string or a PyVista
DataSetsubclass. WhenNone, the output type matches the input type.
- inp
- Returns:
CallbackFilterAlgorithmThe callback filter wired to
inp.