@vitessce/spatial-accelerated 4.0.0-test.0 → 4.0.0-test.2
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.js +13 -4
- package/dist-tsc/VolumeDataManager.d.ts.map +1 -1
- package/dist-tsc/VolumeDataManager.js +6 -2
- package/dist-tsc/VolumeView.d.ts.map +1 -1
- package/dist-tsc/VolumeView.js +8 -3
- package/package.json +11 -11
- package/src/VolumeDataManager.js +7 -2
- package/src/VolumeView.js +7 -3
package/dist/index.js
CHANGED
|
@@ -10440,7 +10440,8 @@ function _requestBufferToRequestObjects(buffer, k, optsForWeighting) {
|
|
|
10440
10440
|
}
|
|
10441
10441
|
counts.set(packed, (counts.get(packed) || 0) + weight);
|
|
10442
10442
|
}
|
|
10443
|
-
const
|
|
10443
|
+
const sorted = Array.from(counts.entries()).toSorted((a, b) => b[1] - a[1]);
|
|
10444
|
+
const requests = sorted.slice(0, k).map(([packed]) => ({
|
|
10444
10445
|
x: packed >> 22 & 1023,
|
|
10445
10446
|
y: packed >> 12 & 1023,
|
|
10446
10447
|
z: packed & 4095
|
|
@@ -11112,6 +11113,10 @@ class VolumeDataManager {
|
|
|
11112
11113
|
* the center of the render target.
|
|
11113
11114
|
*/
|
|
11114
11115
|
async processRequestData(buffer, optsForWeighting) {
|
|
11116
|
+
if (this.initStatus !== INIT_STATUS.COMPLETE) {
|
|
11117
|
+
log.debug("processRequestData: not yet initialized, skipping");
|
|
11118
|
+
return;
|
|
11119
|
+
}
|
|
11115
11120
|
if (this.isBusy) {
|
|
11116
11121
|
log.debug("processRequestData: already busy, skipping");
|
|
11117
11122
|
return;
|
|
@@ -13998,6 +14003,7 @@ function VolumeView(props) {
|
|
|
13998
14003
|
geometrySize: [1, 1, 1]
|
|
13999
14004
|
});
|
|
14000
14005
|
const is3D = spatialRenderingMode === "3D";
|
|
14006
|
+
const [dmInitComplete, setDmInitComplete] = useState(false);
|
|
14001
14007
|
const screenSceneRef = useRef(null);
|
|
14002
14008
|
const screenCameraRef = useRef(null);
|
|
14003
14009
|
const screenQuadRef = useRef(null);
|
|
@@ -14073,6 +14079,7 @@ function VolumeView(props) {
|
|
|
14073
14079
|
const initializeDataManager = async () => {
|
|
14074
14080
|
if (dataManager.initStatus === INIT_STATUS.COMPLETE) {
|
|
14075
14081
|
log.debug("dataManager already initialized, skipping");
|
|
14082
|
+
setDmInitComplete(true);
|
|
14076
14083
|
return;
|
|
14077
14084
|
}
|
|
14078
14085
|
dataManager.initImages(images, imageLayerScopes);
|
|
@@ -14085,6 +14092,7 @@ function VolumeView(props) {
|
|
|
14085
14092
|
renderManager.setZarrUniforms(dataManager.zarrStore, dataManager.PT);
|
|
14086
14093
|
renderManager.setChannelMapping(dataManager.channels.colorMappings);
|
|
14087
14094
|
log.debug("rm.uniforms", renderManager.uniforms);
|
|
14095
|
+
setDmInitComplete(true);
|
|
14088
14096
|
invalidate();
|
|
14089
14097
|
};
|
|
14090
14098
|
initializeDataManager();
|
|
@@ -14094,7 +14102,7 @@ function VolumeView(props) {
|
|
|
14094
14102
|
}, [dataManager, renderManager, images, imageLayerScopes]);
|
|
14095
14103
|
useEffect(() => {
|
|
14096
14104
|
const on3D = spatialRenderingMode === "3D";
|
|
14097
|
-
if (on3D && dataManager && renderManager) {
|
|
14105
|
+
if (on3D && dataManager && renderManager && dmInitComplete) {
|
|
14098
14106
|
logWithColor("useEffect spatialRenderingMode");
|
|
14099
14107
|
const propsForRenderManager = {
|
|
14100
14108
|
images,
|
|
@@ -14128,7 +14136,7 @@ function VolumeView(props) {
|
|
|
14128
14136
|
}
|
|
14129
14137
|
}
|
|
14130
14138
|
}
|
|
14131
|
-
}, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode]);
|
|
14139
|
+
}, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode, dmInitComplete]);
|
|
14132
14140
|
const RENDER_PRIORITY = 1;
|
|
14133
14141
|
useFrame((state, delta, xrFrame) => {
|
|
14134
14142
|
if (!mrtRef.current || !dataManager || !renderManager) {
|
|
@@ -14184,6 +14192,7 @@ function VolumeView(props) {
|
|
|
14184
14192
|
}, 300);
|
|
14185
14193
|
});
|
|
14186
14194
|
useEffect(() => {
|
|
14195
|
+
if (!dmInitComplete) return;
|
|
14187
14196
|
logWithColor("useEffect firstImageLayerChannelCoordination");
|
|
14188
14197
|
setIsInteracting(true);
|
|
14189
14198
|
log.debug("something about channels changed");
|
|
@@ -14193,7 +14202,7 @@ function VolumeView(props) {
|
|
|
14193
14202
|
interactionTimeoutRef.current = setTimeout(() => {
|
|
14194
14203
|
setIsInteracting(false);
|
|
14195
14204
|
}, 300);
|
|
14196
|
-
}, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting]);
|
|
14205
|
+
}, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting, dmInitComplete]);
|
|
14197
14206
|
const stopLoading = useEventCallback(() => {
|
|
14198
14207
|
if (dataManager) {
|
|
14199
14208
|
dataManager.stopLoading();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumeDataManager.d.ts","sourceRoot":"","sources":["../src/VolumeDataManager.js"],"names":[],"mappings":"AA8DA,yEAaC;AACD,8EAeC;AAED;;;;GAIG;AACH,kDAHW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,8BAC1B,MAAM;;;;;;;;;;;;;EAyHhB;AAMD,kFAaC;AAqBD;;;;;;EA2DC;AAKD;;;;;;;EAuDC;;;;;;;AAzDD,4CAA6C;AA6D7C;IACE,0BAgLC;IAjKG,QAAyB;IAa3B,cAAwB;IAyBxB,sBAA+B;IAC/B,wBAA2B;IAC3B,iCAAmC;IAenC;;;;;MAKC;IAED;;;;;;;;;;;;MAcC;IAED,8BAAmB;IACnB,8BAAmB;IAEnB;;;;;;MAMC;IAED;;;;;;;;;MAiBC;IAQD,2BAAiC;IAYjC,gBAAmB;IAGnB,oBAAuD;IACvD,gBAAwD;IACxD,gBAAmB;IACnB,sBAAsB;IAGtB,aAAmD;IAGnD,gBAAkB;IAElB,sBAAwB;IACxB,wBAA2B;IAC3B,kBAAkB;IAClB,UAAW;IACX,uBAA0B;IAC1B,yBAA4B;IAE5B,sBAAyB;IAGzB,mBAAyC;IACzC,eAAqB;IAGrB;;;;;;;;;;aAA8B;IAG9B,4BAA4B;IAC5B,6BAA6B;IAK/B;;;OAGG;IACH,sBAFa,MAAM,CAiBlB;IAED;;OAEG;IACH,oBAQC;IAED;;OAEG;IACH,uBASC;IAED;;OAEG;IACH,qCAeC;IAED;;OAEG;IACH,yCAqCC;IAED;;OAEG;IACH,qBAMC;IAED;;OAEG;IACH,uCAIC;IAED,qDAIC;IAFC,YAAoB;IACpB,sBAAwC;IAG1C;;;;;OAKG;IACH,mBAFa,OAAO,CAAC,MAAM,CAAC,CA8S3B;IAjQG,kBAAmD;IAmQvD;;;;;;;;OAQG;IACH,mBAkBC;IAGD,6BAMC;IAED,wCAqHC;IAED;;;;;OAKG;IAqBH;;;OAGG;IACH,kCAQC;IAED;;;OAGG;IACH,uBAFa,MAAM,CAUlB;IAED,+BAQC;IAED,kCASC;IAED,gCASC;IAED;;;;;;;;;OASG;IACH,iBARW,MAAM,iBACN,MAAM,iBACN,MAAM,KACN,MAAM,KACN,MAAM,cACN,MAAM,GACJ,OAAO,CAAC,UAAU,CAAC,CA+B/B;IAED;;;;;;;;;;;OAWG;IACH,2BATW,UAAU,oBAGlB;QAAiC,KAAK,EAA9B,MAAM;QACmB,MAAM,EAA/B,MAAM;QACmB,eAAe,EAAxC,MAAM;KAGhB,
|
|
1
|
+
{"version":3,"file":"VolumeDataManager.d.ts","sourceRoot":"","sources":["../src/VolumeDataManager.js"],"names":[],"mappings":"AA8DA,yEAaC;AACD,8EAeC;AAED;;;;GAIG;AACH,kDAHW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,8BAC1B,MAAM;;;;;;;;;;;;;EAyHhB;AAMD,kFAaC;AAqBD;;;;;;EA2DC;AAKD;;;;;;;EAuDC;;;;;;;AAzDD,4CAA6C;AA6D7C;IACE,0BAgLC;IAjKG,QAAyB;IAa3B,cAAwB;IAyBxB,sBAA+B;IAC/B,wBAA2B;IAC3B,iCAAmC;IAenC;;;;;MAKC;IAED;;;;;;;;;;;;MAcC;IAED,8BAAmB;IACnB,8BAAmB;IAEnB;;;;;;MAMC;IAED;;;;;;;;;MAiBC;IAQD,2BAAiC;IAYjC,gBAAmB;IAGnB,oBAAuD;IACvD,gBAAwD;IACxD,gBAAmB;IACnB,sBAAsB;IAGtB,aAAmD;IAGnD,gBAAkB;IAElB,sBAAwB;IACxB,wBAA2B;IAC3B,kBAAkB;IAClB,UAAW;IACX,uBAA0B;IAC1B,yBAA4B;IAE5B,sBAAyB;IAGzB,mBAAyC;IACzC,eAAqB;IAGrB;;;;;;;;;;aAA8B;IAG9B,4BAA4B;IAC5B,6BAA6B;IAK/B;;;OAGG;IACH,sBAFa,MAAM,CAiBlB;IAED;;OAEG;IACH,oBAQC;IAED;;OAEG;IACH,uBASC;IAED;;OAEG;IACH,qCAeC;IAED;;OAEG;IACH,yCAqCC;IAED;;OAEG;IACH,qBAMC;IAED;;OAEG;IACH,uCAIC;IAED,qDAIC;IAFC,YAAoB;IACpB,sBAAwC;IAG1C;;;;;OAKG;IACH,mBAFa,OAAO,CAAC,MAAM,CAAC,CA8S3B;IAjQG,kBAAmD;IAmQvD;;;;;;;;OAQG;IACH,mBAkBC;IAGD,6BAMC;IAED,wCAqHC;IAED;;;;;OAKG;IAqBH;;;OAGG;IACH,kCAQC;IAED;;;OAGG;IACH,uBAFa,MAAM,CAUlB;IAED,+BAQC;IAED,kCASC;IAED,gCASC;IAED;;;;;;;;;OASG;IACH,iBARW,MAAM,iBACN,MAAM,iBACN,MAAM,KACN,MAAM,KACN,MAAM,cACN,MAAM,GACJ,OAAO,CAAC,UAAU,CAAC,CA+B/B;IAED;;;;;;;;;;;OAWG;IACH,2BATW,UAAU,oBAGlB;QAAiC,KAAK,EAA9B,MAAM;QACmB,MAAM,EAA/B,MAAM;QACmB,eAAe,EAAxC,MAAM;KAGhB,iBAsCA;IAGD,6CA0DC;IAGD,gCAcC;IAED,yCAmDC;IAGD,+DAqBC;IAKD;;;;OAIG;IACH,oBAHW,MAAM,GACJ;QAAE,OAAO,MAAC;QAAC,CAAC,MAAC;QAAC,CAAC,MAAC;QAAC,CAAC,MAAA;KAAE,EAAE,CAyClC;IAKD,uDA6LC;IAKD,oDAwDC;IAKD,kBAWC;CACF;8BAvwDM,OAAO"}
|
|
@@ -306,8 +306,8 @@ export function _requestBufferToRequestObjects(buffer, k, optsForWeighting) {
|
|
|
306
306
|
counts.set(packed, (counts.get(packed) || 0) + weight);
|
|
307
307
|
}
|
|
308
308
|
// Get the top K (potentially fewer than K) page table requests by weighted count.
|
|
309
|
-
const
|
|
310
|
-
|
|
309
|
+
const sorted = Array.from(counts.entries()).toSorted((a, b) => b[1] - a[1]);
|
|
310
|
+
const requests = sorted
|
|
311
311
|
.slice(0, k)
|
|
312
312
|
.map(([packed]) => ({
|
|
313
313
|
x: (packed >> 22) & 0x3FF,
|
|
@@ -1108,6 +1108,10 @@ export class VolumeDataManager {
|
|
|
1108
1108
|
* the center of the render target.
|
|
1109
1109
|
*/
|
|
1110
1110
|
async processRequestData(buffer, optsForWeighting) {
|
|
1111
|
+
if (this.initStatus !== INIT_STATUS.COMPLETE) {
|
|
1112
|
+
log.debug('processRequestData: not yet initialized, skipping');
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1111
1115
|
if (this.isBusy) {
|
|
1112
1116
|
log.debug('processRequestData: already busy, skipping');
|
|
1113
1117
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumeView.d.ts","sourceRoot":"","sources":["../src/VolumeView.js"],"names":[],"mappings":"AAkMA,
|
|
1
|
+
{"version":3,"file":"VolumeView.d.ts","sourceRoot":"","sources":["../src/VolumeView.js"],"names":[],"mappings":"AAkMA,4CAihBC"}
|
package/dist-tsc/VolumeView.js
CHANGED
|
@@ -179,6 +179,7 @@ export function VolumeView(props) {
|
|
|
179
179
|
// const [lastRes, setLastRes] = useState(null);
|
|
180
180
|
// const [lastChannels, setLastChannels] = useState([]);
|
|
181
181
|
const is3D = spatialRenderingMode === '3D';
|
|
182
|
+
const [dmInitComplete, setDmInitComplete] = useState(false);
|
|
182
183
|
// const [loading, setLoading] = useState(false);
|
|
183
184
|
// Add new refs for screen quad setup
|
|
184
185
|
const screenSceneRef = useRef(null);
|
|
@@ -277,6 +278,7 @@ export function VolumeView(props) {
|
|
|
277
278
|
const initializeDataManager = async () => {
|
|
278
279
|
if (dataManager.initStatus === INIT_STATUS.COMPLETE) {
|
|
279
280
|
log.debug('dataManager already initialized, skipping');
|
|
281
|
+
setDmInitComplete(true);
|
|
280
282
|
return;
|
|
281
283
|
}
|
|
282
284
|
// TODO(mark): separate the initialization which depends on gl, from the initialization which depends on images, from the dm.init(firstImageLayer)
|
|
@@ -296,6 +298,7 @@ export function VolumeView(props) {
|
|
|
296
298
|
// if (onInitComplete) {
|
|
297
299
|
// onInitComplete({ zarrStoreInfo: dm.zarrStore, deviceLimits: dm.deviceLimits });
|
|
298
300
|
// }
|
|
301
|
+
setDmInitComplete(true);
|
|
299
302
|
invalidate();
|
|
300
303
|
};
|
|
301
304
|
initializeDataManager();
|
|
@@ -346,7 +349,7 @@ export function VolumeView(props) {
|
|
|
346
349
|
// TODO(mark): convert to a useMemo?
|
|
347
350
|
useEffect(() => {
|
|
348
351
|
const on3D = spatialRenderingMode === '3D';
|
|
349
|
-
if (on3D && dataManager && renderManager) {
|
|
352
|
+
if (on3D && dataManager && renderManager && dmInitComplete) {
|
|
350
353
|
logWithColor('useEffect spatialRenderingMode');
|
|
351
354
|
// Direct call, no callbacks needed
|
|
352
355
|
const propsForRenderManager = {
|
|
@@ -388,7 +391,7 @@ export function VolumeView(props) {
|
|
|
388
391
|
}
|
|
389
392
|
}
|
|
390
393
|
}
|
|
391
|
-
}, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode]);
|
|
394
|
+
}, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode, dmInitComplete]);
|
|
392
395
|
// Execute code on every rendered frame.
|
|
393
396
|
// A numerical renderPriority value will cause React Three Fiber
|
|
394
397
|
// to disable automatic rendering altogether.
|
|
@@ -514,6 +517,8 @@ export function VolumeView(props) {
|
|
|
514
517
|
// Set isInteracting while the user is sliding the channel slider
|
|
515
518
|
// for smooth updates.
|
|
516
519
|
useEffect(() => {
|
|
520
|
+
if (!dmInitComplete)
|
|
521
|
+
return;
|
|
517
522
|
logWithColor('useEffect firstImageLayerChannelCoordination');
|
|
518
523
|
setIsInteracting(true);
|
|
519
524
|
log.debug('something about channels changed');
|
|
@@ -523,7 +528,7 @@ export function VolumeView(props) {
|
|
|
523
528
|
interactionTimeoutRef.current = setTimeout(() => {
|
|
524
529
|
setIsInteracting(false);
|
|
525
530
|
}, 300);
|
|
526
|
-
}, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting]);
|
|
531
|
+
}, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting, dmInitComplete]);
|
|
527
532
|
const stopLoading = useEventCallback(() => {
|
|
528
533
|
if (dataManager) {
|
|
529
534
|
dataManager.stopLoading();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/spatial-accelerated",
|
|
3
|
-
"version": "4.0.0-test.
|
|
3
|
+
"version": "4.0.0-test.2",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"plur": "^5.1.0",
|
|
25
25
|
"short-number": "^1.0.6",
|
|
26
26
|
"zarrita": "0.6.1",
|
|
27
|
-
"@vitessce/constants-internal": "4.0.0-test.
|
|
28
|
-
"@vitessce/gl": "4.0.0-test.
|
|
29
|
-
"@vitessce/
|
|
30
|
-
"@vitessce/
|
|
31
|
-
"@vitessce/
|
|
32
|
-
"@vitessce/
|
|
33
|
-
"@vitessce/
|
|
34
|
-
"@vitessce/
|
|
35
|
-
"@vitessce/spatial-utils": "4.0.0-test.
|
|
36
|
-
"@vitessce/globals": "4.0.0-test.
|
|
27
|
+
"@vitessce/constants-internal": "4.0.0-test.2",
|
|
28
|
+
"@vitessce/gl": "4.0.0-test.2",
|
|
29
|
+
"@vitessce/sets-utils": "4.0.0-test.2",
|
|
30
|
+
"@vitessce/legend": "4.0.0-test.2",
|
|
31
|
+
"@vitessce/tooltip": "4.0.0-test.2",
|
|
32
|
+
"@vitessce/utils": "4.0.0-test.2",
|
|
33
|
+
"@vitessce/styles": "4.0.0-test.2",
|
|
34
|
+
"@vitessce/vit-s": "4.0.0-test.2",
|
|
35
|
+
"@vitessce/spatial-utils": "4.0.0-test.2",
|
|
36
|
+
"@vitessce/globals": "4.0.0-test.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@react-three/fiber": "^9.0.0",
|
package/src/VolumeDataManager.js
CHANGED
|
@@ -364,8 +364,8 @@ export function _requestBufferToRequestObjects(buffer, k, optsForWeighting) {
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
// Get the top K (potentially fewer than K) page table requests by weighted count.
|
|
367
|
-
const
|
|
368
|
-
|
|
367
|
+
const sorted = Array.from(counts.entries()).toSorted((a, b) => b[1] - a[1]);
|
|
368
|
+
const requests = sorted
|
|
369
369
|
.slice(0, k)
|
|
370
370
|
.map(([packed]) => ({
|
|
371
371
|
x: (packed >> 22) & 0x3FF,
|
|
@@ -1298,6 +1298,11 @@ export class VolumeDataManager {
|
|
|
1298
1298
|
* the center of the render target.
|
|
1299
1299
|
*/
|
|
1300
1300
|
async processRequestData(buffer, optsForWeighting) {
|
|
1301
|
+
if (this.initStatus !== INIT_STATUS.COMPLETE) {
|
|
1302
|
+
log.debug('processRequestData: not yet initialized, skipping');
|
|
1303
|
+
return;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1301
1306
|
if (this.isBusy) {
|
|
1302
1307
|
log.debug('processRequestData: already busy, skipping');
|
|
1303
1308
|
return;
|
package/src/VolumeView.js
CHANGED
|
@@ -229,6 +229,7 @@ export function VolumeView(props) {
|
|
|
229
229
|
// const [lastRes, setLastRes] = useState(null);
|
|
230
230
|
// const [lastChannels, setLastChannels] = useState([]);
|
|
231
231
|
const is3D = spatialRenderingMode === '3D';
|
|
232
|
+
const [dmInitComplete, setDmInitComplete] = useState(false);
|
|
232
233
|
// const [loading, setLoading] = useState(false);
|
|
233
234
|
|
|
234
235
|
// Add new refs for screen quad setup
|
|
@@ -356,6 +357,7 @@ export function VolumeView(props) {
|
|
|
356
357
|
const initializeDataManager = async () => {
|
|
357
358
|
if (dataManager.initStatus === INIT_STATUS.COMPLETE) {
|
|
358
359
|
log.debug('dataManager already initialized, skipping');
|
|
360
|
+
setDmInitComplete(true);
|
|
359
361
|
return;
|
|
360
362
|
}
|
|
361
363
|
// TODO(mark): separate the initialization which depends on gl, from the initialization which depends on images, from the dm.init(firstImageLayer)
|
|
@@ -380,6 +382,7 @@ export function VolumeView(props) {
|
|
|
380
382
|
// onInitComplete({ zarrStoreInfo: dm.zarrStore, deviceLimits: dm.deviceLimits });
|
|
381
383
|
// }
|
|
382
384
|
|
|
385
|
+
setDmInitComplete(true);
|
|
383
386
|
invalidate();
|
|
384
387
|
};
|
|
385
388
|
initializeDataManager();
|
|
@@ -437,7 +440,7 @@ export function VolumeView(props) {
|
|
|
437
440
|
useEffect(() => {
|
|
438
441
|
const on3D = spatialRenderingMode === '3D';
|
|
439
442
|
|
|
440
|
-
if (on3D && dataManager && renderManager) {
|
|
443
|
+
if (on3D && dataManager && renderManager && dmInitComplete) {
|
|
441
444
|
logWithColor('useEffect spatialRenderingMode');
|
|
442
445
|
// Direct call, no callbacks needed
|
|
443
446
|
const propsForRenderManager = {
|
|
@@ -482,7 +485,7 @@ export function VolumeView(props) {
|
|
|
482
485
|
}
|
|
483
486
|
}
|
|
484
487
|
}
|
|
485
|
-
}, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode]);
|
|
488
|
+
}, [dataManager, renderManager, images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination, spatialRenderingMode, dmInitComplete]);
|
|
486
489
|
|
|
487
490
|
|
|
488
491
|
// Execute code on every rendered frame.
|
|
@@ -629,6 +632,7 @@ export function VolumeView(props) {
|
|
|
629
632
|
// Set isInteracting while the user is sliding the channel slider
|
|
630
633
|
// for smooth updates.
|
|
631
634
|
useEffect(() => {
|
|
635
|
+
if (!dmInitComplete) return;
|
|
632
636
|
logWithColor('useEffect firstImageLayerChannelCoordination');
|
|
633
637
|
setIsInteracting(true);
|
|
634
638
|
log.debug('something about channels changed');
|
|
@@ -640,7 +644,7 @@ export function VolumeView(props) {
|
|
|
640
644
|
interactionTimeoutRef.current = setTimeout(() => {
|
|
641
645
|
setIsInteracting(false);
|
|
642
646
|
}, 300);
|
|
643
|
-
}, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting]);
|
|
647
|
+
}, [dataManager, firstImageLayerChannelCoordination, renderManager, setIsInteracting, dmInitComplete]);
|
|
644
648
|
|
|
645
649
|
const stopLoading = useEventCallback(() => {
|
|
646
650
|
if (dataManager) {
|