brainspace.vtk_interface.pipeline.connect(ftr0, ftr1, port0=0, port1=0, add_conn=False)[source]

Connection of two filters.

Connects the output port port0 of filter ftr0 with the input port port1 of filter ftr1.

  • ftr0 (vtkAlgorithm, vtkDataSet, BSAlgorithm or BSDataSet) – The input filter. May be a filter or dataset.
  • ftr1 (vtkAlgorithm or BSAlgorithm) – The output filter.
  • port0 (int, optional) – Output port of ftr0. Not used if ftr0 is a dataset. Default is 0.
  • port1 (int, optional) – Input port of ftr1. Default is 0.
  • add_conn (bool or int, optional) – Connect to specific connection of port1. If False, use SetInputConnection or SetInputData (all other added connections to port1 are removed). Otherwise, use AddInputConnection or AddInputData. If int, add to given connection (e.g., SetInputConnectionByNumber or SetInputDataByNumber). Only used if port1 accepts more than one connection (i.e., repeatable). Default is False.

ftr1 (BSAlgorithm) – Returns (wrapped) frt1 after connecting it with the input filter.