-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linked image viewers and docked plugins #575
Merged
JDWarner
merged 24 commits into
scikit-image:master
from
tonysyu:feature/viewer-linking
Jun 28, 2013
Merged
Linked image viewers and docked plugins #575
JDWarner
merged 24 commits into
scikit-image:master
from
tonysyu:feature/viewer-linking
Jun 28, 2013
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The example in python's descriptor tutorial creates a singleton so multiple, instances share the same attribute. This update fixes the issue based on [1]. [1] http://stackoverflow.com/questions/8718052/where-does-a-python-descriptors-state-go
Heh, almost there! |
Finally! |
* 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.
This was referenced Jun 9, 2013
Closed
New QApplication and event-loop implementation stolen shamelessly from IPython. Strangely, running the viewer at the IPython prompt will open an orphan Matplotlib figure window, but running a script using `%run` does not. Only tested on PySide (not PyQt4).
Argh! My fix for PySide broke PyQt4. Debugging... |
I guess PySide saves the QApplication internally, while PyQt4 doesn't. Saving the QApplication as a global prevents it from getting garbage collected. Saving the QApplication as an instance variable in the ImageViewer also works, but that might prevent the ImageViewer from getting garbage collected in an interactive session. (weakref doesn't seem to work here.)
Fixed issue on PyQt4. I haven't tested the fix on PySide yet... |
Currently only works for main window, does not work for linked viewers.
Image filtering is usually slow, so updating on move was usually a bad idea.
JDWarner
added a commit
that referenced
this pull request
Jun 28, 2013
Linked image viewers and docked plugins
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability link image viewers by passing in a
Plugin
(instead of an image array) to an image viewer. ThePlugin
's output image gets rendered in the viewer, and updates to that plugin trigger updates to the viewer. Linking allows you to create a processing pipeline to interactively view multi-step processing operations.As part of this update, plugins can now be docked to the image viewer. Docking greatly simplifies window layout (so that linked viewer aren't initially displayed on top of one another) and in general, looks a bit cleaner, even for single-viewer examples.