@jax-data-science/sci-image-visualizer 0.8.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +201 -460
- package/esm2022/index.mjs +34 -15
- package/esm2022/lib/channel-histogram/channel-histogram.component.mjs +163 -91
- package/esm2022/lib/contracts/capabilities.contract.mjs +4 -3
- package/esm2022/lib/contracts/cell-segmenter.contract.mjs +1 -1
- package/esm2022/lib/contracts/channel-histogram-api.contract.mjs +5 -1
- package/esm2022/lib/contracts/color.mjs +60 -0
- package/esm2022/lib/contracts/colormap-lut.mjs +213 -57
- package/esm2022/lib/contracts/coordinate-transform.contract.mjs +1 -1
- package/esm2022/lib/contracts/display-types.mjs +11 -1
- package/esm2022/lib/contracts/image.contract.mjs +1 -1
- package/esm2022/lib/contracts/instance-segmenter.contract.mjs +1 -1
- package/esm2022/lib/contracts/intensity.mjs +48 -5
- package/esm2022/lib/contracts/plot-type-contribution.contract.mjs +1 -1
- package/esm2022/lib/contracts/plot-type.mjs +134 -17
- package/esm2022/lib/contracts/ports/image-state.port.mjs +4 -1
- package/esm2022/lib/contracts/ports/preferences.port.mjs +5 -1
- package/esm2022/lib/contracts/ports/region-io.port.mjs +2 -1
- package/esm2022/lib/contracts/ports/spatial-data.port.mjs +5 -1
- package/esm2022/lib/contracts/ports/tile-access.port.mjs +2 -1
- package/esm2022/lib/contracts/region-editor-api.contract.mjs +1 -1
- package/esm2022/lib/contracts/region-overlay.contract.mjs +1 -1
- package/esm2022/lib/contracts/region-store.contract.mjs +1 -1
- package/esm2022/lib/contracts/sam.contract.mjs +1 -1
- package/esm2022/lib/contracts/section-view.contract.mjs +2 -0
- package/esm2022/lib/contracts/semantic-segmenter.contract.mjs +1 -1
- package/esm2022/lib/contracts/spatial-dataset.contract.mjs +3 -1
- package/esm2022/lib/contracts/toolbar-tool.contract.mjs +6 -4
- package/esm2022/lib/contracts/visualizer.contract.mjs +1 -1
- package/esm2022/lib/contracts/viz-config.mjs +2 -1
- package/esm2022/lib/geometry/contour.mjs +63 -0
- package/esm2022/lib/geometry/loft.mjs +128 -0
- package/esm2022/lib/geometry/polylabel.mjs +156 -0
- package/esm2022/lib/geometry/raster.mjs +98 -0
- package/esm2022/lib/geometry/reconstruct.mjs +315 -0
- package/esm2022/lib/geometry/reslice-image.mjs +57 -0
- package/esm2022/lib/geometry/ring.mjs +201 -0
- package/esm2022/lib/geometry/section.mjs +215 -0
- package/esm2022/lib/hex-color-picker/hex-color-picker.component.mjs +202 -102
- package/esm2022/lib/implementations/base-store-visualizer.mjs +201 -48
- package/esm2022/lib/implementations/napari-js/napari-axes-gizmo.mjs +65 -0
- package/esm2022/lib/implementations/napari-js/napari-display-state.mjs +136 -0
- package/esm2022/lib/implementations/napari-js/napari-helpers.mjs +199 -0
- package/esm2022/lib/implementations/napari-js/napari-image-2d-scene.mjs +602 -0
- package/esm2022/lib/implementations/napari-js/napari-loading-badge.mjs +12 -9
- package/esm2022/lib/implementations/napari-js/napari-loading-state.mjs +83 -0
- package/esm2022/lib/implementations/napari-js/napari-region-mesh-pointer.mjs +100 -0
- package/esm2022/lib/implementations/napari-js/napari-region-overlay.mjs +180 -591
- package/esm2022/lib/implementations/napari-js/napari-scene.mjs +2 -0
- package/esm2022/lib/implementations/napari-js/napari-spatial-2d-scene.mjs +614 -0
- package/esm2022/lib/implementations/napari-js/napari-spatial-3d-scene.mjs +769 -0
- package/esm2022/lib/implementations/napari-js/napari-spatial-encoding.mjs +199 -0
- package/esm2022/lib/implementations/napari-js/napari-spatial-hover.mjs +270 -0
- package/esm2022/lib/implementations/napari-js/napari-spatial-scene.mjs +159 -0
- package/esm2022/lib/implementations/napari-js/napari-spatial-tiles.mjs +106 -1408
- package/esm2022/lib/implementations/napari-js/napari-spatial-tooltip.mjs +2 -2
- package/esm2022/lib/implementations/napari-js/napari-surface-scene.mjs +271 -0
- package/esm2022/lib/implementations/napari-js/napari-tile-client.mjs +562 -0
- package/esm2022/lib/implementations/napari-js/napari-tool-bridge.mjs +347 -0
- package/esm2022/lib/implementations/napari-js/napari-visualizer.service.mjs +427 -4207
- package/esm2022/lib/implementations/napari-js/napari-volume-region-meshes.mjs +129 -0
- package/esm2022/lib/implementations/napari-js/napari-volume-scene.mjs +550 -0
- package/esm2022/lib/implementations/napari-js/napari-volume-slice-planes.mjs +103 -0
- package/esm2022/lib/implementations/napari-js/napari-volume-z-handle.mjs +6 -6
- package/esm2022/lib/implementations/napari-js/region-overlay/overlay-projection.mjs +96 -0
- package/esm2022/lib/implementations/napari-js/region-overlay/region-edit.mjs +35 -0
- package/esm2022/lib/implementations/napari-js/region-overlay/region-svg-renderer.mjs +194 -0
- package/esm2022/lib/implementations/napari-js/spatial-tiles/categorical-lookup.mjs +30 -0
- package/esm2022/lib/implementations/napari-js/spatial-tiles/cell-layers.mjs +274 -0
- package/esm2022/lib/implementations/napari-js/spatial-tiles/density-layer.mjs +144 -0
- package/esm2022/lib/implementations/napari-js/spatial-tiles/layer-groups.mjs +165 -0
- package/esm2022/lib/implementations/napari-js/spatial-tiles/plan-context.mjs +78 -0
- package/esm2022/lib/implementations/napari-js/spatial-tiles/transcript-hover.mjs +182 -0
- package/esm2022/lib/implementations/napari-js/spatial-tiles/transcript-jobs.mjs +369 -0
- package/esm2022/lib/implementations/napari-js/spatial-tiles/transcript-layers.mjs +306 -0
- package/esm2022/lib/implementations/osd/display-pipeline.mjs +102 -40
- package/esm2022/lib/implementations/osd/histogram-sampler.mjs +56 -31
- package/esm2022/lib/implementations/osd/openseadragon-viewer-options.mjs +128 -0
- package/esm2022/lib/implementations/osd/openseadragon-visualizer.service.mjs +333 -1685
- package/esm2022/lib/implementations/osd/osd-coordinate-transform.mjs +1 -1
- package/esm2022/lib/implementations/osd/osd-coords.mjs +5 -6
- package/esm2022/lib/implementations/osd/osd-export.mjs +122 -0
- package/esm2022/lib/implementations/osd/osd-lib.mjs +15 -1
- package/esm2022/lib/implementations/osd/osd-navigator-chrome.mjs +205 -0
- package/esm2022/lib/implementations/osd/osd-pixel-readback.mjs +68 -0
- package/esm2022/lib/implementations/osd/osd-region-overlay-draw.mjs +164 -0
- package/esm2022/lib/implementations/osd/osd-region-overlay.mjs +213 -716
- package/esm2022/lib/implementations/osd/osd-scale-bar.mjs +52 -60
- package/esm2022/lib/implementations/osd/osd-tile-source.mjs +105 -0
- package/esm2022/lib/implementations/osd/osd-viewer-like.mjs +2 -0
- package/esm2022/lib/implementations/osd/osd-viewer-mount.mjs +44 -0
- package/esm2022/lib/implementations/osd/osd-viewport.mjs +184 -0
- package/esm2022/lib/implementations/osd/osd-zoom.mjs +7 -1
- package/esm2022/lib/implementations/osd/simple-source.mjs +395 -0
- package/esm2022/lib/implementations/osd/slice-cache.mjs +53 -48
- package/esm2022/lib/implementations/osd/tile-client.mjs +32 -11
- package/esm2022/lib/implementations/osd/tile-recolor.mjs +330 -0
- package/esm2022/lib/implementations/plotly/omics-trace-builders.mjs +161 -73
- package/esm2022/lib/implementations/plotly/plotly-coordinate-transform.mjs +1 -1
- package/esm2022/lib/implementations/plotly/plotly-image-loader.mjs +112 -0
- package/esm2022/lib/implementations/plotly/plotly-image-recolor.mjs +178 -0
- package/esm2022/lib/implementations/plotly/plotly-intensity-inset.mjs +33 -0
- package/esm2022/lib/implementations/plotly/plotly-isosurface-controls.mjs +83 -0
- package/esm2022/lib/implementations/plotly/plotly-layouts.mjs +121 -0
- package/esm2022/lib/implementations/plotly/plotly-readback.mjs +117 -0
- package/esm2022/lib/implementations/plotly/plotly-region-overlay.mjs +19 -10
- package/esm2022/lib/implementations/plotly/plotly-shape-projection.mjs +223 -0
- package/esm2022/lib/implementations/plotly/plotly-trace-builders.mjs +79 -19
- package/esm2022/lib/implementations/plotly/plotly-zoom-controller.mjs +223 -0
- package/esm2022/lib/implementations/plotly/plotly.service.mjs +439 -1655
- package/esm2022/lib/implementations/region-centroids.mjs +47 -0
- package/esm2022/lib/implementations/simple-slice-access.service.mjs +22 -12
- package/esm2022/lib/implementations/spatial-data-http/spatial-data-http.service.mjs +172 -92
- package/esm2022/lib/implementations/spatial-data-http/spatial-wire.mjs +103 -22
- package/esm2022/lib/implementations/tile-server/index.mjs +6 -0
- package/esm2022/lib/implementations/tile-server/native-histogram.mjs +30 -0
- package/esm2022/lib/implementations/tile-server/poll-descriptor.mjs +65 -0
- package/esm2022/lib/implementations/tile-server/tile-protocol.mjs +42 -0
- package/esm2022/lib/implementations/tile-server/transport.mjs +135 -0
- package/esm2022/lib/intensity/intensity-profile.mjs +107 -0
- package/esm2022/lib/intensity/intensity-profile.service.mjs +223 -0
- package/esm2022/lib/intensity-inset/intensity-inset.component.mjs +133 -0
- package/esm2022/lib/models/bezier.mjs +1 -11
- package/esm2022/lib/models/class-preset.mjs +41 -3
- package/esm2022/lib/models/geometry.mjs +27 -164
- package/esm2022/lib/models/polygon-edit.mjs +254 -0
- package/esm2022/lib/models/polygon-factory.mjs +134 -0
- package/esm2022/lib/models/region-clone.mjs +68 -0
- package/esm2022/lib/models/region-geojson.mjs +411 -0
- package/esm2022/lib/models/region.mjs +34 -33
- package/esm2022/lib/models/shape.mjs +18 -16
- package/esm2022/lib/plot-mode/contribution-host.mjs +297 -0
- package/esm2022/lib/plot-mode/plot-mode-controller.mjs +9 -6
- package/esm2022/lib/plot-mode/plot-type-menu.mjs +85 -0
- package/esm2022/lib/plot-mode/tool-params-model.mjs +87 -0
- package/esm2022/lib/plot.utilities.mjs +296 -473
- package/esm2022/lib/processing/image-crop.mjs +1 -1
- package/esm2022/lib/processing/processing-image.mjs +28 -15
- package/esm2022/lib/provide-visualization.mjs +40 -14
- package/esm2022/lib/region-editor/class-tree/class-tree.component.mjs +156 -0
- package/esm2022/lib/region-editor/class-tree/class-tree.mjs +108 -0
- package/esm2022/lib/region-editor/classes-panel/classes-panel.component.mjs +163 -0
- package/esm2022/lib/region-editor/file-stem.mjs +13 -0
- package/esm2022/lib/region-editor/manage-classes-dialog/manage-classes-dialog.component.mjs +118 -0
- package/esm2022/lib/region-editor/mask-export.service.mjs +98 -0
- package/esm2022/lib/region-editor/mask-raster.mjs +11 -5
- package/esm2022/lib/region-editor/region-color-dialog/region-color-dialog.component.mjs +56 -0
- package/esm2022/lib/region-editor/region-editor-help/region-editor-help.component.mjs +28 -0
- package/esm2022/lib/region-editor/region-editor.component.mjs +896 -660
- package/esm2022/lib/region-editor/region-metrics.mjs +86 -0
- package/esm2022/lib/region-editor/region-persistence.service.mjs +160 -0
- package/esm2022/lib/region-editor/region-table/region-table.component.mjs +169 -0
- package/esm2022/lib/region-editor/save-mask-dialog/save-mask-dialog.component.mjs +91 -0
- package/esm2022/lib/region-editor/save-regions-dialog/save-regions-dialog.component.mjs +92 -0
- package/esm2022/lib/region-ops.service.mjs +28 -70
- package/esm2022/lib/region-overlay/region-geometry.mjs +360 -0
- package/esm2022/lib/region-overlay/region-hit-test.mjs +103 -0
- package/esm2022/lib/region-overlay/region-source-layer.mjs +378 -0
- package/esm2022/lib/region-overlay/region-style.mjs +97 -0
- package/esm2022/lib/region-overlay/svg-region-renderer.mjs +228 -0
- package/esm2022/lib/region-source/http-region-source.mjs +104 -0
- package/esm2022/lib/region-source/region-source-ops.mjs +53 -0
- package/esm2022/lib/region-source/region-source-worker.mjs +10 -0
- package/esm2022/lib/region-source/region-source.mjs +67 -0
- package/esm2022/lib/region-source/region-tiles.mjs +708 -0
- package/esm2022/lib/region-source/worker-region-source.mjs +229 -0
- package/esm2022/lib/render-orchestrator.mjs +14 -11
- package/esm2022/lib/render-session.mjs +207 -0
- package/esm2022/lib/routing-visualizer.service.mjs +858 -414
- package/esm2022/lib/section-pane/section-pane.component.mjs +299 -0
- package/esm2022/lib/spatial/density-raster.mjs +14 -0
- package/esm2022/lib/spatial/embedding-compute-coordinator.mjs +239 -0
- package/esm2022/lib/spatial/embedding-compute.mjs +43 -10
- package/esm2022/lib/spatial/gene-search.mjs +1 -1
- package/esm2022/lib/spatial/glyphs.mjs +97 -0
- package/esm2022/lib/spatial/lod.mjs +187 -0
- package/esm2022/lib/spatial/spatial-controls.facade.mjs +200 -0
- package/esm2022/lib/spatial/spatial-density.mjs +25 -16
- package/esm2022/lib/spatial/spatial-encoding.mjs +26 -82
- package/esm2022/lib/spatial/spatial-expression.mjs +43 -42
- package/esm2022/lib/spatial/spatial-framing.mjs +1 -1
- package/esm2022/lib/spatial/spatial-heatmap.mjs +6 -3
- package/esm2022/lib/spatial/spatial-hover.mjs +5 -33
- package/esm2022/lib/spatial/spatial-panel-model.mjs +282 -0
- package/esm2022/lib/spatial/spatial-sections.mjs +1 -1
- package/esm2022/lib/spatial/spatial-selection.mjs +33 -46
- package/esm2022/lib/spatial/spatial-tile-merge.mjs +219 -0
- package/esm2022/lib/spatial/spatial-tiles.mjs +12 -648
- package/esm2022/lib/spatial/spatial-volume-image.mjs +2 -4
- package/esm2022/lib/spatial/stats.mjs +71 -0
- package/esm2022/lib/spatial/transcript-grouping.mjs +307 -0
- package/esm2022/lib/spatial-controls/spatial-cells-panel/spatial-cells-panel.component.mjs +150 -0
- package/esm2022/lib/spatial-controls/spatial-charts/chart-data-model.mjs +309 -0
- package/esm2022/lib/spatial-controls/spatial-charts/chart-help.mjs +145 -0
- package/esm2022/lib/spatial-controls/spatial-charts/plotly-chart-host.mjs +158 -0
- package/esm2022/lib/spatial-controls/spatial-charts/spatial-chart-window/spatial-chart-window.component.mjs +47 -0
- package/esm2022/lib/spatial-controls/spatial-charts/spatial-charts.component.mjs +297 -802
- package/esm2022/lib/spatial-controls/spatial-charts/spatial-embedding-controls/spatial-embedding-controls.component.mjs +89 -0
- package/esm2022/lib/spatial-controls/spatial-charts/spatial-heatmap-controls/spatial-heatmap-controls.component.mjs +52 -0
- package/esm2022/lib/spatial-controls/spatial-controls.component.mjs +143 -1238
- package/esm2022/lib/spatial-controls/spatial-gene-picker.mjs +153 -0
- package/esm2022/lib/spatial-controls/spatial-gene-tree/spatial-gene-tree.component.mjs +241 -0
- package/esm2022/lib/spatial-controls/spatial-groups-panel/spatial-groups-panel.component.mjs +193 -0
- package/esm2022/lib/spatial-controls/spatial-key/spatial-key.component.mjs +132 -0
- package/esm2022/lib/spatial-controls/spatial-key/spatial-key.model.mjs +67 -0
- package/esm2022/lib/spatial-controls/spatial-marker-genes-form/spatial-marker-genes-form.component.mjs +147 -0
- package/esm2022/lib/spatial-controls/spatial-observations-panel/spatial-observations-panel.component.mjs +300 -0
- package/esm2022/lib/spatial-controls/spatial-transcripts-panel/spatial-transcripts-panel.component.mjs +370 -0
- package/esm2022/lib/store/class-color.util.mjs +53 -5
- package/esm2022/lib/store/class-signatures.mjs +63 -0
- package/esm2022/lib/store/region-history.mjs +146 -0
- package/esm2022/lib/store/region-scope-cache.mjs +144 -0
- package/esm2022/lib/store/region-selection.mjs +82 -0
- package/esm2022/lib/store/region-source-scope.mjs +171 -0
- package/esm2022/lib/store/region-store.service.mjs +986 -670
- package/esm2022/lib/store/spatial-selection.service.mjs +2 -2
- package/esm2022/lib/store/visualizer-store.service.mjs +81 -76
- package/esm2022/lib/toast-outlets.mjs +5 -4
- package/esm2022/lib/toolbar/brush/brush-tool.service.mjs +92 -434
- package/esm2022/lib/toolbar/canvas-tools.mjs +20 -0
- package/esm2022/lib/toolbar/crop/slide-crop.mjs +26 -42
- package/esm2022/lib/toolbar/plot-type-selector/plot-type-selector.component.mjs +85 -0
- package/esm2022/lib/toolbar/region-tools/region-tool-buttons.mjs +74 -0
- package/esm2022/lib/toolbar/region-tools/region-tools.component.mjs +120 -0
- package/esm2022/lib/toolbar/segmentation/cell-segment-tool.service.mjs +74 -78
- package/esm2022/lib/toolbar/segmentation/cellpose-segmenter.service.mjs +50 -8
- package/esm2022/lib/toolbar/segmentation/onnx-sam-session.mjs +61 -42
- package/esm2022/lib/toolbar/segmentation/pending-calls.mjs +47 -0
- package/esm2022/lib/toolbar/segmentation/sam-model-registry.mjs +12 -4
- package/esm2022/lib/toolbar/segmentation/sam-onnx-core.mjs +70 -14
- package/esm2022/lib/toolbar/segmentation/sam-point-tool.service.mjs +135 -172
- package/esm2022/lib/toolbar/segmentation/sam-prompt.mjs +9 -90
- package/esm2022/lib/toolbar/segmentation/sam-session.service.mjs +183 -0
- package/esm2022/lib/toolbar/segmentation/sam-tool.service.mjs +95 -150
- package/esm2022/lib/toolbar/segmentation/segmentation-commit.mjs +12 -0
- package/esm2022/lib/toolbar/segmentation/segmentation-runner.mjs +108 -0
- package/esm2022/lib/toolbar/segmentation-tools/segmentation-tools.component.mjs +155 -0
- package/esm2022/lib/toolbar/stack-controls/stack-controls.component.mjs +121 -0
- package/esm2022/lib/toolbar/tool-kit/async-tool-status.mjs +37 -0
- package/esm2022/lib/toolbar/tool-kit/canvas-tool-manager.mjs +63 -0
- package/esm2022/lib/toolbar/tool-kit/canvas-tool.mjs +2 -0
- package/esm2022/lib/toolbar/tool-kit/frame-pixels.mjs +108 -0
- package/esm2022/lib/toolbar/tool-kit/mask-stroke-editor.mjs +306 -0
- package/esm2022/lib/toolbar/tool-kit/matrix-frame.mjs +61 -0
- package/esm2022/lib/toolbar/tool-kit/tool-overlay.mjs +140 -0
- package/esm2022/lib/toolbar/tool-kit/undo-gesture.mjs +24 -0
- package/esm2022/lib/toolbar/tool-slider/tool-slider.component.mjs +63 -0
- package/esm2022/lib/toolbar/toolbar-help-dialog/toolbar-help-dialog.component.mjs +50 -0
- package/esm2022/lib/toolbar/toolbar.component.mjs +84 -119
- package/esm2022/lib/toolbar/vertex-eraser/vertex-eraser-tool.service.mjs +93 -115
- package/esm2022/lib/toolbar/view-controls/view-controls.component.mjs +107 -0
- package/esm2022/lib/toolbar/wand/wand-region-grow.mjs +321 -0
- package/esm2022/lib/toolbar/wand/wand-tool.service.mjs +121 -416
- package/esm2022/lib/toolbar/wand/wand.service.mjs +30 -894
- package/esm2022/lib/toolbar/zoom-to-box/zoom-to-box-tool.service.mjs +48 -90
- package/esm2022/lib/util/mark-for-check.mjs +17 -0
- package/esm2022/lib/util/supersede.mjs +56 -0
- package/esm2022/lib/visualization.module.mjs +39 -141
- package/esm2022/lib/visualizer/floating-drag.directive.mjs +58 -0
- package/esm2022/lib/visualizer/region-actions.mjs +149 -0
- package/esm2022/lib/visualizer/region-load.mjs +123 -0
- package/esm2022/lib/visualizer/spatial-dataset-binder.mjs +163 -0
- package/esm2022/lib/visualizer/tool-modes.mjs +113 -0
- package/esm2022/lib/visualizer/viewer-shortcuts.mjs +167 -0
- package/esm2022/lib/visualizer/visualizer-context-menu.mjs +119 -0
- package/esm2022/lib/visualizer/volume-sections.mjs +175 -0
- package/esm2022/lib/visualizer.component.mjs +602 -1902
- package/esm2022/lib/workers/spatial-math-ops.mjs +43 -0
- package/esm2022/lib/workers/spatial-math-worker.mjs +10 -0
- package/esm2022/lib/workers/spatial-math.mjs +190 -0
- package/fesm2022/jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-BKQhpbHv.mjs +47169 -0
- package/fesm2022/jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-BKQhpbHv.mjs.map +1 -0
- package/fesm2022/jax-data-science-sci-image-visualizer-onnx-sam-session-z1IN-F7w.mjs +238 -0
- package/fesm2022/jax-data-science-sci-image-visualizer-onnx-sam-session-z1IN-F7w.mjs.map +1 -0
- package/fesm2022/jax-data-science-sci-image-visualizer-region-source-worker-CAqBjM5L.mjs +12 -0
- package/fesm2022/jax-data-science-sci-image-visualizer-region-source-worker-CAqBjM5L.mjs.map +1 -0
- package/fesm2022/jax-data-science-sci-image-visualizer-spatial-math-worker-BzVFFqGS.mjs +12 -0
- package/fesm2022/jax-data-science-sci-image-visualizer-spatial-math-worker-BzVFFqGS.mjs.map +1 -0
- package/fesm2022/jax-data-science-sci-image-visualizer.mjs +41 -34467
- package/fesm2022/jax-data-science-sci-image-visualizer.mjs.map +1 -1
- package/fesm2022/mask.worker.js +36 -917
- package/fesm2022/onnx-sam.worker.js +52 -16
- package/fesm2022/region-source.worker.js +1067 -0
- package/fesm2022/spatial-math.worker.js +471 -0
- package/fesm2022/tsne.worker.js +32 -15
- package/index.d.ts +19 -10
- package/lib/channel-histogram/channel-histogram.component.d.ts +53 -43
- package/lib/contracts/capabilities.contract.d.ts +4 -2
- package/lib/contracts/cell-segmenter.contract.d.ts +1 -0
- package/lib/contracts/channel-histogram-api.contract.d.ts +4 -0
- package/lib/contracts/color.d.ts +27 -0
- package/lib/contracts/colormap-lut.d.ts +19 -4
- package/lib/contracts/coordinate-transform.contract.d.ts +3 -3
- package/lib/contracts/display-types.d.ts +21 -0
- package/lib/contracts/image.contract.d.ts +4 -0
- package/lib/contracts/instance-segmenter.contract.d.ts +5 -0
- package/lib/contracts/intensity.d.ts +13 -2
- package/lib/contracts/plot-type.d.ts +3 -1
- package/lib/contracts/ports/image-state.port.d.ts +6 -2
- package/lib/contracts/ports/preferences.port.d.ts +4 -0
- package/lib/contracts/ports/region-io.port.d.ts +1 -0
- package/lib/contracts/ports/spatial-data.port.d.ts +4 -10
- package/lib/contracts/ports/tile-access.port.d.ts +1 -0
- package/lib/contracts/region-editor-api.contract.d.ts +85 -1
- package/lib/contracts/region-overlay.contract.d.ts +5 -0
- package/lib/contracts/region-store.contract.d.ts +22 -0
- package/lib/contracts/sam.contract.d.ts +7 -0
- package/lib/contracts/section-view.contract.d.ts +44 -0
- package/lib/contracts/semantic-segmenter.contract.d.ts +6 -0
- package/lib/contracts/spatial-dataset.contract.d.ts +19 -6
- package/lib/contracts/toolbar-tool.contract.d.ts +1 -0
- package/lib/contracts/visualizer.contract.d.ts +231 -54
- package/lib/contracts/viz-config.d.ts +9 -0
- package/lib/geometry/contour.d.ts +24 -0
- package/lib/geometry/loft.d.ts +22 -0
- package/lib/geometry/polylabel.d.ts +23 -0
- package/lib/geometry/raster.d.ts +42 -0
- package/lib/geometry/reconstruct.d.ts +54 -0
- package/lib/geometry/reslice-image.d.ts +33 -0
- package/lib/geometry/ring.d.ts +67 -0
- package/lib/geometry/section.d.ts +52 -0
- package/lib/hex-color-picker/hex-color-picker.component.d.ts +61 -27
- package/lib/implementations/base-store-visualizer.d.ts +61 -15
- package/lib/implementations/napari-js/napari-axes-gizmo.d.ts +36 -0
- package/lib/implementations/napari-js/napari-display-state.d.ts +76 -0
- package/lib/implementations/napari-js/napari-helpers.d.ts +129 -0
- package/lib/implementations/napari-js/napari-image-2d-scene.d.ts +162 -0
- package/lib/implementations/napari-js/napari-loading-badge.d.ts +4 -3
- package/lib/implementations/napari-js/napari-loading-state.d.ts +37 -0
- package/lib/implementations/napari-js/napari-region-mesh-pointer.d.ts +32 -0
- package/lib/implementations/napari-js/napari-region-overlay.d.ts +68 -71
- package/lib/implementations/napari-js/napari-scene.d.ts +126 -0
- package/lib/implementations/napari-js/napari-spatial-2d-scene.d.ts +163 -0
- package/lib/implementations/napari-js/napari-spatial-3d-scene.d.ts +212 -0
- package/lib/implementations/napari-js/napari-spatial-encoding.d.ts +114 -0
- package/lib/implementations/napari-js/napari-spatial-hover.d.ts +91 -0
- package/lib/implementations/napari-js/napari-spatial-scene.d.ts +118 -0
- package/lib/implementations/napari-js/napari-spatial-tiles.d.ts +56 -263
- package/lib/implementations/napari-js/napari-spatial-tooltip.d.ts +1 -1
- package/lib/implementations/napari-js/napari-surface-scene.d.ts +76 -0
- package/lib/implementations/napari-js/napari-tile-client.d.ts +214 -0
- package/lib/implementations/napari-js/napari-tool-bridge.d.ts +179 -0
- package/lib/implementations/napari-js/napari-visualizer.service.d.ts +169 -883
- package/lib/implementations/napari-js/napari-volume-region-meshes.d.ts +66 -0
- package/lib/implementations/napari-js/napari-volume-scene.d.ts +148 -0
- package/lib/implementations/napari-js/napari-volume-slice-planes.d.ts +43 -0
- package/lib/implementations/napari-js/napari-volume-z-handle.d.ts +8 -12
- package/lib/implementations/napari-js/region-overlay/overlay-projection.d.ts +59 -0
- package/lib/implementations/napari-js/region-overlay/region-edit.d.ts +15 -0
- package/lib/implementations/napari-js/region-overlay/region-svg-renderer.d.ts +54 -0
- package/lib/implementations/napari-js/spatial-tiles/categorical-lookup.d.ts +26 -0
- package/lib/implementations/napari-js/spatial-tiles/cell-layers.d.ts +70 -0
- package/lib/implementations/napari-js/spatial-tiles/density-layer.d.ts +61 -0
- package/lib/implementations/napari-js/spatial-tiles/layer-groups.d.ts +67 -0
- package/lib/implementations/napari-js/spatial-tiles/plan-context.d.ts +38 -0
- package/lib/implementations/napari-js/spatial-tiles/transcript-hover.d.ts +71 -0
- package/lib/implementations/napari-js/spatial-tiles/transcript-jobs.d.ts +105 -0
- package/lib/implementations/napari-js/spatial-tiles/transcript-layers.d.ts +56 -0
- package/lib/implementations/osd/display-pipeline.d.ts +38 -9
- package/lib/implementations/osd/histogram-sampler.d.ts +22 -12
- package/lib/implementations/osd/openseadragon-viewer-options.d.ts +35 -0
- package/lib/implementations/osd/openseadragon-visualizer.service.d.ts +78 -354
- package/lib/implementations/osd/osd-coordinate-transform.d.ts +2 -1
- package/lib/implementations/osd/osd-coords.d.ts +6 -4
- package/lib/implementations/osd/osd-export.d.ts +36 -0
- package/lib/implementations/osd/osd-lib.d.ts +7 -0
- package/lib/implementations/osd/osd-navigator-chrome.d.ts +69 -0
- package/lib/implementations/osd/osd-pixel-readback.d.ts +22 -0
- package/lib/implementations/osd/osd-region-overlay-draw.d.ts +38 -0
- package/lib/implementations/osd/osd-region-overlay.d.ts +46 -51
- package/lib/implementations/osd/osd-scale-bar.d.ts +8 -6
- package/lib/implementations/osd/osd-tile-source.d.ts +49 -0
- package/lib/implementations/osd/osd-viewer-like.d.ts +100 -0
- package/lib/implementations/osd/osd-viewer-mount.d.ts +14 -0
- package/lib/implementations/osd/osd-viewport.d.ts +77 -0
- package/lib/implementations/osd/osd-zoom.d.ts +6 -0
- package/lib/implementations/osd/simple-source.d.ts +161 -0
- package/lib/implementations/osd/slice-cache.d.ts +12 -3
- package/lib/implementations/osd/tile-client.d.ts +11 -14
- package/lib/implementations/osd/tile-recolor.d.ts +141 -0
- package/lib/implementations/plotly/omics-trace-builders.d.ts +32 -20
- package/lib/implementations/plotly/plotly-image-loader.d.ts +49 -0
- package/lib/implementations/plotly/plotly-image-recolor.d.ts +75 -0
- package/lib/implementations/plotly/plotly-intensity-inset.d.ts +8 -0
- package/lib/implementations/plotly/plotly-isosurface-controls.d.ts +38 -0
- package/lib/implementations/plotly/plotly-layouts.d.ts +188 -0
- package/lib/implementations/plotly/plotly-readback.d.ts +41 -0
- package/lib/implementations/plotly/plotly-region-overlay.d.ts +2 -2
- package/lib/implementations/plotly/plotly-shape-projection.d.ts +92 -0
- package/lib/implementations/plotly/plotly-trace-builders.d.ts +23 -12
- package/lib/implementations/plotly/plotly-zoom-controller.d.ts +86 -0
- package/lib/implementations/plotly/plotly.service.d.ts +136 -401
- package/lib/implementations/region-centroids.d.ts +14 -0
- package/lib/implementations/simple-slice-access.service.d.ts +7 -4
- package/lib/implementations/spatial-data-http/spatial-data-http.service.d.ts +42 -18
- package/lib/implementations/spatial-data-http/spatial-wire.d.ts +34 -9
- package/lib/implementations/tile-server/index.d.ts +5 -0
- package/lib/implementations/tile-server/native-histogram.d.ts +25 -0
- package/lib/implementations/tile-server/poll-descriptor.d.ts +39 -0
- package/lib/implementations/tile-server/tile-protocol.d.ts +83 -0
- package/lib/implementations/tile-server/transport.d.ts +62 -0
- package/lib/intensity/intensity-profile.d.ts +66 -0
- package/lib/intensity/intensity-profile.service.d.ts +108 -0
- package/lib/intensity-inset/intensity-inset.component.d.ts +58 -0
- package/lib/models/bezier.d.ts +0 -5
- package/lib/models/class-preset.d.ts +25 -0
- package/lib/models/geometry.d.ts +14 -48
- package/lib/models/polygon-edit.d.ts +72 -0
- package/lib/models/polygon-factory.d.ts +45 -0
- package/lib/models/region-clone.d.ts +20 -0
- package/lib/models/region-geojson.d.ts +57 -0
- package/lib/models/region.d.ts +59 -4
- package/lib/models/shape.d.ts +8 -0
- package/lib/plot-mode/contribution-host.d.ts +125 -0
- package/lib/plot-mode/plot-type-menu.d.ts +60 -0
- package/lib/plot-mode/tool-params-model.d.ts +49 -0
- package/lib/plot.utilities.d.ts +19 -30
- package/lib/processing/processing-image.d.ts +5 -2
- package/lib/provide-visualization.d.ts +19 -2
- package/lib/region-editor/class-tree/class-tree.component.d.ts +78 -0
- package/lib/region-editor/class-tree/class-tree.d.ts +31 -0
- package/lib/region-editor/classes-panel/classes-panel.component.d.ts +86 -0
- package/lib/region-editor/file-stem.d.ts +7 -0
- package/lib/region-editor/manage-classes-dialog/manage-classes-dialog.component.d.ts +45 -0
- package/lib/region-editor/mask-export.service.d.ts +54 -0
- package/lib/region-editor/mask-raster.d.ts +2 -8
- package/lib/region-editor/region-color-dialog/region-color-dialog.component.d.ts +29 -0
- package/lib/region-editor/region-editor-help/region-editor-help.component.d.ts +11 -0
- package/lib/region-editor/region-editor.component.d.ts +283 -200
- package/lib/region-editor/region-metrics.d.ts +34 -0
- package/lib/region-editor/region-persistence.service.d.ts +77 -0
- package/lib/region-editor/region-table/region-table.component.d.ts +89 -0
- package/lib/region-editor/save-mask-dialog/save-mask-dialog.component.d.ts +36 -0
- package/lib/region-editor/save-regions-dialog/save-regions-dialog.component.d.ts +37 -0
- package/lib/region-ops.service.d.ts +1 -7
- package/lib/region-overlay/region-geometry.d.ts +158 -0
- package/lib/region-overlay/region-hit-test.d.ts +38 -0
- package/lib/region-overlay/region-source-layer.d.ts +96 -0
- package/lib/region-overlay/region-style.d.ts +52 -0
- package/lib/region-overlay/svg-region-renderer.d.ts +110 -0
- package/lib/region-source/http-region-source.d.ts +45 -0
- package/lib/region-source/region-source-ops.d.ts +89 -0
- package/lib/region-source/region-source-worker.d.ts +7 -0
- package/lib/region-source/region-source.d.ts +82 -0
- package/lib/region-source/region-tiles.d.ts +289 -0
- package/lib/region-source/worker-region-source.d.ts +65 -0
- package/lib/render-orchestrator.d.ts +6 -2
- package/lib/render-session.d.ts +75 -0
- package/lib/routing-visualizer.service.d.ts +248 -59
- package/lib/section-pane/section-pane.component.d.ts +47 -0
- package/lib/spatial/density-raster.d.ts +6 -0
- package/lib/spatial/embedding-compute-coordinator.d.ts +123 -0
- package/lib/spatial/embedding-compute.d.ts +21 -2
- package/lib/spatial/glyphs.d.ts +16 -0
- package/lib/spatial/lod.d.ts +94 -0
- package/lib/spatial/spatial-controls.facade.d.ts +64 -0
- package/lib/spatial/spatial-density.d.ts +15 -5
- package/lib/spatial/spatial-encoding.d.ts +11 -44
- package/lib/spatial/spatial-expression.d.ts +40 -22
- package/lib/spatial/spatial-framing.d.ts +1 -0
- package/lib/spatial/spatial-heatmap.d.ts +2 -0
- package/lib/spatial/spatial-hover.d.ts +4 -16
- package/lib/spatial/spatial-panel-model.d.ts +135 -0
- package/lib/spatial/spatial-selection.d.ts +21 -26
- package/lib/spatial/spatial-tile-merge.d.ts +41 -0
- package/lib/spatial/spatial-tiles.d.ts +9 -256
- package/lib/spatial/stats.d.ts +38 -0
- package/lib/spatial/transcript-grouping.d.ts +119 -0
- package/lib/spatial-controls/spatial-cells-panel/spatial-cells-panel.component.d.ts +64 -0
- package/lib/spatial-controls/spatial-charts/chart-data-model.d.ts +153 -0
- package/lib/spatial-controls/spatial-charts/chart-help.d.ts +69 -0
- package/lib/spatial-controls/spatial-charts/plotly-chart-host.d.ts +98 -0
- package/lib/spatial-controls/spatial-charts/spatial-chart-window/spatial-chart-window.component.d.ts +26 -0
- package/lib/spatial-controls/spatial-charts/spatial-charts.component.d.ts +101 -260
- package/lib/spatial-controls/spatial-charts/spatial-embedding-controls/spatial-embedding-controls.component.d.ts +43 -0
- package/lib/spatial-controls/spatial-charts/spatial-heatmap-controls/spatial-heatmap-controls.component.d.ts +27 -0
- package/lib/spatial-controls/spatial-controls.component.d.ts +68 -448
- package/lib/spatial-controls/spatial-gene-picker.d.ts +86 -0
- package/lib/spatial-controls/spatial-gene-tree/spatial-gene-tree.component.d.ts +102 -0
- package/lib/spatial-controls/spatial-groups-panel/spatial-groups-panel.component.d.ts +72 -0
- package/lib/spatial-controls/spatial-key/spatial-key.component.d.ts +66 -0
- package/lib/spatial-controls/spatial-key/spatial-key.model.d.ts +33 -0
- package/lib/spatial-controls/spatial-marker-genes-form/spatial-marker-genes-form.component.d.ts +64 -0
- package/lib/spatial-controls/spatial-observations-panel/spatial-observations-panel.component.d.ts +117 -0
- package/lib/spatial-controls/spatial-transcripts-panel/spatial-transcripts-panel.component.d.ts +142 -0
- package/lib/store/class-color.util.d.ts +39 -2
- package/lib/store/class-signatures.d.ts +11 -0
- package/lib/store/region-history.d.ts +66 -0
- package/lib/store/region-scope-cache.d.ts +65 -0
- package/lib/store/region-selection.d.ts +36 -0
- package/lib/store/region-source-scope.d.ts +68 -0
- package/lib/store/region-store.service.d.ts +312 -116
- package/lib/store/visualizer-store.service.d.ts +32 -33
- package/lib/toast-outlets.d.ts +4 -3
- package/lib/toolbar/brush/brush-tool.service.d.ts +31 -98
- package/lib/toolbar/canvas-tools.d.ts +20 -0
- package/lib/toolbar/crop/slide-crop.d.ts +10 -4
- package/lib/toolbar/plot-type-selector/plot-type-selector.component.d.ts +38 -0
- package/lib/toolbar/region-tools/region-tool-buttons.d.ts +21 -0
- package/lib/toolbar/region-tools/region-tools.component.d.ts +62 -0
- package/lib/toolbar/segmentation/cell-segment-tool.service.d.ts +10 -14
- package/lib/toolbar/segmentation/cellpose-segmenter.service.d.ts +12 -2
- package/lib/toolbar/segmentation/onnx-sam-session.d.ts +22 -3
- package/lib/toolbar/segmentation/pending-calls.d.ts +31 -0
- package/lib/toolbar/segmentation/sam-model-registry.d.ts +9 -3
- package/lib/toolbar/segmentation/sam-onnx-core.d.ts +18 -5
- package/lib/toolbar/segmentation/sam-point-tool.service.d.ts +46 -32
- package/lib/toolbar/segmentation/sam-prompt.d.ts +7 -31
- package/lib/toolbar/segmentation/sam-session.service.d.ts +74 -0
- package/lib/toolbar/segmentation/sam-tool.service.d.ts +23 -30
- package/lib/toolbar/segmentation/segmentation-commit.d.ts +8 -0
- package/lib/toolbar/segmentation/segmentation-runner.d.ts +52 -0
- package/lib/toolbar/segmentation-tools/segmentation-tools.component.d.ts +87 -0
- package/lib/toolbar/stack-controls/stack-controls.component.d.ts +51 -0
- package/lib/toolbar/tool-kit/async-tool-status.d.ts +21 -0
- package/lib/toolbar/tool-kit/canvas-tool-manager.d.ts +36 -0
- package/lib/toolbar/tool-kit/canvas-tool.d.ts +86 -0
- package/lib/toolbar/tool-kit/frame-pixels.d.ts +45 -0
- package/lib/toolbar/tool-kit/mask-stroke-editor.d.ts +125 -0
- package/lib/toolbar/tool-kit/matrix-frame.d.ts +40 -0
- package/lib/toolbar/tool-kit/tool-overlay.d.ts +60 -0
- package/lib/toolbar/tool-kit/undo-gesture.d.ts +17 -0
- package/lib/toolbar/tool-slider/tool-slider.component.d.ts +33 -0
- package/lib/toolbar/toolbar-help-dialog/toolbar-help-dialog.component.d.ts +24 -0
- package/lib/toolbar/toolbar.component.d.ts +55 -84
- package/lib/toolbar/vertex-eraser/vertex-eraser-tool.service.d.ts +33 -40
- package/lib/toolbar/view-controls/view-controls.component.d.ts +54 -0
- package/lib/toolbar/wand/wand-region-grow.d.ts +49 -0
- package/lib/toolbar/wand/wand-tool.service.d.ts +39 -124
- package/lib/toolbar/wand/wand.service.d.ts +22 -116
- package/lib/toolbar/zoom-to-box/zoom-to-box-tool.service.d.ts +17 -37
- package/lib/util/mark-for-check.d.ts +11 -0
- package/lib/util/supersede.d.ts +53 -0
- package/lib/visualization.module.d.ts +18 -39
- package/lib/visualizer/floating-drag.directive.d.ts +30 -0
- package/lib/visualizer/region-actions.d.ts +54 -0
- package/lib/visualizer/region-load.d.ts +46 -0
- package/lib/visualizer/spatial-dataset-binder.d.ts +74 -0
- package/lib/visualizer/tool-modes.d.ts +49 -0
- package/lib/visualizer/viewer-shortcuts.d.ts +71 -0
- package/lib/visualizer/visualizer-context-menu.d.ts +55 -0
- package/lib/visualizer/volume-sections.d.ts +64 -0
- package/lib/visualizer.component.d.ts +232 -447
- package/lib/workers/spatial-math-ops.d.ts +65 -0
- package/lib/workers/spatial-math-worker.d.ts +7 -0
- package/lib/workers/spatial-math.d.ts +74 -0
- package/package.json +12 -3
- package/src/lib/assets/slice.svg +23 -0
- package/src/lib/styles/_viz-icons-rules.scss +73 -0
- package/src/lib/styles/viz-icons.scss +14 -0
- package/esm2022/lib/implementations/napari-js/napari-axes-labels.mjs +0 -97
- package/esm2022/lib/implementations/napari-js/napari-navigator.mjs +0 -195
- package/esm2022/lib/implementations/napari-js/napari-scale-bar.mjs +0 -92
- package/fesm2022/jax-data-science-sci-image-visualizer-onnx-sam-session-BwP-A11m.mjs +0 -329
- package/fesm2022/jax-data-science-sci-image-visualizer-onnx-sam-session-BwP-A11m.mjs.map +0 -1
- package/lib/implementations/napari-js/napari-axes-labels.d.ts +0 -49
- package/lib/implementations/napari-js/napari-navigator.d.ts +0 -72
- package/lib/implementations/napari-js/napari-scale-bar.d.ts +0 -35
- package/src/lib/assets/cell-detection.svg +0 -37
- package/src/lib/assets/click.svg +0 -1
- package/src/lib/assets/colormap-luts.json +0 -1
- package/src/lib/assets/edit-selection-white.svg +0 -47
- package/src/lib/assets/icons/colormap-earth.png +0 -0
- package/src/lib/assets/icons/colormap-placeholder.png +0 -0
- package/src/lib/assets/icons/colormap-pubu.png +0 -0
- package/src/lib/assets/interactive-segmentation-cursor.svg +0 -1
- package/src/lib/assets/picture-segmentation.svg +0 -43
- package/src/lib/assets/test/download-379.svg +0 -1
- package/src/lib/assets/test/download-98.svg +0 -1
- package/src/lib/assets/test/json-1.svg +0 -1
- package/src/lib/assets/test/load-53.svg +0 -1
- package/src/lib/assets/test/mask-44.svg +0 -1
- package/src/lib/assets/test/mask-download-44.svg +0 -15
- package/src/lib/assets/test/mask-save-44.svg +0 -11
- package/src/lib/assets/test/overlay-1.svg +0 -1
- package/src/lib/assets/test/overlay-4.svg +0 -1
- package/src/lib/assets/test/region-26.svg +0 -1
- package/src/lib/assets/test/save-56.svg +0 -1
- package/src/lib/assets/test/upload-43.svg +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { SpatialObservations } from '../contracts/spatial-dataset.contract';
|
|
2
|
+
import { DensityGrid, DensityOptions } from '../spatial/spatial-density';
|
|
3
|
+
import { ExpressionField, ExpressionFieldOptions, ExpressionVolumeField, ExpressionVolumeOptions } from '../spatial/spatial-expression';
|
|
4
|
+
import { HeatmapGene, HeatmapGroups, HeatmapMatrix, HeatmapMatrixOptions } from '../spatial/spatial-heatmap';
|
|
5
|
+
/**
|
|
6
|
+
* The pure spatial field and density math, as messages: what crosses into
|
|
7
|
+
* `spatial-math.worker` and what comes back, and the one dispatcher both the worker and
|
|
8
|
+
* the main-thread fallback run. DOM-free and Angular-free, because the worker bundles it.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Just the coordinates of {@link SpatialObservations}: all the math reads. Cloning the
|
|
12
|
+
* full observations would also copy `ids` — millions of strings on a large dataset.
|
|
13
|
+
*/
|
|
14
|
+
export type SpatialMathObservations = Pick<SpatialObservations, 'count' | 'x' | 'y' | 'z'>;
|
|
15
|
+
/** One computation, by name, with the arguments of the synchronous function it runs. */
|
|
16
|
+
export type SpatialMathRequest = {
|
|
17
|
+
op: 'expressionField';
|
|
18
|
+
obs: SpatialMathObservations;
|
|
19
|
+
opts: ExpressionFieldOptions;
|
|
20
|
+
} | {
|
|
21
|
+
op: 'expressionVolume';
|
|
22
|
+
obs: SpatialMathObservations;
|
|
23
|
+
grid: DensityGrid;
|
|
24
|
+
opts: ExpressionVolumeOptions;
|
|
25
|
+
} | {
|
|
26
|
+
op: 'rasterizeDensity';
|
|
27
|
+
obs: SpatialMathObservations;
|
|
28
|
+
grid: DensityGrid;
|
|
29
|
+
opts: DensityOptions;
|
|
30
|
+
} | {
|
|
31
|
+
op: 'heatmapMatrix';
|
|
32
|
+
genes: readonly HeatmapGene[];
|
|
33
|
+
groups: HeatmapGroups;
|
|
34
|
+
opts: HeatmapMatrixOptions;
|
|
35
|
+
};
|
|
36
|
+
/** What each {@link SpatialMathRequest} op resolves to. */
|
|
37
|
+
export interface SpatialMathResults {
|
|
38
|
+
expressionField: ExpressionField | null;
|
|
39
|
+
expressionVolume: ExpressionVolumeField | null;
|
|
40
|
+
rasterizeDensity: Uint8Array | null;
|
|
41
|
+
heatmapMatrix: HeatmapMatrix | null;
|
|
42
|
+
}
|
|
43
|
+
/** A request on the wire: the computation plus the id its answer is matched by. */
|
|
44
|
+
export type SpatialMathMessage = SpatialMathRequest & {
|
|
45
|
+
id: number;
|
|
46
|
+
};
|
|
47
|
+
/** The worker's answer to one {@link SpatialMathMessage}. */
|
|
48
|
+
export type SpatialMathReply = {
|
|
49
|
+
id: number;
|
|
50
|
+
ok: true;
|
|
51
|
+
result: SpatialMathResults[keyof SpatialMathResults];
|
|
52
|
+
} | {
|
|
53
|
+
id: number;
|
|
54
|
+
ok: false;
|
|
55
|
+
error: string;
|
|
56
|
+
};
|
|
57
|
+
/** The coordinates of `obs`, without the per-observation strings the math never reads. */
|
|
58
|
+
export declare function slimObservations(obs: SpatialMathObservations): SpatialMathObservations;
|
|
59
|
+
/** Run one request synchronously — in the worker, or on the main thread as the fallback. */
|
|
60
|
+
export declare function runSpatialMath<R extends SpatialMathRequest>(request: R): SpatialMathResults[R['op']];
|
|
61
|
+
/**
|
|
62
|
+
* The buffers of a result, to transfer rather than copy back: the worker made them and
|
|
63
|
+
* never reads them again. Deduplicated, since a transfer list may not name one twice.
|
|
64
|
+
*/
|
|
65
|
+
export declare function resultTransferables(result: unknown): ArrayBuffer[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory for the spatial-math Web Worker, isolated in its own module so the
|
|
3
|
+
* `import.meta.url` reference — which the bundler needs in order to locate the worker —
|
|
4
|
+
* is never pulled into the ts-jest CommonJS compile of anything that uses it. Same
|
|
5
|
+
* arrangement as `spatial/tsne-worker.ts` and `region-editor/mask-worker.ts`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createSpatialMathWorker(): Worker;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { SpatialObservations } from '../contracts/spatial-dataset.contract';
|
|
2
|
+
import type { DensityGrid, DensityOptions } from '../spatial/spatial-density';
|
|
3
|
+
import type { ExpressionField, ExpressionFieldOptions, ExpressionVolumeField, ExpressionVolumeOptions } from '../spatial/spatial-expression';
|
|
4
|
+
import type { HeatmapGene, HeatmapGroups, HeatmapMatrix, HeatmapMatrixOptions } from '../spatial/spatial-heatmap';
|
|
5
|
+
import { SpatialMathRequest, SpatialMathResults } from './spatial-math-ops';
|
|
6
|
+
/**
|
|
7
|
+
* Async, off-main-thread versions of the pure spatial field and density math
|
|
8
|
+
* (`expressionField`, `expressionVolume`, `rasterizeDensity`, `heatmapMatrix`).
|
|
9
|
+
*
|
|
10
|
+
* Each call runs in `spatial-math.worker` when it is big enough to be worth posting, and
|
|
11
|
+
* on the main thread otherwise — below {@link SPATIAL_MATH_WORKER_MIN_OBSERVATIONS}, where
|
|
12
|
+
* Web Workers do not exist (jsdom, SSR), or when the worker fails to start. Same
|
|
13
|
+
* function, same answer either way; only where it runs changes.
|
|
14
|
+
*
|
|
15
|
+
* Inputs are copied to the worker, never transferred: they are the dataset's own arrays,
|
|
16
|
+
* which the caller keeps using. Results are transferred back.
|
|
17
|
+
*
|
|
18
|
+
* An `AbortSignal` (a `Supersede` task's, typically) rejects the call with an
|
|
19
|
+
* `AbortError` as soon as it fires. When that leaves the worker with nothing else to do,
|
|
20
|
+
* the worker is terminated so the abandoned computation stops using the CPU; the next
|
|
21
|
+
* call starts a fresh one.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Below this many observations (genes × observations for a heatmap) a call runs on the
|
|
25
|
+
* main thread: copying the inputs to a worker would cost about what it saves.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SPATIAL_MATH_WORKER_MIN_OBSERVATIONS = 50000;
|
|
28
|
+
/** Per-call options of the async spatial math. */
|
|
29
|
+
export interface SpatialMathCallOptions {
|
|
30
|
+
/** Abandon the call: it rejects with an `AbortError` and its result is dropped. */
|
|
31
|
+
signal?: AbortSignal;
|
|
32
|
+
/** Override {@link SPATIAL_MATH_WORKER_MIN_OBSERVATIONS} for this call (0 forces the worker). */
|
|
33
|
+
minObservations?: number;
|
|
34
|
+
}
|
|
35
|
+
/** Makes the worker; may be async, as the default one is (it imports the factory on demand). */
|
|
36
|
+
export type SpatialMathWorkerFactory = () => Worker | Promise<Worker>;
|
|
37
|
+
/**
|
|
38
|
+
* Owns one spatial-math worker and the calls in flight on it. The module-level functions
|
|
39
|
+
* share one instance; a test, or a caller that wants its own worker, makes another.
|
|
40
|
+
*/
|
|
41
|
+
export declare class SpatialMathClient {
|
|
42
|
+
private readonly factory?;
|
|
43
|
+
private worker;
|
|
44
|
+
private starting;
|
|
45
|
+
/** Set once the worker failed to start or crashed: every later call runs here. */
|
|
46
|
+
private unavailable;
|
|
47
|
+
private nextId;
|
|
48
|
+
private readonly pending;
|
|
49
|
+
/**
|
|
50
|
+
* `factory` is optional: without one the real worker module is imported on demand —
|
|
51
|
+
* dynamically, because it holds an `import.meta.url` that ts-jest's CommonJS compile
|
|
52
|
+
* rejects, so a static import would break every spec that reaches this file.
|
|
53
|
+
*/
|
|
54
|
+
constructor(factory?: SpatialMathWorkerFactory | undefined);
|
|
55
|
+
/** Run `request`, in the worker when `size` reaches the threshold and a worker can run. */
|
|
56
|
+
run<R extends SpatialMathRequest>(request: R, size: number, options?: SpatialMathCallOptions): Promise<SpatialMathResults[R['op']]>;
|
|
57
|
+
/** Terminate the worker; calls still in flight reject with an `AbortError`. */
|
|
58
|
+
dispose(): void;
|
|
59
|
+
private post;
|
|
60
|
+
private ensureWorker;
|
|
61
|
+
private startWorker;
|
|
62
|
+
private onReply;
|
|
63
|
+
/** The worker died (failed to load, or threw outside a request): answer every call here. */
|
|
64
|
+
private onCrash;
|
|
65
|
+
private stopWorker;
|
|
66
|
+
}
|
|
67
|
+
/** {@link expressionField}, off the main thread when it is big enough to matter. */
|
|
68
|
+
export declare function computeExpressionFieldAsync(obs: SpatialObservations, opts: ExpressionFieldOptions, options?: SpatialMathCallOptions): Promise<ExpressionField | null>;
|
|
69
|
+
/** {@link expressionVolume}, off the main thread when it is big enough to matter. */
|
|
70
|
+
export declare function computeExpressionVolumeAsync(obs: SpatialObservations, grid: DensityGrid, opts: ExpressionVolumeOptions, options?: SpatialMathCallOptions): Promise<ExpressionVolumeField | null>;
|
|
71
|
+
/** {@link rasterizeDensity}, off the main thread when it is big enough to matter. */
|
|
72
|
+
export declare function rasterizeDensityAsync(obs: SpatialObservations, grid: DensityGrid, opts: DensityOptions, options?: SpatialMathCallOptions): Promise<Uint8Array | null>;
|
|
73
|
+
/** {@link heatmapMatrix}, off the main thread when it is big enough to matter. */
|
|
74
|
+
export declare function computeHeatmapMatrixAsync(genes: readonly HeatmapGene[], groups: HeatmapGroups, opts?: HeatmapMatrixOptions, options?: SpatialMathCallOptions): Promise<HeatmapMatrix | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jax-data-science/sci-image-visualizer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.9.0"
|
|
6
6
|
},
|
|
@@ -37,10 +37,9 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@jax-js/jax": "^0.1.24",
|
|
41
40
|
"cellpose-js": "^0.6.0",
|
|
42
41
|
"fast-png": "^6.4.0",
|
|
43
|
-
"napari-js": "^0.
|
|
42
|
+
"napari-js": "^0.18.0",
|
|
44
43
|
"openseadragon": "^6.0.2",
|
|
45
44
|
"plotly.js-dist-min": "^3.0.1",
|
|
46
45
|
"tslib": "^2.3.0"
|
|
@@ -55,9 +54,19 @@
|
|
|
55
54
|
"file-saver": "^2.0.5",
|
|
56
55
|
"image-js": "^0.35.6",
|
|
57
56
|
"onnxruntime-web": "~1.26.0",
|
|
57
|
+
"primeflex": "^3.3.0 || ^4.0.0",
|
|
58
|
+
"primeicons": "^7.0.0",
|
|
58
59
|
"primeng": "^17.18.0",
|
|
59
60
|
"rxjs": "^7.8.0"
|
|
60
61
|
},
|
|
62
|
+
"peerDependenciesMeta": {
|
|
63
|
+
"primeflex": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"primeicons": {
|
|
67
|
+
"optional": true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
61
70
|
"overrides": {
|
|
62
71
|
"@ngtools/webpack": "17.3.17"
|
|
63
72
|
},
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
|
2
|
+
<!-- A volume (a cube) with a slab sliced off it by a scalpel: the slice editor. -->
|
|
3
|
+
<defs>
|
|
4
|
+
<mask id="slice-cut" maskUnits="userSpaceOnUse" x="-64" y="-64" width="192" height="192">
|
|
5
|
+
<rect x="-64" y="-64" width="192" height="192" fill="#fff"/>
|
|
6
|
+
<!-- The cube's lines stop short of the scalpel, so it reads at toolbar size. -->
|
|
7
|
+
<path d="M27.4 19.4 Q20.5 29.3 24.9 42.6 L34.1 21.4 Z" fill="#000" stroke="#000" stroke-width="5" stroke-linejoin="round"/>
|
|
8
|
+
<path d="M31.8 19.1 L34.2 11.0 M31.4 20.6 L31.8 19.1" stroke="#000" stroke-width="12" stroke-linecap="round"/>
|
|
9
|
+
</mask>
|
|
10
|
+
</defs>
|
|
11
|
+
<g transform="translate(4.89 -8.48) scale(1.1566)">
|
|
12
|
+
<g fill="none" stroke="#000" stroke-width="4.6" stroke-linejoin="round" stroke-linecap="round" mask="url(#slice-cut)">
|
|
13
|
+
<path d="M22.0 59.0 L30.3 54.2 L30.3 35.7 L14.3 26.4 L6.0 31.2 L6.0 49.8 Z M22.0 40.5 L22.0 59.0 M22.0 40.5 L30.3 35.7 M22.0 40.5 L6.0 31.2"/>
|
|
14
|
+
<path d="M35.5 51.2 L40.9 48.1 L40.9 29.6 L24.9 20.3 L19.4 23.5 L19.4 42.0 Z M35.5 32.7 L35.5 51.2 M35.5 32.7 L40.9 29.6 M35.5 32.7 L19.4 23.5"/>
|
|
15
|
+
<!-- The slab's cut face: the section the slice shows. -->
|
|
16
|
+
<path d="M35.5 51.2 L35.5 32.7 L19.4 23.5 L19.4 42.0 Z" fill="#000"/>
|
|
17
|
+
</g>
|
|
18
|
+
<path d="M27.4 19.4 Q20.5 29.3 24.9 42.6 L34.1 21.4 Z" fill="#000"/>
|
|
19
|
+
<path d="M31.8 19.1 L34.2 11.0" stroke="#000" stroke-width="7.5" stroke-linecap="round"/>
|
|
20
|
+
<path d="M31.4 20.6 L31.8 19.1" stroke="#000" stroke-width="3.5" stroke-linecap="round"/>
|
|
21
|
+
</g>
|
|
22
|
+
</svg>
|
|
23
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
|
|
3
|
+
// The visualizer's toolbar / context-menu icon classes, as a mixin so the same rules can
|
|
4
|
+
// be emitted from two places with the right asset path for each:
|
|
5
|
+
// - `viz-icons.scss`, the stylesheet the package ships for hosts (global styles);
|
|
6
|
+
// - the visualizer component, inside `::ng-deep`, so nothing changes for a host that
|
|
7
|
+
// does not include the shipped stylesheet.
|
|
8
|
+
// They must be global either way: the context menu and the toolbar overlays are appended
|
|
9
|
+
// to <body>, outside the component's view.
|
|
10
|
+
|
|
11
|
+
$icons: (
|
|
12
|
+
'zoom-box-off-icon': 'zoom-box',
|
|
13
|
+
'wand-icon': 'wand',
|
|
14
|
+
'brush-icon': 'paintbrush',
|
|
15
|
+
'polyline-icon': 'polyline',
|
|
16
|
+
'polygon-vertices-icon': 'polygon-vertices',
|
|
17
|
+
'vertex-add-icon': 'vertex-add',
|
|
18
|
+
'vertex-delete-icon': 'vertex-delete',
|
|
19
|
+
'region-move-icon': 'region-move',
|
|
20
|
+
'to-bezier-icon': 'to-bezier',
|
|
21
|
+
'to-polygon-icon': 'to-polygon',
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
// Icons inverted to white on the highlighted (active) context-menu entry.
|
|
25
|
+
$context-menu-icons: (
|
|
26
|
+
'zoom-box-off-icon',
|
|
27
|
+
'wand-icon',
|
|
28
|
+
'polyline-icon',
|
|
29
|
+
'polygon-vertices-icon',
|
|
30
|
+
'vertex-add-icon',
|
|
31
|
+
'vertex-delete-icon',
|
|
32
|
+
'region-move-icon',
|
|
33
|
+
'to-bezier-icon',
|
|
34
|
+
'to-polygon-icon'
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
/// Emit the icon and active-context-menu rules. `$assets` is the path, relative to the
|
|
38
|
+
/// stylesheet being compiled, of the package's `src/lib/assets` folder.
|
|
39
|
+
@mixin rules($assets) {
|
|
40
|
+
.context-menu-active > .p-menuitem-content {
|
|
41
|
+
background-color: var(--primary-color) !important;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.context-menu-active > .p-menuitem-content .p-menuitem-icon,
|
|
45
|
+
.context-menu-active > .p-menuitem-content .p-menuitem-text {
|
|
46
|
+
color: #ffffff !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$active: ();
|
|
50
|
+
@each $class in $context-menu-icons {
|
|
51
|
+
$active: list.append($active, '.context-menu-active > .p-menuitem-content .#{$class}', $separator: comma);
|
|
52
|
+
}
|
|
53
|
+
#{$active} {
|
|
54
|
+
filter: brightness(0) invert(1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@each $class, $file in $icons {
|
|
58
|
+
.#{$class} {
|
|
59
|
+
background: url('#{$assets}/#{$file}.svg') no-repeat center center;
|
|
60
|
+
background-size: contain;
|
|
61
|
+
width: 1.25rem;
|
|
62
|
+
height: 1.25rem;
|
|
63
|
+
display: inline-block;
|
|
64
|
+
filter: brightness(0)
|
|
65
|
+
invert(47%)
|
|
66
|
+
sepia(98%)
|
|
67
|
+
saturate(567%)
|
|
68
|
+
hue-rotate(181deg)
|
|
69
|
+
brightness(103%)
|
|
70
|
+
contrast(98%);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Global icon rules of the visualizer's toolbar and context menu, shipped for hosts.
|
|
2
|
+
//
|
|
3
|
+
// The visualizer component also emits these when it loads, so including this file is
|
|
4
|
+
// optional. Include it to have the classes defined before any visualizer has loaded (a
|
|
5
|
+
// host toolbar or menu that reuses them), and independent of stylesheet load order. In
|
|
6
|
+
// angular.json:
|
|
7
|
+
//
|
|
8
|
+
// "styles": ["node_modules/@jax-data-science/sci-image-visualizer/src/lib/styles/viz-icons.scss"]
|
|
9
|
+
//
|
|
10
|
+
// The icon URLs are relative to this file (`../assets/*.svg`, the package's assets folder),
|
|
11
|
+
// which the Angular CLI resolves and bundles.
|
|
12
|
+
@use 'viz-icons-rules';
|
|
13
|
+
|
|
14
|
+
@include viz-icons-rules.rules('../assets');
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DOM text labels for the napari-js 3D axes gizmo (jit-ui#102). The {@link AxesLayer} draws the
|
|
3
|
-
* axis lines/ticks/box in WebGPU; this overlay adds the crisp X/Y/Z + scale text on top, projected
|
|
4
|
-
* with the 3D camera's view-projection so each label tracks its anchor as the volume orbits.
|
|
5
|
-
* Mirrors the {@link NapariScaleBar} overlay pattern (absolute-positioned over the host, updated on
|
|
6
|
-
* every `camera3d.changed`). Falls back to pixel/slice counts when no physical µm/pixel is known.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Re-exported from napari-js, which owns the projection now.
|
|
10
|
-
*
|
|
11
|
-
* This used to be a local copy: the same column-major multiply, perspective divide and y-flip
|
|
12
|
-
* that {@link NapariVisualizerService.getSpatialScreenProjection} ALSO carried, written twice
|
|
13
|
-
* with two different behind-the-eye conventions. The renderer owns the camera and the clip
|
|
14
|
-
* convention, so it owns the projection; kept as a named export here only so the overlays that
|
|
15
|
-
* import it from this module do not all have to change.
|
|
16
|
-
*/
|
|
17
|
-
import { projectPoint } from 'napari-js';
|
|
18
|
-
export { projectPoint };
|
|
19
|
-
export class NapariAxesLabels {
|
|
20
|
-
constructor(host, camera3d, labels) {
|
|
21
|
-
this.host = host;
|
|
22
|
-
this.camera3d = camera3d;
|
|
23
|
-
this.labels = labels;
|
|
24
|
-
this.els = [];
|
|
25
|
-
this.visible = true;
|
|
26
|
-
if (getComputedStyle(host).position === 'static')
|
|
27
|
-
host.style.position = 'relative';
|
|
28
|
-
for (const spec of labels) {
|
|
29
|
-
const el = document.createElement('span');
|
|
30
|
-
Object.assign(el.style, {
|
|
31
|
-
position: 'absolute',
|
|
32
|
-
zIndex: '30',
|
|
33
|
-
pointerEvents: 'none',
|
|
34
|
-
font: '11px sans-serif',
|
|
35
|
-
fontWeight: '600',
|
|
36
|
-
color: spec.color,
|
|
37
|
-
textShadow: '0 0 3px #000, 0 0 3px #000',
|
|
38
|
-
whiteSpace: 'nowrap',
|
|
39
|
-
transform: 'translate(-50%, -50%)',
|
|
40
|
-
userSelect: 'none',
|
|
41
|
-
});
|
|
42
|
-
el.textContent = spec.text;
|
|
43
|
-
this.host.appendChild(el);
|
|
44
|
-
this.els.push(el);
|
|
45
|
-
}
|
|
46
|
-
this.disconnectCamera = this.camera3d.changed.connect(() => this.update());
|
|
47
|
-
if (typeof ResizeObserver !== 'undefined') {
|
|
48
|
-
this.resizeObserver = new ResizeObserver(() => this.update());
|
|
49
|
-
this.resizeObserver.observe(this.host);
|
|
50
|
-
}
|
|
51
|
-
this.update();
|
|
52
|
-
}
|
|
53
|
-
setVisible(visible) {
|
|
54
|
-
this.visible = visible;
|
|
55
|
-
this.update();
|
|
56
|
-
}
|
|
57
|
-
/** Replace the label anchors/text in place (same count) and reproject — lets a host move the
|
|
58
|
-
* labels when the box geometry changes live (e.g. a Z-height gizmo restretching the volume)
|
|
59
|
-
* without tearing down and recreating the DOM elements (which would flicker). */
|
|
60
|
-
updateAnchors(labels) {
|
|
61
|
-
for (let i = 0; i < this.labels.length && i < labels.length; i++) {
|
|
62
|
-
this.labels[i] = labels[i];
|
|
63
|
-
if (labels[i].text !== this.els[i].textContent)
|
|
64
|
-
this.els[i].textContent = labels[i].text;
|
|
65
|
-
}
|
|
66
|
-
this.update();
|
|
67
|
-
}
|
|
68
|
-
update() {
|
|
69
|
-
const vw = this.host.clientWidth;
|
|
70
|
-
const vh = this.host.clientHeight;
|
|
71
|
-
if (!this.visible || vw <= 0 || vh <= 0) {
|
|
72
|
-
for (const el of this.els)
|
|
73
|
-
el.style.display = 'none';
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
const mvp = this.camera3d.viewProjection(vw, vh);
|
|
77
|
-
this.labels.forEach((spec, i) => {
|
|
78
|
-
const el = this.els[i];
|
|
79
|
-
const s = projectPoint(mvp, spec.anchor, vw, vh);
|
|
80
|
-
if (!s.visible) {
|
|
81
|
-
el.style.display = 'none';
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
el.style.display = '';
|
|
85
|
-
el.style.left = `${s.x}px`;
|
|
86
|
-
el.style.top = `${s.y}px`;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
destroy() {
|
|
90
|
-
this.disconnectCamera();
|
|
91
|
-
this.resizeObserver?.disconnect();
|
|
92
|
-
for (const el of this.els)
|
|
93
|
-
el.parentNode?.removeChild(el);
|
|
94
|
-
this.els.length = 0;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmFwYXJpLWF4ZXMtbGFiZWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9pbXBsZW1lbnRhdGlvbnMvbmFwYXJpLWpzL25hcGFyaS1heGVzLWxhYmVscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFnQkg7Ozs7Ozs7O0dBUUc7QUFDSCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU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