[Paraview-developers] bug in pqPipelineFilter
Maxim Torgonskiy
kriolog at gmail.com
Fri Aug 4 09:52:14 EDT 2017
Sounds convincing, I'll switch to named access. Thank you for the
clarification!
Le 3 août 2017 11:14, "Utkarsh Ayachit" <utkarsh.ayachit at kitware.com> a
écrit :
While the mismatch may be confusing, ParaView deliberately opted for
"named" access to the inputs since the proxy mechanism does provide ability
to hide/ignore/change input ports. For example, proxy may not even have
input properties for all input ports if some of them are optional.
On Wed, Aug 2, 2017 at 6:19 PM, Maxim Torgonskiy <kriolog at gmail.com> wrote:
> Ok, I see. I just supposed that the order of ports is the same. Before, in
> my paraview plugin I used everywhere access by index (for both VTK and pqPipeline*
> parts) and now I should mix it with access by input name which is less
> consistent.
>
> Thanks,
> Maxim
>
>
>
> 2017-08-02 17:39 GMT-04:00 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>:
>
>> 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/20170804/9be0252a/attachment-0001.html>
More information about the Paraview-developers
mailing list