Image Loading¶
Functions¶
get_image_metadata ¶
Extract useful metadata from an OMERO ImageWrapper.
Returns a dict with keys: size_x, size_y, size_z, size_c, size_t, pixel_type (numpy dtype string), pixel_size_x, pixel_size_y, pixel_size_z (µm, float | None), channels (list of dicts with 'name', 'color', 'emission_wavelength', 'window_start', 'window_end', 'active'), name, id
is_large_image ¶
Return True if image should be loaded via tile-based access.
load_image_data ¶
Load a regular (non-pyramidal) OMERO image into numpy arrays.
Returns:
| Type | Description |
|---|---|
dict with:
|
|
load_image_lazy ¶
Load image data lazily as dask arrays.
For pyramidal images with multiple resolution levels this returns a list-of-lists (one sub-list per channel, each containing one dask array per resolution level, coarsest last). For plain large images it returns a single-resolution lazy array per channel.
Returns:
| Type | Description |
|---|---|
dict with keys ``images`` (list of dask arrays or list-of-lists)
|
|
and ``metadata``.
|
|
Classes¶
RegularImagePlaneProvider ¶
On-demand plane/stack loader for regular OMERO images.
Slice viewing can fetch only the currently needed (c, z, t) plane,
while projection modes can request a full (Z, Y, X) stack for the
selected channel/timepoint.
PyramidTileProvider ¶
Thread-safe multi-resolution tile provider for OMERO pyramid images.
Fetches single-channel 2-D tiles via ICE RawPixelsStore.getTile()
and caches them in an LRU dictionary. Safe to call get_tile from
a background thread while the main thread calls get_cached_tile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image
|
ImageWrapper
|
Connected OMERO image. |
required |
max_cache_mb
|
int
|
Maximum tile cache size in megabytes. |
512
|
best_level_for_scale ¶
Return pyramid level where one level-pixel ~= one screen-pixel.
scale = screen_pixels / full_res_image_pixels.
get_cached_tile ¶
Return tile from cache (no server fetch). Returns None if not cached.
load_overview ¶
Load all channels at level 0 (smallest) as numpy arrays.
Returns a list of arrays, one per channel, each shape (1, Y, X).
Useful for quick overview display and contrast percentile computation.