Reusable PyQt6 dialog for browsing and retrieving images from OMERO via ICE
Project description
omero-browser-qt
Reusable PyQt6 dialog for browsing and retrieving images from OMERO servers. Pixel data is fetched exclusively through the ICE transport layer so you always get the real stored values (not rendered RGB).
Features
- Login dialog with server-name history (credentials are never stored)
- QuPath-style browser — resizable dialog with:
- Group / Owner filter combos
- Lazy-loading Project → Dataset → Image tree
- Image thumbnail preview (256 × 256)
- Attribute table (dimensions, pixel sizes, acquisition date, …)
- Name filter
- ICE pixel loading via
RawPixelsStore- Full 5-D array fetch (
getPlane) - Tile-based dask lazy loading for large / pyramidal images (
getTile)
- Full 5-D array fetch (
- Designed to be embedded in any PyQt6 application
Prerequisites: ZeroC ICE + omero-py
omero-py depends on ZeroC ICE, which cannot be built from source on
modern Python. Pre-built wheels are available for Python 3.10 – 3.12
from Glencoe Software:
https://www.glencoesoftware.com/blog/2023/12/08/ice-binaries-for-omero.html
Install them before installing this package:
# 1. Install the pre-built ZeroC ICE wheel (pick your platform)
pip install https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp311-cp311-manylinux_2_28_x86_64.whl # Linux
pip install https://github.com/glencoesoftware/zeroc-ice-py-win-x86_64/releases/download/20240325/zeroc_ice-3.6.5-cp311-cp311-win_amd64.whl # Windows
pip install https://github.com/glencoesoftware/zeroc-ice-py-macos-universal2/releases/download/20240131/zeroc_ice-3.6.5-cp311-cp311-macosx_11_0_universal2.whl # macOS (Intel + Apple Silicon)
# Replace cp311 with cp310 or cp312 as needed. See the blog post above for details.
# 2. Install omero-py (now that ICE is available)
pip install omero-py
Alternatively, use conda:
conda install -c conda-forge zeroc-ice omero-py
Installation
pip install omero-browser-qt
With the demo viewer
pip install "omero-browser-qt[viewer]"
Quick start
from PyQt6.QtWidgets import QApplication
from omero_browser_qt import OmeroGateway, LoginDialog, OmeroBrowserDialog
app = QApplication([])
gw = OmeroGateway()
# 1. Login (only server names are remembered)
if LoginDialog(gateway=gw).exec():
# 2. Browse & select images
dlg = OmeroBrowserDialog(gateway=gw)
if dlg.exec():
for img in dlg.get_selected_images():
print(img.getName(), img.getId())
gw.disconnect()
Loading pixel data
from omero_browser_qt import load_image_data, load_image_lazy, is_large_image
# For regular images — returns numpy arrays
result = load_image_data(image_wrapper)
volumes = result["images"] # list of np.ndarray, one per channel, shape (Z, Y, X)
meta = result["metadata"]
# For large / pyramidal images — returns dask arrays
if is_large_image(image_wrapper):
result = load_image_lazy(image_wrapper)
# result["images"] is a list (per channel) of lists (per resolution level) of dask arrays
Demo viewer
A stripped-down multi-channel image viewer is included as an example. It supports opening images from local files (via bioio) and from OMERO:
python examples/viewer_demo.py
Controls:
- Open File… — load a local OME-TIFF, ND2, CZI, etc.
- Open from OMERO… — launches the login + browser dialogs
- Projection — Slice / MIP (max intensity) / SUM
- Z slider — navigate slices (enabled in Slice mode)
- Lo% / Hi% — percentile-based contrast adjustment
- Channel buttons — toggle individual channels on/off
- Mouse wheel — zoom; middle-drag — pan
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omero_browser_qt-0.1.3.tar.gz.
File metadata
- Download URL: omero_browser_qt-0.1.3.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85dc0e04421812e50f85b8a544996c2717c3ecfe3d4d85f04fe2080b74406213
|
|
| MD5 |
cbdac7fa827800853f1c08b632cd8e1f
|
|
| BLAKE2b-256 |
7b53bc69932b6aa931caab8831328336038bda6b49643967ad73ce1d77bcac6b
|
File details
Details for the file omero_browser_qt-0.1.3-py3-none-any.whl.
File metadata
- Download URL: omero_browser_qt-0.1.3-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27d22223d542f2c9f87f686e7af73362e1f4e9dc25b6372cd75f9824a86aa034
|
|
| MD5 |
aafd561e7730742ed20e881778693532
|
|
| BLAKE2b-256 |
633120629facb690e6998efb42915448925eb0f377c3a4b33cdda89ffbe020d4
|