[Paraview] custom filter doesn't update property in the Paraview UI

corinna reuter corinnareuter75 at gmail.com
Thu Jul 14 10:34:22 EDT 2016


Hello,
I would like to work on a filter that updates some of its properties from
the filter input. As a demonstration, I attach a (quite minimal)
"vtkTestProperty" filter algorithm, which takes vtkPolyData input, and
which is supposed to copy input->GetNumberOfPoints() into the filter's
"NPoints" property which is exposed to the user interface.

Inside vtkTestProperty::RequestData, I execute:
    int nset=input->GetNumberOfPoints();
    this->SetNPoints(nset);
which, is correctly setting the NPoints value. Additional print statements
in the code confirm, that NPoints is actually updated, but the new value
won't be shown in the Paraview UI.

To reproduce the behaviour, the attachment is ready to compile with
Paraview 5.0.1. Just load the compiled plugin in Paraview, create a
"SphereSource" and append the "ATestPropery" filter to the SphereSource.
The console output will show that NPoints is set to 50 (Number of Points of
the Sphere), but the UI still shows 42 (the default value from the
Servermanager xml).

What am I doing wrong?

Thank you
Corinna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160714/d17333a4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestProperty.tgz
Type: application/x-gzip
Size: 2596 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160714/d17333a4/attachment.bin>


More information about the ParaView mailing list