非常教程

Scikit image参考手册

查看 | viewer

viewer.widgets

用于与ImageViewer交互的小部件。

这些小部件应该使用其add_widget方法添加到Plugin子类中,或者调用:

plugin += Widget(...)

在一个插件实例上。插件将基于由其ptype属性指定的小部件参数类型来委托操作,可以是:

'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(名称,回调)

点击后调用回调的按钮。

skimage.viewer.widgets.CheckBox(name,...)

CheckBox小部件

skimage.viewer.widgets.ComboBox(名称,项目)

ComboBox小部件,用于在一系列选项中进行选择。

skimage.viewer.widgets.OKCancelButtons(...)

关闭父插件的按钮。

skimage.viewer.widgets.SaveButtons(name,...)

将图像保存到io.stack或文件的按钮。

skimage.viewer.widgets.Slider(名称,低,...)

用于调整数字参数的Slider小部件。

skimage.viewer.widgets.Text(名称,文本)

skimage.viewer.widgets.core

skimage.viewer.widgets.history

BaseWidget

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

基地: object

__init__(name, ptype=None, callback=None)[source]plugin = 'Widget is not attached to a Plugin.'val

按键

class skimage.viewer.widgets.Button(name, callback)[source]

基地: skimage.viewer.widgets.core.BaseWidget

点击后调用回调的按钮。

参数:

名称:str按钮的名称。callback:callable f()当单击按钮时调用的函数。

__init__(name, callback)[source]

复选框

class skimage.viewer.widgets.CheckBox(name, value=False, alignment='center', ptype='kwarg', callback=None)[source]

基地: skimage.viewer.widgets.core.BaseWidget

CheckBox小部件

参数:

name:str CheckBox参数的名称。如果此参数作为关键字参数传递,则它必须匹配该关键字参数的名称(空格替换为下划线)。另外,该名称显示为CheckBox的名称。值:{False,True},可选初始状态的CheckBox。对齐:{'center','left','right'},可选复选框对齐方式ptype:{'arg'| 'kwarg'| 'plugin'},可选参数类型callback:callable f(widget_name,value),可选的回调函数,用于响应复选框更改。注意:当小部件添加到插件时,通常会设置(覆盖)此功能。

__init__(name, value=False, alignment='center', ptype='kwarg', callback=None)[source]val

组合框

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

基地: skimage.viewer.widgets.core.BaseWidget

ComboBox小部件,用于在一系列选项中进行选择。

参数:

name:str ComboBox参数的名称。如果此参数作为关键字参数传递,则它必须匹配该关键字参数的名称(空格替换为下划线)。另外,该名称显示为ComboBox的名称。项目:str列表允许的参数值。ptype:{'arg'| 'kwarg'| 'plugin'},可选参数类型。callback:可调用f(widget_name,value),可选的回调函数,用于响应组合框更改。注意:当小部件添加到插件时,通常会设置(覆盖)此功能。

__init__(name, items, ptype='kwarg', callback=None)[source]indexval

OKCancelButtons

class skimage.viewer.widgets.OKCancelButtons(button_width=80)[source]

基地: skimage.viewer.widgets.core.BaseWidget

关闭父插件的按钮。

确定将用当前(过滤)图像替换原始图像。取消将关闭该插件。

__init__(button_width=80)[source]close_plugin()[source]update_original_image()[source]

SaveButtons

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

基地: skimage.viewer.widgets.core.BaseWidget

将图像保存到io.stack或文件的按钮。

__init__(name='Save to:', default_format='png')[source]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小部件。

参数:

name:str滑块参数的名称。如果此参数作为关键字参数传递,则它必须匹配该关键字参数的名称(空格替换为下划线)。另外,该名称显示为滑块的名称。低,高:浮点值的范围。value:float默认滑块值。如果没有,请使用低点和高点之间的中点。value_type:{'float'| 'int'},可选的数值类型的滑块值。ptype:{'kwarg'| 'arg'| 'plugin'},可选参数类型。callback:可调用的f(widget_name,value),可选的回调函数,用于响应滑块更改。注意:当小部件添加到插件时,通常会设置(覆盖)此功能。方向:{'horizo​​ntal'| '垂直'},可选的滑块方向。update_on:{'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]val

文本

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

基地: skimage.viewer.widgets.core.BaseWidget

__init__(name=None, text='')[source]text

Scikit image

Scikit-image 是用于图像处理的 Python 包,使用原生的 NumPy 数组作为图像对象。

主页 http://scikit-image.org/
源码 https://github.com/scikit-image/scikit-image
发布版本 0.13.1