Commit Graph
48 Commits
Author SHA1 Message Date
Tony S Yu 6239ab23b1 Merge pull request #810 from jni/viewer-returns-overlays
WIP: Viewer returns overlays
2013-11-18 18:31:03 -08:00
Johannes Schönberger 3b1182cc2f Skip show commands for doc tests 2013-11-12 08:30:12 +01: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
Juan Nunez-Iglesias e45aee3369 Modify mpl_image_to_rgba to allow RGB input image
mpl_image_to_rgba produces a image of shape (M, N, 3, 4) when the input
image is already RGB. This is understandably confusing for downstream
processes, and this commit fixes it.
2013-10-28 18:29:46 +11: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
Tony S Yu 0a8ff1b364 Fix docstring for CollectionViewer slider. 2013-06-09 05:38:08 -05:00
Tony S Yu afd1b1b835 Fix display of overlay plugin when original image is updated 2013-06-08 19:24:50 -05: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
Tony S Yu 9393eac1b0 Third attempt at getting Travis to build 2013-05-31 00:06:59 -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 16b6411059 Display title in docked plugins 2013-05-30 22:25:02 -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 Yuandtonysyu 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 84cf9430de Fix alpha handling for image saving. 2013-02-24 08:57:27 -06:00
Tony S Yu f517eaa0e7 ENH: Cast arrays for numpy compatibility.
The casting rules in newer versions of numpy are stricter, so ensure that we have a compatible data type.
2012-12-29 18:21:49 -05:00
Steven Silvester 103bd96a3b ENH: Adjusted save_to_file to create a proper composite image 2012-12-28 18:24:29 -06: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 d3edd350f9 ENH: Add open and save menu actions 2012-12-23 16:19:03 -08:00
Tony S Yu 04434b008f BUG: Fix image viewer for RGB images 2012-12-13 10:39:11 -05:00
Tony S Yu 631e97d973 ENH: Add rectangle tool and crop plugin example 2012-12-12 23:59:40 -05:00
Tony S Yu ef2bb54c45 Fix figure canvas creation.
Avoid use of matplotlib's pyplot functions for creating figure canvases. In particular, key press events were ignored by the canvas.
2012-12-09 20:51:18 -05:00
Andreas Mueller 6c59e04714 MISC remove unused imports, some pep8 corrections. 2012-09-27 20:01:45 +01: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 d98a92a603 ENH: Set viewer min-intensity to zero when possible.
Some image dtypes allow negative values, but these are typically not used. If an dtype allows negative values, but no negative values are present in the image, set the minimum value to 0 so that the image doesn't look washed out.
2012-09-05 10:12:49 -04:00
Tony S Yu fe41023370 STY: Refactor initialization of QApplication. 2012-09-04 22:07:25 -04:00
Tony S Yu 7d858a8ba9 ENH: Add CollectionViewer 2012-09-01 15:31:34 -04:00
Stefan van der Walt ac41a4b1be Merge pull request #269 from tonysyu/viewer-fix-doc-and-test
BUG: Viewer: fix autodoc and nosetest failures.
2012-08-25 10:44:26 -07: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
Stefan van der Walt 3c14898fda Merge pull request #267 from tonysyu/viewer-adapt-dtype
BUG: Adjust pixel limits based on image data type.
2012-08-25 07:14:55 -07:00
Tony S Yu ebf4b44a9e BUG: Adjust pixel limits based on image data type 2012-08-24 22:44:04 -04:00
Tony S Yu 2c0ff0543c BUG: Closing ImageViewer shouldn't quit parent program 2012-08-24 22:43:13 -04:00
Tony S Yu 398b320477 BUG: reset image when plugin is closed. 2012-08-03 22:21:59 -04:00
Tony S Yu 539b12dc2c STY: Refactor MatplotlibCanvas from ImageCanvas and PlotCanvas. 2012-07-27 21:57:46 -04:00
Tony S Yu 86526064f2 DOC: Improve docstrings for ImageViewer.
Oops: also changed added leading underscore to `update_status_bar`.
2012-07-24 23:22:55 -04:00
Tony S Yu ff98b059e7 STY: Remove unused add_artist method. 2012-07-24 23:06:53 -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 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 9d1df0c3ce Make alpha value to ClearColormap adjustable. 2012-07-22 22:11:33 -04:00
Tony S Yu 31c2810dee ENH: Align image and plugin windows 2012-07-21 23:27:05 -04:00
Tony S Yu 4d747720de Change ImageViewer to automatically call plugins. 2012-07-21 22:03:46 -05:00
Tony S Yu 48ac757ab8 Refactor image overlays to special plugin base class. 2012-07-21 20:29:43 -05:00
Tony S Yu c21fe1c2f9 Show coordinate and intensity info in status bar. 2012-07-21 18:55:38 -05:00
Tony S Yu 9f0449e663 Add docstring for overlay and reorder methods. 2012-07-21 18:11:32 -05:00
Tony S Yu bd3ee78306 Delete overlay when deleting plugin. 2012-07-21 17:09:29 -05:00
Tony S Yu fb3f201a2a Clean up old code and add docstrings. 2012-07-21 17:08:19 -05:00
Tony S Yu 6b591e27a0 Add PlotPlugin and cleanup code. 2012-07-20 17:49:28 -05:00
Tony S Yu c27119b0cd ENH: Add image viewer based on Qt and Matplotlib 2012-07-20 14:03:47 -05:00