From 52644fba6b2c84991ef56ee91e5b44a8b77b6e36 Mon Sep 17 00:00:00 2001 From: William Moore Date: Tue, 8 Sep 2026 15:58:16 +0100 Subject: [PATCH 1/3] Add sample_figures/ngff_images_figure.json --- sample_figures/ngff_images_figure.json | 2345 ++++++++++++++++++++++++ 1 file changed, 2345 insertions(+) create mode 100644 sample_figures/ngff_images_figure.json diff --git a/sample_figures/ngff_images_figure.json b/sample_figures/ngff_images_figure.json new file mode 100644 index 0000000..7e2e955 --- /dev/null +++ b/sample_figures/ngff_images_figure.json @@ -0,0 +1,2345 @@ +{ + "version": 9, + "panels": [ + { + "x": 32.776939633609516, + "y": 299.60384546911166, + "width": 157, + "height": 160.5839416058394, + "zoom": 100, + "dx": 0, + "dy": 0, + "labels": [ + { + "text": "LaminB1", + "size": "18", + "position": "topleft", + "color": "0000FF" + }, + { + "text": "Dapi", + "size": "18", + "position": "topleft", + "color": "FFFF00" + } + ], + "deltaT": [], + "rotation": 0, + "selected": false, + "pixel_size_x_symbol": "µm", + "pixel_size_x_unit": "MICROMETER", + "rotation_symbol": "°", + "max_export_dpi": 1000, + "vertical_flip": false, + "horizontal_flip": false, + "imageId": "https://livingobjects.ebi.ac.uk/idr/zarr/v0.4/idr0062A/6001240.zarr", + "name": "6001240.zarr", + "sizeZ": 236, + "theZ": 118, + "sizeT": 1, + "theT": 0, + "channels": [ + { + "active": true, + "coefficient": 1, + "color": "0000FF", + "family": "linear", + "inverted": false, + "label": "LaminB1", + "window": { + "end": 1500, + "max": 65535, + "min": 0, + "start": 0 + } + }, + { + "active": true, + "coefficient": 1, + "color": "FFFF00", + "family": "linear", + "inverted": false, + "label": "Dapi", + "window": { + "end": 1500, + "max": 65535, + "min": 0, + "start": 0 + } + } + ], + "orig_width": 271, + "orig_height": 275, + "pixelsType": "uint16", + "zarr": { + "multiscales": [ + { + "axes": [ + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ], + "datasets": [ + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 0.5002025531914894, + 0.3603981534640209, + 0.3603981534640209 + ], + "type": "scale" + } + ], + "path": "0" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 0.5002025531914894, + 0.7207963069280418, + 0.7207963069280418 + ], + "type": "scale" + } + ], + "path": "1" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 0.5002025531914894, + 1.4415926138560835, + 1.4415926138560835 + ], + "type": "scale" + } + ], + "path": "2" + } + ], + "version": "0.4" + } + ], + "arrays": { + "0": { + "chunks": [ + 1, + 1, + 275, + 271 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dimension_separator": "/", + "dtype": "u2", + "fill_value": 0, + "filters": null, + "order": "C", + "shape": [ + 532, + 2, + 988, + 2048, + 2169 + ], + "dimension_separator": "/", + "zarr_format": 2 + }, + "1": { + "chunks": [ + 1, + 1, + 1, + 1024, + 1024 + ], + "compressor": { + "clevel": 5, + "blocksize": 0, + "shuffle": 1, + "cname": "lz4", + "id": "blosc" + }, + "dtype": ">u2", + "fill_value": 0, + "filters": null, + "order": "C", + "shape": [ + 532, + 2, + 988, + 1024, + 1084 + ], + "dimension_separator": "/", + "zarr_format": 2 + }, + "2": { + "chunks": [ + 1, + 1, + 1, + 512, + 542 + ], + "compressor": { + "clevel": 5, + "blocksize": 0, + "shuffle": 1, + "cname": "lz4", + "id": "blosc" + }, + "dtype": ">u2", + "fill_value": 0, + "filters": null, + "order": "C", + "shape": [ + 532, + 2, + 988, + 512, + 542 + ], + "dimension_separator": "/", + "zarr_format": 2 + }, + "3": { + "chunks": [ + 1, + 1, + 1, + 256, + 271 + ], + "compressor": { + "clevel": 5, + "blocksize": 0, + "shuffle": 1, + "cname": "lz4", + "id": "blosc" + }, + "dtype": ">u2", + "fill_value": 0, + "filters": null, + "order": "C", + "shape": [ + 532, + 2, + 988, + 256, + 271 + ], + "dimension_separator": "/", + "zarr_format": 2 + }, + "4": { + "chunks": [ + 1, + 1, + 1, + 128, + 135 + ], + "compressor": { + "clevel": 5, + "blocksize": 0, + "shuffle": 1, + "cname": "lz4", + "id": "blosc" + }, + "dtype": ">u2", + "fill_value": 0, + "filters": null, + "order": "C", + "shape": [ + 532, + 2, + 988, + 128, + 135 + ], + "dimension_separator": "/", + "zarr_format": 2 + } + } + } + }, + { + "x": 31.08678861788615, + "y": 482.6662931054629, + "width": 297.18408647711055, + "height": 175.42303934270956, + "zoom": 100, + "dx": 0, + "dy": 0, + "labels": [], + "deltaT": [], + "rotation": 0, + "selected": true, + "pixel_size_x_symbol": "µm", + "pixel_size_x_unit": "MICROMETER", + "rotation_symbol": "°", + "max_export_dpi": 1000, + "vertical_flip": false, + "horizontal_flip": false, + "imageId": "https://livingobjects.ebi.ac.uk/idr/zarr/v0.4/idr0048A/9846152.zarr", + "name": "/", + "sizeZ": 91, + "theZ": 45, + "sizeT": 1, + "theT": 0, + "channels": [ + { + "active": true, + "coefficient": 1, + "color": "FF0000", + "family": "linear", + "inverted": false, + "label": "0", + "window": { + "end": 25000, + "max": 65535, + "min": 0, + "start": 0 + } + }, + { + "active": true, + "coefficient": 1, + "color": "00FF00", + "family": "linear", + "inverted": false, + "label": "1", + "window": { + "end": 25000, + "max": 65535, + "min": 0, + "start": 0 + } + }, + { + "active": true, + "coefficient": 1, + "color": "0000FF", + "family": "linear", + "inverted": false, + "label": "2", + "window": { + "end": 25000, + "max": 65535, + "min": 0, + "start": 0 + } + } + ], + "orig_width": 19120, + "orig_height": 13350, + "pixelsType": "uint16", + "zarr": { + "multiscales": [ + { + "axes": [ + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space" + }, + { + "name": "y", + "type": "space" + }, + { + "name": "x", + "type": "space" + } + ], + "datasets": [ + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1, + 1 + ], + "type": "scale" + } + ], + "path": "0" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 2, + 2 + ], + "type": "scale" + } + ], + "path": "1" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 4, + 4 + ], + "type": "scale" + } + ], + "path": "2" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 8, + 8 + ], + "type": "scale" + } + ], + "path": "3" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 16, + 16 + ], + "type": "scale" + } + ], + "path": "4" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 32, + 32 + ], + "type": "scale" + } + ], + "path": "5" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 64, + 64 + ], + "type": "scale" + } + ], + "path": "6" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 128, + 128 + ], + "type": "scale" + } + ], + "path": "7" + }, + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 256, + 256 + ], + "type": "scale" + } + ], + "path": "8" + } + ], + "name": "/", + "version": "0.4" + } + ], + "arrays": { + "0": { + "chunks": [ + 1, + 1, + 1024, + 1024 + ], + "compressor": { + "blocksize": 0, + "clevel": 5, + "cname": "lz4", + "id": "blosc", + "shuffle": 1 + }, + "dimension_separator": "/", + "dtype": " Date: Tue, 8 Sep 2026 16:04:15 +0100 Subject: [PATCH 2/3] Update demoUrl to ngff_images_figure.json used in File > Open dialog --- src/js/views/open_local_file_modal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/views/open_local_file_modal.js b/src/js/views/open_local_file_modal.js index d3c5d6a..ed02704 100644 --- a/src/js/views/open_local_file_modal.js +++ b/src/js/views/open_local_file_modal.js @@ -17,8 +17,8 @@ export const OpenLocalFileModalView = Backbone.View.extend({ this.app = options.app; - // TEMP? show a default file to open - let demoUrl = "https://gist.githubusercontent.com/will-moore/75a7f0de5be0f7b4202d5f0229cadcc9/raw/ngff_images_figure.json"; + // Show a default file to open + let demoUrl = "https://raw.githubusercontent.com/ome/figure/refs/heads/master/sample_figures/ngff_images_figure.json"; $(".figureFileUrl", this.el).val(demoUrl); this.enableSubmit(); From ee5c65c3a69567451a595dea213b01b0e2e9b6ce Mon Sep 17 00:00:00 2001 From: William Moore Date: Fri, 18 Sep 2026 12:02:03 +0100 Subject: [PATCH 3/3] Add more panels and features to demo figure --- sample_figures/ngff_images_figure.json | 1428 +++++++++++++++++++----- 1 file changed, 1163 insertions(+), 265 deletions(-) diff --git a/sample_figures/ngff_images_figure.json b/sample_figures/ngff_images_figure.json index 7e2e955..db94da9 100644 --- a/sample_figures/ngff_images_figure.json +++ b/sample_figures/ngff_images_figure.json @@ -1,232 +1,6 @@ { "version": 9, "panels": [ - { - "x": 32.776939633609516, - "y": 299.60384546911166, - "width": 157, - "height": 160.5839416058394, - "zoom": 100, - "dx": 0, - "dy": 0, - "labels": [ - { - "text": "LaminB1", - "size": "18", - "position": "topleft", - "color": "0000FF" - }, - { - "text": "Dapi", - "size": "18", - "position": "topleft", - "color": "FFFF00" - } - ], - "deltaT": [], - "rotation": 0, - "selected": false, - "pixel_size_x_symbol": "µm", - "pixel_size_x_unit": "MICROMETER", - "rotation_symbol": "°", - "max_export_dpi": 1000, - "vertical_flip": false, - "horizontal_flip": false, - "imageId": "https://livingobjects.ebi.ac.uk/idr/zarr/v0.4/idr0062A/6001240.zarr", - "name": "6001240.zarr", - "sizeZ": 236, - "theZ": 118, - "sizeT": 1, - "theT": 0, - "channels": [ - { - "active": true, - "coefficient": 1, - "color": "0000FF", - "family": "linear", - "inverted": false, - "label": "LaminB1", - "window": { - "end": 1500, - "max": 65535, - "min": 0, - "start": 0 - } - }, - { - "active": true, - "coefficient": 1, - "color": "FFFF00", - "family": "linear", - "inverted": false, - "label": "Dapi", - "window": { - "end": 1500, - "max": 65535, - "min": 0, - "start": 0 - } - } - ], - "orig_width": 271, - "orig_height": 275, - "pixelsType": "uint16", - "zarr": { - "multiscales": [ - { - "axes": [ - { - "name": "c", - "type": "channel" - }, - { - "name": "z", - "type": "space", - "unit": "micrometer" - }, - { - "name": "y", - "type": "space", - "unit": "micrometer" - }, - { - "name": "x", - "type": "space", - "unit": "micrometer" - } - ], - "datasets": [ - { - "coordinateTransformations": [ - { - "scale": [ - 1, - 0.5002025531914894, - 0.3603981534640209, - 0.3603981534640209 - ], - "type": "scale" - } - ], - "path": "0" - }, - { - "coordinateTransformations": [ - { - "scale": [ - 1, - 0.5002025531914894, - 0.7207963069280418, - 0.7207963069280418 - ], - "type": "scale" - } - ], - "path": "1" - }, - { - "coordinateTransformations": [ - { - "scale": [ - 1, - 0.5002025531914894, - 1.4415926138560835, - 1.4415926138560835 - ], - "type": "scale" - } - ], - "path": "2" - } - ], - "version": "0.4" - } - ], - "arrays": { - "0": { - "chunks": [ - 1, - 1, - 275, - 271 - ], - "compressor": { - "blocksize": 0, - "clevel": 5, - "cname": "lz4", - "id": "blosc", - "shuffle": 1 - }, - "dimension_separator": "/", - "dtype": "