[Paraview-developers] bug in pqPipelineFilter
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Wed Aug 2 17:39:43 EDT 2017
There's was never meant to be any order matching between the VTK port
numbers and input ports provided by pqPipelineFilter. The latter indeed
used a map internally using the property name as the key for the map
(hence the change in order).
If there's a convincing reason to preserve it, we can surely fix it,
however.
Utkarsh
On Wed, Aug 2, 2017 at 4:08 PM, Maxim Torgonskiy <kriolog at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=
> Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170802/c5fb9f79/attachment-0001.html>
More information about the Paraview-developers
mailing list