Viewer for Python IMage Sequence (PIMS).
Project description
pimsviewer
A graphical user interface (GUI) for PIMS (screenshot below)
This viewer is based on PyQt5 and is able to work with N-dimensional image files that are opened by PIMS.
Also, it has a plugin infrastructure that can be used to extend the main functionality.
Installation
Pimsviewer can be installed using conda:
conda install -c conda-forge pimsviewer
Alternatively, it can also be installed using pip:
pip install pimsviewer
When installing the latest source version, always install it with pip
(and not with python setup.py develop
, this will lead to dependency errors for PyQt
):
Normal installation:
pip install .
Development installation:
pip install . -e
Starting the viewer
After installing the viewer, an executable pimsviewer
is available. Simply run the command via your terminal/command line interface.
$ pimsviewer --help
Usage: pimsviewer [OPTIONS] [FILEPATH]
Options:
--example-plugins / --no-example-plugins
Load additional example plugins
--help Show this message and exit.
Screenshot
Examples
All examples below are also available as script files in the examples
folder.
By running pimsviewer --example-plugins
, you can preview the example plugins used below.
Example 00: Using the viewer from Python
You can use the viewer in a Python script as follows:
import sys
from pimsviewer import GUI
from PyQt5.QtWidgets import QApplication
filepath = 'path/to/file'
# Class names of extra plugins to add
plugins = []
app = QApplication(sys.argv)
gui = GUI(extra_plugins=plugins)
gui.open(fileName=filepath)
gui.show()
sys.exit(app.exec_())
Example 01: Using the viewer from Python (the shorter way)
Or, if you do not need a reference to the actual object but you just want to start the program:
from pimsviewer import run
run('path/to/file')
In both cases, you can omit the file path.
Example 02: evaluating the effect of a processing function
This example adds a processing function that adds an adjustable amount of noise to an image. The amount of noise is tunable with a slider.
from pimsviewer import run
from pimsviewer.plugins import ProcessingPlugin
run('path/to/file', [ProcessingPlugin])
Example 03: annotating features on a video
This example annotates features that were obtained via trackpy onto a video. Tracked positions are loaded from a pandas DataFrame CSV file by the user.
from pimsviewer import run
from pimsviewer.plugins import AnnotatePlugin
run('path/to/file', [AnnotatePlugin])
Your own plugin?
By looking at the code for the example plugins, it should be fairly easy to extend pimsviewer using your own plugins. Contact one of the maintainers if you have any trouble writing your own plugins.
Authors
Pimsviewer version 1.0 was written by Casper van der Wel, versions starting from 2.0 are written by Ruben Verweij.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pimsviewer-2.0.tar.gz
.
File metadata
- Download URL: pimsviewer-2.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200616 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63e3ac0aabb373085e9b70d1d58a6a9e09ca7c3b96c65b5783c8f8cee1c7c277 |
|
MD5 | 3755578d8f7daf959e31706aefc52ee4 |
|
BLAKE2b-256 | 942da8109da813239d210f15607fc9b629a6f6b6ec91316de0d358dd27d0de1f |
File details
Details for the file pimsviewer-2.0-py3-none-any.whl
.
File metadata
- Download URL: pimsviewer-2.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200616 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5dc715b9c6abeda6b56cda33d1c8a4fad2073ec0d0f0deff4937946b5604ece |
|
MD5 | cea7f9c377f85a95ff4ed4c512d17237 |
|
BLAKE2b-256 | 6ca731c8e348752d179fe9ee29dd01ba25681ea3e56958dc628c74d3076b8929 |