Alright, so I have what I think is a pretty good handle on creating custom widgets and running them in ParaView. Now the third point on my initial post is where I am held up. Within my filter, I have a vtkPolyData
coming in on port 1 (I have 2 ports each with their own vtkPolyData
, but I am focusing on the second one here) which I would like to use to initialize the representation of my widget with.
For ease of illustration, let’s say the vtkPolyData
on port 1 is just a poly line, and I would like to initialize the customized vtkPolyLineRepresentation
defining the widget with that poly line.
From what I’ve gathered, the interfacing class vtk3DWidgetRepresentation
specifically has zero input ports interfacing with the ParaView pipeline. Within my ServerManagerConfiguration xml file, I have this widget representation proxy setup pointing at the default vtk3DWidgetRepresentation
class:
<ProxyGroup name="representations">
<NewWidgetRepresentationProxy class="vtk3DWidgetRepresentation"
name="MyPolyLineWidgetRepresentation">
...
</NewWidgetRepresentationProxy>
And under this configuration, everything runs in paraview, though with the default behavior of an uninitialized poly line widget.
I have tried creating a new class which inherits from vtk3DWidgetRepresentation
and adding it as such:
<ProxyGroup name="representations">
<NewWidgetRepresentationProxy class="vtkMyPolyLineWidgetRepresentation"
name="MyPolyLineWidgetRepresentation">
...
</NewWidgetRepresentationProxy>
where the class vtkMyPolyLineWidgetRepresentation
is a vtk3DWidgetRepresentation
but with the constructor asking for two ports instead of zero. this compiles, but immediately crashes in ParaView when the plugin is selected from the Filters menu. It also immediately crashes if vtkMyPolyLineWidgetRepresentation
is does nothing different, and simply calls the superclass constructor at initialization.
I’m not entirely sure where to go from here. I have investigated with reliance of vtkSMNewWidgetRepresentationProxy
on vtk3DWidgetRepresentation
, and I feel like my problem may be something to do with that relationship, but its possible there is also something much deeper I am missing, or something much easier I should be doing.
Thanks in advance for any advice!