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&#39;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">&lt;<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>&gt;</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 &lt;<a href="mailto:pytkvtk@gmail.com">pytkvtk@gmail.com</a>&gt; wrote:<br>
&gt; Many thanks Jeff,<br>
&gt;<br>
&gt; For the moment I use the same revision as in the latest release version of<br>
&gt; paraview, I will updata my revision then<br>
&gt; Can you explain why, when there is only a single actor(from<br>
&gt; vtkUnstructuredGrid), the returned vtkSelection contains a lot of<br>
&gt; vtkSelectionNode objects, with only a single tuple in their selection data ?<br>
&gt;<br>
&gt; Olivier<br>
&gt;<br>
&gt; On Tue, Feb 2, 2010 at 2:43 PM, Jeff Baumes &lt;<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; This needs a wrapper-friendly API. In C++ you would do<br>
&gt;&gt;<br>
&gt;&gt; vtkProp* p =<br>
&gt;&gt; vtkProp::SafeDownCast(node-&gt;GetProperties()-&gt;Get(vtkSelectionNode::PROP()));<br>
&gt;&gt;<br>
&gt;&gt; It would be nice to be able to do the following<br>
&gt;&gt;<br>
&gt;&gt; vtkProp* p = node-&gt;GetProp();<br>
&gt;&gt;<br>
&gt;&gt; which would be accessible from wrapped languages.<br>
&gt;&gt;<br>
&gt;&gt; ...<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve added GetProp, SetProp to vtkSelectionNode in CVS head.<br>
&gt;&gt;<br>
&gt;&gt; Patch title (first comment line): ENH: Adding Get/SetProp to<br>
&gt;&gt; vtkSelectionNode.<br>
&gt;&gt; Autocommit<br>
&gt;&gt;  cvs commit -F .msg &#39;Filtering/vtkSelectionNode.cxx&#39;<br>
&gt;&gt; &#39;Filtering/vtkSelectionNode.h&#39;<br>
&gt;&gt; Committer: Jeffrey Baumes &lt;<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>&gt;<br>
&gt;&gt; /cvsroot/VTK/VTK/Filtering/vtkSelectionNode.cxx,v  &lt;--<br>
&gt;&gt; Filtering/vtkSelectionNode.cxx<br>
&gt;&gt; new revision: 1.5; previous revision: 1.4<br>
&gt;&gt; /cvsroot/VTK/VTK/Filtering/vtkSelectionNode.h,v  &lt;--<br>
&gt;&gt; Filtering/vtkSelectionNode.h<br>
&gt;&gt; new revision: 1.6; previous revision: 1.5<br>
&gt;&gt; Committed successfully to CVS<br>
&gt;&gt;<br>
&gt;&gt; Jeff<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Feb 2, 2010 at 4:09 AM, Olivier Feys &lt;<a href="mailto:pytkvtk@gmail.com">pytkvtk@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; I want to handle selection through multiple vtkUnstructuredGrids by<br>
&gt;&gt; &gt; picking<br>
&gt;&gt; &gt; a particular cell or by making a selection with a rubberband interactor.<br>
&gt;&gt; &gt; I can easily create a vtkSelectionNode from a picked cell and add a<br>
&gt;&gt; &gt; vtkSelectionNode to a vtkSelection.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The problem is when I get a vtkSelection made on several actors.props. I<br>
&gt;&gt; &gt; can&#39;t find any example where the prop/actor is got from the<br>
&gt;&gt; &gt; vtkSelectionNode<br>
&gt;&gt; &gt; object.<br>
&gt;&gt; &gt; How can I, from a selection returned by the vtkHardwareSelector, get,<br>
&gt;&gt; &gt; for<br>
&gt;&gt; &gt; each vtkSelectionNode, the actor that it belongs to ?<br>
&gt;&gt; &gt; When I print the vtkSelectionNode, I can see the property PROP_ID but I<br>
&gt;&gt; &gt; can&#39;t use it.<br>
&gt;&gt; &gt; By the way, if I have only one actor, the returned vtkSelection contains<br>
&gt;&gt; &gt; always more than one vtkSelectionNode. Why is that ?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Jeff Baumes, Ph.D.<br>
&gt;&gt; R&amp;D Engineer, Kitware Inc.<br>
&gt;&gt; (518) 881-4932<br>
&gt;&gt; <a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Jeff Baumes, Ph.D.<br>
R&amp;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>