[vtkusers] one output port to multiple input ports
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Wed Mar 28 09:45:24 EDT 2018
> Question 1: Is this way of connecting one output port to multiple input
> ports a safe way?
Indeed. This is referred to as fan-out and fan-outs are indeed
supported and safe in VTK pipelines.
> Question 2: How can I control the vtkJPEGWriter to write image only when the
> upstream filter updates its output port? It seems that vtkJPEGWriter will
> write data into file as long as there is an image data on the connected
> input port.
This is outside the scope of what the pipeline can automatically do.
Since VTK's pipeline is demand driven (or pull based), it's not
typically to run something downstream when upstream changes. You're
better of handling this in your application code. Whenever something
that triggers the update to your source executes, then alone call
writer->Writer.
HTH
Utkarsh
More information about the vtkusers
mailing list