{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ngff.openmicroscopy.org/0.3/schemas/image.schema",
  "title": "NGFF Image",
  "description": "JSON from OME-NGFF .zattrs",
  "type": "object",
  "properties": {
    "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"
                }
              },
              "required": ["path"]
            }
          },
          "version": {
            "type": "string",
            "enum": [
              "0.3"
            ]
          },
          "axes": {
            "type": "array",
            "minItems": 2,
            "items": {
              "type": "string",
              "pattern": "^[xyzct]$"
            }
          }
        },
        "required": [
          "datasets", "axes"
        ]
      },
      "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": [
              "window",
              "color"
            ]
          }
        }
      },
      "required": [
        "channels"
      ]
    }
  },
  "required": [ "multiscales" ]
}
