doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
name = 'Crop' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Crop.name |
reset() [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Crop.reset |
__init__(maxdist=10, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Crop.__init__ |
class skimage.viewer.plugins.LabelPainter(max_radius=20, **kwargs) [source]
Bases: skimage.viewer.plugins.base.Plugin
__init__(max_radius=20, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
help() [source]
property label
name = 'LabelPainter'
on_enter(overlay) [source]
property radius | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LabelPainter |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LabelPainter.attach |
help() [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LabelPainter.help |
property label | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LabelPainter.label |
name = 'LabelPainter' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LabelPainter.name |
on_enter(overlay) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LabelPainter.on_enter |
property radius | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LabelPainter.radius |
__init__(max_radius=20, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LabelPainter.__init__ |
class skimage.viewer.plugins.LineProfile(maxdist=10, epsilon='deprecated', limits='image', **kwargs) [source]
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
maxdistfloat
Maximum pixel distance allowed when selecting end point of scan line.
limitstuple or {None, ‘image’, ‘dtype’}
(minimum, maximum) intensity limits for plotted profile. The following special values are defined: None : rescale based on min/max intensity along selected scan line. ‘image’ : fixed scale based on min/max intensity in image. ‘dtype’ : fixed scale based on min/max intensity of image dtype.
__init__(maxdist=10, epsilon='deprecated', limits='image', **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
get_profiles() [source]
Return intensity profile of the selected line. Returns
end_points: (2, 2) array
The positions ((x1, y1), (x2, y2)) of the line ends. profile: list of 1d arrays
Profile of intensity values. Length 1 (grayscale) or 3 (rgb).
help() [source]
line_changed(end_points) [source]
name = 'Line Profile'
output() [source]
Return the drawn line and the resulting scan. Returns
line_image(M, N) uint8 array, same shape as image
An array of 0s with the scanned line set to 255. If the linewidth of the line tool is greater than 1, sets the values within the profiled polygon to 128.
scan(P,) or (P, 3) array of int or float
The line scan values across the image.
reset_axes(scan_data) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile.attach |
get_profiles() [source]
Return intensity profile of the selected line. Returns
end_points: (2, 2) array
The positions ((x1, y1), (x2, y2)) of the line ends. profile: list of 1d arrays
Profile of intensity values. Length 1 (grayscale) or 3 (rgb). | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile.get_profiles |
help() [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile.help |
line_changed(end_points) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile.line_changed |
name = 'Line Profile' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile.name |
output() [source]
Return the drawn line and the resulting scan. Returns
line_image(M, N) uint8 array, same shape as image
An array of 0s with the scanned line set to 255. If the linewidth of the line tool is greater than 1, sets the values within the profiled polygon to 128.
scan(P,) or (P, 3) array of int or float
The line scan values across the image. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile.output |
reset_axes(scan_data) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile.reset_axes |
__init__(maxdist=10, epsilon='deprecated', limits='image', **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.LineProfile.__init__ |
class skimage.viewer.plugins.Measure(maxdist=10, **kwargs) [source]
Bases: skimage.viewer.plugins.base.Plugin
__init__(maxdist=10, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
help() [source]
line_changed(end_points) [source]
name = 'Measure' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Measure |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Measure.attach |
help() [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Measure.help |
line_changed(end_points) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Measure.line_changed |
name = 'Measure' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Measure.name |
__init__(maxdist=10, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Measure.__init__ |
class skimage.viewer.plugins.OverlayPlugin(**kwargs) [source]
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
overlayarray
Overlay displayed on top of image. This overlay defaults to a color map with alpha values varying linearly from 0 to 1.
colorint
Color of overlay.
__init__(**kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
closeEvent(event) [source]
On close disconnect all artists and events from ImageViewer. Note that artists must be appended to self.artists.
property color
colors = {'cyan': (0, 1, 1), 'green': (0, 1, 0), 'red': (1, 0, 0), 'yellow': (1, 1, 0)}
display_filtered_image(image) [source]
Display filtered image as an overlay on top of image in viewer.
property filtered_image
Return filtered image. This “filtered image” is used when saving from the plugin.
output() [source]
Return the overlaid image. Returns
overlayarray, same shape as image
The overlay currently displayed.
dataNone
property overlay | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.attach |
closeEvent(event) [source]
On close disconnect all artists and events from ImageViewer. Note that artists must be appended to self.artists. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.closeEvent |
property color | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.color |
colors = {'cyan': (0, 1, 1), 'green': (0, 1, 0), 'red': (1, 0, 0), 'yellow': (1, 1, 0)} | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.colors |
display_filtered_image(image) [source]
Display filtered image as an overlay on top of image in viewer. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.display_filtered_image |
property filtered_image
Return filtered image. This “filtered image” is used when saving from the plugin. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.filtered_image |
output() [source]
Return the overlaid image. Returns
overlayarray, same shape as image
The overlay currently displayed.
dataNone | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.output |
property overlay | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.overlay |
__init__(**kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.OverlayPlugin.__init__ |
class skimage.viewer.plugins.PlotPlugin(image_filter=None, height=150, width=400, **kwargs) [source]
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.
__init__(image_filter=None, height=150, width=400, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
add_plot() [source]
add_tool(tool) [source]
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
redraw() [source]
Redraw plot.
remove_tool(tool) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.PlotPlugin |
add_plot() [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.PlotPlugin.add_plot |
add_tool(tool) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.PlotPlugin.add_tool |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.PlotPlugin.attach |
redraw() [source]
Redraw plot. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.PlotPlugin.redraw |
remove_tool(tool) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.PlotPlugin.remove_tool |
__init__(image_filter=None, height=150, width=400, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.PlotPlugin.__init__ |
class skimage.viewer.plugins.Plugin(image_filter=None, height=0, width=400, useblit=True, dock='bottom') [source]
Bases: object 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_viewerImageViewer
Window containing image used in measurement/manipulation.
image_filterfunction
Function that gets called to update image in image viewer. This value can be None if, for example, you have a plugin that extracts information from an image and doesn’t manipulate it. Alternatively, this function can be defined as a method in a Plugin subclass.
height, widthint
Size of plugin window in pixels. Note that Qt will automatically resize a window to fit components. So if you’re adding rows of components, you can leave height = 0 and just let Qt determine the final height.
useblitbool
If True, use blitting to speed up animation. Only available on some Matplotlib backends. If None, set to True when using Agg backend. This only has an effect if you draw on top of an image viewer. 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
>>> thresholded = viewer.show()[0][0]
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
image_viewerImageViewer
Window containing image used in measurement.
namestr
Name of plugin. This is displayed as the window title.
artistlist
List of Matplotlib artists and canvastools. Any artists created by the plugin should be added to this list so that it gets cleaned up on close.
__init__(image_filter=None, height=0, width=400, useblit=True, dock='bottom') [source]
Initialize self. See help(type(self)) for accurate signature.
add_widget(widget) [source]
Add widget to plugin. Alternatively, Plugin’s __add__ method is overloaded to add widgets: plugin += Widget(...)
Widgets can adjust required or optional arguments of filter function or parameters for the plugin. This is specified by the Widget’s ptype.
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
clean_up() [source]
closeEvent(event) [source]
On close disconnect all artists and events from ImageViewer. Note that artists must be appended to self.artists.
display_filtered_image(image) [source]
Display the filtered image on image viewer. If you don’t want to simply replace the displayed image with the filtered image (e.g., you want to display a transparent overlay), you can override this method.
filter_image(*widget_arg) [source]
Call image_filter with widget args and kwargs Note: display_filtered_image is automatically called.
property filtered_image
Return filtered image.
image_changed = None
image_viewer = 'Plugin is not attached to ImageViewer'
name = 'Plugin'
output() [source]
Return the plugin’s representation and data. Returns
imagearray, same shape as self.image_viewer.image, or None
The filtered image.
dataNone
Any data associated with the plugin. Notes Derived classes should override this method to return a tuple containing an overlay of the same shape of the image, and a data object. Either of these is optional: return None if you don’t want to return a value.
remove_image_artists() [source]
Remove artists that are connected to the image viewer.
show(main_window=True) [source]
Show plugin.
update_plugin(name, value) [source]
Update keyword parameters of the plugin itself. These parameters will typically be implemented as class properties so that they update the image or some other component. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin |
add_widget(widget) [source]
Add widget to plugin. Alternatively, Plugin’s __add__ method is overloaded to add widgets: plugin += Widget(...)
Widgets can adjust required or optional arguments of filter function or parameters for the plugin. This is specified by the Widget’s ptype. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.add_widget |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.attach |
clean_up() [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.clean_up |
closeEvent(event) [source]
On close disconnect all artists and events from ImageViewer. Note that artists must be appended to self.artists. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.closeEvent |
display_filtered_image(image) [source]
Display the filtered image on image viewer. If you don’t want to simply replace the displayed image with the filtered image (e.g., you want to display a transparent overlay), you can override this method. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.display_filtered_image |
property filtered_image
Return filtered image. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.filtered_image |
filter_image(*widget_arg) [source]
Call image_filter with widget args and kwargs Note: display_filtered_image is automatically called. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.filter_image |
image_changed = None | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.image_changed |
image_viewer = 'Plugin is not attached to ImageViewer' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.image_viewer |
name = 'Plugin' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.name |
output() [source]
Return the plugin’s representation and data. Returns
imagearray, same shape as self.image_viewer.image, or None
The filtered image.
dataNone
Any data associated with the plugin. Notes Derived classes should override this method to return a tuple containing an overlay of the same shape of the image, and a data object. Either of these is optional: return None if you don’t want to return a value. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.output |
remove_image_artists() [source]
Remove artists that are connected to the image viewer. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.remove_image_artists |
show(main_window=True) [source]
Show plugin. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.show |
update_plugin(name, value) [source]
Update keyword parameters of the plugin itself. These parameters will typically be implemented as class properties so that they update the image or some other component. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.update_plugin |
__init__(image_filter=None, height=0, width=400, useblit=True, dock='bottom') [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Plugin.__init__ |
Module: viewer.utils
skimage.viewer.utils.figimage(image[, …]) Return figure and axes with figure tightly surrounding image.
skimage.viewer.utils.init_qtapp() Initialize QAppliction.
skimage.viewer.utils.new_plot([parent, …]) Return new figure and axes.
skimage.viewer.utils.start_qtapp([app]) Start Qt mainloop
skimage.viewer.utils.update_axes_image(…) Update the image displayed by an image plot.
skimage.viewer.utils.ClearColormap(rgb[, …]) Color map that varies linearly from alpha = 0 to 1
skimage.viewer.utils.FigureCanvas(figure, …) Canvas for displaying images.
skimage.viewer.utils.LinearColormap(name, …) LinearSegmentedColormap in which color varies smoothly.
skimage.viewer.utils.RequiredAttr([init_val]) A class attribute that must be set before use.
skimage.viewer.utils.canvas
skimage.viewer.utils.core
skimage.viewer.utils.dialogs figimage
skimage.viewer.utils.figimage(image, scale=1, dpi=None, **kwargs) [source]
Return figure and axes with figure tightly surrounding image. Unlike pyplot.figimage, this actually plots onto an axes object, which fills the figure. Plotting the image onto an axes allows for subsequent overlays of axes artists. Parameters
imagearray
image to plot
scalefloat
If scale is 1, the figure and axes have the same dimension as the image. Smaller values of scale will shrink the figure.
dpiint
Dots per inch for figure. If None, use the default rcParam.
init_qtapp
skimage.viewer.utils.init_qtapp() [source]
Initialize QAppliction. The QApplication needs to be initialized before creating any QWidgets
new_plot
skimage.viewer.utils.new_plot(parent=None, subplot_kw=None, **fig_kw) [source]
Return new figure and axes. Parameters
parentQtWidget
Qt widget that displays the plot objects. If None, you must manually call canvas.setParent and pass the parent widget.
subplot_kwdict
Keyword arguments passed matplotlib.figure.Figure.add_subplot.
fig_kwdict
Keyword arguments passed matplotlib.figure.Figure.
start_qtapp
skimage.viewer.utils.start_qtapp(app=None) [source]
Start Qt mainloop
update_axes_image
skimage.viewer.utils.update_axes_image(image_axes, image) [source]
Update the image displayed by an image plot. This sets the image plot’s array and updates its shape appropriately Parameters
image_axesmatplotlib.image.AxesImage
Image axes to update.
imagearray
Image array.
ClearColormap
class skimage.viewer.utils.ClearColormap(rgb, max_alpha=1, name='clear_color') [source]
Bases: skimage.viewer.utils.core.LinearColormap Color map that varies linearly from alpha = 0 to 1
__init__(rgb, max_alpha=1, name='clear_color') [source]
Create color map from linear mapping segments segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional. Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: cdict = {'red': [(0.0, 0.0, 0.0),
(0.5, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'green': [(0.0, 0.0, 0.0),
(0.25, 0.0, 0.0),
(0.75, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'blue': [(0.0, 0.0, 0.0),
(0.5, 0.0, 0.0),
(1.0, 1.0, 1.0)]}
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]: row i: x y0 y1
/
/
row i+1: x y0 y1
Hence y0 in the first row and y1 in the last row are never used. See also
LinearSegmentedColormap.from_list
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
makeMappingArray
For information about making a mapping array.
FigureCanvas
class skimage.viewer.utils.FigureCanvas(figure, **kwargs) [source]
Bases: object Canvas for displaying images.
__init__(figure, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
resizeEvent(event) [source]
LinearColormap
class skimage.viewer.utils.LinearColormap(name, segmented_data, **kwargs) [source]
Bases: matplotlib.colors.LinearSegmentedColormap LinearSegmentedColormap in which color varies smoothly. This class is a simplification of LinearSegmentedColormap, which doesn’t support jumps in color intensities. Parameters
namestr
Name of colormap.
segmented_datadict
Dictionary of ‘red’, ‘green’, ‘blue’, and (optionally) ‘alpha’ values. Each color key contains a list of x, y tuples. x must increase monotonically from 0 to 1 and corresponds to input values for a mappable object (e.g. an image). y corresponds to the color intensity.
__init__(name, segmented_data, **kwargs) [source]
Create color map from linear mapping segments segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional. Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: cdict = {'red': [(0.0, 0.0, 0.0),
(0.5, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'green': [(0.0, 0.0, 0.0),
(0.25, 0.0, 0.0),
(0.75, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'blue': [(0.0, 0.0, 0.0),
(0.5, 0.0, 0.0),
(1.0, 1.0, 1.0)]}
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]: row i: x y0 y1
/
/
row i+1: x y0 y1
Hence y0 in the first row and y1 in the last row are never used. See also
LinearSegmentedColormap.from_list
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
makeMappingArray
For information about making a mapping array.
RequiredAttr
class skimage.viewer.utils.RequiredAttr(init_val=None) [source]
Bases: object A class attribute that must be set before use.
__init__(init_val=None) [source]
Initialize self. See help(type(self)) for accurate signature.
instances = {(<skimage.viewer.utils.core.RequiredAttr object>, None): 'Widget is not attached to a Plugin.', (<skimage.viewer.utils.core.RequiredAttr object>, None): 'Plugin is not attached to ImageViewer'} | skimage.api.skimage.viewer.utils |
class skimage.viewer.utils.ClearColormap(rgb, max_alpha=1, name='clear_color') [source]
Bases: skimage.viewer.utils.core.LinearColormap Color map that varies linearly from alpha = 0 to 1
__init__(rgb, max_alpha=1, name='clear_color') [source]
Create color map from linear mapping segments segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional. Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: cdict = {'red': [(0.0, 0.0, 0.0),
(0.5, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'green': [(0.0, 0.0, 0.0),
(0.25, 0.0, 0.0),
(0.75, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'blue': [(0.0, 0.0, 0.0),
(0.5, 0.0, 0.0),
(1.0, 1.0, 1.0)]}
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]: row i: x y0 y1
/
/
row i+1: x y0 y1
Hence y0 in the first row and y1 in the last row are never used. See also
LinearSegmentedColormap.from_list
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
makeMappingArray
For information about making a mapping array. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.ClearColormap |
__init__(rgb, max_alpha=1, name='clear_color') [source]
Create color map from linear mapping segments segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional. Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: cdict = {'red': [(0.0, 0.0, 0.0),
(0.5, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'green': [(0.0, 0.0, 0.0),
(0.25, 0.0, 0.0),
(0.75, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'blue': [(0.0, 0.0, 0.0),
(0.5, 0.0, 0.0),
(1.0, 1.0, 1.0)]}
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]: row i: x y0 y1
/
/
row i+1: x y0 y1
Hence y0 in the first row and y1 in the last row are never used. See also
LinearSegmentedColormap.from_list
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
makeMappingArray
For information about making a mapping array. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.ClearColormap.__init__ |
skimage.viewer.utils.figimage(image, scale=1, dpi=None, **kwargs) [source]
Return figure and axes with figure tightly surrounding image. Unlike pyplot.figimage, this actually plots onto an axes object, which fills the figure. Plotting the image onto an axes allows for subsequent overlays of axes artists. Parameters
imagearray
image to plot
scalefloat
If scale is 1, the figure and axes have the same dimension as the image. Smaller values of scale will shrink the figure.
dpiint
Dots per inch for figure. If None, use the default rcParam. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.figimage |
class skimage.viewer.utils.FigureCanvas(figure, **kwargs) [source]
Bases: object Canvas for displaying images.
__init__(figure, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
resizeEvent(event) [source] | skimage.api.skimage.viewer.utils#skimage.viewer.utils.FigureCanvas |
resizeEvent(event) [source] | skimage.api.skimage.viewer.utils#skimage.viewer.utils.FigureCanvas.resizeEvent |
__init__(figure, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.FigureCanvas.__init__ |
skimage.viewer.utils.init_qtapp() [source]
Initialize QAppliction. The QApplication needs to be initialized before creating any QWidgets | skimage.api.skimage.viewer.utils#skimage.viewer.utils.init_qtapp |
class skimage.viewer.utils.LinearColormap(name, segmented_data, **kwargs) [source]
Bases: matplotlib.colors.LinearSegmentedColormap LinearSegmentedColormap in which color varies smoothly. This class is a simplification of LinearSegmentedColormap, which doesn’t support jumps in color intensities. Parameters
namestr
Name of colormap.
segmented_datadict
Dictionary of ‘red’, ‘green’, ‘blue’, and (optionally) ‘alpha’ values. Each color key contains a list of x, y tuples. x must increase monotonically from 0 to 1 and corresponds to input values for a mappable object (e.g. an image). y corresponds to the color intensity.
__init__(name, segmented_data, **kwargs) [source]
Create color map from linear mapping segments segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional. Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: cdict = {'red': [(0.0, 0.0, 0.0),
(0.5, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'green': [(0.0, 0.0, 0.0),
(0.25, 0.0, 0.0),
(0.75, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'blue': [(0.0, 0.0, 0.0),
(0.5, 0.0, 0.0),
(1.0, 1.0, 1.0)]}
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]: row i: x y0 y1
/
/
row i+1: x y0 y1
Hence y0 in the first row and y1 in the last row are never used. See also
LinearSegmentedColormap.from_list
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
makeMappingArray
For information about making a mapping array. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.LinearColormap |
__init__(name, segmented_data, **kwargs) [source]
Create color map from linear mapping segments segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional. Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: cdict = {'red': [(0.0, 0.0, 0.0),
(0.5, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'green': [(0.0, 0.0, 0.0),
(0.25, 0.0, 0.0),
(0.75, 1.0, 1.0),
(1.0, 1.0, 1.0)],
'blue': [(0.0, 0.0, 0.0),
(0.5, 0.0, 0.0),
(1.0, 1.0, 1.0)]}
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]: row i: x y0 y1
/
/
row i+1: x y0 y1
Hence y0 in the first row and y1 in the last row are never used. See also
LinearSegmentedColormap.from_list
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
makeMappingArray
For information about making a mapping array. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.LinearColormap.__init__ |
skimage.viewer.utils.new_plot(parent=None, subplot_kw=None, **fig_kw) [source]
Return new figure and axes. Parameters
parentQtWidget
Qt widget that displays the plot objects. If None, you must manually call canvas.setParent and pass the parent widget.
subplot_kwdict
Keyword arguments passed matplotlib.figure.Figure.add_subplot.
fig_kwdict
Keyword arguments passed matplotlib.figure.Figure. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.new_plot |
class skimage.viewer.utils.RequiredAttr(init_val=None) [source]
Bases: object A class attribute that must be set before use.
__init__(init_val=None) [source]
Initialize self. See help(type(self)) for accurate signature.
instances = {(<skimage.viewer.utils.core.RequiredAttr object>, None): 'Widget is not attached to a Plugin.', (<skimage.viewer.utils.core.RequiredAttr object>, None): 'Plugin is not attached to ImageViewer'} | skimage.api.skimage.viewer.utils#skimage.viewer.utils.RequiredAttr |
instances = {(<skimage.viewer.utils.core.RequiredAttr object>, None): 'Widget is not attached to a Plugin.', (<skimage.viewer.utils.core.RequiredAttr object>, None): 'Plugin is not attached to ImageViewer'} | skimage.api.skimage.viewer.utils#skimage.viewer.utils.RequiredAttr.instances |
__init__(init_val=None) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.RequiredAttr.__init__ |
skimage.viewer.utils.start_qtapp(app=None) [source]
Start Qt mainloop | skimage.api.skimage.viewer.utils#skimage.viewer.utils.start_qtapp |
skimage.viewer.utils.update_axes_image(image_axes, image) [source]
Update the image displayed by an image plot. This sets the image plot’s array and updates its shape appropriately Parameters
image_axesmatplotlib.image.AxesImage
Image axes to update.
imagearray
Image array. | skimage.api.skimage.viewer.utils#skimage.viewer.utils.update_axes_image |
Module: viewer.viewers
skimage.viewer.viewers.CollectionViewer(…) Viewer for displaying image collections.
skimage.viewer.viewers.ImageViewer(image[, …]) Viewer for displaying images.
skimage.viewer.viewers.core ImageViewer class for viewing and interacting with images. CollectionViewer
class skimage.viewer.viewers.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: left/right arrows
Previous/next image in collection. number keys, 0–9
0% to 90% of collection. For example, “5” goes to the image in the middle (i.e. 50%) of the collection. home/end keys
First/last image in collection. Parameters
image_collectionlist of images
List of images to be displayed.
update_on{‘move’ | ‘release’}
Control whether image is updated on slide or release of the image slider. Using ‘on_release’ will give smoother behavior when displaying large images or when writing a plugin/subclass that requires heavy computation.
__init__(image_collection, update_on='move', **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
keyPressEvent(event) [source]
update_index(name, index) [source]
Select image on display using index into image collection.
ImageViewer
class skimage.viewer.viewers.ImageViewer(image, useblit=True) [source]
Bases: object 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
imagearray
Image being viewed. Examples >>> from skimage import data
>>> image = data.coins()
>>> viewer = ImageViewer(image)
>>> viewer.show()
Attributes
canvas, fig, axMatplotlib canvas, figure, and axes
Matplotlib canvas, figure, and axes used to display image.
imagearray
Image being viewed. Setting this value will update the displayed frame.
original_imagearray
Plugins typically operate on (but don’t change) the original image.
pluginslist
List of attached plugins.
__init__(image, useblit=True) [source]
Initialize self. See help(type(self)) for accurate signature.
add_tool(tool) [source]
closeEvent(event) [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': None, 'left': None, 'right': None, 'top': None}
property image
open_file(filename=None) [source]
Open image file and display in viewer.
original_image_changed = None
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. | skimage.api.skimage.viewer.viewers |
class skimage.viewer.viewers.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: left/right arrows
Previous/next image in collection. number keys, 0–9
0% to 90% of collection. For example, “5” goes to the image in the middle (i.e. 50%) of the collection. home/end keys
First/last image in collection. Parameters
image_collectionlist of images
List of images to be displayed.
update_on{‘move’ | ‘release’}
Control whether image is updated on slide or release of the image slider. Using ‘on_release’ will give smoother behavior when displaying large images or when writing a plugin/subclass that requires heavy computation.
__init__(image_collection, update_on='move', **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
keyPressEvent(event) [source]
update_index(name, index) [source]
Select image on display using index into image collection. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.CollectionViewer |
keyPressEvent(event) [source] | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.CollectionViewer.keyPressEvent |
update_index(name, index) [source]
Select image on display using index into image collection. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.CollectionViewer.update_index |
__init__(image_collection, update_on='move', **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.CollectionViewer.__init__ |
class skimage.viewer.viewers.ImageViewer(image, useblit=True) [source]
Bases: object 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
imagearray
Image being viewed. Examples >>> from skimage import data
>>> image = data.coins()
>>> viewer = ImageViewer(image)
>>> viewer.show()
Attributes
canvas, fig, axMatplotlib canvas, figure, and axes
Matplotlib canvas, figure, and axes used to display image.
imagearray
Image being viewed. Setting this value will update the displayed frame.
original_imagearray
Plugins typically operate on (but don’t change) the original image.
pluginslist
List of attached plugins.
__init__(image, useblit=True) [source]
Initialize self. See help(type(self)) for accurate signature.
add_tool(tool) [source]
closeEvent(event) [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': None, 'left': None, 'right': None, 'top': None}
property image
open_file(filename=None) [source]
Open image file and display in viewer.
original_image_changed = None
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. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer |
add_tool(tool) [source] | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.add_tool |
closeEvent(event) [source] | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.closeEvent |
connect_event(event, callback) [source]
Connect callback function to matplotlib event and return id. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.connect_event |
disconnect_event(callback_id) [source]
Disconnect callback by its id (returned by connect_event). | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.disconnect_event |
dock_areas = {'bottom': None, 'left': None, 'right': None, 'top': None} | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.dock_areas |
property image | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.image |
open_file(filename=None) [source]
Open image file and display in viewer. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.open_file |
original_image_changed = None | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.original_image_changed |
redraw() [source] | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.redraw |
remove_tool(tool) [source] | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.remove_tool |
reset_image() [source] | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.reset_image |
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). | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.save_to_file |
show(main_window=True) [source]
Show ImageViewer and attached plugins. This behaves much like matplotlib.pyplot.show and QWidget.show. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.show |
update_image(image) [source]
Update displayed image. This method can be overridden or extended in subclasses and plugins to react to image changes. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.update_image |
__init__(image, useblit=True) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.viewers#skimage.viewer.viewers.ImageViewer.__init__ |
Module: viewer.widgets Widgets for interacting with ImageViewer. These widgets should be added to a Plugin subclass using its add_widget method or calling: plugin += Widget(...)
on a Plugin instance. The Plugin will delegate action based on the widget’s parameter type specified by its ptype attribute, which can be: 'arg' : positional argument passed to Plugin's `filter_image` method.
'kwarg' : keyword argument passed to Plugin's `filter_image` method.
'plugin' : attribute of Plugin. You'll probably need to add a class
property of the same name that updates the display.
skimage.viewer.widgets.BaseWidget(name[, …])
skimage.viewer.widgets.Button(name, callback) Button which calls callback upon click.
skimage.viewer.widgets.CheckBox(name[, …]) CheckBox widget
skimage.viewer.widgets.ComboBox(name, items) ComboBox widget for selecting among a list of choices.
skimage.viewer.widgets.OKCancelButtons([…]) Buttons that close the parent plugin.
skimage.viewer.widgets.SaveButtons([name, …]) Buttons to save image to io.stack or to a file.
skimage.viewer.widgets.Slider(name[, low, …]) Slider widget for adjusting numeric parameters.
skimage.viewer.widgets.Text([name, text])
skimage.viewer.widgets.core
skimage.viewer.widgets.history BaseWidget
class skimage.viewer.widgets.BaseWidget(name, ptype=None, callback=None) [source]
Bases: object
__init__(name, ptype=None, callback=None) [source]
Initialize self. See help(type(self)) for accurate signature.
plugin = 'Widget is not attached to a Plugin.'
property val
Button
class skimage.viewer.widgets.Button(name, callback) [source]
Bases: skimage.viewer.widgets.core.BaseWidget Button which calls callback upon click. Parameters
namestr
Name of button.
callbackcallable f()
Function to call when button is clicked.
__init__(name, callback) [source]
Initialize self. See help(type(self)) for accurate signature.
CheckBox
class skimage.viewer.widgets.CheckBox(name, value=False, alignment='center', ptype='kwarg', callback=None) [source]
Bases: skimage.viewer.widgets.core.BaseWidget CheckBox widget Parameters
namestr
Name of CheckBox parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the CheckBox. value: {False, True}, optional
Initial state of the CheckBox. alignment: {‘center’,’left’,’right’}, optional
Checkbox alignment
ptype{‘arg’ | ‘kwarg’ | ‘plugin’}, optional
Parameter type
callbackcallable f(widget_name, value), optional
Callback function called in response to checkbox changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
__init__(name, value=False, alignment='center', ptype='kwarg', callback=None) [source]
Initialize self. See help(type(self)) for accurate signature.
property val
ComboBox
class skimage.viewer.widgets.ComboBox(name, items, ptype='kwarg', callback=None) [source]
Bases: skimage.viewer.widgets.core.BaseWidget ComboBox widget for selecting among a list of choices. Parameters
namestr
Name of ComboBox parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the ComboBox. items: list of str
Allowed parameter values.
ptype{‘arg’ | ‘kwarg’ | ‘plugin’}, optional
Parameter type.
callbackcallable f(widget_name, value), optional
Callback function called in response to combobox changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
__init__(name, items, ptype='kwarg', callback=None) [source]
Initialize self. See help(type(self)) for accurate signature.
property index
property val
OKCancelButtons
class skimage.viewer.widgets.OKCancelButtons(button_width=80) [source]
Bases: skimage.viewer.widgets.core.BaseWidget Buttons that close the parent plugin. OK will replace the original image with the current (filtered) image. Cancel will just close the plugin.
__init__(button_width=80) [source]
Initialize self. See help(type(self)) for accurate signature.
close_plugin() [source]
update_original_image() [source]
SaveButtons
class skimage.viewer.widgets.SaveButtons(name='Save to:', default_format='png') [source]
Bases: skimage.viewer.widgets.core.BaseWidget Buttons to save image to io.stack or to a file.
__init__(name='Save to:', default_format='png') [source]
Initialize self. See help(type(self)) for accurate signature.
save_to_file(filename=None) [source]
save_to_stack() [source]
Slider
class skimage.viewer.widgets.Slider(name, low=0.0, high=1.0, value=None, value_type='float', ptype='kwarg', callback=None, max_edit_width=60, orientation='horizontal', update_on='release') [source]
Bases: skimage.viewer.widgets.core.BaseWidget Slider widget for adjusting numeric parameters. Parameters
namestr
Name of slider parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the slider.
low, highfloat
Range of slider values.
valuefloat
Default slider value. If None, use midpoint between low and high.
value_type{‘float’ | ‘int’}, optional
Numeric type of slider value.
ptype{‘kwarg’ | ‘arg’ | ‘plugin’}, optional
Parameter type.
callbackcallable f(widget_name, value), optional
Callback function called in response to slider changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
orientation{‘horizontal’ | ‘vertical’}, optional
Slider orientation.
update_on{‘release’ | ‘move’}, optional
Control when callback function is called: on slider move or release.
__init__(name, low=0.0, high=1.0, value=None, value_type='float', ptype='kwarg', callback=None, max_edit_width=60, orientation='horizontal', update_on='release') [source]
Initialize self. See help(type(self)) for accurate signature.
property val
Text
class skimage.viewer.widgets.Text(name=None, text='') [source]
Bases: skimage.viewer.widgets.core.BaseWidget
__init__(name=None, text='') [source]
Initialize self. See help(type(self)) for accurate signature.
property text | skimage.api.skimage.viewer.widgets |
class skimage.viewer.widgets.BaseWidget(name, ptype=None, callback=None) [source]
Bases: object
__init__(name, ptype=None, callback=None) [source]
Initialize self. See help(type(self)) for accurate signature.
plugin = 'Widget is not attached to a Plugin.'
property val | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.BaseWidget |
plugin = 'Widget is not attached to a Plugin.' | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.BaseWidget.plugin |
property val | skimage.api.skimage.viewer.widgets#skimage.viewer.widgets.BaseWidget.val |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.