@@ -24,19 +24,19 @@ individual :python:`[R,G,B]` or :python:`[R,G,B,A]` channels/components.
24
24
Notes
25
25
-----
26
26
27
+ :class: `~pyqtgraph.ImageItem ` is frequently used in conjunction with
28
+ :class: `~pyqtgraph.ColorBarItem ` to provide a color map display and interactive level
29
+ adjustments, or with :class: `~pyqtgraph.HistogramLUTItem ` or
30
+ :class: `~pyqtgraph.HistogramLUTWidget ` for a full GUI to control the levels and lookup
31
+ table used to display the image.
32
+
27
33
An image can be placed into a plot area of a given extent directly through the
28
34
:meth: `ImageItem.setRect <pyqtgraph.ImageItem.setRect> ` method or the ``rect `` keyword.
29
35
This is internally realized through assigning a :class: `QTransform `. For other
30
36
translation, scaling or rotations effects that persist for all later image data, the
31
37
user can also directly define and assign such a transform, as shown in the example
32
38
below.
33
39
34
- :class: `~pyqtgraph.ImageItem ` is frequently used in conjunction with
35
- :class: `~pyqtgraph.ColorBarItem ` to provide a color map display and interactive level
36
- adjustments, or with :class: `~pyqtgraph.HistogramLUTItem ` or
37
- :class: `~pyqtgraph.HistogramLUTWidget ` for a full GUI to control the levels and lookup
38
- table used to display the image.
39
-
40
40
Performance
41
41
-----------
42
42
@@ -53,8 +53,8 @@ The following guidance should be observed if performance is an important factor
53
53
:python: `pyqtgraph.setConfigOption('imageAxisOrder', 'row-major') `
54
54
55
55
* Use C-contiguous image data.
56
- * For 1 or 3 channel data, use `uint8 `, `uint16 `, `float32 `, or `float64 `
57
- `` image `` dtype.
56
+ * For 1 or 3 channel data, use `uint8 `, `uint16 `, `float32 `, or `float64 ` `` image ``
57
+ dtype.
58
58
* For 4-channel data, use `uint8 ` or `uint16 ` with :python: `levels=None `.
59
59
* ``levels `` should be set to (even if to ``None ``) to avoid autoLevels sampling.
60
60
* ``levels `` should be single channel or ``None ``.
@@ -65,8 +65,8 @@ The following guidance should be observed if performance is an important factor
65
65
* :func: `ImageItem.setLookupTable <pyqtgraph.ImageItem.setLookupTable> ` with
66
66
:python: `ColorMap.getLookupTable(nPts=256) ` (default is :python: `nPts=512 `)
67
67
68
- * For floating point ``image `` arrays, prefer `float32 ` dtype to `float64 `
69
- and avoid ``NaN `` values.
68
+ * For floating point ``image `` arrays, prefer `float32 ` dtype to `float64 ` and avoid
69
+ ``NaN `` values.
70
70
* Enable Numba with :python: `pyqtgraph.setConfigOption('useNumba', True) `
71
71
72
72
* JIT compilation will only accelerate repeated image display.
@@ -89,6 +89,10 @@ do not call :func:`~pyqtgraph.functions.makeARGB`.
89
89
Examples
90
90
--------
91
91
92
+ In the following example, it is demonstrated how a user scale and translate a
93
+ :class: `~pyqtgraph.ImageItem ` within a :class: `~pyqtgraph.ViewBox ` to occupy a specific
94
+ position and size.
95
+
92
96
.. literalinclude :: /images/gen_example_imageitem_transform.py
93
97
:lines: 19-28
94
98
:dedent: 8
0 commit comments