Class NgffMetadataBuilder


  • public final class NgffMetadataBuilder
    extends Object
    Builds OME-NGFF v0.5 attribute maps for OME-Zarr image and container groups.

    Adapted from the sibling ome-writersJ project and extended to emit one multiscales.datasets entry per pyramid level, each with a correctly scaled coordinate transformation (spatial scale = base pixel size × 2^level).

    • Method Detail

      • buildImageAttributes

        public static Map<String,​Object> buildImageAttributes​(List<AxisInfo> nonSpatialAxes,
                                                                    double pixelSizeY,
                                                                    double pixelSizeX,
                                                                    String spatialUnit,
                                                                    int numLevels,
                                                                    PixelType pixelType)
        Full attributes map for an OME-Zarr image group.
        Parameters:
        nonSpatialAxes - ordered non-spatial, non-position axes (time/channel/z/custom)
        pixelSizeY - physical pixel size along y at level 0
        pixelSizeX - physical pixel size along x at level 0
        spatialUnit - unit for y/x (e.g. "micrometer")
        numLevels - number of pyramid levels (>= 1)
        pixelType - pixel type (used to set omero window ranges)
      • buildBf2RawRootAttributes

        public static Map<String,​Object> buildBf2RawRootAttributes()
        Attributes for a bioformats2raw-layout container (multi-position) root group.