![]() |
BioLib
4.3.0
A GUI-less version of Bio .NET library for editing & annotating various microscopy image formats.
|
Bridges BioLib's BioImage to the OmeZarrWriter, exporting a full 5D image as an OME-Zarr v3 dataset on local disk. More...
Static Public Member Functions | |
| static async void | SaveZarr (BioImage b, string outputDir) |
Saves the full 5D content of a BioImage as an OME-Zarr v3 dataset at outputDir . All pyramid resolution levels in b.Resolutions are written. | |
| static async Task | SavePyramidalZarr (BioImage[] levels, string outputDir) |
| Saves already-processed pyramid levels as an OME-Zarr multiscale dataset. Each entry in levels is written as one resolution level in the output pyramid. | |
| static void | SaveROIs (BioImage b, string outputDir) |
Writes all annotations on b as a JSON sidecar file at <outputDir>/rois.json. | |
| static List< ROI > | LoadROIs (string zarrDir) |
Reads <zarrDir>/rois.json and returns the deserialized list of ROI objects. Returns an empty list when no sidecar file exists. | |
| static List< ROI > | LoadLabelsAsROIs (BioImage b, string zarrDir) |
Reads every label image stored under <zarrDir>/labels/ according to the OME-NGFF labels spec and converts each unique non-zero integer label ID into a ROI of type ROI.Type.Mask. | |
Static Public Attributes | |
| const string | RoiFileName = "rois.json" |
| The file name used for the ROI sidecar that sits beside the Zarr dataset. | |
Bridges BioLib's BioImage to the OmeZarrWriter, exporting a full 5D image as an OME-Zarr v3 dataset on local disk.
XY planes are written in tile-sized chunks so that even whole-slide images never require a full plane to be resident in memory at once. Peak allocation is bounded to a single tile (tileW × tileH × bytesPerSample).
RGB-interleaved buffers are deinterleaved into separate C planes so the output array shape is always (T, C, Z, Y, X) with scalar pixels.
All resolution levels present in b.Resolutions are written, producing a proper OME-NGFF multiscale pyramid.
Reads every label image stored under <zarrDir>/labels/ according to the OME-NGFF labels spec and converts each unique non-zero integer label ID into a ROI of type ROI.Type.Mask.
For each label sub-store the finest resolution level (index 0) is read one plane at a time (iterating Z, C, T from the parent b ). Every distinct pixel value > 0 in a plane becomes a separate ROI.Mask whose float array contains 1.0 wherever that label is present and 0.0 elsewhere.
The method is a no-op when no labels/ sub-directory exists, so it is safe to call unconditionally after opening any Zarr store.
| b | The parent BioImage that supplies physical-size calibration and ZCT extents. |
| zarrDir | Root path of the Zarr dataset on local disk (the directory that contains zarr.json). |
|
static |
Reads <zarrDir>/rois.json and returns the deserialized list of ROI objects. Returns an empty list when no sidecar file exists.
|
static |
Saves already-processed pyramid levels as an OME-Zarr multiscale dataset. Each entry in levels is written as one resolution level in the output pyramid.
|
static |
Writes all annotations on b as a JSON sidecar file at <outputDir>/rois.json.
Call this after SaveZarr so that both image data and ROIs live in the same directory and can be round-tripped together.
|
static |
Saves the full 5D content of a BioImage as an OME-Zarr v3 dataset at outputDir . All pyramid resolution levels in b.Resolutions are written.
|
static |