View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0010634 | VTK | (No Category) | public | 2010-04-28 10:22 | 2013-04-05 19:57 | ||||
Reporter | Rodrigo Valiña | ||||||||
Assigned To | Jeff Baumes | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0010634: vtkInteractorStyleRubberBand2D: unable to obtain selected rectangle | ||||||||
Description | 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" argument that is passed to InvokeEvent (which would contain the coordinates of the selected rectangle (rect)) like this: this->InvokeEvent(vtkCommand::SelectionChangedEvent, reinterpret_cast<void*>(rect)); in (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. As a workaround, I managed to get it work by adding observers to "StartInteractionEvent" and "EndInteractionEvent", and recording the two coordinates with iren.GetEventPosition(). I would suggest to provide public methods like vtkInteractorStyleRubberBand2D::GetStartPosition() and vtkInteractorStyleRubberBand2D::GetEndPosition(), or to provide a means to obtain (in Python too) the "callData" argument passed to InvokeEvent. | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Type | |||||||||
Attached Files | ![]() | ||||||||
Relationships | |
Relationships |
Notes | |
(0020463) Eric Monson (reporter) 2010-04-28 12:04 |
I've attached a simple patch which adds the Get macros for the StartPosition and EndPosition variables to the header files for RubberBand2D and 3D. |
(0020520) Jeff Baumes (administrator) 2010-05-03 12:32 |
commit 43018ebbb8b527ed1c3f79df98b37209b8da4003 Author: Jeffrey Baumes <jeff.baumes@kitware.com> Date: Mon May 3 12:30:45 2010 Fixing bug 10634 for obtaining selection rectangle. Wrapped languages could not obtain the call data for the selection event. The added methods allow wrapped languages to access the start and end positions by querying the interactor. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-04-28 10:22 | Rodrigo Valiña | New Issue | |
2010-04-28 12:03 | Eric Monson | File Added: RubberBandGetPatch.txt | |
2010-04-28 12:04 | Eric Monson | Note Added: 0020463 | |
2010-05-03 12:32 | Jeff Baumes | Note Added: 0020520 | |
2010-05-03 12:32 | Jeff Baumes | Status | backlog => @80@ |
2010-05-03 12:32 | Jeff Baumes | Resolution | open => fixed |
2010-05-03 12:32 | Jeff Baumes | Assigned To | => Jeff Baumes |
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
2013-04-05 19:57 | Berk Geveci | Status | customer review => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |