brainspace.vtk_interface.pipeline.to_data

brainspace.vtk_interface.pipeline.to_data(ftr, port=0)[source]

Extract data from filter.

Parameters:
  • ftr (vtkAlgorithm or BSAlgorithm) – Input filter.
  • port (int, optional) – Port to get data from. When port is -1, refers to all ports. Default is 0.
Returns:

data (BSDataObject or list of BSDataObject) – Returns the output of the filter. If port is -1 and number of output ports > 1, then return list of outputs.

Notes

Filters are automatically updated to get the output.