From 2174bcf8307ba540ae346289eb1b42029de2a3bb Mon Sep 17 00:00:00 2001 From: Sonia Zorba Date: Tue, 21 May 2024 11:21:15 +0200 Subject: [PATCH] Added "Load example" and "Load current data" buttons --- src/routes/sandbox/jsonschema/+page.svelte | 19 +++ src/routes/sandbox/jsonschema/example.json | 165 +++++++++++++++++++++ 2 files changed, 184 insertions(+) create mode 100644 src/routes/sandbox/jsonschema/example.json diff --git a/src/routes/sandbox/jsonschema/+page.svelte b/src/routes/sandbox/jsonschema/+page.svelte index dc17477c..a2ad6af0 100644 --- a/src/routes/sandbox/jsonschema/+page.svelte +++ b/src/routes/sandbox/jsonschema/+page.svelte @@ -1,6 +1,7 @@

Sandbox page for JSON Schema

@@ -69,6 +82,9 @@
+
Data is valid
{/if} +
diff --git a/src/routes/sandbox/jsonschema/example.json b/src/routes/sandbox/jsonschema/example.json new file mode 100644 index 00000000..584ab451 --- /dev/null +++ b/src/routes/sandbox/jsonschema/example.json @@ -0,0 +1,165 @@ +{ + "title": "CellvoyagerToOmeZarrInit", + "type": "object", + "properties": { + "zarr_urls": { + "title": "Zarr Urls", + "type": "array", + "items": { + "type": "string" + }, + "description": "List of paths or urls to the individual OME-Zarr image to be processed. Not used by the converter task. (standard argument for Fractal tasks, managed by Fractal server)." + }, + "zarr_dir": { + "title": "Zarr Dir", + "type": "string", + "description": "path of the directory where the new OME-Zarrs will be created. (standard argument for Fractal tasks, managed by Fractal server)." + }, + "image_dirs": { + "title": "Image Dirs", + "type": "array", + "items": { + "type": "string" + }, + "description": "list of paths to the folders that contains the Cellvoyager image files. Each entry is a path to a folder that contains the image files themselves for a multiwell plate and the MeasurementData & MeasurementDetail metadata files." + }, + "allowed_channels": { + "title": "Allowed Channels", + "type": "array", + "items": { + "$ref": "#/definitions/OmeroChannel" + }, + "description": "A list of `OmeroChannel` s, where each channel must include the `wavelength_id` attribute and where the `wavelength_id` values must be unique across the list." + }, + "image_glob_patterns": { + "title": "Image Glob Patterns", + "type": "array", + "items": { + "type": "string" + }, + "description": "If specified, only parse images with filenames that match with all these patterns. Patterns must be defined as in https://docs.python.org/3/library/fnmatch.html, Example: `image_glob_pattern=[\"*_B03_*\"]` => only process well B03 `image_glob_pattern=[\"*_C09_*\", \"*F016*\", \"*Z[0-5][0-9]C*\"]` => only process well C09, field of view 16 and Z planes 0-59." + }, + "num_levels": { + "title": "Num Levels", + "default": 5, + "type": "integer", + "description": "Number of resolution-pyramid levels. If set to `5`, there will be the full-resolution level and 4 levels of downsampled images." + }, + "coarsening_xy": { + "title": "Coarsening Xy", + "default": 2, + "type": "integer", + "description": "Linear coarsening factor between subsequent levels. If set to `2`, level 1 is 2x downsampled, level 2 is 4x downsampled etc." + }, + "image_extension": { + "title": "Image Extension", + "default": "tif", + "type": "string", + "description": "Filename extension of images (e.g. `\"tif\"` or `\"png\"`)" + }, + "metadata_table_file": { + "title": "Metadata Table File", + "type": "string", + "description": "If `None`, parse Yokogawa metadata from mrf/mlf files in the input_path folder; else, the full path to a csv file containing the parsed metadata table." + }, + "overwrite": { + "title": "Overwrite", + "default": false, + "type": "boolean", + "description": "If `True`, overwrite the task output." + } + }, + "required": [ + "zarr_urls", + "zarr_dir", + "image_dirs", + "allowed_channels" + ], + "additionalProperties": false, + "definitions": { + "Window": { + "title": "Window", + "description": "Custom class for Omero-channel window, based on OME-NGFF v0.4.", + "type": "object", + "properties": { + "min": { + "title": "Min", + "type": "integer", + "description": "Do not change. It will be set to `0` by default." + }, + "max": { + "title": "Max", + "type": "integer", + "description": "Do not change. It will be set according to bit-depth of the images by default (e.g. 65535 for 16 bit images)." + }, + "start": { + "title": "Start", + "type": "integer", + "description": "Lower-bound rescaling value for visualization." + }, + "end": { + "title": "End", + "type": "integer", + "description": "Upper-bound rescaling value for visualization." + } + }, + "required": [ + "start", + "end" + ] + }, + "OmeroChannel": { + "title": "OmeroChannel", + "description": "Custom class for Omero channels, based on OME-NGFF v0.4.", + "type": "object", + "properties": { + "wavelength_id": { + "title": "Wavelength Id", + "type": "string", + "description": "Unique ID for the channel wavelength, e.g. `A01_C01`." + }, + "index": { + "title": "Index", + "type": "integer", + "description": "Do not change. For internal use only." + }, + "label": { + "title": "Label", + "type": "string", + "description": "Name of the channel." + }, + "window": { + "$ref": "#/definitions/Window", + "title": "Window", + "description": "Optional `Window` object to set default display settings for napari." + }, + "color": { + "title": "Color", + "type": "string", + "description": "Optional hex colormap to display the channel in napari (it must be of length 6, e.g. `00FFFF`)." + }, + "active": { + "title": "Active", + "default": true, + "type": "boolean", + "description": "Should this channel be shown in the viewer?" + }, + "coefficient": { + "title": "Coefficient", + "default": 1, + "type": "integer", + "description": "Do not change. Omero-channel attribute." + }, + "inverted": { + "title": "Inverted", + "default": false, + "type": "boolean", + "description": "Do not change. Omero-channel attribute." + } + }, + "required": [ + "wavelength_id" + ] + } + } +} \ No newline at end of file