source_algorithm#
- source_algorithm(generator: Callable[[], DataSet], output_type: str | type = <class 'pyvista.core.pointset.UnstructuredGrid'>) SourceAlgorithm[source]#
Create a source algorithm that generates data from a callable.
A source has no input port. It produces data from scratch via generator.
- Parameters:
- generator
callable() generator() -> dataset.- output_type
str|type[pyvista.DataSet], default:pyvista.UnstructuredGrid Output type. Accepts a VTK class name string or a PyVista
DataSetsubclass.
- generator
- Returns:
SourceAlgorithmThe source algorithm.