@idetik/core 0.23.2 → 0.23.3

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/dist/index.d.ts CHANGED
@@ -491,14 +491,6 @@ declare class Viewport {
491
491
  private getBox;
492
492
  private updateAspectRatio;
493
493
  }
494
- declare function validateNewViewport(viewport: {
495
- id: string;
496
- element: HTMLElement;
497
- }, existingViewports: {
498
- id: string;
499
- element: HTMLElement;
500
- }[]): void;
501
- declare function parseViewportConfigs(viewportConfigs: ViewportConfig[], canvas: HTMLCanvasElement, context: IdetikContext): Viewport[];
502
494
 
503
495
  declare class ChunkStoreView {
504
496
  private readonly store_;
@@ -671,268 +663,6 @@ declare class Idetik {
671
663
  stop(): void;
672
664
  }
673
665
 
674
- declare class WebGLRenderer extends Renderer {
675
- private readonly gl_;
676
- private readonly programs_;
677
- private readonly bindings_;
678
- private readonly textures_;
679
- private readonly state_;
680
- private renderedObjectsPerFrame_;
681
- private currentViewportSize_;
682
- constructor(canvas: HTMLCanvasElement);
683
- render(viewport: Viewport): void;
684
- private initStencil;
685
- private renderLayer;
686
- protected renderObject(layer: Layer, objectIndex: number, camera: Camera): void;
687
- private drawGeometry;
688
- private glGetPrimitive;
689
- protected resize(width: number, height: number): void;
690
- protected clear(): void;
691
- }
692
-
693
- type PerspectiveCameraOptions = {
694
- fov?: number;
695
- aspectRatio?: number;
696
- near?: number;
697
- far?: number;
698
- position?: vec3;
699
- };
700
- declare class PerspectiveCamera extends Camera {
701
- private fov_;
702
- private aspectRatio_;
703
- constructor(options?: PerspectiveCameraOptions);
704
- setAspectRatio(aspectRatio: number): void;
705
- get type(): CameraType;
706
- get fov(): number;
707
- zoom(factor: number): void;
708
- protected updateProjectionMatrix(): void;
709
- }
710
-
711
- type OrbitParams = {
712
- radius?: number;
713
- yaw?: number;
714
- pitch?: number;
715
- target?: vec3;
716
- dampingFactor?: number;
717
- };
718
- declare class OrbitControls implements CameraControls {
719
- private readonly camera_;
720
- private readonly orbitVelocity_;
721
- private readonly panVelocity_;
722
- private readonly currPos_;
723
- private readonly currCenter_;
724
- private readonly dampingFactor_;
725
- private currMouseButton_;
726
- constructor(camera: PerspectiveCamera, params?: OrbitParams);
727
- get isMoving(): boolean;
728
- onEvent(event: EventContext): void;
729
- onUpdate(dt: number): void;
730
- private onPointerDown;
731
- private onPointerMove;
732
- private onWheel;
733
- private onPointerEnd;
734
- private orbit;
735
- private pan;
736
- private zoom;
737
- private updateCamera;
738
- private cutoffLowVelocity;
739
- }
740
-
741
- declare class AxesLayer extends Layer {
742
- readonly type = "AxesLayer";
743
- constructor(params: {
744
- length: number;
745
- width: number;
746
- });
747
- update(): void;
748
- }
749
-
750
- type ChannelProps = {
751
- visible?: boolean;
752
- color?: ColorLike;
753
- contrastLimits?: [number, number];
754
- opacity?: number;
755
- };
756
- /** Layer that exposes channel controls. */
757
- interface ChannelsEnabled {
758
- channelProps: ChannelProps[] | undefined;
759
- setChannelProps(channelProps: ChannelProps[]): void;
760
- resetChannelProps(): void;
761
- addChannelChangeCallback(callback: () => void): void;
762
- removeChannelChangeCallback(callback: () => void): void;
763
- }
764
-
765
- interface PointPickingResult {
766
- world: vec3;
767
- value: number;
768
- }
769
-
770
- type ImageLayerProps = LayerOptions & {
771
- source: ChunkSource;
772
- sliceCoords: SliceCoordinates;
773
- policy: ImageSourcePolicy;
774
- channelProps?: ChannelProps[];
775
- onPickValue?: (info: PointPickingResult) => void;
776
- };
777
- declare class ImageLayer extends Layer implements ChannelsEnabled {
778
- readonly type = "ImageLayer";
779
- private readonly source_;
780
- private readonly sliceCoords_;
781
- private readonly onPickValue_?;
782
- private readonly visibleChunks_;
783
- private readonly pool_;
784
- private readonly initialChannelProps_?;
785
- private readonly channelChangeCallbacks_;
786
- private policy_;
787
- private channelProps_?;
788
- private chunkStoreView_?;
789
- private pointerDownPos_;
790
- private zPrevPointWorld_?;
791
- private debugMode_;
792
- private static readonly STALE_PRESENTATION_MS_;
793
- private lastPresentationTimeStamp_?;
794
- private lastPresentationTimeCoord_?;
795
- private readonly wireframeColors_;
796
- constructor({ source, sliceCoords, policy, channelProps, onPickValue, ...layerOptions }: ImageLayerProps);
797
- onAttached(context: IdetikContext): Promise<void>;
798
- onDetached(_context: IdetikContext): void;
799
- update(context?: RenderContext): void;
800
- private updateChunks;
801
- hasMultipleLODs(): boolean;
802
- get lastPresentationTimeCoord(): number | undefined;
803
- private isPresentationStale;
804
- private resliceIfZChanged;
805
- onEvent(event: EventContext): void;
806
- get chunkStoreView(): ChunkStoreView | undefined;
807
- get sliceCoords(): SliceCoordinates;
808
- get source(): ChunkSource;
809
- get imageSourcePolicy(): Readonly<ImageSourcePolicy>;
810
- set imageSourcePolicy(newPolicy: ImageSourcePolicy);
811
- private slicePlane;
812
- private getImageForChunk;
813
- private getChannelPropsForChunk;
814
- private createImage;
815
- private getDataForImage;
816
- private updateImageChunk;
817
- getValueAtWorld(world: vec3): number | null;
818
- private getValueFromChunk;
819
- get debugMode(): boolean;
820
- set debugMode(debug: boolean);
821
- get channelProps(): ChannelProps[] | undefined;
822
- setChannelProps(channelProps: ChannelProps[]): void;
823
- resetChannelProps(): void;
824
- addChannelChangeCallback(callback: () => void): void;
825
- removeChannelChangeCallback(callback: () => void): void;
826
- private releaseAndRemoveChunks;
827
- }
828
-
829
- type VolumeLayerProps = {
830
- source: ChunkSource;
831
- sliceCoords: SliceCoordinates;
832
- policy: ImageSourcePolicy;
833
- channelProps?: ChannelProps[];
834
- };
835
- declare class VolumeLayer extends Layer implements ChannelsEnabled {
836
- readonly type = "VolumeLayer";
837
- private readonly source_;
838
- private readonly sliceCoords_;
839
- private readonly currentVolumes_;
840
- private readonly volumeToPoolKey_;
841
- private readonly pool_;
842
- private readonly initialChannelProps_?;
843
- private readonly channelChangeCallbacks_;
844
- private sourcePolicy_;
845
- private chunkStoreView_?;
846
- private channelProps_?;
847
- private lastLoadedTime_;
848
- private lastNumRenderedChannelChunks_;
849
- private interactiveStepSizeScale_;
850
- private debugShowWireframes_;
851
- debugShowDegenerateRays: boolean;
852
- relativeStepSize: number;
853
- opacityMultiplier: number;
854
- earlyTerminationAlpha: number;
855
- get debugShowWireframes(): boolean;
856
- set debugShowWireframes(value: boolean);
857
- set sourcePolicy(newPolicy: ImageSourcePolicy);
858
- setChannelProps(channelProps: ChannelProps[]): void;
859
- get channelProps(): ChannelProps[] | undefined;
860
- resetChannelProps(): void;
861
- addChannelChangeCallback(callback: () => void): void;
862
- removeChannelChangeCallback(callback: () => void): void;
863
- constructor({ source, sliceCoords, policy, channelProps }: VolumeLayerProps);
864
- private getOrCreateVolume;
865
- onAttached(context: IdetikContext): Promise<void>;
866
- onDetached(_context: IdetikContext): void;
867
- private updateChunks;
868
- private updateVolumeTransform;
869
- private releaseAndRemoveVolume;
870
- update(context?: RenderContext): void;
871
- getUniforms(): Record<string, unknown>;
872
- }
873
-
874
- type LabelColorMapProps = {
875
- lookupTable?: ReadonlyMap<number, ColorLike>;
876
- cycle?: ColorLike[];
877
- };
878
- declare class LabelColorMap {
879
- readonly lookupTable: ReadonlyMap<number, Color>;
880
- readonly cycle: ReadonlyArray<Color>;
881
- constructor(props?: LabelColorMapProps);
882
- }
883
-
884
- type LabelLayerProps = LayerOptions & {
885
- source: ChunkSource;
886
- sliceCoords: SliceCoordinates;
887
- policy: ImageSourcePolicy;
888
- colorMap?: LabelColorMapProps;
889
- onPickValue?: (info: PointPickingResult) => void;
890
- outlineSelected?: boolean;
891
- };
892
- declare class LabelLayer extends Layer {
893
- readonly type = "LabelLayer";
894
- private readonly source_;
895
- private readonly sliceCoords_;
896
- private readonly onPickValue_?;
897
- private readonly outlineSelected_;
898
- private readonly visibleChunks_;
899
- private readonly pool_;
900
- private colorMap_;
901
- private selectedValue_;
902
- private policy_;
903
- private chunkStoreView_?;
904
- private pointerDownPos_;
905
- private zPrevPointWorld_?;
906
- private static readonly STALE_PRESENTATION_MS_;
907
- private lastPresentationTimeStamp_?;
908
- private lastPresentationTimeCoord_?;
909
- constructor({ source, sliceCoords, policy, colorMap, onPickValue, outlineSelected, ...layerOptions }: LabelLayerProps);
910
- onAttached(context: IdetikContext): Promise<void>;
911
- onDetached(_context: IdetikContext): void;
912
- update(context?: RenderContext): void;
913
- private updateChunks;
914
- private isPresentationStale;
915
- private resliceIfZChanged;
916
- onEvent(event: EventContext): void;
917
- get colorMap(): LabelColorMap;
918
- setColorMap(colorMap: LabelColorMapProps): void;
919
- setSelectedValue(value: number | null): void;
920
- get sliceCoords(): SliceCoordinates;
921
- get source(): ChunkSource;
922
- get imageSourcePolicy(): Readonly<ImageSourcePolicy>;
923
- set imageSourcePolicy(newPolicy: ImageSourcePolicy);
924
- get chunkStoreView(): ChunkStoreView | undefined;
925
- get lastPresentationTimeCoord(): number | undefined;
926
- getValueAtWorld(world: vec3): number | null;
927
- private getValueFromChunk;
928
- private slicePlane;
929
- private getLabelForChunk;
930
- private createLabel;
931
- private getDataForLabel;
932
- private updateLabelChunk;
933
- private releaseAndRemoveChunks;
934
- }
935
-
936
666
  /**The zarr.json attributes key*/
937
667
  declare const Image$1: z.ZodObject<{
938
668
  /**The versioned OME-Zarr Metadata namespace*/
@@ -1576,24 +1306,366 @@ declare class OmeZarrImageSource {
1576
1306
  static fromFileSystem(props: FileSystemOmeZarrImageSourceProps): OmeZarrImageSource;
1577
1307
  }
1578
1308
 
1579
- declare class Plane {
1580
- normal: vec3;
1581
- signedDistance: number;
1582
- constructor(normal?: vec3, distance?: number);
1583
- set(normal: vec3, distance: number): void;
1584
- signedDistanceToPoint(point: vec3): number;
1585
- normalize(): void;
1586
- }
1587
-
1588
- declare class Spherical {
1589
- radius: number;
1590
- phi: number;
1591
- theta: number;
1592
- constructor(radius: number, phi: number, theta: number);
1593
- toVec3(): vec3;
1594
- }
1595
-
1596
- /**JSON from OME-NGFF .zattrs*/
1309
+ declare class AxesLayer extends Layer {
1310
+ readonly type = "AxesLayer";
1311
+ constructor(params: {
1312
+ length: number;
1313
+ width: number;
1314
+ });
1315
+ update(): void;
1316
+ }
1317
+
1318
+ type ChannelProps = {
1319
+ visible?: boolean;
1320
+ color?: ColorLike;
1321
+ contrastLimits?: [number, number];
1322
+ opacity?: number;
1323
+ };
1324
+ /** Layer that exposes channel controls. */
1325
+ interface ChannelsEnabled {
1326
+ channelProps: ChannelProps[] | undefined;
1327
+ setChannelProps(channelProps: ChannelProps[]): void;
1328
+ resetChannelProps(): void;
1329
+ addChannelChangeCallback(callback: () => void): void;
1330
+ removeChannelChangeCallback(callback: () => void): void;
1331
+ }
1332
+
1333
+ interface PointPickingResult {
1334
+ world: vec3;
1335
+ value: number;
1336
+ }
1337
+
1338
+ type ImageLayerProps = LayerOptions & {
1339
+ source: ChunkSource;
1340
+ sliceCoords: SliceCoordinates;
1341
+ policy: ImageSourcePolicy;
1342
+ channelProps?: ChannelProps[];
1343
+ onPickValue?: (info: PointPickingResult) => void;
1344
+ };
1345
+ declare class ImageLayer extends Layer implements ChannelsEnabled {
1346
+ readonly type = "ImageLayer";
1347
+ private readonly source_;
1348
+ private readonly sliceCoords_;
1349
+ private readonly onPickValue_?;
1350
+ private readonly visibleChunks_;
1351
+ private readonly pool_;
1352
+ private readonly initialChannelProps_?;
1353
+ private readonly channelChangeCallbacks_;
1354
+ private policy_;
1355
+ private channelProps_?;
1356
+ private chunkStoreView_?;
1357
+ private pointerDownPos_;
1358
+ private zPrevPointWorld_?;
1359
+ private debugMode_;
1360
+ private static readonly STALE_PRESENTATION_MS_;
1361
+ private lastPresentationTimeStamp_?;
1362
+ private lastPresentationTimeCoord_?;
1363
+ private readonly wireframeColors_;
1364
+ constructor({ source, sliceCoords, policy, channelProps, onPickValue, ...layerOptions }: ImageLayerProps);
1365
+ onAttached(context: IdetikContext): Promise<void>;
1366
+ onDetached(_context: IdetikContext): void;
1367
+ update(context?: RenderContext): void;
1368
+ private updateChunks;
1369
+ hasMultipleLODs(): boolean;
1370
+ get lastPresentationTimeCoord(): number | undefined;
1371
+ private isPresentationStale;
1372
+ private resliceIfZChanged;
1373
+ onEvent(event: EventContext): void;
1374
+ get chunkStoreView(): ChunkStoreView | undefined;
1375
+ get sliceCoords(): SliceCoordinates;
1376
+ get source(): ChunkSource;
1377
+ get imageSourcePolicy(): Readonly<ImageSourcePolicy>;
1378
+ set imageSourcePolicy(newPolicy: ImageSourcePolicy);
1379
+ private slicePlane;
1380
+ private getImageForChunk;
1381
+ private getChannelPropsForChunk;
1382
+ private createImage;
1383
+ private getDataForImage;
1384
+ private updateImageChunk;
1385
+ getValueAtWorld(world: vec3): number | null;
1386
+ private getValueFromChunk;
1387
+ get debugMode(): boolean;
1388
+ set debugMode(debug: boolean);
1389
+ get channelProps(): ChannelProps[] | undefined;
1390
+ setChannelProps(channelProps: ChannelProps[]): void;
1391
+ resetChannelProps(): void;
1392
+ addChannelChangeCallback(callback: () => void): void;
1393
+ removeChannelChangeCallback(callback: () => void): void;
1394
+ private releaseAndRemoveChunks;
1395
+ }
1396
+
1397
+ type VolumeLayerProps = {
1398
+ source: ChunkSource;
1399
+ sliceCoords: SliceCoordinates;
1400
+ policy: ImageSourcePolicy;
1401
+ channelProps?: ChannelProps[];
1402
+ };
1403
+ declare class VolumeLayer extends Layer implements ChannelsEnabled {
1404
+ readonly type = "VolumeLayer";
1405
+ private readonly source_;
1406
+ private readonly sliceCoords_;
1407
+ private readonly currentVolumes_;
1408
+ private readonly volumeToPoolKey_;
1409
+ private readonly pool_;
1410
+ private readonly initialChannelProps_?;
1411
+ private readonly channelChangeCallbacks_;
1412
+ private sourcePolicy_;
1413
+ private chunkStoreView_?;
1414
+ private channelProps_?;
1415
+ private lastLoadedTime_;
1416
+ private lastNumRenderedChannelChunks_;
1417
+ private interactiveStepSizeScale_;
1418
+ private debugShowWireframes_;
1419
+ debugShowDegenerateRays: boolean;
1420
+ relativeStepSize: number;
1421
+ opacityMultiplier: number;
1422
+ earlyTerminationAlpha: number;
1423
+ get debugShowWireframes(): boolean;
1424
+ set debugShowWireframes(value: boolean);
1425
+ set sourcePolicy(newPolicy: ImageSourcePolicy);
1426
+ setChannelProps(channelProps: ChannelProps[]): void;
1427
+ get channelProps(): ChannelProps[] | undefined;
1428
+ resetChannelProps(): void;
1429
+ addChannelChangeCallback(callback: () => void): void;
1430
+ removeChannelChangeCallback(callback: () => void): void;
1431
+ constructor({ source, sliceCoords, policy, channelProps }: VolumeLayerProps);
1432
+ private getOrCreateVolume;
1433
+ onAttached(context: IdetikContext): Promise<void>;
1434
+ onDetached(_context: IdetikContext): void;
1435
+ private updateChunks;
1436
+ private updateVolumeTransform;
1437
+ private releaseAndRemoveVolume;
1438
+ update(context?: RenderContext): void;
1439
+ getUniforms(): Record<string, unknown>;
1440
+ }
1441
+
1442
+ type LabelColorMapProps = {
1443
+ lookupTable?: ReadonlyMap<number, ColorLike>;
1444
+ cycle?: ColorLike[];
1445
+ };
1446
+ declare class LabelColorMap {
1447
+ readonly lookupTable: ReadonlyMap<number, Color>;
1448
+ readonly cycle: ReadonlyArray<Color>;
1449
+ constructor(props?: LabelColorMapProps);
1450
+ }
1451
+
1452
+ type LabelLayerProps = LayerOptions & {
1453
+ source: ChunkSource;
1454
+ sliceCoords: SliceCoordinates;
1455
+ policy: ImageSourcePolicy;
1456
+ colorMap?: LabelColorMapProps;
1457
+ onPickValue?: (info: PointPickingResult) => void;
1458
+ outlineSelected?: boolean;
1459
+ };
1460
+ declare class LabelLayer extends Layer {
1461
+ readonly type = "LabelLayer";
1462
+ private readonly source_;
1463
+ private readonly sliceCoords_;
1464
+ private readonly onPickValue_?;
1465
+ private readonly outlineSelected_;
1466
+ private readonly visibleChunks_;
1467
+ private readonly pool_;
1468
+ private colorMap_;
1469
+ private selectedValue_;
1470
+ private policy_;
1471
+ private chunkStoreView_?;
1472
+ private pointerDownPos_;
1473
+ private zPrevPointWorld_?;
1474
+ private static readonly STALE_PRESENTATION_MS_;
1475
+ private lastPresentationTimeStamp_?;
1476
+ private lastPresentationTimeCoord_?;
1477
+ constructor({ source, sliceCoords, policy, colorMap, onPickValue, outlineSelected, ...layerOptions }: LabelLayerProps);
1478
+ onAttached(context: IdetikContext): Promise<void>;
1479
+ onDetached(_context: IdetikContext): void;
1480
+ update(context?: RenderContext): void;
1481
+ private updateChunks;
1482
+ private isPresentationStale;
1483
+ private resliceIfZChanged;
1484
+ onEvent(event: EventContext): void;
1485
+ get colorMap(): LabelColorMap;
1486
+ setColorMap(colorMap: LabelColorMapProps): void;
1487
+ setSelectedValue(value: number | null): void;
1488
+ get sliceCoords(): SliceCoordinates;
1489
+ get source(): ChunkSource;
1490
+ get imageSourcePolicy(): Readonly<ImageSourcePolicy>;
1491
+ set imageSourcePolicy(newPolicy: ImageSourcePolicy);
1492
+ get chunkStoreView(): ChunkStoreView | undefined;
1493
+ get lastPresentationTimeCoord(): number | undefined;
1494
+ getValueAtWorld(world: vec3): number | null;
1495
+ private getValueFromChunk;
1496
+ private slicePlane;
1497
+ private getLabelForChunk;
1498
+ private createLabel;
1499
+ private getDataForLabel;
1500
+ private updateLabelChunk;
1501
+ private releaseAndRemoveChunks;
1502
+ }
1503
+
1504
+ type UniformValues = {
1505
+ Color: vec3;
1506
+ ImageSampler: number;
1507
+ Opacity: number;
1508
+ ValueOffset: number;
1509
+ ValueScale: number;
1510
+ };
1511
+ declare class ImageRenderable extends RenderableObject {
1512
+ private channels_;
1513
+ constructor(width: number, height: number, texture: Texture, channels?: ChannelProps[]);
1514
+ get type(): string;
1515
+ setChannelProps(channels: ChannelProps[]): void;
1516
+ setChannelProperty<K extends keyof ChannelProps>(channelIndex: number, property: K, value: Required<ChannelProps>[K]): void;
1517
+ getUniforms(): UniformValues;
1518
+ }
1519
+
1520
+ type LabelImageRenderableProps = {
1521
+ width: number;
1522
+ height: number;
1523
+ imageData: Texture;
1524
+ colorMap: LabelColorMap;
1525
+ outlineSelected?: boolean;
1526
+ selectedValue?: number | null;
1527
+ };
1528
+ declare class LabelImageRenderable extends RenderableObject {
1529
+ private outlineSelected_;
1530
+ private selectedValue_;
1531
+ constructor(props: LabelImageRenderableProps);
1532
+ get type(): string;
1533
+ getUniforms(): {
1534
+ ImageSampler: number;
1535
+ ColorCycleSampler: number;
1536
+ ColorLookupTableSampler: number;
1537
+ u_outlineSelected: number;
1538
+ u_selectedValue: number;
1539
+ };
1540
+ setColorMap(colorMap: LabelColorMap): void;
1541
+ setSelectedValue(value: number | null): void;
1542
+ private makeColorCycleTexture;
1543
+ private makeColorLookupTableTexture;
1544
+ }
1545
+
1546
+ declare class Texture2DArray extends Texture {
1547
+ private data_;
1548
+ private readonly width_;
1549
+ private readonly height_;
1550
+ private readonly depth_;
1551
+ constructor(data: DataTextureTypedArray, width: number, height: number);
1552
+ get type(): string;
1553
+ set data(data: DataTextureTypedArray);
1554
+ get data(): DataTextureTypedArray;
1555
+ get width(): number;
1556
+ get height(): number;
1557
+ get depth(): number;
1558
+ updateWithChunk(chunk: Chunk, data?: ChunkData): void;
1559
+ static createWithChunk(chunk: Chunk, data?: ChunkData): Texture2DArray;
1560
+ }
1561
+
1562
+ type PointProperties = {
1563
+ position: vec3;
1564
+ color: Color;
1565
+ size: number;
1566
+ markerIndex: number;
1567
+ };
1568
+ declare class Points extends RenderableObject {
1569
+ private atlas_;
1570
+ constructor(points: PointProperties[], markerAtlas: Texture2DArray);
1571
+ get type(): string;
1572
+ }
1573
+
1574
+ declare class ProjectedLineGeometry extends Geometry {
1575
+ constructor(path: vec3[]);
1576
+ private createVertices;
1577
+ private createIndex;
1578
+ }
1579
+
1580
+ type LineParameters = {
1581
+ geometry: ProjectedLineGeometry;
1582
+ color: ColorLike;
1583
+ width: number;
1584
+ };
1585
+ declare class ProjectedLine extends RenderableObject {
1586
+ private color_;
1587
+ private width_;
1588
+ constructor({ geometry, color, width }: LineParameters);
1589
+ get type(): string;
1590
+ get color(): Color;
1591
+ set color(value: ColorLike);
1592
+ get width(): number;
1593
+ set width(value: number);
1594
+ getUniforms(): {
1595
+ LineColor: [number, number, number];
1596
+ LineWidth: number;
1597
+ };
1598
+ }
1599
+
1600
+ declare class VolumeRenderable extends RenderableObject {
1601
+ voxelScale: vec3;
1602
+ private channels_;
1603
+ private channelToTextureIndex_;
1604
+ private loadedChannels_;
1605
+ constructor();
1606
+ get type(): string;
1607
+ updateVolumeWithChunk(chunk: Chunk): void;
1608
+ private addChannelTexture;
1609
+ private updateChannelTexture;
1610
+ clearLoadedChannels(): void;
1611
+ getUniforms(): Record<string, number[] | number>;
1612
+ /**
1613
+ * 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.
1614
+ */
1615
+ private getAvailableChannelTexture;
1616
+ setChannelProps(channels: ChannelProps[]): void;
1617
+ setChannelProperty<K extends keyof ChannelProps>(channelIndex: number, property: K, value: Required<ChannelProps>[K]): void;
1618
+ }
1619
+
1620
+ type PerspectiveCameraOptions = {
1621
+ fov?: number;
1622
+ aspectRatio?: number;
1623
+ near?: number;
1624
+ far?: number;
1625
+ position?: vec3;
1626
+ };
1627
+ declare class PerspectiveCamera extends Camera {
1628
+ private fov_;
1629
+ private aspectRatio_;
1630
+ constructor(options?: PerspectiveCameraOptions);
1631
+ setAspectRatio(aspectRatio: number): void;
1632
+ get type(): CameraType;
1633
+ get fov(): number;
1634
+ zoom(factor: number): void;
1635
+ protected updateProjectionMatrix(): void;
1636
+ }
1637
+
1638
+ type OrbitParams = {
1639
+ radius?: number;
1640
+ yaw?: number;
1641
+ pitch?: number;
1642
+ target?: vec3;
1643
+ dampingFactor?: number;
1644
+ };
1645
+ declare class OrbitControls implements CameraControls {
1646
+ private readonly camera_;
1647
+ private readonly orbitVelocity_;
1648
+ private readonly panVelocity_;
1649
+ private readonly currPos_;
1650
+ private readonly currCenter_;
1651
+ private readonly dampingFactor_;
1652
+ private currMouseButton_;
1653
+ constructor(camera: PerspectiveCamera, params?: OrbitParams);
1654
+ get isMoving(): boolean;
1655
+ onEvent(event: EventContext): void;
1656
+ onUpdate(dt: number): void;
1657
+ private onPointerDown;
1658
+ private onPointerMove;
1659
+ private onWheel;
1660
+ private onPointerEnd;
1661
+ private orbit;
1662
+ private pan;
1663
+ private zoom;
1664
+ private updateCamera;
1665
+ private cutoffLowVelocity;
1666
+ }
1667
+
1668
+ /**JSON from OME-NGFF .zattrs*/
1597
1669
  declare const Image: z.ZodObject<{
1598
1670
  /**The multiscale datasets for this image*/
1599
1671
  multiscales: z.ZodArray<z.ZodObject<{
@@ -1795,49 +1867,5 @@ declare const Image: z.ZodObject<{
1795
1867
  }>;
1796
1868
  type Image = z.infer<typeof Image>;
1797
1869
 
1798
- declare class Texture2DArray extends Texture {
1799
- private data_;
1800
- private readonly width_;
1801
- private readonly height_;
1802
- private readonly depth_;
1803
- constructor(data: DataTextureTypedArray, width: number, height: number);
1804
- get type(): string;
1805
- set data(data: DataTextureTypedArray);
1806
- get data(): DataTextureTypedArray;
1807
- get width(): number;
1808
- get height(): number;
1809
- get depth(): number;
1810
- updateWithChunk(chunk: Chunk, data?: ChunkData): void;
1811
- static createWithChunk(chunk: Chunk, data?: ChunkData): Texture2DArray;
1812
- }
1813
-
1814
- type PointProperties = {
1815
- position: vec3;
1816
- color: Color;
1817
- size: number;
1818
- markerIndex: number;
1819
- };
1820
- declare class Points extends RenderableObject {
1821
- private atlas_;
1822
- constructor(points: PointProperties[], markerAtlas: Texture2DArray);
1823
- get type(): string;
1824
- }
1825
-
1826
- declare class Texture3D extends Texture {
1827
- private data_;
1828
- private readonly width_;
1829
- private readonly height_;
1830
- private readonly depth_;
1831
- constructor(data: DataTextureTypedArray, width: number, height: number, depth: number);
1832
- set data(data: DataTextureTypedArray);
1833
- get type(): string;
1834
- get data(): DataTextureTypedArray;
1835
- get width(): number;
1836
- get height(): number;
1837
- get depth(): number;
1838
- updateWithChunk(chunk: Chunk): void;
1839
- static createWithChunk(chunk: Chunk): Texture3D;
1840
- }
1841
-
1842
- export { AxesLayer, Box2, Box3, Color, EventContext, Frustum, Idetik, ImageLayer, LabelLayer, Layer, LayerManager, Image as OmeZarrImage, OmeZarrImageSource, OrbitControls, OrthographicCamera, PanZoomControls, PerspectiveCamera, Plane, Points, Spherical, Texture2DArray, Texture3D, Viewport, VolumeLayer, WebGLRenderer, createExplorationPolicy, createImageSourcePolicy, createNoPrefetchPolicy, createPlaybackPolicy, loadOmeZarrPlate, loadOmeZarrWell, loadOmeroChannels, loadOmeroDefaults, parseViewportConfigs, validateNewViewport };
1843
- export type { CameraControls, ChannelProps, ChannelsEnabled, Chunk, ChunkLoader, ColorLike, ImageLayerProps, ImageSourcePolicy, ImageSourcePolicyConfig, LabelColorMapProps, LabelLayerProps, LayerState, OmeroChannel, OmeroMetadata, Overlay, PointPickingResult, PriorityCategory, QueueStats, SliceCoordinates, ViewportConfig };
1870
+ export { AxesLayer, Color, Idetik, ImageLayer, ImageRenderable, LabelColorMap, LabelImageRenderable, LabelLayer, Layer, Image as OmeZarrImage, OmeZarrImageSource, OrbitControls, OrthographicCamera, PanZoomControls, PerspectiveCamera, Points, ProjectedLine, Texture2DArray, VolumeLayer, VolumeRenderable, createExplorationPolicy, createImageSourcePolicy, createNoPrefetchPolicy, createPlaybackPolicy, loadOmeZarrPlate, loadOmeZarrWell, loadOmeroChannels, loadOmeroDefaults };
1871
+ export type { ChannelProps, ColorLike, LayerState, Overlay, SliceCoordinates };