[vtkusers] vtkInteractorStyleRubberBand2D to obtain rectangle

Rodrigo Valiña Gutiérrez rodrigo.valina at usc.es
Wed Apr 28 07:36:41 EDT 2010


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?



More information about the vtkusers mailing list