On Wed, Dec 18, 2013 at 5:36 AM, Nadav Horesh <nadavh.horesh@gmail.com>wrote:
Thank you Juan. IIt looks like the event caught by the CanvasToolBase are not whtn I am looking for (mouse click and keyboard events)
Hi Nadav, I'm not sure I follow. The canvas tools use matplotlib events because the image canvas is drawn with matplotlib. The `CanvasToolBase` class shows an example of using the tool's `connect_event` to connect to "key_press_event" (keyboard events). The `LineTool` class shows an example connecting to keyboard events through "button_press_event". Note that this event system is only for the image canvas. If another widget (e.g. a slider) has focus, then the events are handled by Qt's infrastructure. Cheers, -Tony
Thank you again,
Nadav
Hi Nadav,
I don't have much experience with interactive tools, but I think this is
2013/12/18 Juan Nunez-Iglesias <jni.soma@gmail.com>: the
right place to start for examples:
https://github.com/scikit-image/scikit-image/blob/master/skimage/viewer/canv...
You'll see that the LineProfile plugin uses the LineTool canvas tool:
https://github.com/scikit-image/scikit-image/blob/master/skimage/viewer/plug...
Hopefully this helps, otherwise @tonysyu might be able to step in and
offer
a bit more guidance.
Juan.
On Wed, Dec 18, 2013 at 7:13 PM, Nadav Horesh <nadavh.horesh@gmail.com> wrote:
I I started to build an interactive image exploration utility based on matplotlib. Recently, following a link on this list, I encountered skimage.viewer, and found that the plugins architecture matches my
needs.
I could not find how to link keyboard and mouse events (and maybe buttons) to plugins. Any suggestions?
I am using version 0.93 on linux (I can install the pre 0.10, if needed)
Thanks,
Nadav
participants (1)
-
Tony Yu