Commit Graph

59 Commits

Author SHA1 Message Date
Steven Silvester 28a41eeb2b Clear the blit background when the image changes 2014-09-10 19:21:21 -05:00
Steven Silvester 7ac6323210 Fix failing tests 2014-09-01 13:30:07 -05:00
Steven Silvester 1740392110 Add on_scroll behavior and allow line to change width. 2014-09-01 10:28:28 -05:00
blink1073 7864adbc0c Make other suggested style changes 2014-09-01 10:04:14 -05:00
blink1073 778f62de6a Updates to get all tools tested and working 2014-09-01 10:04:08 -05:00
blink1073 2d9d8bb94c Refactor blit manager and event manager to viewer 2014-09-01 09:59:01 -05:00
blink1073 b6dcf3c336 Update Travis build to use Anaconda.
Update Travis build to use Anaconda

Travis updates and fixes

More travis fixes

Another travis attempt

Revert changes

Use PIL and Pillow

Refactor travis into 4 different builds

Fix activation error

Remove explicit mpl in build_versions.py

Make matplotlib an explicit requirement

Rearrange travis

Make pillow a hard requirement

Try again to make Pillow optional

Fix bash syntax error

Fix bash syntax error

Bump required cython version

More rearrangments

Remove mpl from build_versions, rearrange travis

Fix version check

Make matplotlib explicit again

Conda install into test env

Check for proper install

Allow tests to skip if networkx is not available

Allow tests to skip if networkx is not available

Try swapping pillow for matplotlib

Allow tests to pass when matplotlib is not present

Remove matplotlib from build_versions

Print PIL version

Get pillow from PIP

Allow tests to skip if matplotlib is not present.

Allow tests to skip if networkx is not present.

travis fix

Remove unused mpl import that caused test error

Use nose-cov and do not run doctests without optional libs

Bump required numpy version and fix nose calls

Make overlay test repeatable

bump numpy version again

Move low-end numpy to python 2.7

Play with minimum versions

Add version requirements and use functions

Add version requirements and use functions

Allow require to skip a test

More implementation of require decorator

Update require decorator and clean up tests

Only use requires decorator when needed

Fix python3 error in version_requirements

Fix build errors

Fix handling of require with tests

More fixes for require handler

Use latest miniconda

Fix more build errors

Fix another dict comprehension and travis file.

Fix missing imports

Fix dictionary again

Fix import warning

Fix last failing test on 2.6

Skip doc examples on python2.6

Do not run doctests on python2.6

Fix typo in travis.yml

Make numpy-1.6 compatibility changes

Use numpy-1.6 in travis python2.6

Add tests for version requirements

Fix line noise in PR

Add additional io plugins

Fix simpleitk test.

Fix python 3 error in freeimage_plugin.

Install imread in Travis.

Put matplotlib settings in XDG recommended directory

Fix formatting in travis yml

Fix formatting in travis yml

Make sure to close PIL file atexit

Fix name of apt package xcftools

Fix pil fp closing

Fix matplotlibrc creation

Only download SimpleITK on py2x, run coverage on py27

Fix travis yml syntax error

Run coveralls on py2.7

Install SimpleITK on py3.3 and run coverage on py3.3

Make simpleitk install quiet

Use standard nose and clean up incantation

Fix travis yml syntax error

Put in miniconda workout for libc error.

Fix imread plugin.

Fix travis syntax

Remove unused import

Remove miniconda libpng in favor of system png

Fix imread install and move libm removal to after optional pkg install.

Fix png header copy in travis yml

Another attempt to use png headers

Debug freeimage

Add jpeg library for freeimage and debug imread.

More debug for imread and freeimage

More freeimage and imread debugging

More debugging

Use correct paths for test env

Make sure imread is tied to libpng15

Add a TODO note for simpleitk test causing error.

Fix typo in yml

Cleanup and add more comments to travis yml

Update comment

Try and add 3.2 support.

Docstring formatting

Add more travis comments.

Try numpy 1.6 on python 2.7

Fix travis syntax error

Rename CONDA to ENV for clarity

Alias python on python 3.2

Use python 3.2 as the system python

Clean up libfreeimage install

Fix order on py3.2 pre_install

Move old numpy back to py26

Use the appropriate python calls.

Debug 3.2 build.

Update comment

Fix syntax error

Another fix for syntax error.

Install scipy after downloading import tools

More debugging for py32

Do not install conda on py3.2 (duh)

Fix typo in travis yml

Fix py32 qt install, separate pyfits and imread to find error

Fix syntax error and front-load option lib check for debug

pyfits is not supported in py3.2, try imread now

imread is also not supported on py3.2

install imread before pyfits to show relationship with libs

Make pip builds quiet

Minor formatting to retrigger build

Allow simpleitk to fail to download without breaking the build

Use travis_retry for SimpleITK

See what breaks when we keep libm in

Now remove libm again
2014-08-02 06:47:09 -05:00
blink1073 9576df45f8 Add tests for all of viewer subpackage, with necessary file mods 2014-07-16 19:38:23 -05: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
JDWarner beb395abbb FIX: Skip viewer.show() commands which hang Travis 2013-11-20 12:29:45 -06:00
JDWarner d398b43051 ENH: Add doctest_skip_parser allowing conditional skipping of doctests 2013-11-20 11:20:42 -06:00
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 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 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