Skip to main content

ImageDisplayQT

ImageDisplayQT is a PyQT widget for displaying live images in GUIs. It was developed for scientific imaging applications, with features including zoom, pixel inspection, autoscaling, region of interest with live mean display, and the ability to add persistent overlays.

It is lightweight and simple to use, requiring only a few lines of code to be added to your GUI. It can display images at video rate on modest hardware.

It currently supports monochrome and colour (RGB) images stored as 2D and 3D numpy arrays. 1D array data can also be displayed as a simple line graph.

Full documentation is available.

You can see the widget's appearance on Youtube.

You can pip install ImageDisplayQT for the latest stable version.

The widget is developed mainly by Mike Hughes at the Applied Optics Group, School of Physics and Astronomy, University of Kent.

The widget was originally developed for our in-house microscopy and imaging systems and will evolve with our requirements. Bug reports, contributions and pull requests are welcome.

Getting started

Import the class:

from image_display import ImageDisplay

Create an instance:

imDisplay = ImageDisplay()

and then add this widget to your GUI.

To update the image, call:

imDisplay.set_image(img)

where img is a 2D numpy array containing a monochrome image or a 3D numpy array containing a colour (RGB) image.

Toggle the status bar visibility using:

imDisplay.set_status_bar(True/False)

Toggle the zoom facility using the mouse scroll wheel (or pinch zoom):

imDisplay.set_zoom_enabled(True/False)

Once zoomed you can pan by holding the middle or right mouse buttons.

Toggle the ability to draw a rectangular region of interest by holding the left mouse button and dragging:

imDisplay.set_roi_enabled(True/False)

Set the colormap to be any Matplotlib colormap using:

imDisplay.set_colormap(colormapName)

Please see the example in the examples folder for more functionality, including overlays and autoscaling.

Requirements

Required Packages:

  • PyQt (tested on v5)
  • Numpy
  • PIL
  • Matplotlib (for colormaps)

Acknowledgements

Funding from EPSRC (Ultrathin fluorescence microscope in a needle, EP/R019274/1), Royal Society (Ultrathin Inline Holographic Microscopy) and University of Kent.

Metadata

Release files for ImageDisplayQT 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ImageDisplayQT 1.1.0
File Size Uploaded
ImageDisplayQT-1.1.0.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ImageDisplayQT 1.1.0
File Interpreter ABI Platform
ImageDisplayQT-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / ImageDisplayQT-1.1.0.tar.gz

Download URL ImageDisplayQT-1.1.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
671e5f5176bc5b054b635f85f5c3072dfbd55b72b291997269bf35e42ab5aa57
BLAKE2b-256 checksum
How to use checksums
0f1f7a9647c9e86d8df734ff2e1c6ac6ca99601f2efe719cdcde5dc36f9db6f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.4

Release files / ImageDisplayQT-1.1.0-py3-none-any.whl

Download URL ImageDisplayQT-1.1.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2d5f641c1932a85d22eda810c5c3abb50c2b9b077c2080ca60785e65d46fb0f
BLAKE2b-256 checksum
How to use checksums
b7c6e8379ca790ea9b8db9fa0e73aa1eb29bc35380c8c6f3ff354b8317878dc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page