Bases: skimage.viewer.plugins.plotplugin.PlotPlugin
Return the image mask and the histogram data.
Returns: | mask : array of bool, same shape as image
data : dict
|
---|
Bases: skimage.viewer.plugins.plotplugin.PlotPlugin
Plugin to compute interpolated intensity under a scan line on an image.
See PlotPlugin and Plugin classes for additional details.
Parameters: | maxdist : float
limits : tuple or {None, ‘image’, ‘dtype’}
|
---|
Return intensity profile of the selected line.
Returns: | end_points: (2, 2) array :
profile: list of 1d arrays :
|
---|
Return the drawn line and the resulting scan.
Returns: | line_image : (M, N) uint8 array, same shape as image
scan : (P,) or (P, 3) array of int or float
|
---|
Bases: skimage.viewer.plugins.base.Plugin
Plugin for ImageViewer that displays an overlay on top of main image.
The base Plugin class displays the filtered image directly on the viewer. OverlayPlugin will instead overlay an image with a transparent colormap.
See base Plugin class for additional details.
Attributes
overlay | |
color |
Display filtered image as an overlay on top of image in viewer.
Return filtered image.
This “filtered image” is used when saving from the plugin.
Return the overlaid image.
Returns: | overlay : array, same shape as image
data : None |
---|
Bases: skimage.viewer.plugins.base.Plugin
Plugin for ImageViewer that contains a plot canvas.
Base class for plugins that contain a Matplotlib plot canvas, which can, for example, display an image histogram.
See base Plugin class for additional details.
Redraw plot.
Bases: PyQt4.QtGui.QDialog
Base class for plugins that interact with an ImageViewer.
A plugin connects an image filter (or another function) to an image viewer. Note that a Plugin is initialized without an image viewer and attached in a later step. See example below for details.
Parameters: | image_viewer : ImageViewer
image_filter : function
height, width : int
useblit : bool
|
---|
Examples
>>> from skimage.viewer import ImageViewer
>>> from skimage.viewer.widgets import Slider
>>> from skimage import data
>>>
>>> plugin = Plugin(image_filter=lambda img,
... threshold: img > threshold)
>>> plugin += Slider('threshold', 0, 255)
>>>
>>> image = data.coins()
>>> viewer = ImageViewer(image)
>>> viewer += plugin
>>> viewer.show()
The plugin will automatically delegate parameters to image_filter based on its parameter type, i.e., ptype (widgets for required arguments must be added in the order they appear in the function). The image attached to the viewer is automatically passed as the first argument to the filter function.
#TODO: Add flag so image is not passed to filter function by default.
ptype = ‘kwarg’ is the default for most widgets so it’s unnecessary here.
Attributes