From c20e5bf8bfb5c0106534cbdb336cec05e2c5c68d Mon Sep 17 00:00:00 2001 From: Arthur Alglave Date: Tue, 10 Dec 2024 15:08:07 +0000 Subject: [PATCH] WIP --- editor-layouts/editor_layout_schema.json | 150 ++++++++++------------- editor-layouts/examples/mammo2x2.json | 18 +-- editor-layouts/examples/mammo4x1.json | 16 +-- editor-layouts/examples/metadata2x1.json | 12 +- 4 files changed, 88 insertions(+), 108 deletions(-) diff --git a/editor-layouts/editor_layout_schema.json b/editor-layouts/editor_layout_schema.json index 569cd4d..70c2d3a 100644 --- a/editor-layouts/editor_layout_schema.json +++ b/editor-layouts/editor_layout_schema.json @@ -2,7 +2,7 @@ "$defs": { "AndDicomTagComparison": { "properties": { - "and_conditions": { + "andConditions": { "description": "List of search conditions combined with AND", "items": { "anyOf": [ @@ -18,19 +18,17 @@ ] }, "minItems": 2, - "title": "And Conditions", + "title": "Andconditions", "type": "array" } }, - "required": [ - "and_conditions" - ], + "required": ["andConditions"], "title": "AndDicomTagComparison", "type": "object" }, "AndDicomTagObject": { "properties": { - "and_conditions": { + "andConditions": { "description": "List of search conditions combined with AND", "items": { "anyOf": [ @@ -46,19 +44,17 @@ ] }, "minItems": 2, - "title": "And Conditions", + "title": "Andconditions", "type": "array" } }, - "required": [ - "and_conditions" - ], + "required": ["andConditions"], "title": "AndDicomTagObject", "type": "object" }, "AndMetadataComparison": { "properties": { - "and_conditions": { + "andConditions": { "description": "List of search conditions combined with AND", "items": { "anyOf": [ @@ -74,19 +70,17 @@ ] }, "minItems": 2, - "title": "And Conditions", + "title": "Andconditions", "type": "array" } }, - "required": [ - "and_conditions" - ], + "required": ["andConditions"], "title": "AndMetadataComparison", "type": "object" }, "AndMetadataKeyObject": { "properties": { - "and_conditions": { + "andConditions": { "description": "List of search conditions combined with AND", "items": { "anyOf": [ @@ -102,28 +96,24 @@ ] }, "minItems": 2, - "title": "And Conditions", + "title": "Andconditions", "type": "array" } }, - "required": [ - "and_conditions" - ], + "required": ["andConditions"], "title": "AndMetadataKeyObject", "type": "object" }, "ComparisonOperator": { "const": "=", - "enum": [ - "=" - ], + "enum": ["="], "title": "ComparisonOperator", "type": "string" }, "ContentQuery": { "additionalProperties": false, "properties": { - "dicom_tags_query": { + "dicomTagsQuery": { "anyOf": [ { "$ref": "#/$defs/DicomTagComparison" @@ -140,9 +130,9 @@ ], "default": null, "description": "DICOM query represented as a combination of search conditions", - "title": "Dicom Tags Query" + "title": "Dicomtagsquery" }, - "client_metadata_query": { + "clientMetadataQuery": { "anyOf": [ { "$ref": "#/$defs/MetadataComparison" @@ -159,7 +149,7 @@ ], "default": null, "description": "Client metadata query represented as a combination of search conditions", - "title": "Client Metadata Query" + "title": "Clientmetadataquery" } }, "title": "ContentQuery", @@ -168,7 +158,7 @@ "ContentSelection": { "additionalProperties": false, "properties": { - "dicom_tags": { + "dicomTags": { "anyOf": [ { "$ref": "#/$defs/DicomTagObject" @@ -184,9 +174,9 @@ } ], "default": null, - "title": "Dicom Tags" + "title": "Dicomtags" }, - "client_metadata": { + "clientMetadata": { "anyOf": [ { "$ref": "#/$defs/MetadataKeyObject" @@ -202,7 +192,7 @@ } ], "default": null, - "title": "Client Metadata" + "title": "Clientmetadata" } }, "title": "ContentSelection", @@ -232,11 +222,7 @@ "type": "string" } }, - "required": [ - "tag", - "operator", - "value" - ], + "required": ["tag", "operator", "value"], "title": "DicomTagComparison", "type": "object" }, @@ -257,20 +243,26 @@ "description": "Comparison operator" } }, - "required": [ - "tag", - "operator" - ], + "required": ["tag", "operator"], "title": "DicomTagObject", "type": "object" }, + "EditorLayoutSettings": { + "properties": { + "fixedLayout": { + "default": false, + "description": "Set layout to fixed, so you can't add/remove panes or change to a different layout", + "title": "Fixedlayout", + "type": "boolean" + } + }, + "title": "EditorLayoutSettings", + "type": "object" + }, "Grid": { "properties": { "direction": { - "enum": [ - "row", - "column" - ], + "enum": ["row", "column"], "title": "Direction", "type": "string" }, @@ -303,12 +295,7 @@ "type": "number" } }, - "required": [ - "direction", - "first", - "second", - "splitPercentage" - ], + "required": ["direction", "first", "second", "splitPercentage"], "title": "Grid", "type": "object" }, @@ -337,11 +324,7 @@ "type": "string" } }, - "required": [ - "key", - "operator", - "value" - ], + "required": ["key", "operator", "value"], "title": "MetadataComparison", "type": "object" }, @@ -363,16 +346,13 @@ "description": "Comparison operator" } }, - "required": [ - "key", - "operator" - ], + "required": ["key", "operator"], "title": "MetadataKeyObject", "type": "object" }, "OrDicomTagComparison": { "properties": { - "or_conditions": { + "orConditions": { "description": "List of search conditions combined with OR", "items": { "anyOf": [ @@ -388,19 +368,17 @@ ] }, "minItems": 2, - "title": "Or Conditions", + "title": "Orconditions", "type": "array" } }, - "required": [ - "or_conditions" - ], + "required": ["orConditions"], "title": "OrDicomTagComparison", "type": "object" }, "OrDicomTagObject": { "properties": { - "or_conditions": { + "orConditions": { "description": "List of search conditions combined with OR", "items": { "anyOf": [ @@ -416,19 +394,17 @@ ] }, "minItems": 2, - "title": "Or Conditions", + "title": "Orconditions", "type": "array" } }, - "required": [ - "or_conditions" - ], + "required": ["orConditions"], "title": "OrDicomTagObject", "type": "object" }, "OrMetadataComparison": { "properties": { - "or_conditions": { + "orConditions": { "description": "List of search conditions combined with OR", "items": { "anyOf": [ @@ -444,19 +420,17 @@ ] }, "minItems": 2, - "title": "Or Conditions", + "title": "Orconditions", "type": "array" } }, - "required": [ - "or_conditions" - ], + "required": ["orConditions"], "title": "OrMetadataComparison", "type": "object" }, "OrMetadataKeyObject": { "properties": { - "or_conditions": { + "orConditions": { "description": "List of search conditions combined with OR", "items": { "anyOf": [ @@ -472,13 +446,11 @@ ] }, "minItems": 2, - "title": "Or Conditions", + "title": "Orconditions", "type": "array" } }, - "required": [ - "or_conditions" - ], + "required": ["orConditions"], "title": "OrMetadataKeyObject", "type": "object" } @@ -520,12 +492,20 @@ ], "default": null, "description": "\n Ensures that every element in the grid has the same value. For example, by specifying {\"client_metadata\": { \"key\": \"group\", operation: \"=\" }}, every\n data unit in the layout will have its \"group\" value equal to the data unit's \"group\" value." + }, + "settings": { + "anyOf": [ + { + "$ref": "#/$defs/EditorLayoutSettings" + }, + { + "type": "null" + } + ], + "default": null } }, - "required": [ - "grid", - "gridContent" - ], - "title": "ProjectLayoutInput", + "required": ["grid", "gridContent"], + "title": "EditorLayoutInput", "type": "object" -} \ No newline at end of file +} diff --git a/editor-layouts/examples/mammo2x2.json b/editor-layouts/examples/mammo2x2.json index 9feb9e0..37b8970 100644 --- a/editor-layouts/examples/mammo2x2.json +++ b/editor-layouts/examples/mammo2x2.json @@ -5,8 +5,8 @@ ], "gridContent": { "0": { - "dicom_tags_query": { - "and_conditions": [ + "dicomTagsQuery": { + "andConditions": [ { "tag": "00185101", "operator": "=", @@ -21,8 +21,8 @@ } }, "1": { - "dicom_tags_query": { - "and_conditions": [ + "dicomTagsQuery": { + "andConditions": [ { "tag": "00185101", "operator": "=", @@ -37,8 +37,8 @@ } }, "2": { - "dicom_tags_query": { - "and_conditions": [ + "dicomTagsQuery": { + "andConditions": [ { "tag": "00185101", "operator": "=", @@ -53,8 +53,8 @@ } }, "3": { - "dicom_tags_query": { - "and_conditions": [ + "dicomTagsQuery": { + "andConditions": [ { "tag": "00185101", "operator": "=", @@ -70,7 +70,7 @@ } }, "topLevelGridFilter": { - "dicom_tags": { + "dicomTags": { "tag": "0020000D", "operator": "=" } diff --git a/editor-layouts/examples/mammo4x1.json b/editor-layouts/examples/mammo4x1.json index 766d9de..3c00f03 100644 --- a/editor-layouts/examples/mammo4x1.json +++ b/editor-layouts/examples/mammo4x1.json @@ -2,8 +2,8 @@ "grid": [[0], [1], [2], [3]], "gridContent": { "0": { - "dicom_tags_query": { - "and_conditions": [ + "dicomTagsQuery": { + "andConditions": [ { "tag": "00185101", "operator": "=", @@ -18,8 +18,8 @@ } }, "1": { - "dicom_tags_query": { - "and_conditions": [ + "dicomTagsQuery": { + "andConditions": [ { "tag": "00185101", "operator": "=", @@ -34,8 +34,8 @@ } }, "2": { - "dicom_tags_query": { - "and_conditions": [ + "dicomTagsQuery": { + "andConditions": [ { "tag": "00185101", "operator": "=", @@ -50,8 +50,8 @@ } }, "3": { - "dicom_tags_query": { - "and_conditions": [ + "dicomTagsQuery": { + "andConditions": [ { "tag": "00185101", "operator": "=", diff --git a/editor-layouts/examples/metadata2x1.json b/editor-layouts/examples/metadata2x1.json index fb2a197..0ae517e 100644 --- a/editor-layouts/examples/metadata2x1.json +++ b/editor-layouts/examples/metadata2x1.json @@ -7,8 +7,8 @@ }, "gridContent": { "0": { - "client_metadata_query": { - "or_conditions": [ + "clientMetadataQuery": { + "orConditions": [ { "key": "group-id", "operator": "=", @@ -23,15 +23,15 @@ } }, "1": { - "client_metadata_query": { - "or_conditions": [ + "clientMetadataQuery": { + "orConditions": [ { "key": "group-id", "operator": "=", "value": "C" }, { - "and_conditions": [ + "andConditions": [ { "key": "group-id", "operator": "=", @@ -49,7 +49,7 @@ } }, "topLevelGridFilter": { - "client_metadata": { + "clientMetadata": { "key": "layout-group", "operator": "=" }