[Paraview] Getting Blocks Selection
Rafael March
rafaelmarch3 at yahoo.com
Tue Jun 16 09:01:55 EDT 2009
Utkarsh,
for me is actually ok, as you suggested, to use the Extract Selection filter as a "black box". It will do what I need, which is to get the global id's of the nodes which the user selected (no matter how). The Extract Selection filter does exactly this job, right ? At least I'm able to do using it by hands in ParaView.
I'm just having difficulties in setting up the inputs of this filter. It seems that the class vtkPVExtractSelection is an interface for the already existing filter vtkExtractSelection. The latter requires the vtkDataObject, from which we want to extract a piece, and a vtkSelection object, which represents the selected points or cells (Actually this is what is stated in vtkExtractSelection::FillInputPortInformation and opposed as explained in the documentation, so the docs might be wrong). My question is, how can I get - from my filter's code - a vtkSelection object, which represents exactly what the user is selecting in ParaView's screen ? If I am able to get this information, I can use the vtkPVExtractSelection filter and the job is done !
Thanks for your attention.
Best Regards,
Rafael.
--- On Mon, 6/15/09, Utkarsh Ayachit <utkarsh.ayachit at kitware.com> wrote:
From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
Subject: Re: [Paraview] Getting Blocks Selection
To: "Rafael March" <rafaelmarch3 at yahoo.com>
Cc: paraview at paraview.org
Date: Monday, June 15, 2009, 7:45 PM
Rafael,
pqSelectionManager::getGlobalIDs takes all the necessary steps and then delegates to vtkSelectionConvertor filter to do the actual conversion. So if you fix vtkSelectionConvertor to convert from blocks to ids, then pqSelectionManager::getGlobalIDs should automatically work. Look at implementation of pqSelectionManager::getGlobalIDs to see how the two inputs are set up.
Utkarsh
On Mon, Jun 15, 2009 at 3:06 PM, Rafael March <rafaelmarch3 at yahoo.com> wrote:
Hi Utkarsh,
thanks for the tip. I'm trying now to use the vtkExtractSelection filter, but it requires two inputs: a vtkSelection object, and the Model, whose block will be extracted, according to the selection. The question now is: how to get the vtkSelection object which corresponds to my current selection made in Paraview ? I can only manage to get a pqSelectionManager object in my filter.
Thanks again for the help.
Regards,
Rafael.
--- On Mon, 6/15/09, Utkarsh Ayachit <utkarsh.ayachit at kitware.com> wrote:
From: Utkarsh Ayachit <utkarsh.ayachit at kitware..com>
Subject: Re: [Paraview] Getting Blocks Selection
To: "Rafael March" <rafaelmarch3 at yahoo.com>
Cc: paraview at paraview.org
Date:
Monday, June 15, 2009, 3:13 PM
Currently there's no direct way of converting from block to id-based selection. vtkConvertSelection does not handle the case where the input is a block-based selection. Feel free to add a feature request to the bug tracker.
A possible alternative would be to apply the ExtractSelection filter and then fetch the resulting dataset to the client. That will have the ids for the extracted block.
Utkarsh
On Mon, Jun 15, 2009 at 10:53 AM, Rafael March <rafaelmarch3 at yahoo.com> wrote:
Hi,
I want to get the global Ids of the nodes selected through
selection inspector, using a "Block Selection" to choose a part of the
model.
I thought I would be able to retrieve the ids of the
cells (or points) with the method pqSelectionManager::getIndices() or
pqSelectionManager::getGlobalIds(), but none of them retrieve any Ids
when I make the selection of a block.
Which is the right way to get this information ?
Regards,
Rafael.
_______________________________________________
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
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090616/21f225d2/attachment.htm>
More information about the ParaView
mailing list