{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ngff.openmicroscopy.org/0.6.dev1/schemas/image.schema",
  "title": "OME-Zarr Image",
  "description": "The zarr.json attributes key",
  "type": "object",
  "properties": {
    "ome": {
      "description": "The versioned OME-Zarr Metadata namespace",
      "type": "object",
      "properties": {
        "multiscales": {
          "$ref": "#/$defs/multiscales"
        },
        "omero": {
          "$ref": "#/$defs/omero"
        },
        "version": {
          "$ref": "https://ngff.openmicroscopy.org/0.6.dev1/schemas/_version.schema"
        }
      },
      "required": [
        "multiscales",
        "version"
      ]
    }
  },
  "required": [
    "ome"
  ],
  "$defs": {
    "multiscales": {
      "description": "The multiscale datasets for this image",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "datasets": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "coordinateTransformations": {
                  "$ref": "coordinate_transformation.schema"
                }
              },
              "required": [
                "path",
                "coordinateTransformations"
              ]
            }
          },
          "version": {
            "type": "string",
            "enum": [
              "0.6.dev1"
            ]
          },
          "coordinateSystems": {
            "$ref": "coordinate_systems.schema"
          },
          "coordinateTransformations": {
            "$ref": "coordinate_transformation.schema"
          }
        },
        "required": [
          "datasets", "coordinateSystems"
        ]
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "omero": {
      "type": "object",
      "properties": {
        "channels": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "window": {
                "type": "object",
                "properties": {
                  "end": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  },
                  "min": {
                    "type": "number"
                  },
                  "start": {
                    "type": "number"
                  }
                },
                "required": [
                  "start",
                  "min",
                  "end",
                  "max"
                ]
              },
              "label": {
                "type": "string"
              },
              "family": {
                "type": "string"
              },
              "color": {
                "type": "string"
              },
              "active": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "required": [
        "channels"
      ]
    }
  }
}
