Skip to content

Commit ff8599f

Browse files
committed
apply ixjlyons feedback
1 parent 1df24d4 commit ff8599f

File tree

2 files changed

+29
-34
lines changed

2 files changed

+29
-34
lines changed

doc/source/api_reference/graphicsItems/imageitem.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,32 +47,32 @@ largely there to preserve backwards compatibility.
4747

4848
The following guidance should be observed if performance is an important factor
4949

50-
* Instantiate :class:`~pyqtgraph.ImageItem` with :python:`axisOrder='row-major'`
51-
52-
* Alternatively, set the global configuration optionally
53-
:python:`pyqtgraph.setConfigOption('imageAxisOrder', 'row-major')`
54-
55-
* Use C-contiguous image data.
56-
* For 1 or 3 channel data, use `uint8`, `uint16`, `float32`, or `float64`
57-
``image`` dtype.
58-
* For 4-channel data, use `uint8` or `uint16` with :python":`levels=None`.
59-
* ``levels`` should be single channel (if 1 or 3 channel data).
60-
61-
* Setting :python:`levels=None` will trigger autoLevels sampling, and thus should
62-
be avoided if possible.
63-
64-
* If using LUTs (lookup tables), ensure they have a dtype of `uint8` and have 256
65-
points or less, and that. That can be accomplished with calling:
66-
67-
* :func:`ImageItem.setColorMap <pyqtgraph.ImageItem.setColorMap>` or
68-
* :func:`ImageItem.setLookupTable <pyqtgraph.ImageItem.setLookupTable>` with
69-
:python:`ColorMap.getLookupTable(nPts=256)` (default is :python:`nPts=512`)
70-
71-
* For floating point ``image`` arrays, prefer `float32` dtype to `float64`
72-
and avoid ``NaN`` values.
73-
* Enable Numba with :python:`pyqtgraph.setConfigOption('useNumba', True)`
74-
75-
* JIT compilation will only accelerate repeated image display.
50+
* Instantiate :class:`~pyqtgraph.ImageItem` with :python:`axisOrder='row-major'`
51+
52+
* Alternatively, set the global configuration optionally
53+
:python:`pyqtgraph.setConfigOption('imageAxisOrder', 'row-major')`
54+
55+
* Use C-contiguous image data.
56+
* For 1 or 3 channel data, use `uint8`, `uint16`, `float32`, or `float64`
57+
``image`` dtype.
58+
* For 4-channel data, use `uint8` or `uint16` with :python":`levels=None`.
59+
* ``levels`` should be single channel (if 1 or 3 channel data).
60+
61+
* Setting :python:`levels=None` will trigger autoLevels sampling, and thus should
62+
be avoided if possible.
63+
64+
* If using LUTs (lookup tables), ensure they have a dtype of `uint8` and have 256
65+
points or less, and that. That can be accomplished with calling:
66+
67+
* :func:`ImageItem.setColorMap <pyqtgraph.ImageItem.setColorMap>` or
68+
* :func:`ImageItem.setLookupTable <pyqtgraph.ImageItem.setLookupTable>` with
69+
:python:`ColorMap.getLookupTable(nPts=256)` (default is :python:`nPts=512`)
70+
71+
* For floating point ``image`` arrays, prefer `float32` dtype to `float64`
72+
and avoid ``NaN`` values.
73+
* Enable Numba with :python:`pyqtgraph.setConfigOption('useNumba', True)`
74+
75+
* JIT compilation will only accelerate repeated image display.
7676

7777
Internally, pyqtgraph attempts to directly construct a :class:`QImage` using a
7878
combination of :class:`QImage.Format <QImage.Format>` options and

pyqtgraph/graphicsItems/ImageItem.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def __init__(self, image=None, **kargs):
4545
Arguments directed to :func:`setImage` and :func:`setOpts`
4646
See Also
4747
--------
48-
:func:`setImage`
49-
:func:`setOpts`
48+
setImage : for descriptions of available keyword arguments
49+
setOpts : for information on supported formats
5050
5151
"""
5252
super().__init__()
@@ -158,15 +158,10 @@ def setLevels(self, levels: npt.ArrayLike, update: bool=True):
158158
sets individual scaling for RGB values. Not compatible with lookup tables.
159159
update : bool, optional
160160
Controls if image immediately updates to reflect the new levels, default True
161-
162-
Notes
163-
-----
164-
See :func:`makeARGB <pyqtgraph.makeARGB>` for more details on how levels are
165-
applied.
166161
167162
See Also
168163
--------
169-
:func:`pyqtgraph.functions.makeARGB`
164+
pyqtgraph.functions.makeARGB : for more details on how levels are applied.
170165
"""
171166
if self._xp is None:
172167
self.levels = levels

0 commit comments

Comments
 (0)