Rafael, Try looking at pqSelectionManager::getIndices. It may be possible for you to just call that method to get the list of selected ids.
Utkarsh On Fri, Jan 30, 2009 at 9:39 AM, Rafael March <[email protected]> wrote: > 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. > > > _______________________________________________ > ParaView mailing list > [email protected] > http://www.paraview.org/mailman/listinfo/paraview > > _______________________________________________ ParaView mailing list [email protected] http://www.paraview.org/mailman/listinfo/paraview
