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 (parent, …) | |
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 (parent, flags, …) | |
skimage.viewer.widgets.core | |
skimage.viewer.widgets.history |
class skimage.viewer.widgets.BaseWidget(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())
[source]
Bases: PyQt5.QtWidgets.QWidget
__init__(name, ptype=None, callback=None)
[source]
Initialize self. See help(type(self)) for accurate signature.
plugin = 'Widget is not attached to a Plugin.'
val
class skimage.viewer.widgets.Button(name, callback)
[source]
Bases: skimage.viewer.widgets.core.BaseWidget
Button which calls callback upon click.
Parameters: |
|
---|
__init__(name, callback)
[source]
Initialize self. See help(type(self)) for accurate signature.
class skimage.viewer.widgets.CheckBox(name, value=False, alignment='center', ptype='kwarg', callback=None)
[source]
Bases: skimage.viewer.widgets.core.BaseWidget
CheckBox widget
Parameters: |
|
---|
__init__(name, value=False, alignment='center', ptype='kwarg', callback=None)
[source]
Initialize self. See help(type(self)) for accurate signature.
val
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: |
|
---|
__init__(name, items, ptype='kwarg', callback=None)
[source]
Initialize self. See help(type(self)) for accurate signature.
index
val
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]
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]
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: |
|
---|
__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.
val
class skimage.viewer.widgets.Text(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())
[source]
Bases: skimage.viewer.widgets.core.BaseWidget
__init__(name=None, text='')
[source]
Initialize self. See help(type(self)) for accurate signature.
text
© 2011 the scikit-image team
Licensed under the BSD 3-clause License.
http://scikit-image.org/docs/0.14.x/api/skimage.viewer.widgets.html