Models and helpers

Axes

class ome_zarr_io.Axis(name, type=None, unit=None)

Axis definition with name and type.

Parameters:
  • name (str)

  • type (str | None)

  • unit (str | None)

name: str
type: str | None = None
unit: str | None = None

Channel display metadata

Omero, Channel and Window are legacy ways to describe channels. They are deprecated in favour of the channels= argument of Writer, and are importable from ome_zarr_io.schema_models only.

class ome_zarr_io.schema_models.Omero(channels)

OMERO metadata for image display configuration.

Parameters:

channels (List[Channel])

channels: List[Channel]
class ome_zarr_io.schema_models.Channel(window=None, label=None, family=None, color=None, active=None)

OMERO channel configuration.

Parameters:
  • window (Window | None)

  • label (str | None)

  • family (str | None)

  • color (str | None)

  • active (bool | None)

window: Window | None = None
label: str | None = None
family: str | None = None
color: str | None = None
active: bool | None = None
class ome_zarr_io.schema_models.Window(start, min, end, max)

OMERO window configuration for channel display.

Parameters:
start: float
min: float
end: float
max: float

Helpers

ome_zarr_io.random_colors(n, seed=0, avoid=())

Generate n visually distinct RRGGBB colors.

Hues are spaced by the golden ratio, so color i depends only on i and seed: asking for more colors never changes the earlier ones. Hues close to a color in avoid are skipped. A different seed gives a different palette.

Parameters:
Return type:

List[str]