Overlay of painted labels displayed on top of image.
Current paint color.
Skimage viewer or plot plugin object.
2D shape tuple used to initialize overlay image.
The size of the paint cursor.
Opacity of overlay.
Function called whenever a control handle is moved. This function must accept the end points of line as the only argument.
Function called whenever the control handle is released.
Function called whenever the "enter" key is pressed.
Properties for matplotlib.patches.Rectangle
. This class redefines defaults in matplotlib.widgets.RectangleSelector
.
Widget for painting on top of a plot.
>>> from skimage.data import cameraThis example is valid syntax, but we were not able to check execution
... import matplotlib.pyplot as plt
... from skimage.viewer.canvastools import PaintTool
... import numpy as np
>>> img = camera() #doctest: +SKIPThis example is valid syntax, but we were not able to check execution
>>> ax = plt.subplot(111) #doctest: +SKIPThis example is valid syntax, but we were not able to check execution
... plt.imshow(img, cmap=plt.cm.gray) #doctest: +SKIP
... p = PaintTool(ax,np.shape(img[:-1]),10,0.2) #doctest: +SKIP
... plt.show() #doctest: +SKIP
>>> mask = p.overlay #doctest: +SKIPSee :
... plt.imshow(mask,cmap=plt.cm.gray) #doctest: +SKIP
... plt.show() #doctest: +SKIP
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.viewer.canvastools.painttool.PaintTool
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them