skimage.viewer.warn (message[, category, …]) | A version of warnings.warn with a default stacklevel of 2. |
skimage.viewer.CollectionViewer (image_collection) | Viewer for displaying image collections. |
skimage.viewer.ImageViewer (image[, useblit]) | Viewer for displaying images. |
skimage.viewer.canvastools | |
skimage.viewer.plugins | |
skimage.viewer.qt | |
skimage.viewer.utils | |
skimage.viewer.viewers | |
skimage.viewer.widgets | Widgets for interacting with ImageViewer. |
skimage.viewer.warn(message, category=None, stacklevel=2)
[source]
A version of warnings.warn
with a default stacklevel of 2.
class skimage.viewer.CollectionViewer(image_collection, update_on='move', **kwargs)
[source]
Bases: skimage.viewer.viewers.core.ImageViewer
Viewer for displaying image collections.
Select the displayed frame of the image collection using the slider or with the following keyboard shortcuts:
Parameters: |
|
---|
__init__(image_collection, update_on='move', **kwargs)
[source]
Initialize self. See help(type(self)) for accurate signature.
keyPressEvent(self, QKeyEvent)
[source]
update_index(name, index)
[source]
Select image on display using index into image collection.
class skimage.viewer.ImageViewer(image, useblit=True)
[source]
Bases: PyQt5.QtWidgets.QMainWindow
Viewer for displaying images.
This viewer is a simple container object that holds a Matplotlib axes for showing images. ImageViewer
doesn’t subclass the Matplotlib axes (or figure) because of the high probability of name collisions.
Subclasses and plugins will likely extend the update_image
method to add custom overlays or filter the displayed image.
Parameters: |
|
---|
>>> from skimage import data >>> image = data.coins() >>> viewer = ImageViewer(image) # doctest: +SKIP >>> viewer.show() # doctest: +SKIP
Attributes: |
|
---|
__init__(image, useblit=True)
[source]
Initialize self. See help(type(self)) for accurate signature.
add_tool(tool)
[source]
closeEvent(self, QCloseEvent)
[source]
connect_event(event, callback)
[source]
Connect callback function to matplotlib event and return id.
disconnect_event(callback_id)
[source]
Disconnect callback by its id (returned by connect_event
).
dock_areas = {'bottom': 8, 'left': 1, 'right': 2, 'top': 4}
image
open_file(filename=None)
[source]
Open image file and display in viewer.
original_image_changed
redraw()
[source]
remove_tool(tool)
[source]
reset_image()
[source]
save_to_file(filename=None)
[source]
Save current image to file.
The current behavior is not ideal: It saves the image displayed on screen, so all images will be converted to RGB, and the image size is not preserved (resizing the viewer window will alter the size of the saved image).
show(main_window=True)
[source]
Show ImageViewer and attached plugins.
This behaves much like matplotlib.pyplot.show
and QWidget.show
.
update_image(image)
[source]
Update displayed image.
This method can be overridden or extended in subclasses and plugins to react to image changes.
© 2011 the scikit-image team
Licensed under the BSD 3-clause License.
http://scikit-image.org/docs/0.14.x/api/skimage.viewer.html