[vtkusers] python vtkSelection problem

Jeff Baumes jeff.baumes at kitware.com
Tue Feb 2 09:03:24 EST 2010


If you print each selection, the combination of PROP_ID and PROCESS_ID
should be different for each selection. Is this true? If so, what
changes, the PROP_ID or PROCESS_ID?

Jeff

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



-- 
Jeff Baumes, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4932
jeff.baumes at kitware.com



More information about the vtkusers mailing list