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]) |
CheckBox
¶skimage.viewer.widgets.
CheckBox
(name, value=False, alignment='center', ptype='kwarg', callback=None)[source]¶Bases: skimage.viewer.widgets.core.BaseWidget
CheckBox widget
Parameters: | name : str
value: {False, True}, optional
alignment: {‘center’,’left’,’right’}, optional
ptype : {‘arg’ | ‘kwarg’ | ‘plugin’}, optional
callback : callable f(widget_name, value), optional
|
---|
val
¶ComboBox
¶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: | name : str
items: list of str
ptype : {‘arg’ | ‘kwarg’ | ‘plugin’}, optional
callback : callable f(widget_name, value), optional
|
---|
index
¶val
¶OKCancelButtons
¶SaveButtons
¶Slider
¶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: | name : str
low, high : float
value : float
value_type : {‘float’ | ‘int’}, optional
ptype : {‘kwarg’ | ‘arg’ | ‘plugin’}, optional
callback : callable f(widget_name, value), optional
orientation : {‘horizontal’ | ‘vertical’}, optional
update_on : {‘release’ | ‘move’}, optional
|
---|
__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]¶val
¶