QWidget displaying a 2D image with histograms on its sides.
The ImageView implements this widget, and ImageViewMainWindow provides a main window with additional toolbar and status bar.
Basic usage of ImageView is through the following methods:
For an example of use, see imageview.py in Sample Code.
Display a single image with horizontal and vertical histograms.
Use setImage() to control the displayed image. This class also provides the silx.gui.plot.Plot API.
The ImageView inherits from PlotWindow (which provides the toolbars) and also exposes PlotWidget API for further plot control (plot title, axes labels, aspect ratio, ...).
Parameters: |
|
---|
Signals that the data value under the cursor has changed.
It provides: row, column, data value.
When the cursor is over an histogram, either row or column is Nan and the provided data value is the histogram value (i.e., the sum along the corresponding row/column). Row and columns are either Nan or integer values.
Return the histogram and corresponding row or column extent.
The returned value when an histogram is available is a dict with keys:
Parameters: | axis (str) – ‘x’ for horizontal, ‘y’ for vertical |
---|---|
Returns: | The histogram and its extent as a dict or None. |
Return type: | dict |
Get the default colormap description.
Returns: | A description of the current colormap. See setColormap() for details. |
---|---|
Return type: | dict |
Set the default colormap and update active image.
Parameters that are not provided are taken from the current colormap.
The colormap parameter can also be a dict with the following keys:
name: string. The colormap to use: ‘gray’, ‘reversed gray’, ‘temperature’, ‘red’, ‘green’, ‘blue’.
normalization: string. The mapping to use for the colormap: either ‘linear’ or ‘log’.
autoscale: bool. Whether to use autoscale (True) or range provided by keys ‘vmin’ and ‘vmax’ (False).
vmin: float. The minimum value of the range to use if ‘autoscale’ is False.
vmax: float. The maximum value of the range to use if ‘autoscale’ is False.
List of RGB or RGBA colors to use (only if name is None)
Parameters: |
|
---|
Set the image to display.
Parameters: |
|
---|
Returns the X axis
New in version 0.6.
Return type: | items.Axis |
---|
Returns an Y axis
New in version 0.6.
Parameters: | axis (str) – The Y axis to return (‘left’ or ‘right’). |
---|---|
Return type: | items.Axis |
Set the plot main title.
Parameters: | title (str) – Main title of the plot (default: ‘’) |
---|