[Paraview] PythonProgrammableFilters Multiple Input Ports

Bane Sullivan banesulli at gmail.com
Thu May 31 20:40:11 EDT 2018


Hi there,

I see an old thread here:
https://paraview.markmail.org/thread/z7cy73444s7fjadk about setting
multiple input ports for python programmable filters but I cannot get this
to work.

I want to declare multiple input ports in a ServerManagerConfiguration XML
plugin but I have been unable to successfully add more than one input port
to the vtkPythonProgrammableFilter.

I see that in
`paraview/ParaViewCore/ClientServerCore/Core/vtkPythonProgrammableFilter.h`
the following is declared:

  /**
   * Set the number of input ports
   * This function is explicitly exposed to enable a
vtkClientServerInterpreter to call it
   */
  void SetNumberOfInputPorts(int numberOfInputPorts) VTK_OVERRIDE
  {
    this->Superclass::SetNumberOfInputPorts(numberOfInputPorts);
  }


This leads me to believe that the functionality is there, but how exactly
would I set the number of input ports from an XML plugin for a Programmable
Filter? I have tried the following with no luck:

<ServerManagerConfiguration>
 <ProxyGroup name="filters">
   <SourceProxy
name="TestMuliPort”
class="vtkPythonProgrammableFilter”
label=“TestMuliPort”
post_creation=“SetNumberOfInputPorts"
arguments="2”>
……..


I get the following ERROR:

ERROR: In
/Users/kitware/dashboards/buildbot-slave/8275bd07/build/superbuild/paraview/src/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx,
line 371
vtkPVSessionCore (0x60c0000d4510): Object type:
vtkPythonProgrammableFilter, could not find requested method:
"SetNumberOfInputPorts"
or the method was called with incorrect arguments.

while processing
Message 0 = Invoke
  Argument 0 = vtk_object_pointer {vtkPythonProgrammableFilter
(0x60c0003abde0)}
  Argument 1 = string_value {SetNumberOfInputPorts}



Any help would be greatly appreciated,

Bane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180531/f764e07b/attachment.html>


More information about the ParaView mailing list