{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$comment": "This schema file defines the structure of the *_meta.json files which are part of the annotations and define additional meta labels.",
    "type": "object",
    "properties": {
        "image_labels": {
            "description": "List of labels which occur in the image (weak labels).",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "paper_tags": {
            "description": "List of paper markers denoting the papers where this image is used.",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "label_meta": {
            "description": "Meta labels which are associated with a label (and not the entire image).",
            "type": "object",
            "patternProperties": {
                "^\\w+$": {
                    "type": "object",
                    "properties": {
                        "situs": {
                            "description": "Identifier for the organ composition. Each composition is random, so the situs numbers cannot be compared to other subjects (e.g. situs 1 in one subject may be something different than situs 1 in another subject). This means that the situs numbers can only be interpreted for the images from one pig and label, i.e. across angles, repetitions and annotators.",
                            "type": "integer",
                            "enum": [1, 2, 3, 4],
                            "level_of_measurement": "nominal"
                        },
                        "angle": {
                            "description": "Camera angle (in degree) from the camera to the organ surface. During image acquisition, first the top view perpendicular to the organ surface (0°), than the left (-25°) and then the right (25°) view was taken.",
                            "type": "integer",
                            "enum": [-25, 0, 25],
                            "unit": "degree",
                            "level_of_measurement": "interval"
                        },
                        "repetition": {
                            "description": "The n-th recording of the image after setting the label, situs, and angle. The images were taken directly after each other.",
                            "type": "integer",
                            "enum": [1, 2, 3],
                            "level_of_measurement": "ordinal"
                        }
                    },
                    "additionalProperties": false
                }
            },
            "additionalProperties": false
        }
    },
    "required": ["image_labels"]
}
