[vtkusers] vtkInteractorStyleRubberBand2D to obtain rectangle

Jeff Baumes jeff.baumes at kitware.com
Wed Apr 28 09:34:53 EDT 2010


It looks like you have tried the appropriate things, so there likely
is no way. The approach of making the start/end position accessible
seems reasonable. You can report a bug here

http://vtk.org/Bug

and better yet, you can make the appropriate patch and attach it to
the bug for inclusion in VTK.

Jeff

On Wed, Apr 28, 2010 at 7:36 AM, Rodrigo Valiña Gutiérrez
<rodrigo.valina at usc.es> wrote:
> Hi,
>
> I am using Python wrapping to VTK 5.4.2
>
> I am using vtkInteractorStyleRubberBand2D to allow the user to select
> a rectangle in a 2D plot (vtkXYPlotActor).
>
> When I connect, the callback:
>
>        self.inter.AddObserver("SelectionChangedEvent", self.selection)
>
>    def selection(self, obj, evt):
>        ...
>
> Does not receive the "callData" (in this case, in C++ is an: "unsigned
> int rect[5];") that would provide the coordinates of the selected
> rectangle.
>
> Also, the only variables that would provide the needed information in
> vtkInteractorStyleRubberBand2D, are StartPosition and EndPosition, and
> they are protected; no method is available to access them.
>
> Is there any way of obtain the coordinates of the selected rectangle?
> _______________________________________________
> 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



More information about the vtkusers mailing list