Skip to main content

A Qt-based image sequence visualizer widget

Project description

Image & Sequence Visualization

View on PyPI License

This package provides GUI widgets to show images and play back image sequences.

Screenshot Sequence Viewer

Installation

It is highly recommended to set up a separate virtual environment with an up-to-date pip:

python3 -m venv venv
source venv/bin/activate
python3 -m pip install -U pip

Then, simply install imseqvis via:

python3 -m pip install imseqvis

If you want to try the latest alpha, i.e. the latest main branch packaged and published to TestPyPI, you can instead install it via:

python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "imseqvis[pyside2]"

Qt Backend

imseqvis requires a Qt backend. In Python, you need to either install PyQt or PySide.
The default installation will not install any of these backends, you have to select one on your own.

Optionally, you can install imseqvis with a specific backend. Currently, pyqt5, pyqt6, pyside2, and pyside6 are supported:

# PyQt5
python3 -m pip install "imseqvis[pyqt5]"

# OR PyQt6
python3 -m pip install "imseqvis[pyqt6]"

# OR PySide2
python3 -m pip install "imseqvis[pyside2]"

# OR PySide6
python3 -m pip install "imseqvis[pyside6]"

Usage as Standalone Application

To quickly visualize all images within a folder or sequence (and nothing else), you can use the provided wrappers to start a standalone GUI application:

python3 -m imseqvis path/to/image-folder

Or start the viewer from within your code, either specifically for a folder or iterable image sequence (i.e. a random access container of NumPy ndarrays):

import imseqvis
# Show all images in the given folder.
imseqvis.show_folder('path/to/image-folder')

# Show all images in a random access container. For an exemplary data source
# refer to `imseqvis.sequence_viewer.ImageSequence`.
sequence = [...]
imseqvis.show_sequence(sequence)

Alternatively, you could simply use the provided show functionality:

import imseqvis
imseqvis.show('path/to/image-folder')

sequence = [...]
imseqvis.show(sequence)

Usage as Widget

To integrate the viewer into your own application, use the ImageSequenceViewer widget:

# Prepare the image data source. This must allow random access to the images.
# For an exemplary data source refer to
# `imseqvis.sequence_viewer.ImageSequence`.
sequence = [...]

# Create & use the widget.
viewer = SequenceViewer(image_sequence=sequence)
layout.addWidget(viewer)
...

# Alternatively, the widget can also be created without a data source:
viewer = SequenceViewer(image_sequence=None)
...
# Later on, the image sequence can be set via:
viewer.setSequence(new_sequence)

To show a different sequence within the same viewer, simply call:

viewer.setSequence(new_sequence)

More detailed usage examples are provided within examples/. These also demonstrate how to use the available signals to be notified of the user's interactions with the viewer:

  • examples/demo_standalone.py demonstrates the basic usage with a dummy sequence.
  • examples/demo_folder.py will playback all images within a local folder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imseqvis-0.2.5.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

imseqvis-0.2.5-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file imseqvis-0.2.5.tar.gz.

File metadata

  • Download URL: imseqvis-0.2.5.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for imseqvis-0.2.5.tar.gz
Algorithm Hash digest
SHA256 557b1acb79213535c78533e1f2a6ac45c7b3271aeb9a2efa1377f6ce646caf0a
MD5 456d64b2deadf1f8b800ab8531ab83ef
BLAKE2b-256 bb39ca42212a1a6df7f2de2cd21c09e3108d834f83eeb7c2f5015b57621a9717

See more details on using hashes here.

File details

Details for the file imseqvis-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: imseqvis-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for imseqvis-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 581bc0b6be92104135cbd07d8cb17acc831759ec1b8ba64f79679e93d4fc3a78
MD5 078b6936efc9b11a1fef7d5c315fd33d
BLAKE2b-256 9e3c009dba94c7e0cf70580fad4bdc928f69ce0a368a9f5f1f9a27a5a4702020

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page