@ohif/app 3.14.0-beta.71 → 3.14.0-beta.73
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/{8199.bundle.25557805.js → 1153.bundle.efd8a415.js} +4482 -731
- package/dist/{1566.bundle.e9f5d851.js → 1566.bundle.d58db206.js} +47 -9
- package/dist/{1645.bundle.618a2886.js → 1645.bundle.a8ee81ea.js} +82 -46
- package/dist/{1793.bundle.7b6d510f.js → 1793.bundle.27458a55.js} +2 -2
- package/dist/{1862.bundle.10bed54a.js → 1862.bundle.79bfe469.js} +1 -1
- package/dist/{2717.bundle.4167aa16.js → 2717.bundle.e4bad54f.js} +2 -2
- package/dist/{2748.bundle.a90b290d.js → 2748.bundle.eaa94e2e.js} +0 -805
- package/dist/{3004.bundle.cbd2e499.js → 3004.bundle.c6734d77.js} +2 -2
- package/dist/3723.bundle.eab70100.js +808 -0
- package/dist/{3771.bundle.1c9e74f3.js → 3771.bundle.6cb07c14.js} +2 -2
- package/dist/{3044.bundle.039294b9.js → 4449.bundle.3e4b07e6.js} +1067 -85
- package/dist/{4606.bundle.05282205.js → 4606.bundle.a2a1aa34.js} +1 -1
- package/dist/{5076.bundle.157252dd.js → 5076.bundle.95c07142.js} +50 -8
- package/dist/{5143.bundle.67167d39.js → 5143.bundle.2ea0b15d.js} +1211 -176
- package/dist/{5320.bundle.0c7b2cb7.js → 5320.bundle.335efd86.js} +263 -235
- package/dist/{5914.bundle.00f408d2.js → 5914.bundle.f6e9fc4a.js} +37 -9
- package/dist/{5989.bundle.f8096a4e.js → 5989.bundle.2999d206.js} +336 -256
- package/dist/{1283.bundle.f2c2bb56.js → 6133.bundle.d4f7403f.js} +7802 -504
- package/dist/{3386.bundle.61e687a7.js → 6289.bundle.2795699d.js} +107 -29
- package/dist/{4018.bundle.48c288e5.js → 6847.bundle.5a087332.js} +59 -9
- package/dist/{7604.bundle.2d399cf0.js → 7604.bundle.e703a54d.js} +1 -1
- package/dist/{7464.bundle.492c83ce.js → 8037.bundle.8b5f4114.js} +4148 -1047
- package/dist/{1724.bundle.59b20c59.js → 8699.bundle.024fb1bc.js} +480 -87
- package/dist/{9187.bundle.237037e4.js → 9187.bundle.7d18bb1c.js} +4 -4
- package/dist/{9481.bundle.027aa5ca.js → 9481.bundle.f443c81b.js} +4 -4
- package/dist/{9620.bundle.67375c83.js → 9620.bundle.24273cf3.js} +4 -4
- package/dist/{9886.bundle.5c1ff898.js → 9886.bundle.cabb4a24.js} +2 -2
- package/dist/{9892.bundle.8c1ccb0e.js → 9892.bundle.9bc28476.js} +5 -5
- package/dist/{9948.bundle.29548cec.js → 9948.bundle.b4ff610d.js} +2 -2
- package/dist/app-config.js +2 -0
- package/dist/{app.bundle.7ff9e2bc.js → app.bundle.220fbf72.js} +40 -37
- package/dist/{compute.bundle.79a2d455.js → compute.bundle.19cf1283.js} +10 -10
- package/dist/customizations/gpu/high-texture-4096.jsonc +9 -0
- package/dist/customizations/gpu/high.jsonc +8 -0
- package/dist/customizations/gpu/low-tablet.jsonc +7 -0
- package/dist/customizations/gpu/low.jsonc +7 -0
- package/dist/customizations/gpu/medium.jsonc +7 -0
- package/dist/customizations/index.html +39 -0
- package/dist/{histogram-worker.bundle.a8bb873a.js → histogram-worker.bundle.58e60d7c.js} +4 -4
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.302d242b.js → interpolation.bundle.7b3850e6.js} +7 -7
- package/dist/{polySeg.bundle.aaf002b1.js → polySeg.bundle.157e1e17.js} +11 -11
- package/dist/sw.js +1 -1
- package/package.json +6 -6
|
@@ -3393,20 +3393,54 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3393
3393
|
/* import */ var _init_js__rspack_import_1 = __webpack_require__(90934);
|
|
3394
3394
|
/* import */ var _kitware_vtk_js_Rendering_Core_VolumeMapper_js__rspack_import_2 = __webpack_require__(21067);
|
|
3395
3395
|
/* import */ var _kitware_vtk_js_Common_Core_DataArray_js__rspack_import_3 = __webpack_require__(84472);
|
|
3396
|
+
/* import */ var _kitware_vtk_js_Common_DataModel_BoundingBox_js__rspack_import_4 = __webpack_require__(28710);
|
|
3396
3397
|
|
|
3397
3398
|
|
|
3398
3399
|
|
|
3399
3400
|
|
|
3401
|
+
|
|
3402
|
+
const MAXIMUM_SAMPLES_PER_RAY = 4000;
|
|
3403
|
+
function sampleDistanceOf(imageData, texture, multiplier = (0,_init_js__rspack_import_1/* .getConfiguration */.D0)().rendering?.volumeRendering
|
|
3404
|
+
?.sampleDistanceMultiplier || 1) {
|
|
3405
|
+
const grid = texture?.getGrid?.();
|
|
3406
|
+
const spacing = grid?.spacing ?? imageData.getSpacing();
|
|
3407
|
+
const distance = (multiplier * (spacing[0] + spacing[1] + spacing[2])) / 6;
|
|
3408
|
+
if (!(0,_init_js__rspack_import_1/* .getLossyDownsampling */.GR)().final) {
|
|
3409
|
+
return distance;
|
|
3410
|
+
}
|
|
3411
|
+
const diagonal = _kitware_vtk_js_Common_DataModel_BoundingBox_js__rspack_import_4/* ["default"].getDiagonalLength */.Ay.getDiagonalLength(imageData.getBounds());
|
|
3412
|
+
return Math.max(distance, diagonal / (MAXIMUM_SAMPLES_PER_RAY - 1));
|
|
3413
|
+
}
|
|
3414
|
+
const idleSampleDistanceMultipliers = new WeakMap();
|
|
3415
|
+
function setIdleSampleDistanceMultiplier(mapper, multiplier) {
|
|
3416
|
+
idleSampleDistanceMultipliers.set(mapper, Number.isFinite(multiplier) ? Math.max(multiplier, 0.001) : 1);
|
|
3417
|
+
}
|
|
3418
|
+
function idleSampleDistanceMultiplierOf(mapper) {
|
|
3419
|
+
return (idleSampleDistanceMultipliers.get(mapper) ??
|
|
3420
|
+
((0,_init_js__rspack_import_1/* .getConfiguration */.D0)().rendering?.volumeRendering?.sampleDistanceMultiplier ||
|
|
3421
|
+
1));
|
|
3422
|
+
}
|
|
3423
|
+
function sampleDistanceRatiosOf(mapper, texture = mapper?.getScalarTexture?.()) {
|
|
3424
|
+
const current = mapper?.getSampleDistance?.();
|
|
3425
|
+
const imageData = mapper?.getInputData?.();
|
|
3426
|
+
if (!imageData || !(current > 0)) {
|
|
3427
|
+
return { current: 1, idle: 1 };
|
|
3428
|
+
}
|
|
3429
|
+
const baseline = sampleDistanceOf(imageData, texture, 1);
|
|
3430
|
+
if (!(baseline > 0)) {
|
|
3431
|
+
return { current: 1, idle: 1 };
|
|
3432
|
+
}
|
|
3433
|
+
const idle = sampleDistanceOf(imageData, texture, idleSampleDistanceMultiplierOf(mapper));
|
|
3434
|
+
return { current: current / baseline, idle: idle / baseline };
|
|
3435
|
+
}
|
|
3400
3436
|
function createVolumeMapper(imageData, vtkOpenGLTexture) {
|
|
3401
3437
|
const volumeMapper = _vtkClasses_index_js__rspack_import_0/* .vtkSharedVolumeMapper.newInstance */.wu.newInstance();
|
|
3402
3438
|
volumeMapper.setInputData(imageData);
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
volumeMapper.setSampleDistance(sampleDistance);
|
|
3409
|
-
volumeMapper.setScalarTexture(vtkOpenGLTexture);
|
|
3439
|
+
volumeMapper.setMaximumSamplesPerRay(MAXIMUM_SAMPLES_PER_RAY);
|
|
3440
|
+
volumeMapper.setSampleDistance(sampleDistanceOf(imageData, vtkOpenGLTexture));
|
|
3441
|
+
if (vtkOpenGLTexture) {
|
|
3442
|
+
volumeMapper.setScalarTexture(vtkOpenGLTexture);
|
|
3443
|
+
}
|
|
3410
3444
|
return volumeMapper;
|
|
3411
3445
|
}
|
|
3412
3446
|
function convertMapperToNotSharedMapper(sharedMapper) {
|
|
@@ -3427,8 +3461,12 @@ function convertMapperToNotSharedMapper(sharedMapper) {
|
|
|
3427
3461
|
}
|
|
3428
3462
|
|
|
3429
3463
|
__webpack_require__.d(__webpack_exports__, {
|
|
3430
|
-
|
|
3431
|
-
|
|
3464
|
+
$U: () => (setIdleSampleDistanceMultiplier),
|
|
3465
|
+
Ax: () => (idleSampleDistanceMultiplierOf),
|
|
3466
|
+
Ay: () => (createVolumeMapper),
|
|
3467
|
+
h6: () => (sampleDistanceOf),
|
|
3468
|
+
hA: () => (convertMapperToNotSharedMapper),
|
|
3469
|
+
nr: () => (sampleDistanceRatiosOf)
|
|
3432
3470
|
});
|
|
3433
3471
|
|
|
3434
3472
|
|
|
@@ -4229,8 +4229,9 @@ const getViewportByViewportId = (viewportId) => {
|
|
|
4229
4229
|
const enabledElement = (0,_cornerstonejs_core__rspack_import_0.getEnabledElementByViewportId)(viewportId);
|
|
4230
4230
|
return enabledElement?.viewport ?? undefined;
|
|
4231
4231
|
};
|
|
4232
|
+
const segmentationsWithStaleVolume = new Set();
|
|
4232
4233
|
const onLabelmapSegmentationDataModified = function (evt) {
|
|
4233
|
-
const { segmentationId, modifiedSlicesToUse } = evt.detail;
|
|
4234
|
+
const { segmentationId, modifiedSlicesToUse, voxelsUnchanged } = evt.detail;
|
|
4234
4235
|
const { representationData } = (0,_stateManagement_segmentation_getSegmentation_js__rspack_import_4/* .getSegmentation */.T)(segmentationId);
|
|
4235
4236
|
const viewportIds = (0,_stateManagement_segmentation_getViewportIdsWithSegmentation_js__rspack_import_5/* .getViewportIdsWithSegmentation */.P)(segmentationId);
|
|
4236
4237
|
const volumeViewportIds = [];
|
|
@@ -4266,11 +4267,16 @@ const onLabelmapSegmentationDataModified = function (evt) {
|
|
|
4266
4267
|
const hasVolumeViewport = volumeViewportIds.length > 0;
|
|
4267
4268
|
const hasStackViewport = stackViewportIds.length > 0;
|
|
4268
4269
|
const hasBothStackAndVolume = hasVolumeViewport && hasStackViewport;
|
|
4270
|
+
if (!hasVolumeViewport && !voxelsUnchanged) {
|
|
4271
|
+
segmentationsWithStaleVolume.add(segmentationId);
|
|
4272
|
+
}
|
|
4269
4273
|
if (hasVolumeViewport) {
|
|
4274
|
+
const volumeIsStale = segmentationsWithStaleVolume.delete(segmentationId);
|
|
4270
4275
|
(0,_performVolumeLabelmapUpdate_js__rspack_import_2/* .performVolumeLabelmapUpdate */.r)({
|
|
4271
|
-
modifiedSlicesToUse: hasBothStackAndVolume ? [] : modifiedSlicesToUse,
|
|
4276
|
+
modifiedSlicesToUse: hasBothStackAndVolume || volumeIsStale ? [] : modifiedSlicesToUse,
|
|
4272
4277
|
representationData,
|
|
4273
4278
|
type: _enums_index_js__rspack_import_1.SegmentationRepresentations.Labelmap,
|
|
4279
|
+
voxelsUnchanged: Boolean(voxelsUnchanged) && !volumeIsStale,
|
|
4274
4280
|
});
|
|
4275
4281
|
}
|
|
4276
4282
|
if (hasStackViewport) {
|
|
@@ -4336,11 +4342,15 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4336
4342
|
/* import */ var _stateManagement_segmentation_helpers_labelmapSegmentationState_js__rspack_import_1 = __webpack_require__(92996);
|
|
4337
4343
|
|
|
4338
4344
|
|
|
4339
|
-
function performVolumeLabelmapUpdate({ modifiedSlicesToUse, representationData, type, }) {
|
|
4345
|
+
function performVolumeLabelmapUpdate({ modifiedSlicesToUse, representationData, type, voxelsUnchanged = false, }) {
|
|
4340
4346
|
const labelmapData = representationData[type];
|
|
4341
4347
|
const volumes = getVolumesToUpdate(labelmapData);
|
|
4342
4348
|
volumes.forEach((segmentationVolume) => {
|
|
4343
|
-
const { imageData,
|
|
4349
|
+
const { imageData, voxelManager } = segmentationVolume;
|
|
4350
|
+
if (voxelsUnchanged) {
|
|
4351
|
+
triggerVolumeModified(segmentationVolume);
|
|
4352
|
+
return;
|
|
4353
|
+
}
|
|
4344
4354
|
let slicesToUpdate;
|
|
4345
4355
|
if (modifiedSlicesToUse?.length > 0) {
|
|
4346
4356
|
slicesToUpdate = modifiedSlicesToUse;
|
|
@@ -4349,20 +4359,24 @@ function performVolumeLabelmapUpdate({ modifiedSlicesToUse, representationData,
|
|
|
4349
4359
|
const numSlices = imageData.getDimensions()[2];
|
|
4350
4360
|
slicesToUpdate = [...Array(numSlices).keys()];
|
|
4351
4361
|
}
|
|
4352
|
-
|
|
4362
|
+
segmentationVolume.markFrameModified &&
|
|
4353
4363
|
slicesToUpdate.forEach((i) => {
|
|
4354
|
-
|
|
4364
|
+
segmentationVolume.markFrameModified(i);
|
|
4355
4365
|
});
|
|
4356
4366
|
voxelManager?.invalidateCache?.();
|
|
4357
4367
|
imageData.modified();
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4368
|
+
triggerVolumeModified(segmentationVolume);
|
|
4369
|
+
});
|
|
4370
|
+
}
|
|
4371
|
+
function triggerVolumeModified(segmentationVolume) {
|
|
4372
|
+
const { imageData } = segmentationVolume;
|
|
4373
|
+
const numberOfFrames = segmentationVolume.imageIds?.length ?? imageData.getDimensions()[2] ?? 0;
|
|
4374
|
+
const FrameOfReferenceUID = segmentationVolume.metadata?.FrameOfReferenceUID ?? '';
|
|
4375
|
+
(0,_cornerstonejs_core__rspack_import_0.triggerEvent)(_cornerstonejs_core__rspack_import_0.eventTarget, _cornerstonejs_core__rspack_import_0.Enums.Events.IMAGE_VOLUME_MODIFIED, {
|
|
4376
|
+
volumeId: segmentationVolume.volumeId,
|
|
4377
|
+
FrameOfReferenceUID,
|
|
4378
|
+
numberOfFrames,
|
|
4379
|
+
framesProcessed: numberOfFrames,
|
|
4366
4380
|
});
|
|
4367
4381
|
}
|
|
4368
4382
|
function getVolumesToUpdate(labelmapData) {
|
|
@@ -5170,7 +5184,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
5170
5184
|
store: () => (/* reexport module object */ _store_index_js__rspack_import_1),
|
|
5171
5185
|
synchronizers: () => (/* reexport module object */ _synchronizers_index_js__rspack_import_5),
|
|
5172
5186
|
utilities: () => (/* reexport module object */ _utilities_index_js__rspack_import_7),
|
|
5173
|
-
version: () => (/* reexport safe */ (/* inlined export _version_js__rspack_import_4 */"5.
|
|
5187
|
+
version: () => (/* reexport safe */ (/* inlined export _version_js__rspack_import_4 */"5.17.1"))
|
|
5174
5188
|
});
|
|
5175
5189
|
|
|
5176
5190
|
|
|
@@ -6400,7 +6414,6 @@ const planarContourToolName = _tools_annotation_PlanarFreehandContourSegmentatio
|
|
|
6400
6414
|
class SegmentationRenderingEngine {
|
|
6401
6415
|
constructor() {
|
|
6402
6416
|
this._needsRender = new Set();
|
|
6403
|
-
this._pendingRenderQueue = [];
|
|
6404
6417
|
this._animationFrameSet = false;
|
|
6405
6418
|
this._animationFrameHandle = null;
|
|
6406
6419
|
this._getAllViewports = () => {
|
|
@@ -6410,18 +6423,17 @@ class SegmentationRenderingEngine {
|
|
|
6410
6423
|
this._renderFlaggedSegmentations = () => {
|
|
6411
6424
|
this._throwIfDestroyed();
|
|
6412
6425
|
const viewportIds = Array.from(this._needsRender);
|
|
6413
|
-
viewportIds.forEach((viewportId) => {
|
|
6414
|
-
this._triggerRender(viewportId);
|
|
6415
|
-
});
|
|
6416
6426
|
this._needsRender.clear();
|
|
6417
6427
|
this._animationFrameSet = false;
|
|
6418
6428
|
this._animationFrameHandle = null;
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
this._setViewportsToBeRenderedNextFrame(nextViewportIds);
|
|
6429
|
+
viewportIds.forEach((viewportId) => {
|
|
6430
|
+
try {
|
|
6431
|
+
this._triggerRender(viewportId);
|
|
6423
6432
|
}
|
|
6424
|
-
|
|
6433
|
+
catch (error) {
|
|
6434
|
+
cs3dLogger.error(error);
|
|
6435
|
+
}
|
|
6436
|
+
});
|
|
6425
6437
|
};
|
|
6426
6438
|
}
|
|
6427
6439
|
renderSegmentationsForViewport(viewportId) {
|
|
@@ -6460,10 +6472,6 @@ class SegmentationRenderingEngine {
|
|
|
6460
6472
|
}
|
|
6461
6473
|
}
|
|
6462
6474
|
_setViewportsToBeRenderedNextFrame(viewportIds) {
|
|
6463
|
-
if (this._animationFrameSet) {
|
|
6464
|
-
this._pendingRenderQueue.push(viewportIds);
|
|
6465
|
-
return;
|
|
6466
|
-
}
|
|
6467
6475
|
viewportIds.forEach((viewportId) => {
|
|
6468
6476
|
this._needsRender.add(viewportId);
|
|
6469
6477
|
});
|
|
@@ -7521,11 +7529,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
7521
7529
|
|
|
7522
7530
|
|
|
7523
7531
|
|
|
7524
|
-
function triggerSegmentationDataModified(segmentationId, modifiedSlicesToUse, segmentIndex) {
|
|
7532
|
+
function triggerSegmentationDataModified(segmentationId, modifiedSlicesToUse, segmentIndex, { voxelsUnchanged } = {}) {
|
|
7525
7533
|
const eventDetail = {
|
|
7526
7534
|
segmentationId,
|
|
7527
7535
|
modifiedSlicesToUse,
|
|
7528
7536
|
segmentIndex,
|
|
7537
|
+
...(voxelsUnchanged ? { voxelsUnchanged } : {}),
|
|
7529
7538
|
};
|
|
7530
7539
|
(0,_utilities_segmentation_utilities_js__rspack_import_2/* .setSegmentationDirty */.HM)(segmentationId);
|
|
7531
7540
|
(0,_cornerstonejs_core__rspack_import_0.triggerEvent)(_cornerstonejs_core__rspack_import_0.eventTarget, _enums_index_js__rspack_import_1.Events.SEGMENTATION_DATA_MODIFIED, eventDetail);
|
|
@@ -18767,7 +18776,9 @@ class TrackballRotateTool extends _base_index_js__rspack_import_4/* .BaseTool */
|
|
|
18767
18776
|
}
|
|
18768
18777
|
const originalSampleDistance = mapper.getSampleDistance();
|
|
18769
18778
|
if (!this._hasResolutionChanged) {
|
|
18770
|
-
const
|
|
18779
|
+
const rotateSampleDistanceFactor = (0,_cornerstonejs_core__rspack_import_2.getLossyDownsampling)().interactive
|
|
18780
|
+
? this.configuration.rotateSampleDistanceFactor
|
|
18781
|
+
: 1;
|
|
18771
18782
|
mapper.setSampleDistance(originalSampleDistance * rotateSampleDistanceFactor);
|
|
18772
18783
|
this._hasResolutionChanged = true;
|
|
18773
18784
|
if (this.cleanUp !== null) {
|
|
@@ -19786,7 +19797,9 @@ class VolumeCroppingTool extends _base_index_js__rspack_import_7/* .BaseTool */.
|
|
|
19786
19797
|
}
|
|
19787
19798
|
const originalSampleDistance = mapper.getSampleDistance();
|
|
19788
19799
|
if (!this._hasResolutionChanged) {
|
|
19789
|
-
const
|
|
19800
|
+
const rotateSampleDistanceFactor = (0,_cornerstonejs_core__rspack_import_8.getLossyDownsampling)().interactive
|
|
19801
|
+
? this.configuration.rotateSampleDistanceFactor
|
|
19802
|
+
: 1;
|
|
19790
19803
|
mapper.setSampleDistance(originalSampleDistance * rotateSampleDistanceFactor);
|
|
19791
19804
|
this._hasResolutionChanged = true;
|
|
19792
19805
|
if (this.cleanUp !== null) {
|
|
@@ -38422,7 +38435,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38422
38435
|
|
|
38423
38436
|
|
|
38424
38437
|
|
|
38425
|
-
function getStrategyDataForVolumeViewport({ operationData }) {
|
|
38438
|
+
function getStrategyDataForVolumeViewport({ operationData, }) {
|
|
38426
38439
|
const { volumeId } = operationData;
|
|
38427
38440
|
if (!volumeId) {
|
|
38428
38441
|
const event = new CustomEvent(_cornerstonejs_core__rspack_import_0.Enums.Events.ERROR_EVENT, {
|
|
@@ -42199,6 +42212,7 @@ const SUPPORTED_PROBE_VARIANT = [
|
|
|
42199
42212
|
'4,3',
|
|
42200
42213
|
'4,7',
|
|
42201
42214
|
'4,-1',
|
|
42215
|
+
'-2,-1',
|
|
42202
42216
|
];
|
|
42203
42217
|
const UNIT_MAPPING = {
|
|
42204
42218
|
0: 'px',
|
|
@@ -42213,6 +42227,7 @@ const UNIT_MAPPING = {
|
|
|
42213
42227
|
9: 'cm\xb2/s',
|
|
42214
42228
|
0xc: 'degrees',
|
|
42215
42229
|
[-1]: 'mV',
|
|
42230
|
+
[-2]: 'ms',
|
|
42216
42231
|
};
|
|
42217
42232
|
const EPS = 1e-3;
|
|
42218
42233
|
const SQUARE = '\xb2';
|
|
@@ -42268,19 +42283,6 @@ const getCalibratedLengthUnitsAndScale = (image, handles) => {
|
|
|
42268
42283
|
unit = UNIT_MAPPING[region.physicalUnitsXDirection] || 'unknown';
|
|
42269
42284
|
areaUnit = unit + SQUARE;
|
|
42270
42285
|
}
|
|
42271
|
-
else if (region && region.physicalUnitsYDirection === -1) {
|
|
42272
|
-
const physicalDeltaX = Math.abs(region.physicalDeltaX);
|
|
42273
|
-
const physicalDeltaY = Math.abs(region.physicalDeltaY);
|
|
42274
|
-
scale = 1 / physicalDeltaX;
|
|
42275
|
-
scaleY = 1 / physicalDeltaY;
|
|
42276
|
-
calibrationType = 'ECG Region';
|
|
42277
|
-
unit =
|
|
42278
|
-
UNIT_MAPPING[region.physicalUnitsXDirection] ||
|
|
42279
|
-
UNIT_MAPPING[region.physicalUnitsYDirection] ||
|
|
42280
|
-
'unknown';
|
|
42281
|
-
areaUnit =
|
|
42282
|
-
(UNIT_MAPPING[region.physicalUnitsYDirection] || 'px') + SQUARE;
|
|
42283
|
-
}
|
|
42284
42286
|
}
|
|
42285
42287
|
else if (calibration.scale) {
|
|
42286
42288
|
scale = calibration.scale;
|
|
@@ -47783,6 +47785,9 @@ function prefetch(element, priority = 0) {
|
|
|
47783
47785
|
cs3dLogger.warn('CornerstoneTools.stackPrefetch: No images in stack.');
|
|
47784
47786
|
return;
|
|
47785
47787
|
}
|
|
47788
|
+
if ((0,_stackPrefetchUtils_js__rspack_import_2/* .isLoadedByProgressiveVolume */.yN)(stack.imageIds)) {
|
|
47789
|
+
return;
|
|
47790
|
+
}
|
|
47786
47791
|
const stackPrefetchData = (0,_state_js__rspack_import_1/* .getToolState */.k)(element);
|
|
47787
47792
|
if (!stackPrefetchData) {
|
|
47788
47793
|
return;
|
|
@@ -48000,6 +48005,20 @@ let configuration = {
|
|
|
48000
48005
|
};
|
|
48001
48006
|
let resetPrefetchTimeout;
|
|
48002
48007
|
const resetPrefetchDelay = 10;
|
|
48008
|
+
const loadingCancelledHandlers = new WeakMap();
|
|
48009
|
+
function getLoadingCancelledHandler(element) {
|
|
48010
|
+
return (evt) => {
|
|
48011
|
+
const { volumeId } = evt.detail;
|
|
48012
|
+
try {
|
|
48013
|
+
const imageId = (0,_stackPrefetchUtils_js__rspack_import_2/* .getStackData */.bV)(element)?.imageIds[0];
|
|
48014
|
+
if (_cornerstonejs_core__rspack_import_0.cache.getVolume(volumeId)?.getImageIdIndex(imageId) !== undefined) {
|
|
48015
|
+
prefetch(element);
|
|
48016
|
+
}
|
|
48017
|
+
}
|
|
48018
|
+
catch {
|
|
48019
|
+
}
|
|
48020
|
+
};
|
|
48021
|
+
}
|
|
48003
48022
|
function prefetch(element) {
|
|
48004
48023
|
const stackPrefetchData = (0,_state_js__rspack_import_1/* .getToolState */.k)(element);
|
|
48005
48024
|
if (!stackPrefetchData) {
|
|
@@ -48011,6 +48030,9 @@ function prefetch(element) {
|
|
|
48011
48030
|
cs3dLogger.warn('CornerstoneTools.stackPrefetch: No images in stack.');
|
|
48012
48031
|
return;
|
|
48013
48032
|
}
|
|
48033
|
+
if ((0,_stackPrefetchUtils_js__rspack_import_2/* .isLoadedByProgressiveVolume */.yN)(stack.imageIds)) {
|
|
48034
|
+
return;
|
|
48035
|
+
}
|
|
48014
48036
|
const { currentImageIdIndex } = stack;
|
|
48015
48037
|
stackPrefetch.enabled =
|
|
48016
48038
|
stackPrefetch.enabled && (stackPrefetch.indicesToRequest?.length ?? 0) > 0;
|
|
@@ -48135,12 +48157,21 @@ function enable(element) {
|
|
|
48135
48157
|
const promiseRemovedHandler = (0,_stackPrefetchUtils_js__rspack_import_2/* .getPromiseRemovedHandler */.m0)(element);
|
|
48136
48158
|
_cornerstonejs_core__rspack_import_0.eventTarget.removeEventListener(_cornerstonejs_core__rspack_import_0.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
48137
48159
|
_cornerstonejs_core__rspack_import_0.eventTarget.addEventListener(_cornerstonejs_core__rspack_import_0.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
48160
|
+
removeLoadingCancelledHandler(element);
|
|
48161
|
+
const loadingCancelledHandler = getLoadingCancelledHandler(element);
|
|
48162
|
+
loadingCancelledHandlers.set(element, loadingCancelledHandler);
|
|
48163
|
+
_cornerstonejs_core__rspack_import_0.eventTarget.addEventListener(_cornerstonejs_core__rspack_import_0.Enums.Events.IMAGE_VOLUME_LOADING_CANCELLED, loadingCancelledHandler);
|
|
48164
|
+
}
|
|
48165
|
+
function removeLoadingCancelledHandler(element) {
|
|
48166
|
+
_cornerstonejs_core__rspack_import_0.eventTarget.removeEventListener(_cornerstonejs_core__rspack_import_0.Enums.Events.IMAGE_VOLUME_LOADING_CANCELLED, loadingCancelledHandlers.get(element));
|
|
48167
|
+
loadingCancelledHandlers.delete(element);
|
|
48138
48168
|
}
|
|
48139
48169
|
function disable(element) {
|
|
48140
48170
|
clearTimeout(resetPrefetchTimeout);
|
|
48141
48171
|
element.removeEventListener(_cornerstonejs_core__rspack_import_0.Enums.Events.STACK_NEW_IMAGE, onImageUpdated);
|
|
48142
48172
|
const promiseRemovedHandler = (0,_stackPrefetchUtils_js__rspack_import_2/* .getPromiseRemovedHandler */.m0)(element);
|
|
48143
48173
|
_cornerstonejs_core__rspack_import_0.eventTarget.removeEventListener(_cornerstonejs_core__rspack_import_0.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
48174
|
+
removeLoadingCancelledHandler(element);
|
|
48144
48175
|
const stackPrefetchData = (0,_state_js__rspack_import_1/* .getToolState */.k)(element);
|
|
48145
48176
|
if (stackPrefetchData && stackPrefetchData.indicesToRequest.length) {
|
|
48146
48177
|
stackPrefetchData.enabled = false;
|
|
@@ -48237,6 +48268,10 @@ function getPromiseRemovedHandler(element) {
|
|
|
48237
48268
|
stackPrefetchData.indicesToRequest.push(imageIdIndex);
|
|
48238
48269
|
};
|
|
48239
48270
|
}
|
|
48271
|
+
function isLoadedByProgressiveVolume(imageIds) {
|
|
48272
|
+
const volume = _cornerstonejs_core__rspack_import_0.cache.getVolumeContainingImageId(imageIds[0])?.volume;
|
|
48273
|
+
return !!volume?.isLoadingProgressively?.();
|
|
48274
|
+
}
|
|
48240
48275
|
const clearFromImageIds = (stack) => {
|
|
48241
48276
|
const imageIdSet = new Set(stack.imageIds);
|
|
48242
48277
|
return (requestDetails) => requestDetails.type !== requestType ||
|
|
@@ -48247,6 +48282,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
48247
48282
|
bV: () => (getStackData),
|
|
48248
48283
|
m0: () => (getPromiseRemovedHandler),
|
|
48249
48284
|
y1: () => (range),
|
|
48285
|
+
yN: () => (isLoadedByProgressiveVolume),
|
|
48250
48286
|
zo: () => (nearestIndex)
|
|
48251
48287
|
}, {
|
|
48252
48288
|
Pg: clearFromImageIds,
|
|
@@ -49294,7 +49330,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
49294
49330
|
|
|
49295
49331
|
},
|
|
49296
49332
|
72563() {
|
|
49297
|
-
const version = '5.
|
|
49333
|
+
const version = '5.17.1';
|
|
49298
49334
|
|
|
49299
49335
|
|
|
49300
49336
|
},
|
|
@@ -548,8 +548,8 @@ function getCustomizationModule() {
|
|
|
548
548
|
var jsx_runtime = __webpack_require__(31085);
|
|
549
549
|
// EXTERNAL MODULE: ../../node_modules/react/index.js
|
|
550
550
|
var react = __webpack_require__(14041);
|
|
551
|
-
// EXTERNAL MODULE: ../../extensions/cornerstone/src/index.tsx +
|
|
552
|
-
var src = __webpack_require__(
|
|
551
|
+
// EXTERNAL MODULE: ../../extensions/cornerstone/src/index.tsx + 217 modules
|
|
552
|
+
var src = __webpack_require__(87407);
|
|
553
553
|
;// CONCATENATED MODULE: ../../extensions/test-extension/src/getPanelModule.tsx
|
|
554
554
|
|
|
555
555
|
|
|
@@ -6,7 +6,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6
6
|
/* import */ var react_compiler_runtime__rspack_import_1 = __webpack_require__(54005);
|
|
7
7
|
/* import */ var react__rspack_import_2 = __webpack_require__(14041);
|
|
8
8
|
/* import */ var _ohif_ui_next__rspack_import_3 = __webpack_require__(2727);
|
|
9
|
-
/* import */ var _ohif_extension_cornerstone__rspack_import_4 = __webpack_require__(
|
|
9
|
+
/* import */ var _ohif_extension_cornerstone__rspack_import_4 = __webpack_require__(87407);
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -1656,8 +1656,8 @@ function WorkflowPanel(t0) {
|
|
|
1656
1656
|
|
|
1657
1657
|
// EXTERNAL MODULE: ../../extensions/default/src/index.ts + 155 modules
|
|
1658
1658
|
var default_src = __webpack_require__(40546);
|
|
1659
|
-
// EXTERNAL MODULE: ../../extensions/cornerstone/src/index.tsx +
|
|
1660
|
-
var cornerstone_src = __webpack_require__(
|
|
1659
|
+
// EXTERNAL MODULE: ../../extensions/cornerstone/src/index.tsx + 217 modules
|
|
1660
|
+
var cornerstone_src = __webpack_require__(87407);
|
|
1661
1661
|
;// CONCATENATED MODULE: ../../extensions/cornerstone-dynamic-volume/src/panels/DynamicExport.tsx
|
|
1662
1662
|
|
|
1663
1663
|
|