<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Utkarsh,<br><br>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. <br><br>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 ! <br><br>Thanks for your attention.<br><br>Best Regards,<br>Rafael.<br><br>--- On <b>Mon, 6/15/09, Utkarsh Ayachit <i><utkarsh.ayachit@kitware.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Utkarsh Ayachit <utkarsh.ayachit@kitware.com><br>Subject: Re: [Paraview] Getting Blocks Selection<br>To: "Rafael March" <rafaelmarch3@yahoo.com><br>Cc: paraview@paraview.org<br>Date: Monday, June 15, 2009, 7:45 PM<br><br><div id="yiv280907633">Rafael,<br><br>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.<br>
<br>Utkarsh<br><br><div class="gmail_quote">On Mon, Jun 15, 2009 at 3:06 PM, Rafael March <span dir="ltr"><<a rel="nofollow" ymailto="mailto:rafaelmarch3@yahoo.com" target="_blank" href="/mc/compose?to=rafaelmarch3@yahoo.com">rafaelmarch3@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
Hi Utkarsh,<br><br>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.<br>
<br>Thanks again for the help.<br><br>Regards,<br>Rafael.<br><br>--- On <b>Mon, 6/15/09, Utkarsh Ayachit <i><<a rel="nofollow" ymailto="mailto:utkarsh.ayachit@kitware.com" target="_blank" href="/mc/compose?to=utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>></i></b> wrote:<br>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Utkarsh Ayachit <utkarsh.ayachit@kitware..com><br>Subject: Re: [Paraview] Getting Blocks Selection<br>To: "Rafael March" <<a rel="nofollow" ymailto="mailto:rafaelmarch3@yahoo.com" target="_blank" href="/mc/compose?to=rafaelmarch3@yahoo.com">rafaelmarch3@yahoo.com</a>><br>
Cc: <a rel="nofollow" ymailto="mailto:paraview@paraview.org" target="_blank" href="/mc/compose?to=paraview@paraview.org">paraview@paraview.org</a><br>Date:
Monday, June 15, 2009, 3:13 PM<div><div></div><div class="h5"><br><br><div>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.<br>
<br>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.<br><br>Utkarsh<br><br><div class="gmail_quote">
On Mon, Jun 15, 2009 at 10:53 AM, Rafael March <span dir="ltr"><<a rel="nofollow" target="_blank" href="http://mc/compose?to=rafaelmarch3@yahoo.com">rafaelmarch3@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
Hi,<br><br>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. <br><br>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.<br><br>Which is the right way to get this information ?<br><br>Regards,<br>Rafael.</td></tr></tbody></table><br>
<br>_______________________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a rel="nofollow" target="_blank" href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a rel="nofollow" target="_blank" href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>
</div></div></div></blockquote></td></tr></tbody></table><br>
</blockquote></div><br>
</div></blockquote></td></tr></table><br>