vtkFileSeriesReader: Auto-detect output port count from internal reader

Summary

Override SetReader() to automatically configure the number of output ports to match the internal reader's output port count. This enables vtkFileSeriesReader to work with readers that have multiple output ports without requiring subclassing. Includes example reader plugin and utilizes that in tests.

Problem

vtkFileSeriesReader hardcodes SetNumberOfOutputPorts(1) in its constructor, preventing it from working with multi-output readers. Plugin developers must create trivial subclasses that only override the constructor to set the correct port count.

See discussion: https://discourse.paraview.org/t/vtkfileseriesreader-multi-output-port-support/17394

Solution

Auto-detect the port count in SetReader() by querying reader->GetNumberOfOutputPorts() and matching it. This makes vtkFileSeriesReader generic with respect to output port count.

Testing

MR includes an example custom 2-output-port reader (MultiOutputPortReader) that builds and tests under CTest. File series functionality confirmed for both output ports.

Edited by Noah

Merge request reports

Loading