diff --git a/siibra/atlases/parcellationmap/v0.1.json b/siibra/atlases/parcellationmap/v0.1.json index 1426aab..6310750 100644 --- a/siibra/atlases/parcellationmap/v0.1.json +++ b/siibra/atlases/parcellationmap/v0.1.json @@ -29,13 +29,17 @@ "items": { "$ref": "urn:siibra-local:siibra/attr/v0.1.json" } + }, + "region_mapping": { + "$ref": "urn:siibra-local:siibra/attr/util/region_mapping/v0.1.json" } }, "required": [ "@type", "maptype", "parcellation_id", - "space_id" + "space_id", + "region_mapping" ], "additionalProperties": false } \ No newline at end of file diff --git a/siibra/attr/data/_volume_base/v0.1.json b/siibra/attr/data/_volume_base/v0.1.json index f8655aa..acc87d3 100644 --- a/siibra/attr/data/_volume_base/v0.1.json +++ b/siibra/attr/data/_volume_base/v0.1.json @@ -10,14 +10,6 @@ }, "colormap": { "$ref": "#/definitions/colormap" - }, - "mapping": { - "type": "object", - "patternProperties": { - ".+": { - "$ref": "#/definitions/mappingValue" - } - } } }, "required": [ @@ -30,24 +22,6 @@ "const": "magma" } ] - }, - "mappingValue": { - "type": "object", - "properties": { - "range": { - "type": "array", - "items": { - "type": "number" - } - }, - "color": { - "type": "string" - }, - "label": { - "type": "number" - } - }, - "additionalProperties": false } } } diff --git a/siibra/attr/desc/attribute_mapping/v0.1.json b/siibra/attr/desc/attribute_mapping/v0.1.json new file mode 100644 index 0000000..520dd1c --- /dev/null +++ b/siibra/attr/desc/attribute_mapping/v0.1.json @@ -0,0 +1,133 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "oneOf": [ + { + "type": "object", + "properties": { + "parcellation_id": { + "type": "string" + }, + "region_mapping": { + "$ref": "urn:siibra-local:siibra/attr/util/region_mapping/v0.1.json" + } + }, + "required": ["parcellation_id", "region_mapping"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "ref_type": { + "$ref": "#/definitions/ebrainsref_type" + }, + "refs": { + "$ref": "#/definitions/ebrainsref_mapping" + } + } + } + ], + "properties": { + "@type": { + "const": "siibra/attr/desc/attribute_mapping/v0.1" + } + }, + "required": [ + "@type" + ], + "examples": [ + { + "@type": "siibra/attr/desc/attribute_mapping/v0.1", + "parcellation_id": "minds/core/parcellationatlas/v1.0.0/94c1125b-b87e-45e4-901c-00daee7f2579-300", + "region_mappings": { + "Area 45 (IFG) - left hemisphere": [ + { + "@type": "volume/ref", + "label": 1, + "target": "Left hemisphere volume of Julich Brain 3.0.3 in ICBM 152 space", + "color": "#A76792" + } + ], + "Area 45 (IFG) - right hemisphere": [ + { + "@type": "volume/ref", + "label": 1, + "target": "Right hemisphere volume of Julich Brain 3.0.3 in ICBM 152 space", + "color": "#A76792" + } + ] + } + }, + { + "@type": "siibra/attr/desc/attribute_mapping/v0.1", + "parcellation_id": "minds/core/parcellationatlas/v1.0.0/94c1125b-b87e-45e4-901c-00daee7f2579-300", + "region_mappings": { + "Area 45 (IFG) - left hemisphere": [ + { + "@type": "csv/row-index", + "index": 0 + } + ], + "Area 44 (IFG) - left hemisphere": [ + { + "@type": "csv/row-index", + "index": 1 + } + ] + } + }, + { + "@type": "siibra/attr/desc/attribute_mapping/v0.1", + "ref_type": "openminds/DatasetVersion", + "refs": { + "cb40a501-b155-4c2f-8df3-0ee7c5f1ed00": [ + { + "target": "Detailed map of VTM (Amygdala) - left hemisphere in Julich Brain in Big Brain" + }, + { + "target": "Detailed map of VTM (Amygdala) - right hemisphere in Julich Brain in Big Brain" + } + ] + } + } + ], + "definitions": { + "ebrainsref_type": { + "oneOf": [ + { + "const": "openminds/DatasetVersion" + }, + { + "const": "openminds/Dataset" + }, + { + "const": "openminds/AtlasAnnotation" + }, + { + "const": "minds/core/dataset/v1.0.0" + } + ] + }, + "ebrainsref_mapping": { + "type": "object", + "properties": { + "refs": { + "type": "object", + "patternProperties": { + "^[0-9a-f-]+$": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target": { + "type": "string" + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/siibra/attr/desc/v0.1.json b/siibra/attr/desc/v0.1.json index 7c20c95..9ba3a72 100644 --- a/siibra/attr/desc/v0.1.json +++ b/siibra/attr/desc/v0.1.json @@ -39,6 +39,9 @@ }, { "$ref": "urn:siibra-local:siibra/attr/desc/categorization/v0.1.json" + }, + { + "$ref": "urn:siibra-local:siibra/attr/desc/attribute_mapping/v0.1.json" } ] } diff --git a/siibra/attr/util/region_mapping/v0.1.json b/siibra/attr/util/region_mapping/v0.1.json new file mode 100644 index 0000000..47142c9 --- /dev/null +++ b/siibra/attr/util/region_mapping/v0.1.json @@ -0,0 +1,143 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "patternProperties": { + "^.*$": { + "type": "array", + "items": { + "$ref": "#/definitions/region-mapping-target" + } + } + }, + "description": "Describes how a subset of regions in a parcellation scheme connects to other attributes. At the moment, labelled volume mapping, statistical volume linking, and csv/row-index can be described. \n\nPlease note that this schema is not meant to be standalone, as the parcellation_id is deliberately not included. The parent node should contain parcellation_id.", + "examples": [ + { + "Area 45 (IFG) - left hemisphere": [ + { + "@type": "volume/ref", + "label": 1, + "target": "Left hemisphere volume of Julich Brain 3.0.3 in ICBM 152 space", + "color": "#A76792" + } + ] + }, + { + "Area 45 (IFG) - left hemisphere": [ + { + "@type": "volume/ref", + "range": [0, 0.98], + "target": "Statistical map of Area 45 (IFG) - left hemisphere in ICBM 152 space" + } + ] + }, + { + "Component 3: Calcarine cortex posterior": [ + { + "@type": "volume/ref", + "subspace": [ + ":", + ":", + ":", + 2 + ], + "range": [], + "target": "DiFuMo Atlas (64 dimensions) on MNI 152 ICBM 2009c Nonlinear Asymmetric - statistical - 32 regions" + } + ] + }, + { + "Area 45 (IFG) - left hemisphere": [ + { + "@type": "csv/row-index", + "index": 0 + } + ] + } + ], + "definitions": { + "target_protocol": { + "type": "object", + "properties": { + "target": { + "type": "string" + } + } + }, + "region-mapping-target": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/target_protocol" + } + ], + "oneOf": [ + { + "$ref": "#/definitions/volume" + }, + { + "$ref": "#/definitions/row-index" + } + ] + }, + "volume": { + "type": "object", + "oneOf": [ + { + "type": "object", + "properties": { + "label": { + "type": "number" + }, + "color": { + "type": "string", + "pattern": "#[a-fA-F0-9]{6}" + } + }, + "required": ["label"] + }, + { + "type": "object", + "properties": { + "range": { + "type": "array", + "items": { + "type": "number" + } + }, + "subspace": { + "type": "array", + "items": { + "anyOf": [ + { + "const": ":" + }, + { + "type": "number" + } + ] + } + } + }, + "required": ["range"] + } + ], + "properties": { + "@type": { + "const": "volume/ref" + } + }, + "required": ["@type"] + }, + "row-index": { + "type": "object", + "properties": { + "@type": { + "const": "csv/row-index" + }, + "index": { + "type": "number" + } + } + } + } +} \ No newline at end of file