@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
package/lib/spatial-controls/spatial-transcripts-panel/spatial-transcripts-panel.component.d.ts
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, NgZone, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import type { ISpatialControls } from '../../contracts/visualizer.contract';
|
|
3
|
+
import type { SpatialDataset } from '../../contracts/spatial-dataset.contract';
|
|
4
|
+
import { ColormapNode, SpatialViewState, TranscriptGlyphName } from '../../contracts/display-types';
|
|
5
|
+
import { PanelOption } from '../../spatial/spatial-panel-model';
|
|
6
|
+
import type { GenePickerModel } from '../spatial-gene-picker';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/** One item of the gene list's '⋮' menu. */
|
|
9
|
+
export interface GeneMenuItem {
|
|
10
|
+
label: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
command: () => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The Transcripts section, as Xenium Explorer's: the on/off switch, the transcript genes
|
|
17
|
+
* (with "All genes", the '⋮' menu and gene-group import), the
|
|
18
|
+
* {@link SpatialMarkerGenesFormComponent marker-genes form}, the
|
|
19
|
+
* {@link SpatialGeneTreeComponent gene tree}, how transcripts are drawn — the points
|
|
20
|
+
* estimate against its budget, colouring, icon, size, opacity and quality — and the
|
|
21
|
+
* density map's opacity, bin size, threshold window and colormap.
|
|
22
|
+
*
|
|
23
|
+
* Writes only through `controls.setViewState`.
|
|
24
|
+
*/
|
|
25
|
+
export declare class SpatialTranscriptsPanelComponent implements OnChanges {
|
|
26
|
+
private readonly zone;
|
|
27
|
+
private readonly cdr;
|
|
28
|
+
/** The spatial controls this panel reads and writes through; null without a `SPATIAL_DATA_PORT`. */
|
|
29
|
+
controls: ISpatialControls | null;
|
|
30
|
+
/** The dataset on offer, or null. */
|
|
31
|
+
dataset: SpatialDataset | null;
|
|
32
|
+
/** The current spatial view state: what is drawn, and how. */
|
|
33
|
+
view: SpatialViewState;
|
|
34
|
+
/** The gene list the transcript genes are picked from, shared with the other gene dropdowns. */
|
|
35
|
+
genes: GenePickerModel | null;
|
|
36
|
+
/** Estimated transcripts in view, against the budget — Explorer's points bar. */
|
|
37
|
+
estimate: {
|
|
38
|
+
points: number;
|
|
39
|
+
max: number;
|
|
40
|
+
} | null;
|
|
41
|
+
/** The density window in use and its densest bin, for the threshold control. */
|
|
42
|
+
densityStats: {
|
|
43
|
+
lo: number;
|
|
44
|
+
hi: number;
|
|
45
|
+
max: number;
|
|
46
|
+
} | null;
|
|
47
|
+
/** Transcripts of each selected gene in the current view, from the renderer. */
|
|
48
|
+
geneCounts: Record<string, number> | null;
|
|
49
|
+
/** Colormap tree for the density map's colouring. */
|
|
50
|
+
colormapOptions: ColormapNode[];
|
|
51
|
+
/** Whether the section is expanded. */
|
|
52
|
+
open: boolean;
|
|
53
|
+
/** Asks to open or close it; two-way with `open`. */
|
|
54
|
+
readonly openChange: EventEmitter<boolean>;
|
|
55
|
+
/** Virtual-scrolled only past this many options (see the cells panel's gene dropdown). */
|
|
56
|
+
protected readonly geneVirtualScrollFrom = 200;
|
|
57
|
+
protected readonly transcriptColorOptions: PanelOption<SpatialViewState['transcriptColorBy']>[];
|
|
58
|
+
protected readonly glyphOptions: import("../../spatial/spatial-panel-model").GlyphOption[];
|
|
59
|
+
protected readonly budgetOptions: {
|
|
60
|
+
label: string;
|
|
61
|
+
value: number;
|
|
62
|
+
}[];
|
|
63
|
+
protected readonly densityBins: number[];
|
|
64
|
+
/**
|
|
65
|
+
* Transcript modes on offer. Built once per dataset rather than in a getter: a getter
|
|
66
|
+
* returns a fresh array on every change-detection pass, and PrimeNG re-renders its
|
|
67
|
+
* buttons whenever the array identity changes — which made them impossible to click.
|
|
68
|
+
*/
|
|
69
|
+
protected transcriptModeOptions: PanelOption<SpatialViewState['transcriptMode']>[];
|
|
70
|
+
/** The '⋮' menu, rebuilt when what enables its items changes. */
|
|
71
|
+
protected geneMenu: GeneMenuItem[];
|
|
72
|
+
protected editingMax: boolean;
|
|
73
|
+
/** Whether the marker-genes form is shown. */
|
|
74
|
+
protected markersOpen: boolean;
|
|
75
|
+
protected geneGroupError: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* The threshold window shown: the one set, else the one derived. A stored array, not a
|
|
78
|
+
* getter: a range slider's `ngModel` given a fresh array every change-detection pass
|
|
79
|
+
* schedules another pass, forever — which hung the page the moment the density
|
|
80
|
+
* controls appeared.
|
|
81
|
+
*/
|
|
82
|
+
protected densityWindow: [number, number];
|
|
83
|
+
protected densitySliderMax: number;
|
|
84
|
+
protected densityStep: number;
|
|
85
|
+
protected selectedDensityColormapNode: ColormapNode | null;
|
|
86
|
+
/** Built once per density colormap: a 256-entry LUT per change-detection pass is waste. */
|
|
87
|
+
protected densityColorBarCss: string;
|
|
88
|
+
private densityBarFor;
|
|
89
|
+
/** The mode the section header's switch turns back on. */
|
|
90
|
+
private lastTranscriptMode;
|
|
91
|
+
/** Whether any column can supply marker genes' clusters. */
|
|
92
|
+
private hasMarkerColumns;
|
|
93
|
+
/** The hidden file input the menu's import opens. */
|
|
94
|
+
private geneGroupFileRef?;
|
|
95
|
+
constructor(zone: NgZone, cdr: ChangeDetectorRef);
|
|
96
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
97
|
+
protected onTranscriptsOn(on: boolean): void;
|
|
98
|
+
protected onTranscriptMode(mode: SpatialViewState['transcriptMode']): void;
|
|
99
|
+
protected onTranscriptGenes(genes: string[] | null): void;
|
|
100
|
+
/** Real genes in the panel — the tree's denominator. */
|
|
101
|
+
protected get geneTotal(): number;
|
|
102
|
+
/** "All genes" needs the grouping pyramid, or at least tiles to draw individually. */
|
|
103
|
+
protected get canShowAllGenes(): boolean;
|
|
104
|
+
/** Why "All genes" is not offered yet, while the server builds its pyramid. */
|
|
105
|
+
protected get allGenesPreparing(): string | null;
|
|
106
|
+
protected get showingAllGenes(): boolean;
|
|
107
|
+
onTranscriptAllGenes(on: boolean): void;
|
|
108
|
+
/** '±': every gene, or back to the chosen list. */
|
|
109
|
+
protected onToggleAllGenes(): void;
|
|
110
|
+
get canAddMarkers(): boolean;
|
|
111
|
+
/** Open the marker-genes form (from the '⋮' menu). */
|
|
112
|
+
openMarkers(): void;
|
|
113
|
+
onNewGeneGroup(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Import gene groups: CSV/TSV with a group and a gene column (header optional), e.g.
|
|
116
|
+
* marker genes per cell type. The genes are added to the selection.
|
|
117
|
+
*/
|
|
118
|
+
protected onImportGeneGroups(input: HTMLInputElement): Promise<void>;
|
|
119
|
+
protected get estimatePercent(): number;
|
|
120
|
+
protected get estimateOverMax(): boolean;
|
|
121
|
+
protected onTranscriptBudget(n: number): void;
|
|
122
|
+
protected onTranscriptColorBy(by: SpatialViewState['transcriptColorBy']): void;
|
|
123
|
+
protected onTranscriptScale(value: number | undefined): void;
|
|
124
|
+
protected onTranscriptOpacity(value: number | undefined): void;
|
|
125
|
+
protected onTranscriptQuality(includeLow: boolean): void;
|
|
126
|
+
protected glyphOf(gene: string, slot: number): TranscriptGlyphName;
|
|
127
|
+
protected onGlyph(gene: string, glyph: TranscriptGlyphName): void;
|
|
128
|
+
protected get densityOpacityPercent(): number;
|
|
129
|
+
protected onDensityOpacity(value: number | undefined): void;
|
|
130
|
+
protected onDensityOpacityPercent(v: number | null): void;
|
|
131
|
+
protected get densityBinIndex(): number;
|
|
132
|
+
protected onDensityBinIndex(i: number | undefined): void;
|
|
133
|
+
protected onDensityRange(range: [number, number] | number[] | undefined): void;
|
|
134
|
+
protected onDensityRangeEnd(which: 0 | 1, v: number | null): void;
|
|
135
|
+
protected onDensityAuto(): void;
|
|
136
|
+
protected onDensityColormap(node: ColormapNode | null): void;
|
|
137
|
+
private refreshDensityWindow;
|
|
138
|
+
/** '⋮' menu. */
|
|
139
|
+
private buildGeneMenu;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpatialTranscriptsPanelComponent, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpatialTranscriptsPanelComponent, "spatial-transcripts-panel", never, { "controls": { "alias": "controls"; "required": false; }; "dataset": { "alias": "dataset"; "required": false; }; "view": { "alias": "view"; "required": false; }; "genes": { "alias": "genes"; "required": false; }; "estimate": { "alias": "estimate"; "required": false; }; "densityStats": { "alias": "densityStats"; "required": false; }; "geneCounts": { "alias": "geneCounts"; "required": false; }; "colormapOptions": { "alias": "colormapOptions"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "openChange": "openChange"; }, never, never, true, never>;
|
|
142
|
+
}
|
|
@@ -8,12 +8,20 @@
|
|
|
8
8
|
* so the same unknown class always gets the same colour with no stored state.
|
|
9
9
|
*
|
|
10
10
|
* These functions are pure (no mutation); opt-in promotion of unknown classes into the
|
|
11
|
-
* set is
|
|
11
|
+
* set is reported to the caller (see {@link applyPresetColors}), which owns persistence.
|
|
12
12
|
*/
|
|
13
13
|
import { ClassPreset, PresetSet } from '../models/class-preset';
|
|
14
|
+
import { Region } from '../models/region';
|
|
14
15
|
export declare function normalizeLabel(s: string): string;
|
|
15
16
|
/** Stable, non-negative 32-bit string hash (identical across runs and machines). */
|
|
16
17
|
export declare function hashString(s: string): number;
|
|
18
|
+
/**
|
|
19
|
+
* The key two class names are compared by under the set's match mode: the name
|
|
20
|
+
* itself for `exact`, trimmed and lower-cased for `normalized`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function presetKey(set: Pick<PresetSet, 'matchMode'>, label: string): string;
|
|
23
|
+
/** `#RRGGBB` (upper-case) for an HSL colour: hue in degrees, saturation and lightness in %. */
|
|
24
|
+
export declare function hslToHex(hDeg: number, sPct: number, lPct: number): string;
|
|
17
25
|
/** Find the preset matching `label` under the set's match mode. */
|
|
18
26
|
export declare function findPreset(label: string, set: PresetSet): ClassPreset | undefined;
|
|
19
27
|
/**
|
|
@@ -22,5 +30,34 @@ export declare function findPreset(label: string, set: PresetSet): ClassPreset |
|
|
|
22
30
|
* HSL hue. Same name -> same colour, every run.
|
|
23
31
|
*/
|
|
24
32
|
export declare function fallbackColorFor(label: string, palette: string[]): string;
|
|
25
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a colour for `label`: a matching preset's colour, else the colour an imported file
|
|
35
|
+
* gave the class, else the deterministic fallback.
|
|
36
|
+
*/
|
|
26
37
|
export declare function colorForLabel(label: string, set: PresetSet): string;
|
|
38
|
+
/** Options for {@link applyPresetColors}. */
|
|
39
|
+
export interface ApplyPresetColorsOptions {
|
|
40
|
+
/**
|
|
41
|
+
* True for a region the caller owns outright (fresh, not yet stored, so in no
|
|
42
|
+
* undo snapshot): its colour is set in place. Every other region whose
|
|
43
|
+
* colour changes is copied. Default: never in place.
|
|
44
|
+
*/
|
|
45
|
+
inPlace?: (r: Region) => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Called once per unknown class when `set.autoPromote` is on, with the
|
|
48
|
+
* preset to add (name trimmed in `normalized` match mode, `source: 'auto'`).
|
|
49
|
+
*/
|
|
50
|
+
onPromote?: (preset: ClassPreset) => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve each labelled region's colour from the preset set (jit-ui#70). The
|
|
54
|
+
* presets are the source of truth: a matching preset gives the class colour,
|
|
55
|
+
* an unknown class the colour an imported file gave it (`importedColors`) or else
|
|
56
|
+
* its deterministic fallback, **overriding any colour already on the region**. Unlabelled regions and
|
|
57
|
+
* ones the user recoloured (`colorOverridden`) are left untouched. Unknown
|
|
58
|
+
* classes are reported through `onPromote` when `autoPromote` is on.
|
|
59
|
+
*
|
|
60
|
+
* Returns a new array; regions whose colour is already right are the same
|
|
61
|
+
* instances.
|
|
62
|
+
*/
|
|
63
|
+
export declare function applyPresetColors(regions: Region[], set: PresetSet, opts?: ApplyPresetColorsOptions): Region[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Region } from '../models/region';
|
|
2
|
+
/**
|
|
3
|
+
* A fingerprint of each class's regions (by label): their ids and geometry folded into one number
|
|
4
|
+
* per class. Two sets give the same fingerprint for a class when its regions did not change, so
|
|
5
|
+
* comparing a slice's fingerprints before and after an edit names the classes the edit touched
|
|
6
|
+
* (a recoloured or relabelled region touches its old class and its new one). Profile lines and
|
|
7
|
+
* unlabelled regions are left out: they are in no class.
|
|
8
|
+
*/
|
|
9
|
+
export declare function classSignatures(regions: readonly Region[]): Map<string, number>;
|
|
10
|
+
/** The classes whose fingerprints differ between `before` and `after` (added and removed included). */
|
|
11
|
+
export declare function changedClasses(before: ReadonlyMap<string, number>, after: ReadonlyMap<string, number>): Set<string>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Bounded undo/redo history of immutable snapshots (review RT-13, RegionStore
|
|
4
|
+
* split "RegionHistory").
|
|
5
|
+
*
|
|
6
|
+
* Holds snapshots by reference. That is only sound because the store never
|
|
7
|
+
* changes a snapshot after recording it — `RegionStore` is copy-on-write: each
|
|
8
|
+
* edit replaces the edited region (and the array) rather than mutating them —
|
|
9
|
+
* so a snapshot costs one array of pointers, not a deep clone of every vertex.
|
|
10
|
+
*
|
|
11
|
+
* Recording: call {@link record} with the state just BEFORE a change. Commits
|
|
12
|
+
* coalesce into one step:
|
|
13
|
+
* - between {@link beginGesture} and {@link endGesture} every commit folds into
|
|
14
|
+
* the step its first commit opened, however long the pauses, and a gesture
|
|
15
|
+
* never merges with a commit before or after it (RT-12);
|
|
16
|
+
* - outside a gesture, each commit within `coalesceMs` of the previous one
|
|
17
|
+
* folds into the same step.
|
|
18
|
+
* A fresh step drops the redo future. Up to `limit` steps are kept each way.
|
|
19
|
+
*/
|
|
20
|
+
export declare class RegionHistory<T> {
|
|
21
|
+
private readonly limit;
|
|
22
|
+
private readonly coalesceMs;
|
|
23
|
+
private undoStack;
|
|
24
|
+
private redoStack;
|
|
25
|
+
/** True while a coalescing burst is open (further commits fold into it). */
|
|
26
|
+
private burstOpen;
|
|
27
|
+
/** Open gestures (nested begin/end); while > 0 the burst stays open with no timer. */
|
|
28
|
+
private gestureDepth;
|
|
29
|
+
private burstTimer;
|
|
30
|
+
/** True while a snapshot is being restored, so the restore records nothing. */
|
|
31
|
+
private restoring;
|
|
32
|
+
private readonly canUndoSubject;
|
|
33
|
+
private readonly canRedoSubject;
|
|
34
|
+
constructor(limit?: number, coalesceMs?: number);
|
|
35
|
+
/** Whether an undo step is available (drives the toolbar's Undo button). */
|
|
36
|
+
readonly canUndo$: Observable<boolean>;
|
|
37
|
+
/** Whether a redo step is available. */
|
|
38
|
+
readonly canRedo$: Observable<boolean>;
|
|
39
|
+
canUndo(): boolean;
|
|
40
|
+
canRedo(): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Record `before` — the state just before a change — unless the change
|
|
43
|
+
* folds into the step already open, or a restore is in progress.
|
|
44
|
+
*/
|
|
45
|
+
record(before: T): void;
|
|
46
|
+
/**
|
|
47
|
+
* Step back: returns the state to restore (and keeps `current` for redo), or
|
|
48
|
+
* undefined when there is nothing to undo. Restore it inside {@link restore}.
|
|
49
|
+
*/
|
|
50
|
+
undo(current: T): T | undefined;
|
|
51
|
+
/** Step forward again: the mirror of {@link undo}. */
|
|
52
|
+
redo(current: T): T | undefined;
|
|
53
|
+
/** Run `fn` (applying an undo/redo snapshot) without recording anything it triggers. */
|
|
54
|
+
restore(fn: () => void): void;
|
|
55
|
+
/** Forget every step (an image load/switch: history never crosses images). */
|
|
56
|
+
reset(): void;
|
|
57
|
+
/** Start one user gesture: every commit until the matching {@link endGesture} is one step. Nests. */
|
|
58
|
+
beginGesture(): void;
|
|
59
|
+
/** End the gesture opened by {@link beginGesture}; the next commit starts a new step. */
|
|
60
|
+
endGesture(): void;
|
|
61
|
+
private push;
|
|
62
|
+
/** (Re)arm the idle timer that closes the current coalescing burst. */
|
|
63
|
+
private armBurst;
|
|
64
|
+
private closeBurst;
|
|
65
|
+
private emit;
|
|
66
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { IImageInfo } from '../contracts/image.contract';
|
|
2
|
+
import { Region } from '../models/region';
|
|
3
|
+
/** How a stack's regions round-trip to disk (jit-ui#93): `combined` writes one
|
|
4
|
+
* z-indexed geojson (single-file z-stack, QuPath schema); `per-slice-file`
|
|
5
|
+
* writes one geojson per slice-file (a folder of numbered images). */
|
|
6
|
+
export type StackSaveLayout = 'combined' | 'per-slice-file';
|
|
7
|
+
/**
|
|
8
|
+
* Where the region store's *live* set comes from and goes back to: a per-image
|
|
9
|
+
* cache (keyed by the image's first URL, else its file name) and, while a
|
|
10
|
+
* z-stack is loaded, a per-slice map for the current image (jit-ui#93).
|
|
11
|
+
*
|
|
12
|
+
* The owner holds the live array; every method that can change scope takes
|
|
13
|
+
* the current live array (to capture its edits) and returns the incoming
|
|
14
|
+
* live set, or null when nothing changes. It never changes a region: slice
|
|
15
|
+
* tags are applied to copies ({@link withRegionZ}).
|
|
16
|
+
*/
|
|
17
|
+
export declare class RegionScopeCache {
|
|
18
|
+
private byImage;
|
|
19
|
+
private imageKey;
|
|
20
|
+
private bySlice;
|
|
21
|
+
private stack;
|
|
22
|
+
private sliceZ;
|
|
23
|
+
private layout;
|
|
24
|
+
/** Slices loaded with regions: a per-slice-file save re-writes them even when
|
|
25
|
+
* now empty, so clearing a slice and saving removes its geojson. */
|
|
26
|
+
private initialNonEmpty;
|
|
27
|
+
/** The cache key for an image: its first URL, else its file name. */
|
|
28
|
+
static imageKey(imageInfo: IImageInfo | undefined): string | undefined;
|
|
29
|
+
/** The active image's cache key (see {@link imageKey}). */
|
|
30
|
+
get activeImage(): string | undefined;
|
|
31
|
+
/** True while a z-stack is loaded and regions are held per slice. */
|
|
32
|
+
get stackMode(): boolean;
|
|
33
|
+
/** The current display slice (zero-based; 0 outside stack mode unless set). */
|
|
34
|
+
get displaySlice(): number;
|
|
35
|
+
/** How the current stack persists; meaningless outside stack mode. */
|
|
36
|
+
get saveLayout(): StackSaveLayout;
|
|
37
|
+
/** Record `live` as the current image's regions. */
|
|
38
|
+
sync(live: Region[]): void;
|
|
39
|
+
/**
|
|
40
|
+
* Make `key` the active image: ends stack mode, caches `live` under the
|
|
41
|
+
* outgoing image, and returns the incoming image's regions (or []). Null when
|
|
42
|
+
* `key` already is the active image (repeated replots keep their regions).
|
|
43
|
+
*/
|
|
44
|
+
switchImage(key: string | undefined, live: Region[]): Region[] | null;
|
|
45
|
+
/**
|
|
46
|
+
* Enter per-slice mode with `slices` (already admitted by the store, each
|
|
47
|
+
* region tagged with its slice) and return `initialZ`'s slice as the live set.
|
|
48
|
+
*/
|
|
49
|
+
enterStack(slices: Map<number, Region[]>, initialZ: number, layout: StackSaveLayout): Region[];
|
|
50
|
+
/** Leave stack mode; a no-op outside it. */
|
|
51
|
+
exitStack(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Show slice `z`: capture `live` into the current slice and return slice
|
|
54
|
+
* `z`'s regions. Null when nothing swaps — the same slice, or outside stack
|
|
55
|
+
* mode (where the index is only recorded).
|
|
56
|
+
*/
|
|
57
|
+
showSlice(z: number, live: Region[]): Region[] | null;
|
|
58
|
+
/** Every slice's regions (current one from `live`), each tagged with its z,
|
|
59
|
+
* in slice order; `live` itself outside stack mode. */
|
|
60
|
+
sliceRegions(live: Region[]): Region[];
|
|
61
|
+
/** Slices to write on a per-slice-file save: every slice with regions plus
|
|
62
|
+
* every slice loaded non-empty (re-written empty when cleared). Empty
|
|
63
|
+
* outside stack mode. */
|
|
64
|
+
stackSaveSlices(live: Region[]): Map<number, Region[]>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/** The part of a region the selection reads: its stable id. */
|
|
3
|
+
interface HasId {
|
|
4
|
+
id: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Region selection, held by region *id* (stable across edits, reorders and
|
|
8
|
+
* delete/add cycles) and projected to array indices for the IRegionStore
|
|
9
|
+
* boundary. Changing the ids ({@link replace}, {@link retain}) is silent; the
|
|
10
|
+
* owner calls {@link sync} once the region array it projects onto is final,
|
|
11
|
+
* which prunes ids that no longer exist and emits {@link indices$} only when
|
|
12
|
+
* the index set changed.
|
|
13
|
+
*/
|
|
14
|
+
export declare class RegionSelection {
|
|
15
|
+
private selected;
|
|
16
|
+
private readonly indicesSubject;
|
|
17
|
+
/** The selected regions' current array indices (emits on change only). */
|
|
18
|
+
readonly indices$: Observable<number[]>;
|
|
19
|
+
/** The selected indices as last projected by {@link sync}. */
|
|
20
|
+
get indices(): number[];
|
|
21
|
+
/** The selected ids, in selection order. */
|
|
22
|
+
get ids(): readonly number[];
|
|
23
|
+
/** Replace the selected ids (no emit until {@link sync}). */
|
|
24
|
+
replace(ids: number[]): void;
|
|
25
|
+
/** Keep only the ids `keep` accepts (no emit until {@link sync}). */
|
|
26
|
+
retain(keep: (id: number) => boolean): void;
|
|
27
|
+
/**
|
|
28
|
+
* Select by array index into `regions`: invalid and duplicate indices are
|
|
29
|
+
* dropped, the given order is kept. Projects and emits.
|
|
30
|
+
*/
|
|
31
|
+
selectIndices(indices: number[], regions: readonly HasId[]): void;
|
|
32
|
+
/** Project the selected ids onto `regions`, pruning ids it no longer holds,
|
|
33
|
+
* and emit if the index set changed. */
|
|
34
|
+
sync(regions: readonly HasId[]): void;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { RegionSource } from '../region-source/region-source';
|
|
2
|
+
/** Opens a region source on demand (and again after it was closed to save memory). */
|
|
3
|
+
export type RegionSourceOpener = () => Promise<RegionSource>;
|
|
4
|
+
/** Which slices a source serves: one slice (plane `plane` of the source), or every slice z
|
|
5
|
+
* from the source's plane z (a z-indexed GeoJSON over a whole stack). */
|
|
6
|
+
export type RegionSourceSlices = {
|
|
7
|
+
slice: number;
|
|
8
|
+
plane?: number;
|
|
9
|
+
} | 'planes';
|
|
10
|
+
/** The region source behind one slice: the source and which of its planes the slice shows. */
|
|
11
|
+
export interface RegionSourceBinding {
|
|
12
|
+
source: RegionSource;
|
|
13
|
+
plane: number;
|
|
14
|
+
}
|
|
15
|
+
/** Sources held open, past which the least recently used one is closed (never the one shown). */
|
|
16
|
+
export declare const OPEN_REGION_SOURCES = 6;
|
|
17
|
+
/**
|
|
18
|
+
* The region sources of every image the store has seen, per slice, and per slice the ids of
|
|
19
|
+
* the source features taken out of the source (into the working set, or deleted) — those the
|
|
20
|
+
* source no longer draws and an export leaves out.
|
|
21
|
+
*
|
|
22
|
+
* Sources open lazily, the first time their slice is shown or read, and at most
|
|
23
|
+
* {@link OPEN_REGION_SOURCES} stay open: the least recently used are closed and re-opened from
|
|
24
|
+
* their opener when used again (a source's ids are stable, so what was taken stays taken). The
|
|
25
|
+
* source of the slice on screen ({@link show}) is never closed for another: a read across every
|
|
26
|
+
* slice must not close the source the viewer draws and takes from.
|
|
27
|
+
*/
|
|
28
|
+
export declare class RegionSourceScope {
|
|
29
|
+
private readonly images;
|
|
30
|
+
/** Open entries, least recently used first. */
|
|
31
|
+
private readonly openOrder;
|
|
32
|
+
/** The entry of the slice on screen: kept open. */
|
|
33
|
+
private shown;
|
|
34
|
+
/** Attach `open` to `image` for `slices`, replacing (and closing) what was there. */
|
|
35
|
+
attach(image: string, open: RegionSourceOpener, slices: RegionSourceSlices): void;
|
|
36
|
+
/** Drop every source of `image` (closing the open ones) and what was taken from them. */
|
|
37
|
+
detachImage(image: string): void;
|
|
38
|
+
/** Drop the source of one slice of `image`. */
|
|
39
|
+
detachSlice(image: string, slice: number): void;
|
|
40
|
+
/** The slice on screen (null: none): its source stays open while others are read. */
|
|
41
|
+
show(image: string | undefined, slice: number | null): void;
|
|
42
|
+
/** Whether `image` has a source for `slice`. */
|
|
43
|
+
has(image: string | undefined, slice: number): boolean;
|
|
44
|
+
/** Whether `slice` of `image` has a source of its own (not a `'planes'` source's plane). */
|
|
45
|
+
hasOwnSource(image: string | undefined, slice: number): boolean;
|
|
46
|
+
/** Every slice of `image` with a source of its own (not counting a `'planes'` source). */
|
|
47
|
+
slicesWithSource(image: string | undefined): number[];
|
|
48
|
+
/** Whether `image` has one source over all its slices. */
|
|
49
|
+
hasPlanesSource(image: string | undefined): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The source behind `slice` of `image`, opening it if needed. Resolves null when there is
|
|
52
|
+
* none, and rejects when it cannot be opened.
|
|
53
|
+
*/
|
|
54
|
+
binding(image: string | undefined, slice: number): Promise<RegionSourceBinding | null>;
|
|
55
|
+
/** The ids taken from `slice`'s source. */
|
|
56
|
+
taken(image: string | undefined, slice: number): ReadonlySet<string>;
|
|
57
|
+
/** Every id taken from any slice of `image` (a `'planes'` source's ids are unique across them). */
|
|
58
|
+
allTaken(image: string | undefined): string[];
|
|
59
|
+
/** The slices of `image` with anything taken from their source. */
|
|
60
|
+
slicesWithTaken(image: string | undefined): number[];
|
|
61
|
+
/** Replace the ids taken from `slice`'s source (copy-on-write: `ids` is kept as given). */
|
|
62
|
+
setTaken(image: string | undefined, slice: number, ids: ReadonlySet<string>): void;
|
|
63
|
+
private entry;
|
|
64
|
+
private imageSources;
|
|
65
|
+
private openEntry;
|
|
66
|
+
private close;
|
|
67
|
+
private closeSource;
|
|
68
|
+
}
|