# vtkFileSeriesReader Multi-Output-Port Support

**URL:** https://discourse.paraview.org/t/vtkfileseriesreader-multi-output-port-support/17394
**Category:** Feature Requests
**Created:** [January 13, 2026, 8:00am UTC](https://discourse.paraview.org/t/vtkfileseriesreader-multi-output-port-support/17394 "2026-01-13T08:00:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Noerr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/noerr/32/10562_2.png) [@Noerr](https://discourse.paraview.org/u/Noerr)
#### Post date: [January 13, 2026, 8:00am UTC](https://discourse.paraview.org/t/vtkfileseriesreader-multi-output-port-support/17394/1 "2026-01-13T08:00:05Z")

</div>

**Allow vtkFileSeriesReader to support multi-output-port readers**

* * *

## Summary

We’ve successfully implemented file series support for a 3-output-port reader by subclassing `vtkFileSeriesReader` and overriding just the constructor. This works because the base class code is already generic with respect to output count—only the hardcoded `SetNumberOfOutputPorts(1)` in the constructor limits it to single-port readers. We’d like to request this be made configurable upstream.

## Background

We developed the [WARPM ParaView Reader Plugin](https://github.com/Noerr/warpm-paraview-plugin) with two reader classes:

1. **`vtkWARPMReader`** - Single output port (standard physical-space data)
2. **`vtkWARPMPhaseSpaceReader`** - Three output ports:
  - Port 0: Physical space mesh
  - Port 1: Velocity space mesh (at user-selected location)
  - Port 2: Probe position marker

## The Problem

When wrapping the 3-port reader with `vtkFileSeriesReader` using the standard XML pattern:

```xml
<SourceProxy name="WARPMPhaseSpaceReader"
             class="vtkFileSeriesReader"
             si_class="vtkSIMetaReaderProxy"
             file_name_method="SetFileName">
  <SubProxy>
    <Proxy name="Reader" proxygroup="internal_sources"
           proxyname="WARPMPhaseSpaceReaderCore" />
  </SubProxy>
  <OutputPort index="0" name="Physical Space" />
  <OutputPort index="1" name="Velocity Space" />
  <OutputPort index="2" name="Slice Position" />
</SourceProxy>

```

…the plugin crashes with a segmentation fault on `UpdatePipeline()`.

## Root Cause

Looking at the [vtkFileSeriesReader source](https://github.com/certik/paraview/blob/master/Servers/Filters/vtkFileSeriesReader.cxx), the constructor explicitly sets:

```cpp
this->SetNumberOfOutputPorts(1);

```

However, the rest of the class (including `FillOutputPortInformation`, `RequestInformation`, `RequestData`, etc.) is written generically and works fine with multiple output ports.

## Our Solution

Following the approach described by @Keith_Ballard_CIV in [this thread](https://discourse.paraview.org/t/file-series-support-for-custom-time-unaware-plugin/15566), we created a minimal subclass:

**[vtkWARPMPhaseSpaceFileSeriesReader.h](https://github.com/Noerr/warpm-paraview-plugin/blob/main/Plugin/Reader/vtkWARPMPhaseSpaceFileSeriesReader.h)**:

```cpp
class WARPMREADERCORE_EXPORT vtkWARPMPhaseSpaceFileSeriesReader : public vtkFileSeriesReader
{
public:
  static vtkWARPMPhaseSpaceFileSeriesReader* New();
  vtkTypeMacro(vtkWARPMPhaseSpaceFileSeriesReader, vtkFileSeriesReader);

protected:
  vtkWARPMPhaseSpaceFileSeriesReader();
  ~vtkWARPMPhaseSpaceFileSeriesReader() override = default;
  // ...
};

```

**[vtkWARPMPhaseSpaceFileSeriesReader.cxx](https://github.com/Noerr/warpm-paraview-plugin/blob/main/Plugin/Reader/vtkWARPMPhaseSpaceFileSeriesReader.cxx)**:

```cpp
vtkWARPMPhaseSpaceFileSeriesReader::vtkWARPMPhaseSpaceFileSeriesReader()
{
  // Override base class's SetNumberOfOutputPorts(1) to support 3 outputs
  this->SetNumberOfOutputPorts(3);
}

```

**Updated XML** ([WARPMReader.xml](https://github.com/Noerr/warpm-paraview-plugin/blob/main/Plugin/Reader/WARPMReader.xml#L151-L231)):

```xml
<SourceProxy name="WARPMPhaseSpaceReader"
             class="vtkWARPMPhaseSpaceFileSeriesReader"
             si_class="vtkSIMetaReaderProxy"
             file_name_method="SetFileName">
  <!-- ... same SubProxy and OutputPort declarations ... -->
</SourceProxy>

```

**Result** : File series support works perfectly for our 3-output-port reader. Users can select multiple `.h5` files and ParaView treats them as a time series with all three output ports updating correctly.

## Feature Request

Since the workaround is so minimal (literally one line in the constructor), would it be possible to make `vtkFileSeriesReader` configurable for the number of output ports? Options could include:

1. **Query the internal reader** : In `FillOutputPortInformation`, if a reader is set, use `Reader->GetNumberOfOutputPorts()` to determine the count
2. **XML attribute** : Add an optional attribute like `number_of_output_ports="3"` to the ServerManager XML
3. **Constructor parameter** : Allow the output port count to be specified at construction time

This would eliminate the need for plugin developers to create trivial subclasses just to change the port count (and need to locate these forum posts revealing the workaround).

## Environment

- ParaView 6.0 (built from source)
- VTK 9.5.2
- macOS / Darwin

## References

- Our plugin: [GitHub - Noerr/warpm-paraview-plugin: ParaView Reader plugin for WARPM discontinuous Galerkin output](https://github.com/Noerr/warpm-paraview-plugin)
- Prior discussion with same workaround: [File Series Support for Custom Time-Unaware Plugin](https://discourse.paraview.org/t/file-series-support-for-custom-time-unaware-plugin/15566)
- vtkFileSeriesReader source: [paraview/Servers/Filters/vtkFileSeriesReader.cxx at master · certik/paraview · GitHub](https://github.com/certik/paraview/blob/master/Servers/Filters/vtkFileSeriesReader.cxx)

Thank you for considering this enhancement!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 13, 2026, 8:01am UTC](https://discourse.paraview.org/t/vtkfileseriesreader-multi-output-port-support/17394/2 "2026-01-13T08:01:00Z")

</div>

> [@Noerr](#):
>
> Since the workaround is so minimal (literally one line in the constructor), would it be possible to make `vtkFileSeriesReader` configurable for the number of output ports?

You definitely can open a merge request to share these improvements 🙂

---

<div class="post-metadata">

### Author: ![Noerr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/noerr/32/10562_2.png) [@Noerr](https://discourse.paraview.org/u/Noerr)
#### Post date: [January 13, 2026, 7:40pm UTC](https://discourse.paraview.org/t/vtkfileseriesreader-multi-output-port-support/17394/3 "2026-01-13T19:40:47Z")

</div>

MR: [https://gitlab.kitware.com/paraview/paraview/-/merge\_requests/7637](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/7637)

Sorry, I didn’t mean to make it sound trivial for me. I would have never gotten this far without my buddy Claude.
