[Paraview] Converting selections
Rafael March
rafaelmarch3 at yahoo.com
Fri Jan 30 09:39:09 EST 2009
Hi,
I'm programming a plugin which writes in a file the ids of the current selected cells in the vtkUnstructuredGrid displayed in ParaView. In my code I write something like this:
pqSelectionManager* selMan = (pqSelectionManager*)(pqApplicationCore::instance()->manager("SelectionManager"));
pqOutputPort* port = selMan->getSelectedPort();
vtkSMSourceProxy* activeSelection=port->getSelectionInput();
and get the property "IDs", just like the pqExtractSelectionsPanel class does. Of course, if the user made a selection by Frustum or Threshold, I should get the properties "Frustum" or "Thresholds" respectively, but they wouldn't "store" the cell id's, but some other information. I'm wondering if there is a way to convert a selection from frustum and/or threshold (or any other type) to a selection by IDs, that is: getting the IDs of the cells from a Frustum selection. I've been looking at classes vtkSelectionConverter and vtkPConvertSelection, but couldn't figure out a way of doing this. How can it be made ?
Thanks for any help,
Rafael March.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090130/20c08465/attachment-0001.htm>
More information about the ParaView
mailing list