@idetik/core 0.27.3 → 0.29.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 +34 -9
- package/dist/assets/worker_kernel-CBlE4MBI.js.map +1 -1
- package/dist/index.d.ts +132 -7
- package/dist/index.js +2115 -2092
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +32 -32
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/src/core/channel.d.ts +1 -0
- package/dist/types/src/core/channel.d.ts.map +1 -1
- package/dist/types/src/core/image_source_policy.d.ts +4 -0
- package/dist/types/src/core/image_source_policy.d.ts.map +1 -1
- package/dist/types/src/core/layer.d.ts +17 -0
- package/dist/types/src/core/layer.d.ts.map +1 -1
- package/dist/types/src/core/renderable_object.d.ts +2 -0
- package/dist/types/src/core/renderable_object.d.ts.map +1 -1
- package/dist/types/src/data/chunk.d.ts +4 -1
- package/dist/types/src/data/chunk.d.ts.map +1 -1
- package/dist/types/src/data/chunk_manager.d.ts +13 -2
- package/dist/types/src/data/chunk_manager.d.ts.map +1 -1
- package/dist/types/src/data/chunk_memory.d.ts.map +1 -1
- package/dist/types/src/data/chunk_queue.d.ts +1 -0
- package/dist/types/src/data/chunk_queue.d.ts.map +1 -1
- package/dist/types/src/data/chunk_store.d.ts.map +1 -1
- package/dist/types/src/data/chunk_store_view.d.ts.map +1 -1
- package/dist/types/src/data/ome_zarr/image_loader.d.ts +2 -0
- package/dist/types/src/data/ome_zarr/image_loader.d.ts.map +1 -1
- package/dist/types/src/data/ome_zarr/image_source.d.ts +5 -1
- package/dist/types/src/data/ome_zarr/image_source.d.ts.map +1 -1
- package/dist/types/src/data/ome_zarr/metadata_loaders.d.ts +4 -0
- package/dist/types/src/data/ome_zarr/metadata_loaders.d.ts.map +1 -1
- package/dist/types/src/idetik.d.ts +16 -0
- package/dist/types/src/idetik.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +7 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/layers/axes_layer.d.ts +1 -0
- package/dist/types/src/layers/axes_layer.d.ts.map +1 -1
- package/dist/types/src/layers/image_layer.d.ts +15 -0
- package/dist/types/src/layers/image_layer.d.ts.map +1 -1
- package/dist/types/src/layers/label_layer.d.ts +1 -0
- package/dist/types/src/layers/label_layer.d.ts.map +1 -1
- package/dist/types/src/layers/volume_layer.d.ts +1 -0
- package/dist/types/src/layers/volume_layer.d.ts.map +1 -1
- package/dist/types/src/math/color.d.ts +2 -0
- package/dist/types/src/math/color.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/controls.d.ts +1 -0
- package/dist/types/src/objects/cameras/controls.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/orbit_controls.d.ts +1 -0
- package/dist/types/src/objects/cameras/orbit_controls.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/orthographic_camera.d.ts +23 -0
- package/dist/types/src/objects/cameras/orthographic_camera.d.ts.map +1 -1
- package/dist/types/src/objects/cameras/perspective_camera.d.ts +1 -0
- package/dist/types/src/objects/cameras/perspective_camera.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/image_renderable.d.ts +1 -0
- package/dist/types/src/objects/renderable/image_renderable.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/label_color_map.d.ts +1 -0
- package/dist/types/src/objects/renderable/label_color_map.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/label_image_renderable.d.ts +1 -0
- package/dist/types/src/objects/renderable/label_image_renderable.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/points.d.ts +1 -0
- package/dist/types/src/objects/renderable/points.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/projected_line.d.ts +1 -0
- package/dist/types/src/objects/renderable/projected_line.d.ts.map +1 -1
- package/dist/types/src/objects/renderable/volume_renderable.d.ts +3 -1
- package/dist/types/src/objects/renderable/volume_renderable.d.ts.map +1 -1
- package/dist/types/src/objects/textures/texture.d.ts +6 -2
- package/dist/types/src/objects/textures/texture.d.ts.map +1 -1
- package/dist/types/src/objects/textures/texture_2d.d.ts +0 -6
- package/dist/types/src/objects/textures/texture_2d.d.ts.map +1 -1
- package/dist/types/src/objects/textures/texture_2d_array.d.ts +0 -6
- package/dist/types/src/objects/textures/texture_2d_array.d.ts.map +1 -1
- package/dist/types/src/objects/textures/texture_3d.d.ts +0 -4
- package/dist/types/src/objects/textures/texture_3d.d.ts.map +1 -1
- package/dist/types/src/renderers/webgl_textures.d.ts +1 -3
- package/dist/types/src/renderers/webgl_textures.d.ts.map +1 -1
- package/dist/types/src/renderers/webgpu/webgpu_renderer.d.ts.map +1 -1
- package/dist/types/src/renderers/webgpu/webgpu_texture_pool.d.ts +4 -0
- package/dist/types/src/renderers/webgpu/webgpu_texture_pool.d.ts.map +1 -1
- package/package.json +11 -3
package/dist/index.d.ts
CHANGED
|
@@ -27,10 +27,13 @@ declare abstract class Texture extends Node {
|
|
|
27
27
|
wrapT: TextureWrapMode;
|
|
28
28
|
needsUpdate: boolean;
|
|
29
29
|
readTexel?: (x: number, y: number, z: number) => Promise<number>;
|
|
30
|
+
protected data_: DataTextureTypedArray | null;
|
|
31
|
+
get data(): DataTextureTypedArray | null;
|
|
32
|
+
set data(data: DataTextureTypedArray);
|
|
33
|
+
releaseCpuData(): void;
|
|
30
34
|
abstract get width(): number;
|
|
31
35
|
abstract get height(): number;
|
|
32
|
-
|
|
33
|
-
abstract set data(data: DataTextureTypedArray);
|
|
36
|
+
get depth(): number;
|
|
34
37
|
get type(): string;
|
|
35
38
|
}
|
|
36
39
|
|
|
@@ -45,6 +48,7 @@ type ChunkViewState = {
|
|
|
45
48
|
};
|
|
46
49
|
type Chunk = {
|
|
47
50
|
data?: ChunkData;
|
|
51
|
+
texture?: Texture;
|
|
48
52
|
state: "unloaded" | "queued" | "loading" | "loaded";
|
|
49
53
|
lod: number;
|
|
50
54
|
shape: {
|
|
@@ -92,6 +96,7 @@ type SourceDimensionLod = {
|
|
|
92
96
|
scale: number;
|
|
93
97
|
translation: number;
|
|
94
98
|
};
|
|
99
|
+
/** @group Layer Configuration */
|
|
95
100
|
type SliceCoordinates = {
|
|
96
101
|
z?: number;
|
|
97
102
|
c?: number[];
|
|
@@ -102,6 +107,7 @@ type ChunkSource = {
|
|
|
102
107
|
};
|
|
103
108
|
type ChunkLoader = {
|
|
104
109
|
getSourceDimensionMap(): SourceDimensionMap;
|
|
110
|
+
getBytesPerElement(): number;
|
|
105
111
|
loadChunkData(chunk: Chunk, signal: AbortSignal): Promise<void>;
|
|
106
112
|
};
|
|
107
113
|
|
|
@@ -138,9 +144,13 @@ type ImageSourcePolicy = Readonly<{
|
|
|
138
144
|
bias: number;
|
|
139
145
|
};
|
|
140
146
|
}>;
|
|
147
|
+
/** @group Layer Configuration */
|
|
141
148
|
declare function createImageSourcePolicy(config: ImageSourcePolicyConfig): ImageSourcePolicy;
|
|
149
|
+
/** @group Layer Configuration */
|
|
142
150
|
declare function createExplorationPolicy(overrides?: Partial<ImageSourcePolicyConfig>): ImageSourcePolicy;
|
|
151
|
+
/** @group Layer Configuration */
|
|
143
152
|
declare function createPlaybackPolicy(overrides?: Partial<ImageSourcePolicyConfig>): ImageSourcePolicy;
|
|
153
|
+
/** @group Layer Configuration */
|
|
144
154
|
declare function createNoPrefetchPolicy(overrides?: Partial<ImageSourcePolicyConfig>): ImageSourcePolicy;
|
|
145
155
|
|
|
146
156
|
declare class ChunkStore {
|
|
@@ -243,10 +253,15 @@ type QueueStats = {
|
|
|
243
253
|
pending: number;
|
|
244
254
|
running: number;
|
|
245
255
|
};
|
|
246
|
-
|
|
247
256
|
declare class ChunkManager {
|
|
248
257
|
private readonly stores_;
|
|
249
258
|
private readonly queue_;
|
|
259
|
+
private readonly uploadTexture_?;
|
|
260
|
+
private readonly disposeTexture_?;
|
|
261
|
+
private readonly getGpuResidentBytes_;
|
|
262
|
+
private readonly memoryLimitBytes_;
|
|
263
|
+
constructor(uploadTexture?: (texture: Texture) => void, disposeTexture?: (texture: Texture) => void, getGpuResidentBytes?: () => number, memoryLimitBytes?: number);
|
|
264
|
+
get memoryLimitBytes(): number;
|
|
250
265
|
get queueStats(): QueueStats;
|
|
251
266
|
get memoryStats(): {
|
|
252
267
|
cpuChunkBytes: number;
|
|
@@ -254,6 +269,10 @@ declare class ChunkManager {
|
|
|
254
269
|
};
|
|
255
270
|
addView(source: ChunkSource, policy: ImageSourcePolicy): ChunkStoreView;
|
|
256
271
|
update(): void;
|
|
272
|
+
private enqueueWithinBudget;
|
|
273
|
+
private chunkBytes;
|
|
274
|
+
private uploadLoadedChunks;
|
|
275
|
+
private disposeChunkTexture;
|
|
257
276
|
}
|
|
258
277
|
|
|
259
278
|
declare class Box3 {
|
|
@@ -327,7 +346,9 @@ declare class TrsTransform {
|
|
|
327
346
|
|
|
328
347
|
type Shader = "floatScalarImage" | "floatVolume" | "intScalarImage" | "intVolume" | "labelImage" | "points" | "projectedLine" | "uintScalarImage" | "uintVolume" | "wireframe";
|
|
329
348
|
|
|
349
|
+
/** @group Layer Configuration */
|
|
330
350
|
type ColorLike = Color | vec3 | vec4 | string;
|
|
351
|
+
/** @group Layer Configuration */
|
|
331
352
|
declare class Color {
|
|
332
353
|
static readonly RED: Color;
|
|
333
354
|
static readonly GREEN: Color;
|
|
@@ -367,6 +388,8 @@ declare abstract class RenderableObject extends Node {
|
|
|
367
388
|
private programName_;
|
|
368
389
|
private cullFaceMode_;
|
|
369
390
|
setTexture(index: number, texture: Texture): void;
|
|
391
|
+
protected clearTextures(): void;
|
|
392
|
+
protected markStaleTexture(texture: Texture | undefined): void;
|
|
370
393
|
popStaleTextures(): Texture[];
|
|
371
394
|
get geometry(): Geometry;
|
|
372
395
|
get wireframeGeometry(): WireframeGeometry;
|
|
@@ -437,11 +460,34 @@ declare class EventDispatcher {
|
|
|
437
460
|
private readonly handleEvent;
|
|
438
461
|
}
|
|
439
462
|
|
|
463
|
+
/**
|
|
464
|
+
* A camera using an orthographic (parallel) projection.
|
|
465
|
+
*
|
|
466
|
+
* Orthographic projection has no perspective foreshortening, so object size is
|
|
467
|
+
* independent of distance from the camera. This is the camera to use for 2D
|
|
468
|
+
* image viewing, where it pairs naturally with {@link PanZoomControls}. The
|
|
469
|
+
* initial frame is given in world coordinates; zoom and pan are applied as
|
|
470
|
+
* scale and translation on top of that frame.
|
|
471
|
+
*
|
|
472
|
+
* @see {@link PerspectiveCamera} for 3D scenes with perspective projection.
|
|
473
|
+
*
|
|
474
|
+
* @group Cameras & Controls
|
|
475
|
+
*/
|
|
440
476
|
declare class OrthographicCamera extends Camera {
|
|
441
477
|
private width_;
|
|
442
478
|
private height_;
|
|
443
479
|
private viewportAspectRatio_;
|
|
444
480
|
private viewportSize_;
|
|
481
|
+
/**
|
|
482
|
+
* Creates an orthographic camera framing the given world-space rectangle.
|
|
483
|
+
*
|
|
484
|
+
* @param left - Left edge of the view frame, in world units.
|
|
485
|
+
* @param right - Right edge of the view frame, in world units.
|
|
486
|
+
* @param top - Top edge of the view frame, in world units.
|
|
487
|
+
* @param bottom - Bottom edge of the view frame, in world units.
|
|
488
|
+
* @param near - Near clipping plane distance. Defaults to `0.0`.
|
|
489
|
+
* @param far - Far clipping plane distance. Defaults to `100.0`.
|
|
490
|
+
*/
|
|
445
491
|
constructor(left: number, right: number, top: number, bottom: number, near?: number, far?: number);
|
|
446
492
|
get viewportSize(): [number, number];
|
|
447
493
|
setAspectRatio(aspectRatio: number): void;
|
|
@@ -457,6 +503,7 @@ interface CameraControls {
|
|
|
457
503
|
onUpdate(dt: number): void;
|
|
458
504
|
onEvent(event: EventContext): void;
|
|
459
505
|
}
|
|
506
|
+
/** @group Cameras & Controls */
|
|
460
507
|
declare class PanZoomControls implements CameraControls {
|
|
461
508
|
private readonly camera_;
|
|
462
509
|
private dragActive_;
|
|
@@ -510,6 +557,7 @@ declare class Viewport {
|
|
|
510
557
|
private updateAspectRatio;
|
|
511
558
|
}
|
|
512
559
|
|
|
560
|
+
/** @group Layers */
|
|
513
561
|
type LayerState = "initialized" | "loading" | "ready";
|
|
514
562
|
type BlendMode = "none" | "normal" | "additive" | "subtractive" | "multiply" | "premultiplied";
|
|
515
563
|
type StateChangeCallback = (newState: LayerState, prevState?: LayerState) => void;
|
|
@@ -517,6 +565,22 @@ interface LayerOptions {
|
|
|
517
565
|
opacity?: number;
|
|
518
566
|
blendMode?: BlendMode;
|
|
519
567
|
}
|
|
568
|
+
/**
|
|
569
|
+
* Abstract base class for everything that can be added to a viewport.
|
|
570
|
+
*
|
|
571
|
+
* A `Layer` owns a set of renderable objects and contributes them to the scene
|
|
572
|
+
* each frame. Subclasses (e.g. {@link ImageLayer}, {@link VolumeLayer},
|
|
573
|
+
* {@link LabelLayer}) implement {@link Layer.update} to build or refresh those
|
|
574
|
+
* objects for the current view, and may override the `attach`/`detach` hooks to
|
|
575
|
+
* acquire and release resources when the layer joins or leaves a viewport.
|
|
576
|
+
*
|
|
577
|
+
* Layers carry shared presentation state — {@link Layer.opacity} and blend mode —
|
|
578
|
+
* and expose a lifecycle {@link LayerState} (`initialized` → `loading` → `ready`)
|
|
579
|
+
* that observers can subscribe to. A layer instance may be attached to only one
|
|
580
|
+
* viewport at a time.
|
|
581
|
+
*
|
|
582
|
+
* @group Layers
|
|
583
|
+
*/
|
|
520
584
|
declare abstract class Layer {
|
|
521
585
|
abstract readonly type: string;
|
|
522
586
|
private objects_;
|
|
@@ -576,18 +640,22 @@ declare abstract class Renderer {
|
|
|
576
640
|
set backgroundColor(color: ColorLike);
|
|
577
641
|
}
|
|
578
642
|
|
|
643
|
+
/** @group Runtime */
|
|
579
644
|
type Overlay = {
|
|
580
645
|
update(idetik: Idetik): void;
|
|
581
646
|
};
|
|
647
|
+
/** @inline */
|
|
582
648
|
type IdetikParams = {
|
|
583
649
|
canvas: HTMLCanvasElement;
|
|
584
650
|
viewports?: ViewportConfig[];
|
|
585
651
|
overlays?: Overlay[];
|
|
586
652
|
showStats?: boolean;
|
|
653
|
+
memoryLimitMB?: number;
|
|
587
654
|
};
|
|
588
655
|
type IdetikContext = {
|
|
589
656
|
chunkManager: ChunkManager;
|
|
590
657
|
};
|
|
658
|
+
/** @group Runtime */
|
|
591
659
|
type MemoryStats = {
|
|
592
660
|
cpuChunkBytes: number;
|
|
593
661
|
cpuChunkCount: number;
|
|
@@ -596,6 +664,18 @@ type MemoryStats = {
|
|
|
596
664
|
jsHeapUsedBytes?: number;
|
|
597
665
|
jsHeapLimitBytes?: number;
|
|
598
666
|
};
|
|
667
|
+
/**
|
|
668
|
+
* The top-level entry point for an Idetik visualization.
|
|
669
|
+
*
|
|
670
|
+
* An `Idetik` instance owns the renderer, the shared chunk manager, and one or
|
|
671
|
+
* more viewports. Each viewport pairs a camera, its controls, and a stack of
|
|
672
|
+
* layers and draws into a region of the canvas. Call {@link Idetik.start} to
|
|
673
|
+
* begin the render loop and {@link Idetik.stop} to halt it.
|
|
674
|
+
*
|
|
675
|
+
* @see {@link Layer} for the data layers rendered within a viewport.
|
|
676
|
+
*
|
|
677
|
+
* @group Runtime
|
|
678
|
+
*/
|
|
599
679
|
declare class Idetik {
|
|
600
680
|
private readonly chunkManager_;
|
|
601
681
|
private readonly context_;
|
|
@@ -966,8 +1046,10 @@ declare class OmeZarrImageLoader {
|
|
|
966
1046
|
private readonly arrays_;
|
|
967
1047
|
private readonly arrayParams_;
|
|
968
1048
|
private readonly dimensions_;
|
|
1049
|
+
private readonly bytesPerElement_;
|
|
969
1050
|
constructor(props: OmeZarrImageLoaderProps);
|
|
970
1051
|
getSourceDimensionMap(): SourceDimensionMap;
|
|
1052
|
+
getBytesPerElement(): number;
|
|
971
1053
|
loadChunkData(chunk: Chunk, signal: AbortSignal): Promise<void>;
|
|
972
1054
|
}
|
|
973
1055
|
|
|
@@ -1275,11 +1357,15 @@ type Version = (typeof versions)[number];
|
|
|
1275
1357
|
type AdaptedOme<T> = T & {
|
|
1276
1358
|
originalVersion: Version;
|
|
1277
1359
|
};
|
|
1360
|
+
/** @group Data Loading */
|
|
1278
1361
|
declare function loadOmeZarrPlate(url: string, version?: Version): Promise<AdaptedOme<Plate["ome"]>>;
|
|
1362
|
+
/** @group Data Loading */
|
|
1279
1363
|
declare function loadOmeZarrWell(url: string, path: string, version?: Version): Promise<AdaptedOme<Well["ome"]>>;
|
|
1280
1364
|
type OmeroMetadata = NonNullable<Image$1["ome"]["omero"]>;
|
|
1281
1365
|
type OmeroChannel = OmeroMetadata["channels"][number];
|
|
1366
|
+
/** @group Data Loading */
|
|
1282
1367
|
declare function loadOmeroChannels(source: OmeZarrImageSource): Promise<OmeroChannel[]>;
|
|
1368
|
+
/** @group Data Loading */
|
|
1283
1369
|
declare function loadOmeroDefaults(source: OmeZarrImageSource): Promise<OmeroMetadata["rdefs"]>;
|
|
1284
1370
|
|
|
1285
1371
|
type HttpOmeZarrImageSourceProps = {
|
|
@@ -1291,7 +1377,11 @@ type FileSystemOmeZarrImageSourceProps = {
|
|
|
1291
1377
|
version?: Version;
|
|
1292
1378
|
path?: `/${string}`;
|
|
1293
1379
|
};
|
|
1294
|
-
/**
|
|
1380
|
+
/**
|
|
1381
|
+
* Opens an OME-Zarr multiscale image Zarr group from either a URL or local directory.
|
|
1382
|
+
*
|
|
1383
|
+
* @group Data Loading
|
|
1384
|
+
*/
|
|
1295
1385
|
declare class OmeZarrImageSource {
|
|
1296
1386
|
readonly location: Location<Readable>;
|
|
1297
1387
|
readonly version?: Version;
|
|
@@ -1320,6 +1410,7 @@ declare class OmeZarrImageSource {
|
|
|
1320
1410
|
static fromFileSystem(props: FileSystemOmeZarrImageSourceProps): Promise<OmeZarrImageSource>;
|
|
1321
1411
|
}
|
|
1322
1412
|
|
|
1413
|
+
/** @group Layers */
|
|
1323
1414
|
declare class AxesLayer extends Layer {
|
|
1324
1415
|
readonly type = "AxesLayer";
|
|
1325
1416
|
constructor(params: {
|
|
@@ -1329,6 +1420,7 @@ declare class AxesLayer extends Layer {
|
|
|
1329
1420
|
update(): void;
|
|
1330
1421
|
}
|
|
1331
1422
|
|
|
1423
|
+
/** @group Layer Configuration */
|
|
1332
1424
|
type ChannelProps = {
|
|
1333
1425
|
visible?: boolean;
|
|
1334
1426
|
color?: ColorLike;
|
|
@@ -1349,6 +1441,7 @@ interface PointPickingResult {
|
|
|
1349
1441
|
value: number;
|
|
1350
1442
|
}
|
|
1351
1443
|
|
|
1444
|
+
/** @inline */
|
|
1352
1445
|
type ImageLayerProps = LayerOptions & {
|
|
1353
1446
|
source: ChunkSource;
|
|
1354
1447
|
sliceCoords: SliceCoordinates;
|
|
@@ -1356,6 +1449,20 @@ type ImageLayerProps = LayerOptions & {
|
|
|
1356
1449
|
channelProps?: ChannelProps[];
|
|
1357
1450
|
onPickValue?: (info: PointPickingResult) => void;
|
|
1358
1451
|
};
|
|
1452
|
+
/**
|
|
1453
|
+
* A layer that renders a 2D slice of a chunked, multi-channel image source.
|
|
1454
|
+
*
|
|
1455
|
+
* `ImageLayer` streams chunks from a `ChunkSource` (e.g.
|
|
1456
|
+
* {@link OmeZarrImageSource}) according to the supplied `ImageSourcePolicy`,
|
|
1457
|
+
* which decides which resolution levels and chunks to load for the current
|
|
1458
|
+
* view. Per-channel appearance (contrast limits,
|
|
1459
|
+
* color, visibility) is controlled via {@link ChannelProps}, and the visible
|
|
1460
|
+
* slice is selected with {@link SliceCoordinates}.
|
|
1461
|
+
*
|
|
1462
|
+
* @see {@link VolumeLayer} for 3D volume rendering of the same data.
|
|
1463
|
+
*
|
|
1464
|
+
* @group Layers
|
|
1465
|
+
*/
|
|
1359
1466
|
declare class ImageLayer extends Layer implements ChannelsEnabled {
|
|
1360
1467
|
readonly type = "ImageLayer";
|
|
1361
1468
|
private readonly source_;
|
|
@@ -1412,6 +1519,7 @@ type VolumeLayerProps = {
|
|
|
1412
1519
|
policy: ImageSourcePolicy;
|
|
1413
1520
|
channelProps?: ChannelProps[];
|
|
1414
1521
|
};
|
|
1522
|
+
/** @group Layers */
|
|
1415
1523
|
declare class VolumeLayer extends Layer implements ChannelsEnabled {
|
|
1416
1524
|
readonly type = "VolumeLayer";
|
|
1417
1525
|
private readonly source_;
|
|
@@ -1455,6 +1563,7 @@ type LabelColorMapProps = {
|
|
|
1455
1563
|
lookupTable?: ReadonlyMap<number, ColorLike>;
|
|
1456
1564
|
cycle?: ColorLike[];
|
|
1457
1565
|
};
|
|
1566
|
+
/** @group Renderable Objects */
|
|
1458
1567
|
declare class LabelColorMap {
|
|
1459
1568
|
readonly lookupTable: ReadonlyMap<number, Color>;
|
|
1460
1569
|
readonly cycle: ReadonlyArray<Color>;
|
|
@@ -1469,6 +1578,7 @@ type LabelLayerProps = LayerOptions & {
|
|
|
1469
1578
|
onPickValue?: (info: PointPickingResult) => void;
|
|
1470
1579
|
outlineSelected?: boolean;
|
|
1471
1580
|
};
|
|
1581
|
+
/** @group Layers */
|
|
1472
1582
|
declare class LabelLayer extends Layer {
|
|
1473
1583
|
readonly type = "LabelLayer";
|
|
1474
1584
|
private readonly source_;
|
|
@@ -1519,6 +1629,7 @@ type UniformValues = {
|
|
|
1519
1629
|
u_valueScale: number;
|
|
1520
1630
|
u_zTexCoord: number;
|
|
1521
1631
|
};
|
|
1632
|
+
/** @group Renderable Objects */
|
|
1522
1633
|
declare class ImageRenderable extends RenderableObject {
|
|
1523
1634
|
private channels_;
|
|
1524
1635
|
zTexCoord: number;
|
|
@@ -1537,6 +1648,7 @@ type LabelImageRenderableProps = {
|
|
|
1537
1648
|
outlineSelected?: boolean;
|
|
1538
1649
|
selectedValue?: number | null;
|
|
1539
1650
|
};
|
|
1651
|
+
/** @group Renderable Objects */
|
|
1540
1652
|
declare class LabelImageRenderable extends RenderableObject {
|
|
1541
1653
|
private outlineSelected_;
|
|
1542
1654
|
private selectedValue_;
|
|
@@ -1564,6 +1676,7 @@ type PointProperties = {
|
|
|
1564
1676
|
size: number;
|
|
1565
1677
|
marker: Marker;
|
|
1566
1678
|
};
|
|
1679
|
+
/** @group Renderable Objects */
|
|
1567
1680
|
declare class Points extends RenderableObject {
|
|
1568
1681
|
constructor(points: PointProperties[]);
|
|
1569
1682
|
get type(): string;
|
|
@@ -1580,6 +1693,7 @@ type LineParameters = {
|
|
|
1580
1693
|
color: ColorLike;
|
|
1581
1694
|
width: number;
|
|
1582
1695
|
};
|
|
1696
|
+
/** @group Renderable Objects */
|
|
1583
1697
|
declare class ProjectedLine extends RenderableObject {
|
|
1584
1698
|
private color_;
|
|
1585
1699
|
private width_;
|
|
@@ -1595,17 +1709,19 @@ declare class ProjectedLine extends RenderableObject {
|
|
|
1595
1709
|
};
|
|
1596
1710
|
}
|
|
1597
1711
|
|
|
1712
|
+
/** @group Renderable Objects */
|
|
1598
1713
|
declare class VolumeRenderable extends RenderableObject {
|
|
1599
1714
|
voxelScale: vec3;
|
|
1600
1715
|
private channels_;
|
|
1601
|
-
private channelToTextureIndex_;
|
|
1602
1716
|
private loadedChannels_;
|
|
1717
|
+
private readonly channelToTextureIndex_;
|
|
1603
1718
|
constructor();
|
|
1604
1719
|
get type(): string;
|
|
1605
1720
|
updateVolumeWithChunk(chunk: Chunk): void;
|
|
1606
1721
|
private addChannelTexture;
|
|
1607
1722
|
private updateChannelTexture;
|
|
1608
1723
|
clearLoadedChannels(): void;
|
|
1724
|
+
reset(): void;
|
|
1609
1725
|
getUniforms(): Record<string, number[] | number>;
|
|
1610
1726
|
/**
|
|
1611
1727
|
* Get an available texture for a channel. If desiredChannelIndex is provided, it will try to return the texture for that channel index. If that texture is not available, or no desiredChannelIndex is passed, return the first available channel texture. This is used to determine which texture to use when updating channel properties, since channel properties can be updated even if the channel's texture hasn't been loaded yet. If no textures are available, it returns null, which signals that default contrast limits should be used when validating the channel properties.
|
|
@@ -1622,6 +1738,7 @@ type PerspectiveCameraOptions = {
|
|
|
1622
1738
|
far?: number;
|
|
1623
1739
|
position?: vec3;
|
|
1624
1740
|
};
|
|
1741
|
+
/** @group Cameras & Controls */
|
|
1625
1742
|
declare class PerspectiveCamera extends Camera {
|
|
1626
1743
|
private fov_;
|
|
1627
1744
|
private aspectRatio_;
|
|
@@ -1640,6 +1757,7 @@ type OrbitParams = {
|
|
|
1640
1757
|
target?: vec3;
|
|
1641
1758
|
dampingFactor?: number;
|
|
1642
1759
|
};
|
|
1760
|
+
/** @group Cameras & Controls */
|
|
1643
1761
|
declare class OrbitControls implements CameraControls {
|
|
1644
1762
|
private readonly camera_;
|
|
1645
1763
|
private readonly orbitVelocity_;
|
|
@@ -1865,5 +1983,12 @@ declare const Image: z.ZodObject<{
|
|
|
1865
1983
|
}>;
|
|
1866
1984
|
type Image = z.infer<typeof Image>;
|
|
1867
1985
|
|
|
1868
|
-
|
|
1869
|
-
|
|
1986
|
+
/**
|
|
1987
|
+
* Parsed OME-Zarr (OME-NGFF 0.4) image metadata.
|
|
1988
|
+
*
|
|
1989
|
+
* @group Data Loading
|
|
1990
|
+
*/
|
|
1991
|
+
type OmeZarrImage = Image;
|
|
1992
|
+
|
|
1993
|
+
export { AxesLayer, Color, Idetik, ImageLayer, ImageRenderable, LabelColorMap, LabelImageRenderable, LabelLayer, Layer, OmeZarrImageSource, OrbitControls, OrthographicCamera, PanZoomControls, PerspectiveCamera, Points, ProjectedLine, VolumeLayer, VolumeRenderable, createExplorationPolicy, createImageSourcePolicy, createNoPrefetchPolicy, createPlaybackPolicy, loadOmeZarrPlate, loadOmeZarrWell, loadOmeroChannels, loadOmeroDefaults };
|
|
1994
|
+
export type { ChannelProps, ColorLike, LayerState, MemoryStats, OmeZarrImage, Overlay, SliceCoordinates };
|