documentation fixes
This commit is contained in:
parent
43ec2bcd2c
commit
912f1f13c2
@ -1,4 +1,4 @@
|
|||||||
Pyqtgraph's Graphics Items
|
PyQtGraph's Graphics Items
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
Since pyqtgraph relies on Qt's GraphicsView framework, most of its graphics functionality is implemented as QGraphicsItem subclasses. This has two important consequences: 1) virtually anything you want to draw can be easily accomplished using the functionality provided by Qt. 2) Many of pyqtgraph's GraphicsItem classes can be used in any normal QGraphicsScene.
|
Since pyqtgraph relies on Qt's GraphicsView framework, most of its graphics functionality is implemented as QGraphicsItem subclasses. This has two important consequences: 1) virtually anything you want to draw can be easily accomplished using the functionality provided by Qt. 2) Many of pyqtgraph's GraphicsItem classes can be used in any normal QGraphicsScene.
|
||||||
|
@ -4,5 +4,25 @@ ROI
|
|||||||
.. autoclass:: pyqtgraph.ROI
|
.. autoclass:: pyqtgraph.ROI
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. automethod:: pyqtgraph.ROI.__init__
|
.. autoclass:: pyqtgraph.RectROI
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: pyqtgraph.EllipseROI
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: pyqtgraph.CircleROI
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: pyqtgraph.LineSegmentROI
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: pyqtgraph.PolyLineROI
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: pyqtgraph.LineROI
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: pyqtgraph.MultiRectROI
|
||||||
|
:members:
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ class AxisItem(GraphicsWidget):
|
|||||||
without any scaling prefix (eg, 'V' instead of 'mV'). The
|
without any scaling prefix (eg, 'V' instead of 'mV'). The
|
||||||
scaling prefix will be automatically prepended based on the
|
scaling prefix will be automatically prepended based on the
|
||||||
range of data displayed.
|
range of data displayed.
|
||||||
**args All extra keyword arguments become CSS style options for
|
\**args All extra keyword arguments become CSS style options for
|
||||||
the <span> tag which will surround the axis label and units.
|
the <span> tag which will surround the axis label and units.
|
||||||
============= =============================================================
|
============= =============================================================
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ class PlotDataItem(GraphicsObject):
|
|||||||
=========================== =========================================
|
=========================== =========================================
|
||||||
|
|
||||||
**Line style keyword arguments:**
|
**Line style keyword arguments:**
|
||||||
========== ================================================
|
========== ==============================================================================
|
||||||
connect Specifies how / whether vertexes should be connected.
|
connect Specifies how / whether vertexes should be connected.
|
||||||
See :func:`arrayToQPath() <pyqtgraph.arrayToQPath>`
|
See :func:`arrayToQPath() <pyqtgraph.arrayToQPath>`
|
||||||
pen Pen to use for drawing line between points.
|
pen Pen to use for drawing line between points.
|
||||||
@ -67,21 +67,25 @@ class PlotDataItem(GraphicsObject):
|
|||||||
fillLevel Fill the area between the curve and fillLevel
|
fillLevel Fill the area between the curve and fillLevel
|
||||||
fillBrush Fill to use when fillLevel is specified.
|
fillBrush Fill to use when fillLevel is specified.
|
||||||
May be any single argument accepted by :func:`mkBrush() <pyqtgraph.mkBrush>`
|
May be any single argument accepted by :func:`mkBrush() <pyqtgraph.mkBrush>`
|
||||||
========== ================================================
|
========== ==============================================================================
|
||||||
|
|
||||||
**Point style keyword arguments:** (see :func:`ScatterPlotItem.setData() <pyqtgraph.ScatterPlotItem.setData>` for more information)
|
**Point style keyword arguments:** (see :func:`ScatterPlotItem.setData() <pyqtgraph.ScatterPlotItem.setData>` for more information)
|
||||||
|
|
||||||
============ ================================================
|
============ =====================================================
|
||||||
symbol Symbol to use for drawing points OR list of symbols, one per point. Default is no symbol.
|
symbol Symbol to use for drawing points OR list of symbols,
|
||||||
|
one per point. Default is no symbol.
|
||||||
Options are o, s, t, d, +, or any QPainterPath
|
Options are o, s, t, d, +, or any QPainterPath
|
||||||
symbolPen Outline pen for drawing points OR list of pens, one per point.
|
symbolPen Outline pen for drawing points OR list of pens, one
|
||||||
May be any single argument accepted by :func:`mkPen() <pyqtgraph.mkPen>`
|
per point. May be any single argument accepted by
|
||||||
symbolBrush Brush for filling points OR list of brushes, one per point.
|
:func:`mkPen() <pyqtgraph.mkPen>`
|
||||||
May be any single argument accepted by :func:`mkBrush() <pyqtgraph.mkBrush>`
|
symbolBrush Brush for filling points OR list of brushes, one per
|
||||||
|
point. May be any single argument accepted by
|
||||||
|
:func:`mkBrush() <pyqtgraph.mkBrush>`
|
||||||
symbolSize Diameter of symbols OR list of diameters.
|
symbolSize Diameter of symbols OR list of diameters.
|
||||||
pxMode (bool) If True, then symbolSize is specified in pixels. If False, then symbolSize is
|
pxMode (bool) If True, then symbolSize is specified in
|
||||||
|
pixels. If False, then symbolSize is
|
||||||
specified in data coordinates.
|
specified in data coordinates.
|
||||||
============ ================================================
|
============ =====================================================
|
||||||
|
|
||||||
**Optimization keyword arguments:**
|
**Optimization keyword arguments:**
|
||||||
|
|
||||||
@ -92,11 +96,11 @@ class PlotDataItem(GraphicsObject):
|
|||||||
decimate deprecated.
|
decimate deprecated.
|
||||||
downsample (int) Reduce the number of samples displayed by this value
|
downsample (int) Reduce the number of samples displayed by this value
|
||||||
downsampleMethod 'subsample': Downsample by taking the first of N samples.
|
downsampleMethod 'subsample': Downsample by taking the first of N samples.
|
||||||
This method is fastest and least accurate.
|
This method is fastest and least accurate.
|
||||||
'mean': Downsample by taking the mean of N samples.
|
'mean': Downsample by taking the mean of N samples.
|
||||||
'peak': Downsample by drawing a saw wave that follows the min
|
'peak': Downsample by drawing a saw wave that follows the min
|
||||||
and max of the original data. This method produces the best
|
and max of the original data. This method produces the best
|
||||||
visual representation of the data but is slower.
|
visual representation of the data but is slower.
|
||||||
autoDownsample (bool) If True, resample the data before plotting to avoid plotting
|
autoDownsample (bool) If True, resample the data before plotting to avoid plotting
|
||||||
multiple line segments per pixel. This can improve performance when
|
multiple line segments per pixel. This can improve performance when
|
||||||
viewing very high-density data, but increases the initial overhead
|
viewing very high-density data, but increases the initial overhead
|
||||||
@ -294,13 +298,13 @@ class PlotDataItem(GraphicsObject):
|
|||||||
Arguments
|
Arguments
|
||||||
ds (int) Reduce visible plot samples by this factor. To disable,
|
ds (int) Reduce visible plot samples by this factor. To disable,
|
||||||
set ds=1.
|
set ds=1.
|
||||||
auto (bool) If True, automatically pick *ds* based on visible range
|
auto (bool) If True, automatically pick *ds* based on visible range.
|
||||||
mode 'subsample': Downsample by taking the first of N samples.
|
mode 'subsample': Downsample by taking the first of N samples.
|
||||||
This method is fastest and least accurate.
|
This method is fastest and least accurate.
|
||||||
'mean': Downsample by taking the mean of N samples.
|
'mean': Downsample by taking the mean of N samples.
|
||||||
'peak': Downsample by drawing a saw wave that follows the min
|
'peak': Downsample by drawing a saw wave that follows the min
|
||||||
and max of the original data. This method produces the best
|
and max of the original data. This method produces the best
|
||||||
visual representation of the data but is slower.
|
visual representation of the data but is slower.
|
||||||
=========== =================================================================
|
=========== =================================================================
|
||||||
"""
|
"""
|
||||||
changed = False
|
changed = False
|
||||||
|
@ -46,8 +46,8 @@ class ROI(GraphicsObject):
|
|||||||
that allow the user to manibulate the ROI.
|
that allow the user to manibulate the ROI.
|
||||||
|
|
||||||
|
|
||||||
Signals
|
======================= ====================================================
|
||||||
----------------------- ----------------------------------------------------
|
**Signals**
|
||||||
sigRegionChangeFinished Emitted when the user stops dragging the ROI (or
|
sigRegionChangeFinished Emitted when the user stops dragging the ROI (or
|
||||||
one of its handles) or if the ROI is changed
|
one of its handles) or if the ROI is changed
|
||||||
programatically.
|
programatically.
|
||||||
@ -65,11 +65,11 @@ class ROI(GraphicsObject):
|
|||||||
details.
|
details.
|
||||||
sigRemoveRequested Emitted when the user selects 'remove' from the
|
sigRemoveRequested Emitted when the user selects 'remove' from the
|
||||||
ROI's context menu (if available).
|
ROI's context menu (if available).
|
||||||
----------------------- ----------------------------------------------------
|
======================= ====================================================
|
||||||
|
|
||||||
|
|
||||||
Arguments
|
================ ===========================================================
|
||||||
---------------- -----------------------------------------------------------
|
**Arguments**
|
||||||
pos (length-2 sequence) Indicates the position of the ROI's
|
pos (length-2 sequence) Indicates the position of the ROI's
|
||||||
origin. For most ROIs, this is the lower-left corner of
|
origin. For most ROIs, this is the lower-left corner of
|
||||||
its bounding rectangle.
|
its bounding rectangle.
|
||||||
@ -101,7 +101,7 @@ class ROI(GraphicsObject):
|
|||||||
an option to remove the ROI. The ROI emits
|
an option to remove the ROI. The ROI emits
|
||||||
sigRemoveRequested when this menu action is selected.
|
sigRemoveRequested when this menu action is selected.
|
||||||
Default is False.
|
Default is False.
|
||||||
---------------- -----------------------------------------------------------
|
================ ===========================================================
|
||||||
"""
|
"""
|
||||||
|
|
||||||
sigRegionChangeFinished = QtCore.Signal(object)
|
sigRegionChangeFinished = QtCore.Signal(object)
|
||||||
@ -276,11 +276,14 @@ class ROI(GraphicsObject):
|
|||||||
If the ROI is bounded and the move would exceed boundaries, then the ROI
|
If the ROI is bounded and the move would exceed boundaries, then the ROI
|
||||||
is moved to the nearest acceptable position instead.
|
is moved to the nearest acceptable position instead.
|
||||||
|
|
||||||
snap can be:
|
*snap* can be:
|
||||||
None (default): use self.translateSnap and self.snapSize to determine whether/how to snap
|
|
||||||
False: do not snap
|
=============== ==========================================================================
|
||||||
Point(w,h) snap to rectangular grid with spacing (w,h)
|
None (default) use self.translateSnap and self.snapSize to determine whether/how to snap
|
||||||
True: snap using self.snapSize (and ignoring self.translateSnap)
|
False do not snap
|
||||||
|
Point(w,h) snap to rectangular grid with spacing (w,h)
|
||||||
|
True snap using self.snapSize (and ignoring self.translateSnap)
|
||||||
|
=============== ==========================================================================
|
||||||
|
|
||||||
Also accepts *update* and *finish* arguments (see setPos() for a description of these).
|
Also accepts *update* and *finish* arguments (see setPos() for a description of these).
|
||||||
"""
|
"""
|
||||||
@ -346,8 +349,8 @@ class ROI(GraphicsObject):
|
|||||||
ROI. However, for larger ROIs it may be desirable to disable this and
|
ROI. However, for larger ROIs it may be desirable to disable this and
|
||||||
instead provide one or more translation handles.
|
instead provide one or more translation handles.
|
||||||
|
|
||||||
Arguments:
|
=================== ====================================================
|
||||||
------------------- ----------------------------------------------------
|
**Arguments**
|
||||||
pos (length-2 sequence) The position of the handle
|
pos (length-2 sequence) The position of the handle
|
||||||
relative to the shape of the ROI. A value of (0,0)
|
relative to the shape of the ROI. A value of (0,0)
|
||||||
indicates the origin, whereas (1, 1) indicates the
|
indicates the origin, whereas (1, 1) indicates the
|
||||||
@ -357,7 +360,7 @@ class ROI(GraphicsObject):
|
|||||||
name The name of this handle (optional). Handles are
|
name The name of this handle (optional). Handles are
|
||||||
identified by name when calling
|
identified by name when calling
|
||||||
getLocalHandlePositions and getSceneHandlePositions.
|
getLocalHandlePositions and getSceneHandlePositions.
|
||||||
------------------- ----------------------------------------------------
|
=================== ====================================================
|
||||||
"""
|
"""
|
||||||
pos = Point(pos)
|
pos = Point(pos)
|
||||||
return self.addHandle({'name': name, 'type': 't', 'pos': pos, 'item': item}, index=index)
|
return self.addHandle({'name': name, 'type': 't', 'pos': pos, 'item': item}, index=index)
|
||||||
@ -367,8 +370,8 @@ class ROI(GraphicsObject):
|
|||||||
Add a new free handle to the ROI. Dragging free handles has no effect
|
Add a new free handle to the ROI. Dragging free handles has no effect
|
||||||
on the position or shape of the ROI.
|
on the position or shape of the ROI.
|
||||||
|
|
||||||
Arguments:
|
=================== ====================================================
|
||||||
------------------- ----------------------------------------------------
|
**Arguments**
|
||||||
pos (length-2 sequence) The position of the handle
|
pos (length-2 sequence) The position of the handle
|
||||||
relative to the shape of the ROI. A value of (0,0)
|
relative to the shape of the ROI. A value of (0,0)
|
||||||
indicates the origin, whereas (1, 1) indicates the
|
indicates the origin, whereas (1, 1) indicates the
|
||||||
@ -378,7 +381,7 @@ class ROI(GraphicsObject):
|
|||||||
name The name of this handle (optional). Handles are
|
name The name of this handle (optional). Handles are
|
||||||
identified by name when calling
|
identified by name when calling
|
||||||
getLocalHandlePositions and getSceneHandlePositions.
|
getLocalHandlePositions and getSceneHandlePositions.
|
||||||
------------------- ----------------------------------------------------
|
=================== ====================================================
|
||||||
"""
|
"""
|
||||||
if pos is not None:
|
if pos is not None:
|
||||||
pos = Point(pos)
|
pos = Point(pos)
|
||||||
@ -389,8 +392,8 @@ class ROI(GraphicsObject):
|
|||||||
Add a new scale handle to the ROI. Dragging a scale handle allows the
|
Add a new scale handle to the ROI. Dragging a scale handle allows the
|
||||||
user to change the height and/or width of the ROI.
|
user to change the height and/or width of the ROI.
|
||||||
|
|
||||||
Arguments:
|
=================== ====================================================
|
||||||
------------------- ----------------------------------------------------
|
**Arguments**
|
||||||
pos (length-2 sequence) The position of the handle
|
pos (length-2 sequence) The position of the handle
|
||||||
relative to the shape of the ROI. A value of (0,0)
|
relative to the shape of the ROI. A value of (0,0)
|
||||||
indicates the origin, whereas (1, 1) indicates the
|
indicates the origin, whereas (1, 1) indicates the
|
||||||
@ -404,7 +407,7 @@ class ROI(GraphicsObject):
|
|||||||
name The name of this handle (optional). Handles are
|
name The name of this handle (optional). Handles are
|
||||||
identified by name when calling
|
identified by name when calling
|
||||||
getLocalHandlePositions and getSceneHandlePositions.
|
getLocalHandlePositions and getSceneHandlePositions.
|
||||||
------------------- ----------------------------------------------------
|
=================== ====================================================
|
||||||
"""
|
"""
|
||||||
pos = Point(pos)
|
pos = Point(pos)
|
||||||
center = Point(center)
|
center = Point(center)
|
||||||
@ -420,8 +423,8 @@ class ROI(GraphicsObject):
|
|||||||
Add a new rotation handle to the ROI. Dragging a rotation handle allows
|
Add a new rotation handle to the ROI. Dragging a rotation handle allows
|
||||||
the user to change the angle of the ROI.
|
the user to change the angle of the ROI.
|
||||||
|
|
||||||
Arguments:
|
=================== ====================================================
|
||||||
------------------- ----------------------------------------------------
|
**Arguments**
|
||||||
pos (length-2 sequence) The position of the handle
|
pos (length-2 sequence) The position of the handle
|
||||||
relative to the shape of the ROI. A value of (0,0)
|
relative to the shape of the ROI. A value of (0,0)
|
||||||
indicates the origin, whereas (1, 1) indicates the
|
indicates the origin, whereas (1, 1) indicates the
|
||||||
@ -433,7 +436,7 @@ class ROI(GraphicsObject):
|
|||||||
name The name of this handle (optional). Handles are
|
name The name of this handle (optional). Handles are
|
||||||
identified by name when calling
|
identified by name when calling
|
||||||
getLocalHandlePositions and getSceneHandlePositions.
|
getLocalHandlePositions and getSceneHandlePositions.
|
||||||
------------------- ----------------------------------------------------
|
=================== ====================================================
|
||||||
"""
|
"""
|
||||||
pos = Point(pos)
|
pos = Point(pos)
|
||||||
center = Point(center)
|
center = Point(center)
|
||||||
@ -446,8 +449,8 @@ class ROI(GraphicsObject):
|
|||||||
arbitrary center point as well as scale the ROI by dragging the handle
|
arbitrary center point as well as scale the ROI by dragging the handle
|
||||||
toward or away from the center point.
|
toward or away from the center point.
|
||||||
|
|
||||||
Arguments:
|
=================== ====================================================
|
||||||
------------------- ----------------------------------------------------
|
**Arguments**
|
||||||
pos (length-2 sequence) The position of the handle
|
pos (length-2 sequence) The position of the handle
|
||||||
relative to the shape of the ROI. A value of (0,0)
|
relative to the shape of the ROI. A value of (0,0)
|
||||||
indicates the origin, whereas (1, 1) indicates the
|
indicates the origin, whereas (1, 1) indicates the
|
||||||
@ -459,7 +462,7 @@ class ROI(GraphicsObject):
|
|||||||
name The name of this handle (optional). Handles are
|
name The name of this handle (optional). Handles are
|
||||||
identified by name when calling
|
identified by name when calling
|
||||||
getLocalHandlePositions and getSceneHandlePositions.
|
getLocalHandlePositions and getSceneHandlePositions.
|
||||||
------------------- ----------------------------------------------------
|
=================== ====================================================
|
||||||
"""
|
"""
|
||||||
pos = Point(pos)
|
pos = Point(pos)
|
||||||
center = Point(center)
|
center = Point(center)
|
||||||
@ -474,8 +477,8 @@ class ROI(GraphicsObject):
|
|||||||
arbitrary center point, while moving toward or away from the center
|
arbitrary center point, while moving toward or away from the center
|
||||||
point has no effect on the shape of the ROI.
|
point has no effect on the shape of the ROI.
|
||||||
|
|
||||||
Arguments:
|
=================== ====================================================
|
||||||
------------------- ----------------------------------------------------
|
**Arguments**
|
||||||
pos (length-2 sequence) The position of the handle
|
pos (length-2 sequence) The position of the handle
|
||||||
relative to the shape of the ROI. A value of (0,0)
|
relative to the shape of the ROI. A value of (0,0)
|
||||||
indicates the origin, whereas (1, 1) indicates the
|
indicates the origin, whereas (1, 1) indicates the
|
||||||
@ -487,7 +490,7 @@ class ROI(GraphicsObject):
|
|||||||
name The name of this handle (optional). Handles are
|
name The name of this handle (optional). Handles are
|
||||||
identified by name when calling
|
identified by name when calling
|
||||||
getLocalHandlePositions and getSceneHandlePositions.
|
getLocalHandlePositions and getSceneHandlePositions.
|
||||||
------------------- ----------------------------------------------------
|
=================== ====================================================
|
||||||
"""
|
"""
|
||||||
pos = Point(pos)
|
pos = Point(pos)
|
||||||
center = Point(center)
|
center = Point(center)
|
||||||
@ -1030,8 +1033,8 @@ class ROI(GraphicsObject):
|
|||||||
"""Use the position and orientation of this ROI relative to an imageItem
|
"""Use the position and orientation of this ROI relative to an imageItem
|
||||||
to pull a slice from an array.
|
to pull a slice from an array.
|
||||||
|
|
||||||
|
=================== ====================================================
|
||||||
**Arguments**
|
**Arguments**
|
||||||
------------------- ----------------------------------------------------
|
|
||||||
data The array to slice from. Note that this array does
|
data The array to slice from. Note that this array does
|
||||||
*not* have to be the same data that is represented
|
*not* have to be the same data that is represented
|
||||||
in *img*.
|
in *img*.
|
||||||
@ -1043,9 +1046,9 @@ class ROI(GraphicsObject):
|
|||||||
returnMappedCoords (bool) If True, the array slice is returned along
|
returnMappedCoords (bool) If True, the array slice is returned along
|
||||||
with a corresponding array of coordinates that were
|
with a corresponding array of coordinates that were
|
||||||
used to extract data from the original array.
|
used to extract data from the original array.
|
||||||
**kwds All keyword arguments are passed to
|
\**kwds All keyword arguments are passed to
|
||||||
:func:`affineSlice <pyqtgraph.affineSlice>`.
|
:func:`affineSlice <pyqtgraph.affineSlice>`.
|
||||||
------------------- ----------------------------------------------------
|
=================== ====================================================
|
||||||
|
|
||||||
This method uses :func:`affineSlice <pyqtgraph.affineSlice>` to generate
|
This method uses :func:`affineSlice <pyqtgraph.affineSlice>` to generate
|
||||||
the slice from *data* and uses :func:`getAffineSliceParams <pyqtgraph.ROI.getAffineSliceParams>` to determine the parameters to
|
the slice from *data* and uses :func:`getAffineSliceParams <pyqtgraph.ROI.getAffineSliceParams>` to determine the parameters to
|
||||||
@ -1548,8 +1551,8 @@ class RectROI(ROI):
|
|||||||
"""
|
"""
|
||||||
Rectangular ROI subclass with a single scale handle at the top-right corner.
|
Rectangular ROI subclass with a single scale handle at the top-right corner.
|
||||||
|
|
||||||
|
============== =============================================================
|
||||||
**Arguments**
|
**Arguments**
|
||||||
-------------- -------------------------------------------------------------
|
|
||||||
pos (length-2 sequence) The position of the ROI origin.
|
pos (length-2 sequence) The position of the ROI origin.
|
||||||
See ROI().
|
See ROI().
|
||||||
size (length-2 sequence) The size of the ROI. See ROI().
|
size (length-2 sequence) The size of the ROI. See ROI().
|
||||||
@ -1557,8 +1560,8 @@ class RectROI(ROI):
|
|||||||
center, rather than its origin.
|
center, rather than its origin.
|
||||||
sideScalers (bool) If True, extra scale handles are added at the top and
|
sideScalers (bool) If True, extra scale handles are added at the top and
|
||||||
right edges.
|
right edges.
|
||||||
**args All extra keyword arguments are passed to ROI()
|
\**args All extra keyword arguments are passed to ROI()
|
||||||
-------------- -------------------------------------------------------------
|
============== =============================================================
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, pos, size, centered=False, sideScalers=False, **args):
|
def __init__(self, pos, size, centered=False, sideScalers=False, **args):
|
||||||
@ -1581,15 +1584,15 @@ class LineROI(ROI):
|
|||||||
allows the ROI to be positioned as if moving the ends of a line segment.
|
allows the ROI to be positioned as if moving the ends of a line segment.
|
||||||
A third handle controls the width of the ROI orthogonal to its "line" axis.
|
A third handle controls the width of the ROI orthogonal to its "line" axis.
|
||||||
|
|
||||||
|
============== =============================================================
|
||||||
**Arguments**
|
**Arguments**
|
||||||
-------------- -------------------------------------------------------------
|
|
||||||
pos1 (length-2 sequence) The position of the center of the ROI's
|
pos1 (length-2 sequence) The position of the center of the ROI's
|
||||||
left edge.
|
left edge.
|
||||||
pos2 (length-2 sequence) The position of the center of the ROI's
|
pos2 (length-2 sequence) The position of the center of the ROI's
|
||||||
right edge.
|
right edge.
|
||||||
width (float) The width of the ROI.
|
width (float) The width of the ROI.
|
||||||
**args All extra keyword arguments are passed to ROI()
|
\**args All extra keyword arguments are passed to ROI()
|
||||||
-------------- -------------------------------------------------------------
|
============== =============================================================
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, pos1, pos2, width, **args):
|
def __init__(self, pos1, pos2, width, **args):
|
||||||
@ -1617,12 +1620,12 @@ class MultiRectROI(QtGui.QGraphicsObject):
|
|||||||
an image similarly to PolyLineROI. It differs in that each segment
|
an image similarly to PolyLineROI. It differs in that each segment
|
||||||
of the chain is rectangular instead of linear and thus has width.
|
of the chain is rectangular instead of linear and thus has width.
|
||||||
|
|
||||||
|
============== =============================================================
|
||||||
**Arguments**
|
**Arguments**
|
||||||
-------------- -------------------------------------------------------------
|
|
||||||
points (list of length-2 sequences) The list of points in the path.
|
points (list of length-2 sequences) The list of points in the path.
|
||||||
width (float) The width of the ROIs orthogonal to the path.
|
width (float) The width of the ROIs orthogonal to the path.
|
||||||
**args All extra keyword arguments are passed to ROI()
|
\**args All extra keyword arguments are passed to ROI()
|
||||||
-------------- -------------------------------------------------------------
|
============== =============================================================
|
||||||
"""
|
"""
|
||||||
sigRegionChangeFinished = QtCore.Signal(object)
|
sigRegionChangeFinished = QtCore.Signal(object)
|
||||||
sigRegionChangeStarted = QtCore.Signal(object)
|
sigRegionChangeStarted = QtCore.Signal(object)
|
||||||
@ -1751,12 +1754,12 @@ class EllipseROI(ROI):
|
|||||||
Elliptical ROI subclass with one scale handle and one rotation handle.
|
Elliptical ROI subclass with one scale handle and one rotation handle.
|
||||||
|
|
||||||
|
|
||||||
|
============== =============================================================
|
||||||
**Arguments**
|
**Arguments**
|
||||||
-------------- -------------------------------------------------------------
|
|
||||||
pos (length-2 sequence) The position of the ROI's origin.
|
pos (length-2 sequence) The position of the ROI's origin.
|
||||||
size (length-2 sequence) The size of the ROI's bounding rectangle.
|
size (length-2 sequence) The size of the ROI's bounding rectangle.
|
||||||
**args All extra keyword arguments are passed to ROI()
|
\**args All extra keyword arguments are passed to ROI()
|
||||||
-------------- -------------------------------------------------------------
|
============== =============================================================
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, pos, size, **args):
|
def __init__(self, pos, size, **args):
|
||||||
@ -1801,12 +1804,12 @@ class CircleROI(EllipseROI):
|
|||||||
Circular ROI subclass. Behaves exactly as EllipseROI, but may only be scaled
|
Circular ROI subclass. Behaves exactly as EllipseROI, but may only be scaled
|
||||||
proportionally to maintain its aspect ratio.
|
proportionally to maintain its aspect ratio.
|
||||||
|
|
||||||
|
============== =============================================================
|
||||||
**Arguments**
|
**Arguments**
|
||||||
-------------- -------------------------------------------------------------
|
|
||||||
pos (length-2 sequence) The position of the ROI's origin.
|
pos (length-2 sequence) The position of the ROI's origin.
|
||||||
size (length-2 sequence) The size of the ROI's bounding rectangle.
|
size (length-2 sequence) The size of the ROI's bounding rectangle.
|
||||||
**args All extra keyword arguments are passed to ROI()
|
\**args All extra keyword arguments are passed to ROI()
|
||||||
-------------- -------------------------------------------------------------
|
============== =============================================================
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, pos, size, **args):
|
def __init__(self, pos, size, **args):
|
||||||
@ -1874,8 +1877,8 @@ class PolyLineROI(ROI):
|
|||||||
|
|
||||||
This class allows the user to draw paths of multiple line segments.
|
This class allows the user to draw paths of multiple line segments.
|
||||||
|
|
||||||
|
============== =============================================================
|
||||||
**Arguments**
|
**Arguments**
|
||||||
-------------- -------------------------------------------------------------
|
|
||||||
positions (list of length-2 sequences) The list of points in the path.
|
positions (list of length-2 sequences) The list of points in the path.
|
||||||
Note that, unlike the handle positions specified in other
|
Note that, unlike the handle positions specified in other
|
||||||
ROIs, these positions must be expressed in the normal
|
ROIs, these positions must be expressed in the normal
|
||||||
@ -1883,8 +1886,8 @@ class PolyLineROI(ROI):
|
|||||||
to the size of the ROI.
|
to the size of the ROI.
|
||||||
closed (bool) if True, an extra LineSegmentROI is added connecting
|
closed (bool) if True, an extra LineSegmentROI is added connecting
|
||||||
the beginning and end points.
|
the beginning and end points.
|
||||||
**args All extra keyword arguments are passed to ROI()
|
\**args All extra keyword arguments are passed to ROI()
|
||||||
-------------- -------------------------------------------------------------
|
============== =============================================================
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, positions, closed=False, pos=None, **args):
|
def __init__(self, positions, closed=False, pos=None, **args):
|
||||||
@ -2032,13 +2035,15 @@ class LineSegmentROI(ROI):
|
|||||||
"""
|
"""
|
||||||
ROI subclass with two freely-moving handles defining a line.
|
ROI subclass with two freely-moving handles defining a line.
|
||||||
|
|
||||||
|
============== =============================================================
|
||||||
**Arguments**
|
**Arguments**
|
||||||
-------------- -------------------------------------------------------------
|
|
||||||
positions (list of two length-2 sequences) The endpoints of the line
|
positions (list of two length-2 sequences) The endpoints of the line
|
||||||
segment. Note that, unlike the handle positions specified in
|
segment. Note that, unlike the handle positions specified in
|
||||||
other ROIs, these positions must be expressed in the normal
|
other ROIs, these positions must be expressed in the normal
|
||||||
coordinate system of the ROI, rather than (0 to 1) relative
|
coordinate system of the ROI, rather than (0 to 1) relative
|
||||||
to the size of the ROI.
|
to the size of the ROI.
|
||||||
|
\**args All extra keyword arguments are passed to ROI()
|
||||||
|
============== =============================================================
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, positions=(None, None), pos=None, handles=(None,None), **args):
|
def __init__(self, positions=(None, None), pos=None, handles=(None,None), **args):
|
||||||
|
Loading…
Reference in New Issue
Block a user