Skip to main content

GUI analysis tools for Propix JSON processing

Project description

PROPIX GUI Analysis

A lightweight Python library to load, inspect, summarize, and visualize JSON frames generated by the PROPIX GUI.

This package is designed to work directly with PROPIX GUI outputs, including:

  • RGB images
  • Segmentation masks
  • Hyperspectral data (wavelengths and spectra)

It provides a clean, NumPy-friendly API for analysis, debugging, and visualization.


✨ Features

  • Load PROPIX GUI JSON frames into Python structures
  • Decode base64-encoded RGB images and masks
  • Normalize and handle multiple segmentation masks
  • Visualize:
    • RGB images
    • Masks (overlayed or individual)
    • RGB + masks
    • Spectral curves
    • RGB + masks + spectra (side-by-side)
  • Print a human-readable frame summary:
    • Image resolution
    • Mask coverage (percentage of pixels)
    • Spectral range
    • Number of spectral bands
    • Spectral resolution (Δλ)

📦 Installation

pip install propix_gui_analysis

Or for development:

pip install -e .

🚀 Quick Start

from propix_gui_analysis.propix_json_analysis import (
    load_frame,
    frame_summary,
    plot_rgb,
    plot_rgb_with_masks,
    plot_masks_only,
    plot_spectra,
    plot_frame_rgb_and_spectra,
)

frame = load_frame("frame.json")
frame_summary(frame)

📂 Frame Structure

frame = {
    "frame_id": int,
    "task_finished": bool,

    "rgb": np.ndarray,          # [H, W, 3]
    "masks": List[np.ndarray],  # list of [H, W] masks (values in [0,1])
    "mask_colors": List[List[float]],  # normalized RGBA colors

    "wavelengths": np.ndarray,  # [N]
    "spectra": {
        "values": np.ndarray,   # [num_masks, N]
        "labels": List[str]
    }
}

🖨️ Frame Summary

frame_summary(frame)

📊 Visualization

  • plot_rgb(frame)
  • plot_rgb_with_masks(frame)
  • plot_masks_only(frame)
  • plot_spectra(frame)
  • plot_frame_rgb_and_spectra(frame)

🔬 Spectral Resolution

Defined as the average wavelength spacing (Δλ) between consecutive bands.


🧰 Dependencies

  • Python ≥ 3.8
  • NumPy
  • Pillow
  • Matplotlib

📄 License

MIT License.

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

propix_gui_analysis-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

propix_gui_analysis-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file propix_gui_analysis-0.1.0.tar.gz.

File metadata

  • Download URL: propix_gui_analysis-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for propix_gui_analysis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b0f0aef2e7360db6ea44590e9f60d241bffb6316813e1c6c913951377f11f6b
MD5 c48ac2f4ffa45263cfdd2a259e3f626c
BLAKE2b-256 cbc30c81a480b5bd0b8ea5774f2d7d58aefe82c25e030107dd2be9d08955e75d

See more details on using hashes here.

File details

Details for the file propix_gui_analysis-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for propix_gui_analysis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 482e0364fc6c5fc1116a6f76a4544c3f116d895dd995bbbaadb398b336fbd467
MD5 08c7c2341f0fbcc6417ec8ec270e3e96
BLAKE2b-256 4c9bf8b71830f186e92b73151a1f52ea9fe12d2e90c6fec521267509553c37c3

See more details on using hashes here.

Supported by

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