Here is the print of the vtkSelection.<br>I have only one actor in the scene<br>Is it the vtkHardware Selector that attributes a different propid each time a cell has been identified?<br>So all these PROP_ID's should refer to the same prop ?<br>
Either there is a problem in the PROP_ID generation, or I miss something ?<br><br>Selection vtkSelection (0x7cb4270)<br> Debug: Off<br> Modified Time: 142381<br> Reference Count: 2<br> Registered Events: (none)<br> Source: (none)<br>
Information: 0x7bb3310<br> Data Released: False<br> Global Release Data: Off<br> UpdateTime: 0<br> Field Data:<br> Debug: Off<br> Modified Time: 141896<br> Reference Count: 1<br> Registered Events: (none)<br>
Number Of Arrays: 0<br> Number Of Components: 0<br> Number Of Tuples: 0<br> Number of nodes: 32<br> Nodes: <br> Node #0<br> Debug: Off<br> Modified Time: 141915<br> Reference Count: 1<br> Registered Events: (none)<br>
ContentType: INDICES<br> FieldType: CELL<br> Properties: <br> Debug: Off<br> Modified Time: 141909<br> Reference Count: 1<br> Registered Events: (none)<br> FIELD_TYPE: 0<br> PROP_ID: 2883583<br>
CONTENT_TYPE: 4<br> PIXEL_COUNT: 865<br> SelectionData: <br> Debug: Off<br> Modified Time: 141915<br> Reference Count: 1<br> Registered Events: (none)<br> Number Of Arrays: 1<br> Array 0 name = SelectedIds<br>
Number Of Components: 1<br> Number Of Tuples: 1<br> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br> Interpolate Flags: ( 1 1 1 1 1 0 0 )<br> Pass Through Flags: ( 1 1 1 1 1 1 1 )<br> Scalars: (none)<br>
Vectors: (none)<br> Normals: (none)<br> TCoords: (none)<br> Tensors: (none)<br> GlobalIds: (none)<br> PedigreeIds: (none)<br> Node #1<br> Debug: Off<br> Modified Time: 141930<br> Reference Count: 1<br>
Registered Events: (none)<br> ContentType: INDICES<br> FieldType: CELL<br> Properties: <br> Debug: Off<br> Modified Time: 141924<br> Reference Count: 1<br> Registered Events: (none)<br> FIELD_TYPE: 0<br>
PROP_ID: 2949119<br> CONTENT_TYPE: 4<br> PIXEL_COUNT: 1543<br> SelectionData: <br> Debug: Off<br> Modified Time: 141930<br> Reference Count: 1<br> Registered Events: (none)<br> Number Of Arrays: 1<br>
Array 0 name = SelectedIds<br> Number Of Components: 1<br> Number Of Tuples: 1<br> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br> Interpolate Flags: ( 1 1 1 1 1 0 0 )<br> Pass Through Flags: ( 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br> Vectors: (none)<br> Normals: (none)<br> TCoords: (none)<br> Tensors: (none)<br> GlobalIds: (none)<br> PedigreeIds: (none)<br> Node #2<br> Debug: Off<br> Modified Time: 141945<br>
Reference Count: 1<br> Registered Events: (none)<br> ContentType: INDICES<br> FieldType: CELL<br> Properties: <br> Debug: Off<br> Modified Time: 141939<br> Reference Count: 1<br> Registered Events: (none)<br>
FIELD_TYPE: 0<br> PROP_ID: 3014655<br> CONTENT_TYPE: 4<br> PIXEL_COUNT: 1290<br> SelectionData: <br> Debug: Off<br> Modified Time: 141945<br> Reference Count: 1<br> Registered Events: (none)<br>
Number Of Arrays: 1<br> Array 0 name = SelectedIds<br> Number Of Components: 1<br> Number Of Tuples: 1<br> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br> Interpolate Flags: ( 1 1 1 1 1 0 0 )<br> Pass Through Flags: ( 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br> Vectors: (none)<br> Normals: (none)<br> TCoords: (none)<br> Tensors: (none)<br> GlobalIds: (none)<br> PedigreeIds: (none)<br> Node #3<br> Debug: Off<br> Modified Time: 141960<br>
Reference Count: 1<br> Registered Events: (none)<br> ContentType: INDICES<br> FieldType: CELL<br> Properties: <br> Debug: Off<br> Modified Time: 141954<br> Reference Count: 1<br> Registered Events: (none)<br>
FIELD_TYPE: 0<br> PROP_ID: 3080191<br> CONTENT_TYPE: 4<br> PIXEL_COUNT: 1548<br> SelectionData: <br> Debug: Off<br> Modified Time: 141960<br> Reference Count: 1<br> Registered Events: (none)<br>
Number Of Arrays: 1<br> Array 0 name = SelectedIds<br> Number Of Components: 1<br> Number Of Tuples: 1<br> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br> Interpolate Flags: ( 1 1 1 1 1 0 0 )<br> Pass Through Flags: ( 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br> Vectors: (none)<br> Normals: (none)<br> TCoords: (none)<br> Tensors: (none)<br> GlobalIds: (none)<br> PedigreeIds: (none)<br> Node #4<br> Debug: Off<br> Modified Time: 141975<br>
Reference Count: 1<br> Registered Events: (none)<br> ContentType: INDICES<br> FieldType: CELL<br> Properties: <br> Debug: Off<br> Modified Time: 141969<br> Reference Count: 1<br> Registered Events: (none)<br>
FIELD_TYPE: 0<br> PROP_ID: 3145727<br> CONTENT_TYPE: 4<br> PIXEL_COUNT: 1290<br> SelectionData: <br> Debug: Off<br> Modified Time: 141975<br> Reference Count: 1<br> Registered Events: (none)<br>
Number Of Arrays: 1<br> Array 0 name = SelectedIds<br> Number Of Components: 1<br> Number Of Tuples: 1<br> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )<br> Interpolate Flags: ( 1 1 1 1 1 0 0 )<br> Pass Through Flags: ( 1 1 1 1 1 1 1 )<br>
Scalars: (none)<br> Vectors: (none)<br> Normals: (none)<br> TCoords: (none)<br> Tensors: (none)<br> GlobalIds: (none)<br> PedigreeIds: (none)<br> <br><br><div class="gmail_quote">On Tue, Feb 2, 2010 at 3:03 PM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.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;">If you print each selection, the combination of PROP_ID and PROCESS_ID<br>
should be different for each selection. Is this true? If so, what<br>
changes, the PROP_ID or PROCESS_ID?<br>
<font color="#888888"><br>
Jeff<br>
</font><div><div></div><div class="h5"><br>
On Tue, Feb 2, 2010 at 8:57 AM, Olivier Feys <<a href="mailto:pytkvtk@gmail.com">pytkvtk@gmail.com</a>> wrote:<br>
> Many thanks Jeff,<br>
><br>
> For the moment I use the same revision as in the latest release version of<br>
> paraview, I will updata my revision then<br>
> Can you explain why, when there is only a single actor(from<br>
> vtkUnstructuredGrid), the returned vtkSelection contains a lot of<br>
> vtkSelectionNode objects, with only a single tuple in their selection data ?<br>
><br>
> Olivier<br>
><br>
> On Tue, Feb 2, 2010 at 2:43 PM, Jeff Baumes <<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>> wrote:<br>
>><br>
>> This needs a wrapper-friendly API. In C++ you would do<br>
>><br>
>> vtkProp* p =<br>
>> vtkProp::SafeDownCast(node->GetProperties()->Get(vtkSelectionNode::PROP()));<br>
>><br>
>> It would be nice to be able to do the following<br>
>><br>
>> vtkProp* p = node->GetProp();<br>
>><br>
>> which would be accessible from wrapped languages.<br>
>><br>
>> ...<br>
>><br>
>> I've added GetProp, SetProp to vtkSelectionNode in CVS head.<br>
>><br>
>> Patch title (first comment line): ENH: Adding Get/SetProp to<br>
>> vtkSelectionNode.<br>
>> Autocommit<br>
>> cvs commit -F .msg 'Filtering/vtkSelectionNode.cxx'<br>
>> 'Filtering/vtkSelectionNode.h'<br>
>> Committer: Jeffrey Baumes <<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>><br>
>> /cvsroot/VTK/VTK/Filtering/vtkSelectionNode.cxx,v <--<br>
>> Filtering/vtkSelectionNode.cxx<br>
>> new revision: 1.5; previous revision: 1.4<br>
>> /cvsroot/VTK/VTK/Filtering/vtkSelectionNode.h,v <--<br>
>> Filtering/vtkSelectionNode.h<br>
>> new revision: 1.6; previous revision: 1.5<br>
>> Committed successfully to CVS<br>
>><br>
>> Jeff<br>
>><br>
>> On Tue, Feb 2, 2010 at 4:09 AM, Olivier Feys <<a href="mailto:pytkvtk@gmail.com">pytkvtk@gmail.com</a>> wrote:<br>
>> > I want to handle selection through multiple vtkUnstructuredGrids by<br>
>> > picking<br>
>> > a particular cell or by making a selection with a rubberband interactor.<br>
>> > I can easily create a vtkSelectionNode from a picked cell and add a<br>
>> > vtkSelectionNode to a vtkSelection.<br>
>> ><br>
>> > The problem is when I get a vtkSelection made on several actors.props. I<br>
>> > can't find any example where the prop/actor is got from the<br>
>> > vtkSelectionNode<br>
>> > object.<br>
>> > How can I, from a selection returned by the vtkHardwareSelector, get,<br>
>> > for<br>
>> > each vtkSelectionNode, the actor that it belongs to ?<br>
>> > When I print the vtkSelectionNode, I can see the property PROP_ID but I<br>
>> > can't use it.<br>
>> > By the way, if I have only one actor, the returned vtkSelection contains<br>
>> > always more than one vtkSelectionNode. Why is that ?<br>
>> ><br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Jeff Baumes, Ph.D.<br>
>> R&D Engineer, Kitware Inc.<br>
>> (518) 881-4932<br>
>> <a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a><br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Jeff Baumes, Ph.D.<br>
R&D Engineer, Kitware Inc.<br>
(518) 881-4932<br>
<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a><br>
</div></div></blockquote></div><br>