vtkAlgorithm : SetInputConnection() vs AddInputConnection() ?

I am reading the documentation about the methods here but can’t wrap my head around when to use which one

If I am simply connecting the outputport of one node to the inputport of another node, do I add or set ?

Cheers

Note that you can connect multiple inputs to the same port. Many times you have only one input in which case you use Set, some filters (such as append poly data) have several inputs in which case you’ll use add.

https://vtk.org/doc/nightly/html/classvtkAlgorithm.html#aac26b4138f0e8c07e45c74571f2c51a3

describes this.

1 Like