[Paraview-developers] bug in pqPipelineFilter

Maxim Torgonskiy kriolog at gmail.com
Wed Aug 2 16:08:20 EDT 2017


Hello,

It seems that there's a bug in pqPipelineFilter::getInputPortName(int). I
have a vtk filter which has 3 inputs and when I try to access the inputs
with pqPipelineFilter the function getInputPortName doesn't respect their
order:

.xml :
<?xml version="1.0"?>
<ServerManagerConfiguration>
  <ProxyGroup name="filters">
    <SourceProxy class="Dummy" name="Dummy">
      <InputProperty
        name="Zero"
        port_index="0"
        command="SetInputConnection">
        <ProxyGroupDomain name="groups">
          <Group name="sources"/>
          <Group name="filters"/>
        </ProxyGroupDomain>
        <DataTypeDomain name="input_type">
          <DataType value="vtkPolyData"/>
        </DataTypeDomain>
      </InputProperty>
      <InputProperty
        name="One"
        port_index="1"
        optional="1"
        command="SetInputConnection">
        <ProxyGroupDomain name="groups">
          <Group name="sources"/>
          <Group name="filters"/>
        </ProxyGroupDomain>
        <DataTypeDomain name="input_type">
          <DataType value="vtkPointSet"/>
        </DataTypeDomain>
      </InputProperty>
      <InputProperty
        name="Two"
        port_index="2"
        optional="1"
        command="SetInputConnection">
        <ProxyGroupDomain name="groups">
          <Group name="sources"/>
          <Group name="filters"/>
        </ProxyGroupDomain>
        <DataTypeDomain name="input_type">
          <DataType value="vtkPolyData"/>
        </DataTypeDomain>
      </InputProperty>
    </SourceProxy>
  </ProxyGroup>
</ServerManagerConfiguration>

.cxx :
int Dummy::RequestData(
  vtkInformation *vtkNotUsed(info),
  vtkInformationVector **inputVector,
  vtkInformationVector *outputVector)
{
  pqPipelineFilter* self_pqfilter =
qobject_cast<pqPipelineFilter*>(pqActiveObjects::instance().activeSource());
  Q_ASSERT(self_pqfilter);

  for(int i = 0; i < GetNumberOfInputPorts(); ++i)
    qDebug() << self_pqfilter->getInputPortName(i);

  return 1;
}

output :
"One"
"Two"
"Zero"


A minimal reproducible example is attached.

Regards,
Maxim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170802/04f8bec2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dummy.zip
Type: application/zip
Size: 2484 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170802/04f8bec2/attachment.zip>


More information about the Paraview-developers mailing list