60 Commits

Author SHA1 Message Date
Steven Silvester 65c1d4eec6 Update viewer for PyQt5 compatibility
Conflicts:
	skimage/viewer/tests/test_plugins.py
	skimage/viewer/tests/test_tools.py
2014-12-27 10:52:27 -06:00
Stefan van der Walt 7f8cd65675 Fix docstring markup errors 2014-12-15 02:21:34 +02:00
blink1073 9576df45f8 Add tests for all of viewer subpackage, with necessary file mods 2014-07-16 19:38:23 -05:00
Juan Nunez-Iglesias 17541e2cdc Update plugin class doc example to use output 2014-04-10 12:19:23 +10:00
Johannes Schönberger ece0f30af3 Always Skip doctests which depend on Qt and are in the class doc string
The doc test skip directive modifies the __doc__ attribute, which is not
possible for new-stlye classes.
2014-03-13 18:29:54 -04:00
Johannes Schönberger 86c90a336f Merge pull request #821 from JDWarner/add_conditional_doctest_decorator
ENH: Add `doctest_skip_parser` allowing conditional skipping of doctests
2013-11-25 13:54:29 -08:00
JDWarner beb395abbb FIX: Skip viewer.show() commands which hang Travis 2013-11-20 12:29:45 -06:00
Johannes Schönberger f8b5550751 Merge pull request #804 from tonysyu/viewer-color-hist-fix
Fix ColorHistogram to work with Open File
2013-11-20 09:32:00 -08:00
JDWarner d398b43051 ENH: Add doctest_skip_parser allowing conditional skipping of doctests 2013-11-20 11:20:42 -06:00
Juan Nunez-Iglesias 4e05ebf711 Incorporate @tonysyu's suggestions re:docstrings 2013-11-01 15:10:30 +11:00
Juan Nunez-Iglesias 7774a76eea Add plugin return values for ImageViewer
The model supported is that plugins can return an overlay, some data,
or both. Each plugin therefore returns an `(overlay, data)` tuple in
which each element can be `None`.

To allow return values, the plugin need only override the `output`
method defined in the base Plugin class.

See discussions here:
https://groups.google.com/d/msg/scikit-image/0nkJM-WguXA/iqogBABa748J
and here:
https://github.com/scikit-image/scikit-image/pull/805
2013-10-31 14:51:06 +11:00
Tony S Yu 5aec00731a Fix ColorHistogram to work with Open File 2013-10-28 22:55:07 -05:00
Josh Warner 173fec01c7 Merge pull request #575 from tonysyu/feature/viewer-linking
Linked image viewers and docked plugins
2013-06-28 08:32:34 -07:00
tonysyu ed7c75d4c6 Raise ImageViewer to front on start.
Currently only works for main window, does not work for linked viewers.
2013-06-26 11:00:24 -05:00
François Boulogne 3926f1873d use items/values for python2/3 compat 2013-06-20 11:16:23 +02:00
François Boulogne cc249baa6c fix iteritems for python3 compat 2013-06-13 14:06:23 +02:00
Tony S Yu cc2f1854b5 Fix plugin interaction with CollectionViewer
* Signal updates to original image when image changed in CollectionViewer.
* Update plugin arguments for the filter.
* Also fixes image updates when opening a new image from the file menu.
2013-06-08 19:06:23 -05:00
tonysyu 2ca77c42be Fix PySide compatibility for signal defs 2013-06-05 11:22:24 -05:00
Tony S Yu 55386ec785 Add smart window-layout for multi-viewer display 2013-05-30 22:37:36 -05:00
Tony S Yu 07630a93e6 Dock plugins to image viewer. 2013-05-30 22:21:21 -05:00
Tony S Yu bd860b7720 Add infrastructure for conneting plugin output to a viewer. 2013-05-28 23:52:10 -05:00
Tony S Yu a5d42a3940 Add skimage.viewer.qt wrapper.
This allows the viewer to use either PyQt4 or PySide as the toolkit.
2013-05-17 16:22:17 -05:00
Tony S Yu 16f159fb3e ENH: Remove unnecessary clean up functions.
Connecting matplotlib events are now the responsibility of canvastools, not the viewer.
2012-12-26 21:41:03 -08:00
Tony S Yu 6c1b969b21 BUG: Fix clean up of canvastools
NOTE: The rectangle tool doesn't seem to clean up properly.
2012-12-26 21:39:39 -08:00
Tony S Yu 9bf512da8b ENH: Allow Save buttons to save overlay
Closes Github #264
2012-12-15 09:32:26 -05:00
Tony S Yu 16a720770a STY: Clean up unused blitting-related code 2012-12-12 13:34:53 -05:00
Tony S Yu 211bba0195 ENH: Default to blitting
Since the Qt4 Agg backend is always used, it's always safe to use blitting.
2012-12-09 21:11:06 -05:00
Tony S Yu fcf2a9bc97 DOC: Fix doctests in viewer subpackage
The doctests in the viewer subpackage weren't originally written as proper doctests.
2012-09-11 23:38:00 -04:00
Tony S Yu d1e012ea30 BUG: Initialize QApplication when creating Plugin.
QWidgets cannot be initialized unless QApplication has been created. In cases where the Plugin is created before the ImageViewer, ensure that QApplication exists.
2012-09-04 22:07:59 -04:00
Tony S Yu b14514e018 BUG: Fix nosetest and autodoc errors when PyQt4 not available
nose and autodoc imports the viewer modules so all PyQt4 imports must be wrapped in a try-except block. In addition, any classes derived from PyQt4 must be proxied since the class definition are run on import. This is really hacky.
2012-08-25 12:06:03 -04:00
Tony S Yu 398b320477 BUG: reset image when plugin is closed. 2012-08-03 22:21:59 -04:00
Tony S Yu 4ab583ba31 ENH: Add SaveButtons widget. 2012-08-03 21:50:28 -04:00
Tony S Yu 54af4176dd ENH: Add RequiredAttr to raise warnings when attr not set. 2012-08-03 20:45:01 -04:00
Tony S Yu 4620ee734e ENH: Create new Slider with editbox.
Also, make the behavior more consistent between updating plugin and widget parameters.
2012-07-27 22:21:26 -04:00
Tony S Yu 51e61b3e46 DOC: Improve docstrings for Plugin class. 2012-07-25 00:21:56 -04:00
Tony S Yu c2d2919bae BUG: Don't override image_filter method if defined by subclass 2012-07-24 01:31:47 -04:00
Tony S Yu c1a859acae ENH: Change inplace-add to normal add to support alternate syntax
Widgets can be added to Plugins inline, and Plugins can be added inline to Viewers.
2012-07-24 00:58:35 -04:00
Tony S Yu 4b3f6d6c30 BUG: in-place add should return object
Actually, I didn't mean to add `__iadd__` a couple of commits ago, so this was supposed to be an enhancement that allows you to access `add_widget` using in place adding.
2012-07-24 00:51:31 -04:00
Tony S Yu 1ae662f712 ENH: filter image when Plugin is attached to ImageViewer 2012-07-24 00:35:26 -04:00
Tony S Yu 0e8f444fbb ENH: Display overlay by default 2012-07-24 00:28:37 -04:00
Tony S Yu 36b0fbd84e Rename (dis)connect_event to (dis)connect_image_events.
This clarifies action since these events are on the image viewer, not the plugin.
2012-07-23 01:22:05 -04:00
Tony S Yu 92ca837471 ENH: Let Qt handle most of the window sizing. 2012-07-23 01:13:03 -04:00
Tony S Yu 977d17134d Change image_viewer to Plugin property.
Raise an error when using Plugin.image_viewer before it is set. This error prevents other, more obscure, errors from getting raised.
2012-07-23 00:45:11 -04:00
Tony S Yu df18d40290 Minor cleanup. 2012-07-23 00:18:32 -04:00
Tony S Yu f47312a3d1 API Change: Attach ImageViewer to Plugin after init.
Plugin is now added to the viewer using an inplace add on the viewer instead of on initialization of the plugin. This change means that operations requiring the viewer must be delayed until attach operation.
2012-07-23 00:12:21 -04:00
Tony S Yu 86b428952d ENH: Allow Plugin.add_widget to hook into Plugin attributes.
The `ptype` parameter of widget can now be set to 'plugin'. When this is the case, the plugin will set a plugin attribute whenever the widget is updated.

As an example, this commit adds a ComboBox widget which is hooked into the overlay color of the OverlayPlugin.
2012-07-22 13:24:41 -04:00
Tony S Yu 06449581bd ENH: Generalize add_widget function. 2012-07-22 02:26:03 -04:00
Tony S Yu 385382f64a ENH: Simplify widget addition. 2012-07-22 02:11:56 -04:00
Tony S Yu 9b4c6222b5 ENH: Rename callback functions for clarity. 2012-07-22 02:08:16 -04:00
Tony S Yu 887a9119b2 ENH: Simplify creation of Slider widget. 2012-07-22 02:02:29 -04:00