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

Attachment: TestProperty.tgz
Description: GNU Zip compressed data

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to