@vitessce/all 3.8.10 → 3.8.13

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.
@@ -1,7 +1,7 @@
1
- import { G as Group, M as Matrix4, T as TrianglesDrawMode, a as TriangleFanDrawMode, b as TriangleStripDrawMode, R as REVISION, L as Loader, c as LoaderUtils, F as FileLoader, d as MeshPhysicalMaterial, V as Vector2, C as Color, S as SpotLight, P as PointLight, D as DirectionalLight, e as Vector3, I as InstancedMesh, Q as Quaternion, O as Object3D, f as TextureLoader, g as ImageBitmapLoader, B as BufferAttribute, h as InterleavedBuffer, i as LinearMipmapLinearFilter, N as NearestMipmapLinearFilter, j as LinearMipmapNearestFilter, k as NearestMipmapNearestFilter, l as LinearFilter, m as NearestFilter, n as RepeatWrapping, o as MirroredRepeatWrapping, p as ClampToEdgeWrapping, q as PointsMaterial, r as Material, s as LineBasicMaterial, t as MeshStandardMaterial, u as DoubleSide, v as MeshBasicMaterial, w as PropertyBinding, x as BufferGeometry, y as SkinnedMesh, z as Mesh, A as LineSegments, E as Line$1, H as LineLoop, J as Points, K as PerspectiveCamera, U as MathUtils, W as OrthographicCamera, X as Skeleton, Y as InterpolateDiscrete, Z as InterpolateLinear, _ as AnimationClip, $ as Bone, a0 as InterleavedBufferAttribute, a1 as Texture, a2 as VectorKeyframeTrack, a3 as QuaternionKeyframeTrack, a4 as NumberKeyframeTrack, a5 as FrontSide, a6 as Interpolant, a7 as Box3, a8 as Sphere, a9 as InstancedBufferGeometry, aa as Float32BufferAttribute, ab as InstancedInterleavedBuffer, ac as WireframeGeometry, ad as ShaderMaterial, ae as UniformsUtils, af as UniformsLib, ag as Vector4, ah as Line3, ai as SphereGeometry, aj as _extends, ak as Plane, al as Triangle, am as BackSide, an as Ray$1, ao as jsxRuntimeExports, ap as Matrix3, aq as CoordinationType, ar as Data3DTexture, as as RedFormat, at as FloatType, au as getImageSize, av as Scene } from "./index-NBOfpK3S.js";
1
+ import { G as Group, M as Matrix4, T as TrianglesDrawMode, a as TriangleFanDrawMode, b as TriangleStripDrawMode, R as REVISION, L as Loader, c as LoaderUtils, F as FileLoader, d as MeshPhysicalMaterial, V as Vector2, C as Color, S as SpotLight, P as PointLight, D as DirectionalLight, e as Vector3, I as InstancedMesh, Q as Quaternion, O as Object3D, f as TextureLoader, g as ImageBitmapLoader, B as BufferAttribute, h as InterleavedBuffer, i as LinearMipmapLinearFilter, N as NearestMipmapLinearFilter, j as LinearMipmapNearestFilter, k as NearestMipmapNearestFilter, l as LinearFilter, m as NearestFilter, n as RepeatWrapping, o as MirroredRepeatWrapping, p as ClampToEdgeWrapping, q as PointsMaterial, r as Material, s as LineBasicMaterial, t as MeshStandardMaterial, u as DoubleSide, v as MeshBasicMaterial, w as PropertyBinding, x as BufferGeometry, y as SkinnedMesh, z as Mesh, A as LineSegments, E as Line$1, H as LineLoop, J as Points, K as PerspectiveCamera, U as MathUtils, W as OrthographicCamera, X as Skeleton, Y as InterpolateDiscrete, Z as InterpolateLinear, _ as AnimationClip, $ as Bone, a0 as InterleavedBufferAttribute, a1 as Texture, a2 as VectorKeyframeTrack, a3 as QuaternionKeyframeTrack, a4 as NumberKeyframeTrack, a5 as FrontSide, a6 as Interpolant, a7 as Box3, a8 as Sphere, a9 as InstancedBufferGeometry, aa as Float32BufferAttribute, ab as InstancedInterleavedBuffer, ac as WireframeGeometry, ad as ShaderMaterial, ae as UniformsUtils, af as UniformsLib, ag as Vector4, ah as Line3, ai as SphereGeometry, aj as _extends, ak as Plane, al as Triangle, am as BackSide, an as Ray$1, ao as jsxRuntimeExports, ap as Matrix3, aq as CoordinationType, ar as Data3DTexture, as as RedFormat, at as FloatType, au as getImageSize, av as Scene } from "./index-B0JyLhTY.js";
2
2
  import * as React from "react";
3
3
  import { useRef, useEffect, useState, forwardRef } from "react";
4
- import { u as useThree, a as useFrame, c as create, e as extend, b as createPortal, O as OrbitControls, C as Canvas } from "./OrbitControls-t9CaxJow.js";
4
+ import { u as useThree, a as useFrame, c as create, e as extend, b as createPortal, O as OrbitControls, C as Canvas } from "./OrbitControls-Bq0h_Ctg.js";
5
5
  const isPromise = (promise) => typeof promise === "object" && typeof promise.then === "function";
6
6
  const globalCache = [];
7
7
  function shallowEqualArrays(arrA, arrB, equal = (a, b) => a === b) {
@@ -5027,7 +5027,7 @@ const Text = /* @__PURE__ */ React.forwardRef(({
5027
5027
  const {
5028
5028
  Text: TextMeshImpl,
5029
5029
  preloadFont
5030
- } = suspend(async () => import("./troika-three-text.esm-O9xfslQt.js"), []);
5030
+ } = suspend(async () => import("./troika-three-text.esm-aenn8tL8.js"), []);
5031
5031
  const invalidate = useThree(({
5032
5032
  invalidate: invalidate2
5033
5033
  }) => invalidate2);
@@ -1,6 +1,6 @@
1
- import { aw as log, ax as isEqual, ar as Data3DTexture, as as RedFormat, ay as UnsignedByteType, l as LinearFilter, az as RedIntegerFormat, aA as UnsignedIntType, m as NearestFilter, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aB as WebGLMultipleRenderTargets, aC as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aD as PlaneGeometry, ao as jsxRuntimeExports, aE as GLSL3, am as BackSide } from "./index-NBOfpK3S.js";
2
- import { useRef, useState, useMemo, useEffect, useCallback } from "react";
3
- import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-t9CaxJow.js";
1
+ import { aw as log, ax as isEqual, ar as Data3DTexture, as as RedFormat, ay as UnsignedByteType, l as LinearFilter, az as RedIntegerFormat, aA as UnsignedIntType, m as NearestFilter, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aB as WebGLMultipleRenderTargets, aC as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aD as PlaneGeometry, aE as useEventCallback, ao as jsxRuntimeExports, aF as GLSL3, am as BackSide } from "./index-B0JyLhTY.js";
2
+ import { useRef, useState, useMemo, useEffect, Suspense } from "react";
3
+ import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-Bq0h_Ctg.js";
4
4
  const LogLevel = {
5
5
  INFO: "info",
6
6
  WARN: "warn",
@@ -345,12 +345,55 @@ class VolumeDataManager {
345
345
  this.timeStamp = 0;
346
346
  this.k = 40;
347
347
  this.noNewRequests = false;
348
+ this.manuallyStopped = false;
348
349
  this.needsBailout = false;
349
350
  this.initStatus = INIT_STATUS.NOT_STARTED;
350
351
  this.initError = null;
351
352
  this._lastChannelConfig = null;
353
+ this.currentRequestCount = 0;
354
+ this.totalBricksRequested = 0;
352
355
  logWithColor$2("VolumeDataManager constructor complete");
353
356
  }
357
+ /**
358
+ * Get loading progress information
359
+ * @returns {Object} Loading progress with bricksLoaded, totalBricks, isLoading, and percentage
360
+ */
361
+ getLoadingProgress() {
362
+ const bricksLoaded = this.bricksEverLoaded.size;
363
+ const isLoading = !this.noNewRequests && this.currentRequestCount > 0;
364
+ const percentage = this.totalBricksRequested > 0 ? (this.totalBricksRequested - this.currentRequestCount) / this.totalBricksRequested * 100 : 0;
365
+ return {
366
+ bricksLoaded,
367
+ currentRequestCount: this.currentRequestCount,
368
+ totalBricksRequested: this.totalBricksRequested,
369
+ isLoading,
370
+ percentage,
371
+ noNewRequests: this.noNewRequests
372
+ };
373
+ }
374
+ /**
375
+ * Manually stop loading and render at highest resolution
376
+ */
377
+ stopLoading() {
378
+ log.debug("Manually stopping data loading");
379
+ this.noNewRequests = true;
380
+ this.manuallyStopped = true;
381
+ this.needsBailout = true;
382
+ this.currentRequestCount = 0;
383
+ this.totalBricksRequested = 0;
384
+ }
385
+ /**
386
+ * Manually restart loading
387
+ */
388
+ restartLoading() {
389
+ log.debug("Manually restarting data loading");
390
+ this.noNewRequests = false;
391
+ this.manuallyStopped = false;
392
+ this.needsBailout = false;
393
+ this.triggerUsage = true;
394
+ this.currentRequestCount = 0;
395
+ this.totalBricksRequested = 0;
396
+ }
354
397
  /**
355
398
  * Handle WebGL context loss
356
399
  */
@@ -621,16 +664,11 @@ class VolumeDataManager {
621
664
  this.bcTHREE = bcTHREE;
622
665
  logWithColor$2("initMRMCPT() COMPLETE");
623
666
  }
624
- /*
625
- testTexture() {
626
- log.debug('testTexture pt', this.ptTHREE);
627
- log.debug('testTexture bc', this.bcTHREE);
628
- }
629
- */
630
667
  async initTexture() {
631
668
  const requests = [
632
669
  { x: 0, y: 0, z: 1 }
633
670
  ];
671
+ logWithColor$2("initTexture - loading first brick");
634
672
  await this.handleBrickRequests(requests);
635
673
  }
636
674
  updateChannels(channelProps) {
@@ -816,6 +854,7 @@ class VolumeDataManager {
816
854
  if (!this.zarrStore || !this.zarrStore.arrays[resolution]) {
817
855
  throw new Error("Zarr store or resolution not initialized");
818
856
  }
857
+ log.debug("loadZarrChunk", { t, c, z, y, x, resolution });
819
858
  const array = this.zarrStore.arrays[resolution];
820
859
  const chunkEntry = await array.getChunk([t, c, z, y, x]);
821
860
  if (!chunkEntry) {
@@ -831,6 +870,10 @@ class VolumeDataManager {
831
870
  log.debug("processRequestData: already busy, skipping");
832
871
  return;
833
872
  }
873
+ if (this.noNewRequests) {
874
+ log.debug("processRequestData: loading stopped by user, skipping");
875
+ return;
876
+ }
834
877
  if (this.isContextLost()) {
835
878
  log.debug("processRequestData: WebGL context is lost, skipping");
836
879
  return;
@@ -1032,6 +1075,7 @@ class VolumeDataManager {
1032
1075
  }
1033
1076
  log.debug("starting to load zarr chunk", { resolution, z, y, x, zarrChannel });
1034
1077
  let chunk = await this.loadZarrChunk(0, zarrChannel, z, y, x, resolution);
1078
+ log.debug("chunk", chunk);
1035
1079
  if (chunk instanceof Uint16Array) {
1036
1080
  log.debug("chunk is Uint16Array, converting to Uint8Array");
1037
1081
  if (this.channels.downsampleMin[channel] === void 0) {
@@ -1042,9 +1086,15 @@ class VolumeDataManager {
1042
1086
  log.debug("this.channels.downsampleMin[channel]", this.channels.downsampleMin[channel]);
1043
1087
  log.debug("this.channels.downsampleMax[channel]", this.channels.downsampleMax[channel]);
1044
1088
  }
1089
+ const uint16View = new Uint16Array(chunk.buffer);
1045
1090
  const uint8Chunk = new Uint8Array(chunk.length);
1046
- for (let i = 0; i < chunk.length; i++) {
1047
- uint8Chunk[i] = Math.floor((chunk[i] - this.channels.downsampleMin[channel]) / (this.channels.downsampleMax[channel] - this.channels.downsampleMin[channel]) * 255);
1091
+ const minVal = this.channels.downsampleMin[channel];
1092
+ const maxVal = this.channels.downsampleMax[channel];
1093
+ const range = maxVal - minVal;
1094
+ for (let i = 0; i < uint16View.length; i++) {
1095
+ const val = uint16View[i];
1096
+ const clamped = Math.max(minVal, Math.min(maxVal, val));
1097
+ uint8Chunk[i] = (clamped - minVal) * 255 / range | 0;
1048
1098
  }
1049
1099
  chunk = uint8Chunk;
1050
1100
  }
@@ -1097,12 +1147,14 @@ class VolumeDataManager {
1097
1147
  async handleBrickRequests(ptRequests) {
1098
1148
  if (ptRequests.length === 0)
1099
1149
  return;
1150
+ this.totalBricksRequested = ptRequests.length;
1151
+ this.currentRequestCount = ptRequests.length;
1100
1152
  const slots = this._allocateBCSlots(ptRequests.length);
1101
1153
  log.debug("Handling brick requests:", { requestCount: ptRequests.length, slotCount: slots.length });
1102
1154
  log.debug("handleBrickRequests: starting for loop");
1103
1155
  for (let i = 0; i < ptRequests.length; ++i) {
1104
- log.debug("uploading brick", ptRequests[i], slots[i]);
1105
1156
  await this._uploadBrick(ptRequests[i], slots[i]);
1157
+ this.currentRequestCount = ptRequests.length - i - 1;
1106
1158
  const rlength = this.bricksEverLoaded.size;
1107
1159
  this.bricksEverLoaded.add(`${ptRequests[i].x},${ptRequests[i].y},${ptRequests[i].z}`);
1108
1160
  if (rlength === this.bricksEverLoaded.size) {
@@ -1111,9 +1163,11 @@ class VolumeDataManager {
1111
1163
  if (this.needsBailout) {
1112
1164
  log.debug("Bailing out of handleBrickRequests early due to needsBailout flag");
1113
1165
  this.needsBailout = false;
1166
+ this.currentRequestCount = 0;
1114
1167
  break;
1115
1168
  }
1116
1169
  }
1170
+ this.currentRequestCount = 0;
1117
1171
  log.debug("this.bricksEverLoaded", this.bricksEverLoaded);
1118
1172
  }
1119
1173
  /* --------------------------------------------------------- *
@@ -1211,7 +1265,7 @@ uniform usampler3D pageTableTex;
1211
1265
  // ========================================
1212
1266
  // RENDERING PARAMETERS/CONSTANTS
1213
1267
  // ========================================
1214
- // Rendering style: 0=MIP, 1=MinIP, 2=standard volume rendering
1268
+ // Rendering style: 0=MIP, 1=MinIP, 2=standard volume rendering, 3=DEBUG
1215
1269
  uniform int u_renderstyle;
1216
1270
  // Global opacity multiplier for volume rendering
1217
1271
  uniform float opacity;
@@ -2223,7 +2277,19 @@ void main(void) {
2223
2277
  // TODO: figure out how to hook it up with frontend
2224
2278
  int [] c_res_min = int[7](getRes(0).x, getRes(1).x, getRes(2).x, getRes(3).x, getRes(4).x, getRes(5).x, getRes(6).x);
2225
2279
  int [] c_res_max = int[7](getRes(0).y, getRes(1).y, getRes(2).y, getRes(3).y, getRes(4).y, getRes(5).y, getRes(6).y);
2226
-
2280
+ vec3 [] res_color = vec3[10](
2281
+ vec3(1.0, 0.0, 0.0),
2282
+ vec3(0.0, 0.0, 1.0),
2283
+ vec3(0.0, 1.0, 0.0),
2284
+ vec3(1.0, 0.0, 1.0),
2285
+ vec3(0.0, 1.0, 1.0),
2286
+ vec3(1.0, 1.0, 0.0),
2287
+ vec3(1.0, 0.5, 0.5),
2288
+ vec3(0.5, 0.5, 1.0),
2289
+ vec3(0.5, 1.0, 0.5),
2290
+ vec3(0.5, 0.5, 0.5)
2291
+ );
2292
+
2227
2293
  // ========================================
2228
2294
  // PER-CHANNEL STATE ARRAYS
2229
2295
  // ========================================
@@ -2661,7 +2727,13 @@ void main(void) {
2661
2727
  // Accumulate this channel's contribution.
2662
2728
  // sum up the values onto the slice values
2663
2729
  total += c_val_current[c];
2664
- rgbCombo += c_val_current[c] * c_color[c];
2730
+ if (u_renderstyle == 3) {
2731
+ rgbCombo += c_val_current[c] * res_color[targetRes];
2732
+ } else if (u_renderstyle == 4) {
2733
+ rgbCombo += c_val_current[c] * res_color[c_res_current[c]];
2734
+ } else {
2735
+ rgbCombo += c_val_current[c] * c_color[c];
2736
+ }
2665
2737
 
2666
2738
  }
2667
2739
 
@@ -2748,6 +2820,7 @@ const VolumeShader = {
2748
2820
  zClip: { value: new Vector2(0, 1e6) },
2749
2821
  u_window_size: { value: new Vector2(1, 1) },
2750
2822
  u_vol_scale: { value: new Vector3(1, 1, 1) },
2823
+ // Set renderstyle to 3 or 4 for debugging modes
2751
2824
  u_renderstyle: { value: 2 },
2752
2825
  brickCacheTex: { type: "sampler3D", value: null },
2753
2826
  pageTableTex: { type: "usampler3D", value: null },
@@ -2850,10 +2923,10 @@ class VolumeRenderManager {
2850
2923
  * @returns {Object} Extracted rendering settings
2851
2924
  */
2852
2925
  extractRenderingSettingsFromProps(props) {
2853
- logWithColor$1("Extracting rendering settings from props");
2854
2926
  const { images = {}, imageLayerScopes = [], imageLayerCoordination = [{}], imageChannelScopesByLayer = {}, imageChannelCoordination = [{}], spatialRenderingMode } = props;
2855
2927
  const layerScope = imageLayerScopes[0];
2856
2928
  if (!layerScope) {
2929
+ logWithColor$1("Extracting rendering settings from props - no layer scope");
2857
2930
  return {
2858
2931
  valid: false
2859
2932
  };
@@ -2863,11 +2936,13 @@ class VolumeRenderManager {
2863
2936
  const channelCoordination = imageChannelCoordination[0][layerScope];
2864
2937
  const data = images[layerScope]?.image?.instance?.getData();
2865
2938
  if (!data) {
2939
+ logWithColor$1("Extracting rendering settings from props - no image data");
2866
2940
  return {
2867
2941
  valid: false
2868
2942
  };
2869
2943
  }
2870
2944
  if (!channelCoordination[channelScopes?.[0]][CoordinationType.SPATIAL_CHANNEL_WINDOW]) {
2945
+ logWithColor$1("Extracting rendering settings from props - no channel window set");
2871
2946
  return {
2872
2947
  valid: false
2873
2948
  };
@@ -2909,10 +2984,12 @@ class VolumeRenderManager {
2909
2984
  let xSlice = layerCoordination[CoordinationType.SPATIAL_SLICE_X];
2910
2985
  let ySlice = layerCoordination[CoordinationType.SPATIAL_SLICE_Y];
2911
2986
  let zSlice = layerCoordination[CoordinationType.SPATIAL_SLICE_Z];
2987
+ const lodFactor = layerCoordination[CoordinationType.SPATIAL_LOD_FACTOR] ?? 1;
2912
2988
  xSlice = xSlice !== null ? xSlice : new Vector2(-1, 1e5);
2913
2989
  ySlice = ySlice !== null ? ySlice : new Vector2(-1, 1e5);
2914
2990
  zSlice = zSlice !== null ? zSlice : new Vector2(-1, 1e5);
2915
2991
  const allChannels = images[layerScope].image.loaders[0].channels;
2992
+ logWithColor$1("Extracting rendering settings from props - success");
2916
2993
  return {
2917
2994
  valid: true,
2918
2995
  channelsVisible,
@@ -2926,7 +3003,8 @@ class VolumeRenderManager {
2926
3003
  layerTransparency,
2927
3004
  xSlice,
2928
3005
  ySlice,
2929
- zSlice
3006
+ zSlice,
3007
+ lodFactor
2930
3008
  };
2931
3009
  }
2932
3010
  /**
@@ -2935,9 +3013,9 @@ class VolumeRenderManager {
2935
3013
  * @returns {boolean} True if settings were successfully updated
2936
3014
  */
2937
3015
  updateFromProps(props) {
2938
- logWithColor$1("Updating from props");
2939
3016
  const settings = this.extractRenderingSettingsFromProps(props);
2940
3017
  if (!settings.valid) {
3018
+ logWithColor$1("Updating from props - invalid settings");
2941
3019
  return false;
2942
3020
  }
2943
3021
  this.channelsVisible = settings.channelsVisible;
@@ -2950,6 +3028,10 @@ class VolumeRenderManager {
2950
3028
  this.xSlice = settings.xSlice;
2951
3029
  this.ySlice = settings.ySlice;
2952
3030
  this.zSlice = settings.zSlice;
3031
+ this.uniforms.lodFactor.value = settings.lodFactor;
3032
+ logWithColor$1(`lodFactor ${settings.lodFactor}`);
3033
+ this.shader.uniforms.lodFactor.value = settings.lodFactor;
3034
+ logWithColor$1("Updating from props - success");
2953
3035
  return true;
2954
3036
  }
2955
3037
  /**
@@ -3354,7 +3436,7 @@ function performBlitPass(_gl, { screenSceneRef, screenCameraRef }) {
3354
3436
  function handleRequests(_gl, { frameRef, dataManager, mrtRef, bufRequest, bufUsage }) {
3355
3437
  const ctx = _gl.getContext();
3356
3438
  const f = frameRef.current;
3357
- if (dataManager.noNewRequests === true && f % 100 === 0 && f < 500) {
3439
+ if (dataManager.noNewRequests === true && !dataManager.manuallyStopped && f % 100 === 0 && f < 500) {
3358
3440
  dataManager.noNewRequests = false;
3359
3441
  }
3360
3442
  if (dataManager.triggerRequest === true && dataManager.noNewRequests === false) {
@@ -3379,8 +3461,10 @@ function handleAdaptiveQuality(clock, params) {
3379
3461
  }
3380
3462
  }
3381
3463
  if (isInteracting) {
3382
- dataManager.noNewRequests = false;
3383
- dataManager.triggerUsage = true;
3464
+ if (!dataManager.manuallyStopped) {
3465
+ dataManager.noNewRequests = false;
3466
+ dataManager.triggerUsage = true;
3467
+ }
3384
3468
  return;
3385
3469
  }
3386
3470
  if (spatialRenderingModeChanging)
@@ -3438,7 +3522,8 @@ function VolumeView(props) {
3438
3522
  imageChannelCoordination,
3439
3523
  // onInitComplete,
3440
3524
  spatialRenderingMode,
3441
- spatialRenderingModeChanging
3525
+ spatialRenderingModeChanging,
3526
+ onVolumeLoadingUpdate
3442
3527
  } = props;
3443
3528
  const {
3444
3529
  gl
@@ -3457,11 +3542,11 @@ function VolumeView(props) {
3457
3542
  meshScale: [1, 1, 1],
3458
3543
  geometrySize: [1, 1, 1]
3459
3544
  });
3460
- const [is3D, setIs3D] = useState(false);
3545
+ const is3D = spatialRenderingMode === "3D";
3461
3546
  const screenSceneRef = useRef(null);
3462
3547
  const screenCameraRef = useRef(null);
3463
3548
  const screenQuadRef = useRef(null);
3464
- const [isInteracting, setIsInteracting] = useState(false);
3549
+ const [isInteracting, _setIsInteracting] = useState(false);
3465
3550
  const interactionTimeoutRef = useRef(null);
3466
3551
  const stillRef = useRef(false);
3467
3552
  const frameRef = useRef(0);
@@ -3514,6 +3599,7 @@ function VolumeView(props) {
3514
3599
  const firstImageLayerChannelCoordination = imageChannelCoordination?.[0]?.[firstImageLayerScope];
3515
3600
  useEffect(() => {
3516
3601
  logWithColor("useEffect INIT");
3602
+ let hasRerun = false;
3517
3603
  if (!dataManager || !renderManager) {
3518
3604
  log.debug("dataManager or renderManager not initialized yet");
3519
3605
  return;
@@ -3526,24 +3612,32 @@ function VolumeView(props) {
3526
3612
  log.debug("no firstImageLayerChannelCoordination yet");
3527
3613
  return;
3528
3614
  }
3529
- (async () => {
3615
+ const initializeDataManager = async () => {
3616
+ if (dataManager.initStatus === INIT_STATUS.COMPLETE) {
3617
+ log.debug("dataManager already initialized, skipping");
3618
+ return;
3619
+ }
3530
3620
  dataManager.initImages(images, imageLayerScopes);
3531
3621
  await dataManager.init(firstImageLayerChannelCoordination);
3622
+ if (hasRerun) {
3623
+ log.debug("Initialization useEffect has rerun, aborting remaining initialization");
3624
+ return;
3625
+ }
3626
+ log.debug("dataManager initialized");
3532
3627
  renderManager.setZarrUniforms(dataManager.zarrStore, dataManager.PT);
3533
3628
  renderManager.setChannelMapping(dataManager.channels.colorMappings);
3534
3629
  log.debug("rm.uniforms", renderManager.uniforms);
3535
- })();
3536
- }, [
3537
- dataManager,
3538
- renderManager,
3539
- images,
3540
- imageLayerScopes
3541
- ]);
3630
+ invalidate();
3631
+ };
3632
+ initializeDataManager();
3633
+ return () => {
3634
+ hasRerun = true;
3635
+ };
3636
+ }, [dataManager, renderManager, images, imageLayerScopes]);
3542
3637
  useEffect(() => {
3543
- logWithColor("useEffect spatialRenderingMode");
3544
3638
  const on3D = spatialRenderingMode === "3D";
3545
- setIs3D(on3D);
3546
3639
  if (on3D && dataManager && renderManager) {
3640
+ logWithColor("useEffect spatialRenderingMode");
3547
3641
  const propsForRenderManager = {
3548
3642
  images,
3549
3643
  imageLayerScopes,
@@ -3576,33 +3670,15 @@ function VolumeView(props) {
3576
3670
  }
3577
3671
  }
3578
3672
  }
3579
- }, [
3580
- dataManager,
3581
- renderManager,
3582
- images,
3583
- imageLayerScopes,
3584
- imageLayerCoordination,
3585
- imageChannelScopesByLayer,
3586
- imageChannelCoordination,
3587
- spatialRenderingMode
3588
- ]);
3589
- useEffect(() => {
3590
- logWithColor("useEffect isInteracting");
3591
- if (isInteracting) {
3592
- const meshRefUniforms = meshRef.current?.material?.uniforms;
3593
- if (meshRefUniforms) {
3594
- meshRefUniforms.renderRes.value = dataManager.PT.lowestDataRes;
3595
- }
3596
- stillRef.current = false;
3597
- invalidate();
3598
- }
3599
- }, [invalidate, isInteracting]);
3673
+ }, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode]);
3600
3674
  const RENDER_PRIORITY = 1;
3601
3675
  useFrame((state, delta, xrFrame) => {
3602
- if (!mrtRef.current || !dataManager || !renderManager)
3676
+ if (!mrtRef.current || !dataManager || !renderManager) {
3603
3677
  return;
3604
- if (!renderState.shader)
3678
+ }
3679
+ if (!renderState.shader) {
3605
3680
  return;
3681
+ }
3606
3682
  const { gl: frameGl, camera: frameCamera, scene: frameScene, clock } = state;
3607
3683
  if (!stillRef.current) {
3608
3684
  performGeometryPass(frameGl, frameCamera, frameScene, { mrtRef });
@@ -3623,15 +3699,27 @@ function VolumeView(props) {
3623
3699
  });
3624
3700
  frameRef.current += 1;
3625
3701
  }, RENDER_PRIORITY);
3626
- const onOrbitControlsStart = useCallback((e) => {
3702
+ const setIsInteracting = useEventCallback((interacting) => {
3703
+ logWithColor("invalidateOnInteraction callback");
3704
+ _setIsInteracting(interacting);
3705
+ if (interacting) {
3706
+ const meshRefUniforms = meshRef.current?.material?.uniforms;
3707
+ if (meshRefUniforms) {
3708
+ meshRefUniforms.renderRes.value = dataManager.PT.lowestDataRes;
3709
+ }
3710
+ stillRef.current = false;
3711
+ invalidate();
3712
+ }
3713
+ });
3714
+ const onOrbitControlsStart = useEventCallback((e) => {
3627
3715
  setIsInteracting(true);
3628
- }, []);
3629
- const onOrbitControlsEnd = useCallback((e) => {
3716
+ });
3717
+ const onOrbitControlsEnd = useEventCallback((e) => {
3630
3718
  clearTimeout(interactionTimeoutRef.current);
3631
3719
  interactionTimeoutRef.current = setTimeout(() => {
3632
3720
  setIsInteracting(false);
3633
3721
  }, 300);
3634
- }, []);
3722
+ });
3635
3723
  useEffect(() => {
3636
3724
  logWithColor("useEffect firstImageLayerChannelCoordination");
3637
3725
  setIsInteracting(true);
@@ -3642,7 +3730,37 @@ function VolumeView(props) {
3642
3730
  interactionTimeoutRef.current = setTimeout(() => {
3643
3731
  setIsInteracting(false);
3644
3732
  }, 300);
3645
- }, [firstImageLayerChannelCoordination]);
3733
+ }, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting]);
3734
+ const stopLoading = useEventCallback(() => {
3735
+ if (dataManager) {
3736
+ dataManager.stopLoading();
3737
+ }
3738
+ });
3739
+ const restartLoading = useEventCallback(() => {
3740
+ if (dataManager) {
3741
+ dataManager.restartLoading();
3742
+ }
3743
+ });
3744
+ const getLoadingProgress = useEventCallback(() => {
3745
+ if (dataManager) {
3746
+ return dataManager.getLoadingProgress();
3747
+ }
3748
+ return null;
3749
+ });
3750
+ useEffect(() => {
3751
+ if (!onVolumeLoadingUpdate)
3752
+ return void 0;
3753
+ const intervalId = setInterval(() => {
3754
+ const loadingProgress = getLoadingProgress();
3755
+ onVolumeLoadingUpdate({
3756
+ loadingProgress,
3757
+ stillRef,
3758
+ onStopLoading: stopLoading,
3759
+ onRestartLoading: restartLoading
3760
+ });
3761
+ }, 1e3);
3762
+ return () => clearInterval(intervalId);
3763
+ }, [onVolumeLoadingUpdate, stillRef]);
3646
3764
  if (!is3D || !dataManager || !renderManager)
3647
3765
  return null;
3648
3766
  if (!renderState.shader) {
@@ -3679,7 +3797,7 @@ function SpatialWrapper(props) {
3679
3797
  logarithmicDepthBuffer: false,
3680
3798
  preserveDrawingBuffer: false,
3681
3799
  autoClear: false
3682
- }, children: jsxRuntimeExports.jsx(VolumeView, { ...props }) });
3800
+ }, children: jsxRuntimeExports.jsx(Suspense, { fallback: "Initializing Volume View...", children: jsxRuntimeExports.jsx(VolumeView, { ...props }) }) });
3683
3801
  }
3684
3802
  export {
3685
3803
  SpatialWrapper
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { bQ, bO, bM, bP, bN, bL, bR } from "./index-NBOfpK3S.js";
1
+ import { bR, bP, bN, bQ, bO, bM, bS } from "./index-B0JyLhTY.js";
2
2
  import { useComplexCoordination, useComplexCoordinationSecondary, useCoordination, useCoordinationScopes, useCoordinationScopesBy, useGridItemSize, useMultiCoordinationScopesNonNull, useMultiCoordinationScopesSecondaryNonNull, usePageModeView } from "@vitessce/vit-s";
3
3
  export {
4
- bQ as PluginAsyncFunction,
5
- bO as PluginCoordinationType,
6
- bM as PluginFileType,
7
- bP as PluginJointFileType,
8
- bN as PluginViewType,
9
- bL as Vitessce,
4
+ bR as PluginAsyncFunction,
5
+ bP as PluginCoordinationType,
6
+ bN as PluginFileType,
7
+ bQ as PluginJointFileType,
8
+ bO as PluginViewType,
9
+ bM as Vitessce,
10
10
  useComplexCoordination,
11
11
  useComplexCoordinationSecondary,
12
12
  useCoordination,
@@ -16,5 +16,5 @@ export {
16
16
  useMultiCoordinationScopesNonNull,
17
17
  useMultiCoordinationScopesSecondaryNonNull,
18
18
  usePageModeView,
19
- bR as z
19
+ bS as z
20
20
  };
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-NBOfpK3S.js";
1
+ import { aX as BaseDecoder } from "./index-B0JyLhTY.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { aF as getDefaultExportFromCjs, aW as BaseDecoder, aX as LercParameters, aY as LercAddCompression } from "./index-NBOfpK3S.js";
2
+ import { aG as getDefaultExportFromCjs, aX as BaseDecoder, aY as LercParameters, aZ as LercAddCompression } from "./index-B0JyLhTY.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-NBOfpK3S.js";
1
+ import { aX as BaseDecoder } from "./index-B0JyLhTY.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-NBOfpK3S.js";
1
+ import { aX as BaseDecoder } from "./index-B0JyLhTY.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-NBOfpK3S.js";
1
+ import { aX as BaseDecoder } from "./index-B0JyLhTY.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { bG as MeshDistanceMaterial, bH as MeshDepthMaterial, bI as RGBADepthPacking, ae as UniformsUtils, bJ as ShaderChunk, a9 as InstancedBufferGeometry, a8 as Sphere, a7 as Box3, am as BackSide, u as DoubleSide, z as Mesh, a5 as FrontSide, v as MeshBasicMaterial, C as Color, e as Vector3, M as Matrix4, V as Vector2, ap as Matrix3, ag as Vector4, a1 as Texture, l as LinearFilter, aD as PlaneGeometry, x as BufferGeometry, aa as Float32BufferAttribute, bK as InstancedBufferAttribute } from "./index-NBOfpK3S.js";
1
+ import { bH as MeshDistanceMaterial, bI as MeshDepthMaterial, bJ as RGBADepthPacking, ae as UniformsUtils, bK as ShaderChunk, a9 as InstancedBufferGeometry, a8 as Sphere, a7 as Box3, am as BackSide, u as DoubleSide, z as Mesh, a5 as FrontSide, v as MeshBasicMaterial, C as Color, e as Vector3, M as Matrix4, V as Vector2, ap as Matrix3, ag as Vector4, a1 as Texture, l as LinearFilter, aD as PlaneGeometry, x as BufferGeometry, aa as Float32BufferAttribute, bL as InstancedBufferAttribute } from "./index-B0JyLhTY.js";
2
2
  function workerBootstrap() {
3
3
  var modules = /* @__PURE__ */ Object.create(null);
4
4
  function registerModule(ref, callback) {
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-NBOfpK3S.js";
1
+ import { aX as BaseDecoder } from "./index-B0JyLhTY.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"base-plugins.d.ts","sourceRoot":"","sources":["../src/base-plugins.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,CAAC,EAqDF,MAAM,mBAAmB,CAAC;AAmL3B,eAAO,MAAM,aAAa,kBA8BzB,CAAC;AAEF,eAAO,MAAM,aAAa,wDA2EzB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAuGwD,CAAC;gCAClE,CAAC;;;yBAGF,CAAC;gCAEa,CAAC;;;;;;;;;;;;;;;;iBAeZ,CAAC;;;;iBAGrB,CAAJ;;;;;;;YAOqB,CAAC;;;YAGpB,CAAC;;;;;;;YAK0G,CAAC;;;YAExG,CAAC;;;;;;;YAKU,CAAC;;;YAGd,CAAJ;;;;;;;;;;;;;;YAkBK,CAAC;;;YAEQ,CAAC;;;;;;;;YAYX,CAAC;;;;YAGS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;yBAQA,CAAC;gCAAsD,CAAC;;;;;;;;iBAGhC,CAAC;;;;YACF,CAAC;;;;YACH,CAAC;;;;YACX,CAAC;;;;;;;YAExB,CAAC;;;;YACU,CAAC;;;;;;;;;;;;;;;;;;;;yBAG4F,CAAC;gCACtE,CAAC;;;;;;;;iBAEsD,CAAC;;;;YACzB,CAAC;;;;YAClC,CAAC;;;;Y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CAAF;eACgB,CAAC;;;;;;;;;;;;;;;;;;;aAgCd,CAAC;cACQ,CAAC;eACW,CAAC;;;;;;;;;;;;;;;;;;;aAqBE,CAAC;cAC1B,CAAC;eAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aApE/B,CAAC;cAGX,CAAD;eAES,CAAC;;;aAIH,CAAC;cAEP,CAAF;eACgB,CAAC;;;;;;;;;;;;;;;;;;;aAgCd,CAAC;cACQ,CAAC;eACW,CAAC;;;;;;;;;;;;;;;;;;;aAqBE,CAAC;cAC1B,CAAC;eAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kzBA6hB1C,CAAC;AAEF,eAAO,MAAM,kBAAkB,uBAK9B,CAAC"}
@@ -301,6 +301,7 @@ export const baseCoordinationTypes = [
301
301
  new PluginCoordinationType(CoordinationType.SPATIAL_CHANNEL_COLOR, [255, 255, 255], z.array(z.number()).length(3).nullable()),
302
302
  new PluginCoordinationType(CoordinationType.SPATIAL_SEGMENTATION_FILLED, true, z.boolean()),
303
303
  new PluginCoordinationType(CoordinationType.SPATIAL_SEGMENTATION_STROKE_WIDTH, 1.0, z.number()),
304
+ new PluginCoordinationType(CoordinationType.SPATIAL_LOD_FACTOR, 1.0, z.number()),
304
305
  // Reference: https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html
305
306
  new PluginCoordinationType(CoordinationType.PHOTOMETRIC_INTERPRETATION, null, z.enum(['BlackIsZero', 'RGB']).nullable()),
306
307
  new PluginCoordinationType(CoordinationType.SPATIAL_RENDERING_MODE, '2D', z.enum(['2D', '3D']).nullable()),