On Monday, February 27, 2012 10:13:01 AM UTC+1, Guillaume wrote:
Le 26/02/2012 21:15, Stéfan van der Walt a écrit :
> On Sat, Feb 25, 2012 at 11:10 AM, Tony Yu<tsyu80@gmail.com>  wrote:
>> Plugin system
>> ------
>> It might be nice to have some sort of plugin system for the image viewer.
>> That way, tools like this could be implemented a bit more easily and, also,
>> easily added to the viewer or ignored by the user.
> At the moment, we basically have a double-viewer implementation:
> simply vs fancy.  So we separate out
>
> imshow(x) and imshow(x, fancy=True)

My 0.6dev does not know the property fancy:

In [8]: io.imshow(ctx.data, fancy=True)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Users/maye/Dropbox/src/scikits-image/<ipython-input-8-b10fe497c546> in <module>()
----> 1 io.imshow(ctx.data, fancy=True)
[....]
AttributeError: Unknown property fancy


Do I need to activate something at compile time with the setup.py?

Michael

 
I thought one solution was to sub-class FigureCanvas, with extra
buttons, but from what I understand, it is not that easy to do this at
the platform independant level.

  But maybe adding arguments to the function call, for exemple imshow(x,
set_contrast=True, linescan=True) plus keyboard toggles is enough?

>
>> agree to an extent. Nevertheless, I think providing a viewer that supplies
>> *an infrastructure* for creating GUI tools might be really valuable. I
>> haven't really thought through what this plugin system would look like, so
>> it may just be a pipe dream.
> This is a tricky problem (which set of tools to use, etc.)--but in
> principle, it would be nice to have a few standard viewers, e.g.,
> image compare, image compare + parameter adjust, mask editor (to build
> custom filters, e.g.) and image inspector (like the one you and
> Guillaume are working on).
>
> Stéfan
>
What do you mean by mask editor? Something like a slider to adjust a
threshold with a superimposed mask?

Guillaume