Module: viewer.widgets

BaseWidget

class skimage.viewer.widgets.BaseWidget(name, ptype=None, callback=None)

Bases: PyQt4.QtGui.QWidget

__init__(name, ptype=None, callback=None)
val

ComboBox

class skimage.viewer.widgets.ComboBox(name, items, ptype='kwarg', callback=None)

Bases: skimage.viewer.widgets.core.BaseWidget

ComboBox widget for selecting among a list of choices.

Parameters:

name : str

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.

items: list :

Allowed parameter values.

ptype : {‘arg’ | ‘kwarg’ | ‘plugin’}

Parameter type.

callback : function

Callback function called in response to slider changes. This function is typically set when the widget is added to a plugin.

__init__(name, items, ptype='kwarg', callback=None)
index
val

OKCancelButtons

class skimage.viewer.widgets.OKCancelButtons(button_width=80)

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)
close_plugin()
update_original_image()

SaveButtons

class skimage.viewer.widgets.SaveButtons(name='Save to:', default_format='png')

Bases: skimage.viewer.widgets.core.BaseWidget

Buttons to save image to io.stack or to a file.

__init__(name='Save to:', default_format='png')
save_to_file()
save_to_stack()

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')

Bases: skimage.viewer.widgets.core.BaseWidget

Slider widget for adjusting numeric parameters.

Parameters:

name : str

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, high : float

Range of slider values.

value : float

Default slider value. If None, use midpoint between low and high.

value_type : {‘float’ | ‘int’}

Numeric type of slider value.

ptype : {‘arg’ | ‘kwarg’ | ‘plugin’}

Parameter type.

callback : function

Callback function called in response to slider changes. This function is typically set when the widget is added to a plugin.

orientation : {‘horizontal’ | ‘vertical’}

Slider orientation.

update_on : {‘release’ | ‘move’}

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')
val

Text

class skimage.viewer.widgets.Text(name=None, text='')

Bases: skimage.viewer.widgets.core.BaseWidget

__init__(name=None, text='')
text