ImageItem

class pyqtgraph.ImageItem(image=None, **kargs)

GraphicsObject displaying an image. Optimized for rapid update (ie video display)

__init__(image=None, **kargs)

See setImage for all allowed arguments.

getHistogram(bins=500, step=3)

returns x and y arrays containing the histogram values for the current image. The step argument causes pixels to be skipped when computing the histogram to save time.

pixelSize()

return scene-size of a single pixel in the image

setImage(image=None, autoLevels=None, **kargs)

Update the image displayed by this item. Arguments:

image autoLevels lut levels opacity compositionMode border
setLevels(levels, update=True)
Set image scaling levels. Can be one of:
[blackLevel, whiteLevel] [[minRed, maxRed], [minGreen, maxGreen], [minBlue, maxBlue]]

Only the first format is compatible with lookup tables.

setLookupTable(lut, update=True)

Set the lookup table to use for this image. (see functions.makeARGB for more information on how this is used) Optionally, lut can be a callable that accepts the current image as an argument and returns the lookup table to use.

setPxMode(b)

Set whether the item ignores transformations and draws directly to screen pixels.

Previous topic

PlotItem

Next topic

ViewBox

This Page