@jax-data-science/sci-image-visualizer 0.13.0 → 0.14.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/esm2022/lib/contracts/channel-histogram-api.contract.mjs +19 -1
- package/esm2022/lib/contracts/display-types.mjs +7 -1
- package/esm2022/lib/contracts/image.contract.mjs +1 -1
- package/esm2022/lib/contracts/spatial-dataset.contract.mjs +1 -1
- package/esm2022/lib/contracts/visualizer.contract.mjs +1 -1
- package/esm2022/lib/implementations/napari-js/napari-image-2d-scene.mjs +17 -2
- package/esm2022/lib/implementations/napari-js/napari-spatial-2d-scene.mjs +88 -10
- package/esm2022/lib/implementations/napari-js/napari-spatial-3d-scene.mjs +62 -13
- package/esm2022/lib/implementations/napari-js/napari-spatial-encoding.mjs +21 -1
- package/esm2022/lib/implementations/napari-js/napari-spatial-scene.mjs +5 -1
- package/esm2022/lib/implementations/napari-js/napari-visualizer.service.mjs +4 -1
- package/esm2022/lib/implementations/napari-js/spatial-tiles/categorical-lookup.mjs +26 -3
- package/esm2022/lib/implementations/napari-js/spatial-tiles/cell-layers.mjs +3 -2
- package/esm2022/lib/implementations/napari-js/spatial-tiles/density-layer.mjs +20 -4
- package/esm2022/lib/implementations/napari-js/spatial-tiles/transcript-hover.mjs +4 -2
- package/esm2022/lib/implementations/napari-js/spatial-tiles/transcript-jobs.mjs +4 -2
- package/esm2022/lib/implementations/napari-js/spatial-tiles/transcript-layers.mjs +42 -15
- package/esm2022/lib/implementations/osd/openseadragon-visualizer.service.mjs +3 -1
- package/esm2022/lib/spatial/lod.mjs +6 -3
- package/esm2022/lib/spatial/spatial-controls.facade.mjs +8 -3
- package/esm2022/lib/spatial/spatial-gene-filter.mjs +138 -0
- package/esm2022/lib/spatial/spatial-tile-merge.mjs +42 -1
- package/esm2022/lib/spatial-controls/spatial-cells-panel/spatial-cells-panel.component.mjs +3 -3
- package/esm2022/lib/spatial-controls/spatial-controls.component.mjs +4 -3
- package/esm2022/lib/spatial-controls/spatial-gene-style/spatial-gene-style.component.mjs +66 -0
- package/esm2022/lib/spatial-controls/spatial-gene-tree/spatial-gene-tree.component.mjs +106 -26
- package/esm2022/lib/spatial-controls/spatial-groups-panel/spatial-groups-panel.component.mjs +3 -3
- package/esm2022/lib/spatial-controls/spatial-key/spatial-key.component.mjs +3 -3
- package/esm2022/lib/spatial-controls/spatial-marker-genes-form/spatial-marker-genes-form.component.mjs +3 -3
- package/esm2022/lib/spatial-controls/spatial-observations-panel/spatial-observations-panel.component.mjs +110 -8
- package/esm2022/lib/spatial-controls/spatial-transcripts-panel/spatial-transcripts-panel.component.mjs +41 -9
- package/esm2022/lib/store/visualizer-store.service.mjs +50 -1
- package/fesm2022/{jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-DURPqs5a.mjs → jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-DvFp1jNH.mjs} +1064 -318
- package/fesm2022/jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-DvFp1jNH.mjs.map +1 -0
- package/fesm2022/{jax-data-science-sci-image-visualizer-onnx-sam-session-D0IQ6PjZ.mjs → jax-data-science-sci-image-visualizer-onnx-sam-session-D7lSUAM1.mjs} +2 -2
- package/fesm2022/{jax-data-science-sci-image-visualizer-onnx-sam-session-D0IQ6PjZ.mjs.map → jax-data-science-sci-image-visualizer-onnx-sam-session-D7lSUAM1.mjs.map} +1 -1
- package/fesm2022/jax-data-science-sci-image-visualizer.mjs +1 -1
- package/lib/contracts/channel-histogram-api.contract.d.ts +14 -0
- package/lib/contracts/display-types.d.ts +27 -0
- package/lib/contracts/image.contract.d.ts +2 -0
- package/lib/contracts/spatial-dataset.contract.d.ts +7 -0
- package/lib/contracts/visualizer.contract.d.ts +3 -0
- package/lib/implementations/napari-js/napari-image-2d-scene.d.ts +7 -0
- package/lib/implementations/napari-js/napari-spatial-2d-scene.d.ts +13 -2
- package/lib/implementations/napari-js/napari-spatial-encoding.d.ts +5 -0
- package/lib/implementations/napari-js/napari-spatial-scene.d.ts +4 -0
- package/lib/implementations/napari-js/napari-visualizer.service.d.ts +2 -0
- package/lib/implementations/napari-js/spatial-tiles/categorical-lookup.d.ts +6 -1
- package/lib/implementations/napari-js/spatial-tiles/transcript-hover.d.ts +4 -0
- package/lib/implementations/napari-js/spatial-tiles/transcript-layers.d.ts +3 -1
- package/lib/spatial/lod.d.ts +3 -1
- package/lib/spatial/spatial-controls.facade.d.ts +3 -0
- package/lib/spatial/spatial-gene-filter.d.ts +44 -0
- package/lib/spatial/spatial-tile-merge.d.ts +17 -0
- package/lib/spatial-controls/spatial-gene-style/spatial-gene-style.component.d.ts +30 -0
- package/lib/spatial-controls/spatial-gene-tree/spatial-gene-tree.component.d.ts +39 -7
- package/lib/spatial-controls/spatial-observations-panel/spatial-observations-panel.component.d.ts +33 -1
- package/lib/spatial-controls/spatial-transcripts-panel/spatial-transcripts-panel.component.d.ts +13 -1
- package/lib/store/visualizer-store.service.d.ts +13 -0
- package/package.json +1 -1
- package/fesm2022/jax-data-science-sci-image-visualizer-jax-data-science-sci-image-visualizer-DURPqs5a.mjs.map +0 -1
package/lib/spatial-controls/spatial-observations-panel/spatial-observations-panel.component.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import type { ISpatialControls } from '../../contracts/visualizer.contract';
|
|
3
4
|
import type { SpatialDataset } from '../../contracts/spatial-dataset.contract';
|
|
4
|
-
import { ColormapNode, SpatialViewState } from '../../contracts/display-types';
|
|
5
|
+
import { ColormapNode, SpatialViewState, TranscriptGlyphName } from '../../contracts/display-types';
|
|
5
6
|
import { SpatialSelectionMask } from '../../spatial/spatial-selection';
|
|
6
7
|
import { PanelOption } from '../../spatial/spatial-panel-model';
|
|
7
8
|
import type { GenePickerModel } from '../spatial-gene-picker';
|
|
@@ -45,6 +46,8 @@ export declare class SpatialObservationsPanelComponent implements OnChanges {
|
|
|
45
46
|
/** A legend row was clicked (see the key). */
|
|
46
47
|
readonly categoryClicked: EventEmitter<number>;
|
|
47
48
|
protected readonly clipOptions: PanelOption<[number, number]>[];
|
|
49
|
+
/** How several genes of the observation filter combine. */
|
|
50
|
+
protected readonly matchOptions: PanelOption<SpatialViewState['observationGenesMatch']>[];
|
|
48
51
|
/** Virtual-scrolled only past this many options (see the cells panel's gene dropdown). */
|
|
49
52
|
protected readonly geneVirtualScrollFrom = 200;
|
|
50
53
|
/** Colour-by column choices — "None" plus every column the dataset declares. */
|
|
@@ -62,6 +65,35 @@ export declare class SpatialObservationsPanelComponent implements OnChanges {
|
|
|
62
65
|
protected onColumn(name: string | null): void;
|
|
63
66
|
/** A gene was picked; it supersedes any column selection. */
|
|
64
67
|
protected onGene(name: string | null): void;
|
|
68
|
+
/** Genes picked for the observation filter; none draws every observation. */
|
|
69
|
+
protected onObservationGenes(genes: string[] | null): void;
|
|
70
|
+
protected onObservationGenesMatch(match: SpatialViewState['observationGenesMatch'] | null): void;
|
|
71
|
+
/** Whether the gene filter could not be applied (an expression read failed); one stream per
|
|
72
|
+
* `controls`, so the template's async pipe keeps its subscription. */
|
|
73
|
+
protected geneFilterFailed$: Observable<boolean>;
|
|
74
|
+
/** Ask for the picked genes' expression again (a failed read is not cached). */
|
|
75
|
+
protected retryGeneFilter(): void;
|
|
76
|
+
protected onObservationGenesColorBy(on: boolean): void;
|
|
77
|
+
protected removeObservationGene(gene: string): void;
|
|
78
|
+
protected isObservationGene(gene: string): boolean;
|
|
79
|
+
protected trackByGene(_i: number, gene: string): string;
|
|
80
|
+
/** The gene the icon and colour picker is open for. */
|
|
81
|
+
protected styleGene: string | null;
|
|
82
|
+
protected geneColorOf(gene: string): string;
|
|
83
|
+
protected geneGlyphOf(gene: string): TranscriptGlyphName;
|
|
84
|
+
protected glyphPointsOf(gene: string): string;
|
|
85
|
+
/** Open the picker on the gene's swatch. Inside the genes dropdown the click must not also
|
|
86
|
+
* reach the option, which would unpick the gene. */
|
|
87
|
+
protected openGeneStyle(event: Event, gene: string, panel: {
|
|
88
|
+
toggle(e: Event): void;
|
|
89
|
+
hide(): void;
|
|
90
|
+
}): void;
|
|
91
|
+
protected onGeneColor(gene: string, hex: string): void;
|
|
92
|
+
protected onGeneGlyph(gene: string, glyph: TranscriptGlyphName): void;
|
|
93
|
+
/** Back to the gene's default colour (its place in the list) and icon (a circle). */
|
|
94
|
+
protected resetGeneStyle(gene: string): void;
|
|
95
|
+
/** What the filter hides, in words. */
|
|
96
|
+
protected get geneFilterHint(): string;
|
|
65
97
|
/** Cell outlines on offer, which changes what the circles mean. */
|
|
66
98
|
protected get hasCells(): boolean;
|
|
67
99
|
/** True while a selection is active — everything else renders muted. */
|
package/lib/spatial-controls/spatial-transcripts-panel/spatial-transcripts-panel.component.d.ts
CHANGED
|
@@ -54,7 +54,13 @@ export declare class SpatialTranscriptsPanelComponent implements OnChanges {
|
|
|
54
54
|
readonly openChange: EventEmitter<boolean>;
|
|
55
55
|
/** Virtual-scrolled only past this many options (see the cells panel's gene dropdown). */
|
|
56
56
|
protected readonly geneVirtualScrollFrom = 200;
|
|
57
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Colourings on offer: "Cell type" only for a dataset with cell types. Rebuilt only when that
|
|
59
|
+
* changes, for the same reason as {@link transcriptModeOptions}.
|
|
60
|
+
*/
|
|
61
|
+
protected transcriptColorOptions: PanelOption<SpatialViewState['transcriptColorBy']>[];
|
|
62
|
+
/** Whether the dataset has a column naming each cell's type (see `cellTypeColumnFor`). */
|
|
63
|
+
protected hasCellTypes: boolean;
|
|
58
64
|
protected readonly glyphOptions: import("../../spatial/spatial-panel-model").GlyphOption[];
|
|
59
65
|
protected readonly budgetOptions: {
|
|
60
66
|
label: string;
|
|
@@ -117,8 +123,14 @@ export declare class SpatialTranscriptsPanelComponent implements OnChanges {
|
|
|
117
123
|
*/
|
|
118
124
|
protected onImportGeneGroups(input: HTMLInputElement): Promise<void>;
|
|
119
125
|
protected get estimatePercent(): number;
|
|
126
|
+
/** Whether the Observations gene filter is on, which limits the transcripts drawn. */
|
|
127
|
+
protected get observationsFiltered(): boolean;
|
|
120
128
|
protected get estimateOverMax(): boolean;
|
|
121
129
|
protected onTranscriptBudget(n: number): void;
|
|
130
|
+
/** The colouring in use: "Cell type" without cell types colours by gene (as the markers do). */
|
|
131
|
+
protected get transcriptColorShown(): SpatialViewState['transcriptColorBy'];
|
|
132
|
+
/** Genes of "All genes" hidden one by one (not the whole set switched off). */
|
|
133
|
+
protected get allGenesSomeHidden(): boolean;
|
|
122
134
|
protected onTranscriptColorBy(by: SpatialViewState['transcriptColorBy']): void;
|
|
123
135
|
protected onTranscriptScale(value: number | undefined): void;
|
|
124
136
|
protected onTranscriptOpacity(value: number | undefined): void;
|
|
@@ -76,6 +76,18 @@ export declare class VisualizerStore {
|
|
|
76
76
|
* Editor) show µm²/mm² instead of px². No-op when neither axis is positive.
|
|
77
77
|
*/
|
|
78
78
|
setPhysicalPixelSize(mppX?: number, mppY?: number): void;
|
|
79
|
+
/**
|
|
80
|
+
* Fill in the channel names and tints the host's image meta left out, from the image's tile
|
|
81
|
+
* descriptor: the server reads them from the file (an OME-TIFF's channel names, such as Cytos's
|
|
82
|
+
* "Actin" or "Cell-Membrane"), where a host's metadata (jit-ui's `/metadata`) carries none, so
|
|
83
|
+
* the Channels pane showed "Channel 1", "Channel 2"… The host's own names and tints win; only a
|
|
84
|
+
* channel still showing its derived default takes the descriptor's, so an edit made in the pane
|
|
85
|
+
* stays. A no-op when the channel counts differ, or for RGB.
|
|
86
|
+
*/
|
|
87
|
+
adoptChannelInfo(info: ReadonlyArray<{
|
|
88
|
+
name?: string;
|
|
89
|
+
color?: string;
|
|
90
|
+
}> | null | undefined): void;
|
|
79
91
|
/**
|
|
80
92
|
* Publish the current image's metadata and derive its channels.
|
|
81
93
|
*
|
|
@@ -90,6 +102,7 @@ export declare class VisualizerStore {
|
|
|
90
102
|
* - RGB (rgbChannels ≥ 3) → Red/Green/Blue;
|
|
91
103
|
* - multichannel fluorescence (channelCount > 1) → one channel per band,
|
|
92
104
|
* named/tinted from the server `channelInfo` when present, else a palette;
|
|
105
|
+
* only the first `DEFAULT_VISIBLE_CHANNELS` start visible (see `defaultChannelVisible`);
|
|
93
106
|
* - otherwise a single grayscale "Intensity" channel. */
|
|
94
107
|
private deriveChannels;
|
|
95
108
|
getChannelStates(): Observable<IChannelState[]>;
|