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:
The ImageView uses PlotWindow and also exposes silx.gui.plot.Plot API for further control (plot title, axes labels, adding other images, ...).
For an example of use, see the implementation of ImageViewMainWindow.
The ImageView module can also be used to open an EDF or TIFF file from the shell command line. To view an image file: python -m silx.gui.plot.ImageView <file to open> To get help: python -m silx.gui.plot.ImageView -h
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.
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.
“Profile tools attached to this plot.
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: |
|
---|
Set the plot main title.
Parameters: | title (str) – Main title of the plot (default: ‘’) |
---|
Set the plot X axis label.
The provided label can be temporarily replaced by the X label of the active curve if any.
Parameters: | label (str) – The X axis label (default: ‘X’) |
---|
Set the plot Y axis label.
The provided label can be temporarily replaced by the Y label of the active curve if any.
Parameters: |
|
---|