Skip to main content

Intro

Primawera is a simple imager viewer with support for non-standard image data such as complex, floating point or 3D image data. For more detailed description about the basics of the viewer, please view the official website.

Installation

This package is available at PyPI. To install the package using pip run:

python -m pip install primawera

Building

Required packages

More detailed information about version of packages is inside the pyproject.toml file.

  • Python 3.11
  • numpy 2
  • PIL
  • PyQt5
  • Qt 5
  • h5py

Building and installing the package

Make sure you have the latest version of setuptools, pip and venv packages as the building requires some newer features of setuptools.

Inside the root folder run:

python -m build

The command should build a wheel file inside the dist folder. To install it run:

pip install <PATH TO WHEEL FILE>

Usage

Open empty window

It is possible to run the viewer without any data.

from primawera.app import create_window
create_window()

Visualise numpy data

If you want to visualise data inside a numpy array, you will have to import the function run_app. Sometimes it is not possible to automatically infer the mode (see Pillow image modes). in which case it has to be provided manually.

from primawera.app import run_app
import numpy as np
data = np.random.random((10, 10, 10))
run_app(data)
# Or
run_app(data, mode="float")

# You can also add overlay data
overlay_data = np.random.random(data.shape)  # same shape as data
run_app(data, mode="float", overlay_data=overlay_data)

Run from terminal

Simply run

primawera

Recognized image modes (case insensitive)

Image type Legal Mode
Boolean 1, bool
Grayscale gray, grey, grayscale, greyscale, I;16 I;16B
RGB rgb, color, colour
Floating f, float, floating
Complex c, complex

Release files for primawera 0.7.0

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

Built distribution (wheel)

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

Release files / primawera-0.7.0-py3-none-any.whl

Download URL primawera-0.7.0-py3-none-any.whl
Size 75.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
932a0960b9dd4a997b70e9b45beab00b740b09923b1c8a8be4efca0a5cd84dd4
BLAKE2b-256 checksum
How to use checksums
37a7423b4e0f2b6caa21af37574815a749411f86e4d366058c49116b8eb25b3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.7.0 This release

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.3

1 release file

0.1.2

2 release files

0.1.1

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