@ohif/app 3.14.0-beta.55 → 3.14.0-beta.56

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.
Files changed (37) hide show
  1. package/dist/{9187.bundle.47a04a89.js → 1283.bundle.56abacf4.js} +162 -137
  2. package/dist/{4262.bundle.0c550b7f.js → 1558.bundle.03d5783b.js} +36 -11
  3. package/dist/{1566.bundle.8d90bb15.js → 1566.bundle.e9f5d851.js} +5 -1
  4. package/dist/{1645.bundle.65cff869.js → 1645.bundle.618a2886.js} +700 -389
  5. package/dist/{1724.bundle.b4757283.js → 1724.bundle.59b20c59.js} +1184 -1139
  6. package/dist/{1788.bundle.5b78672d.js → 1788.bundle.3f1349d2.js} +101 -43
  7. package/dist/1975.bundle.53cf5d7c.js +8216 -0
  8. package/dist/{5922.bundle.46b3e037.js → 2894.bundle.db3f8686.js} +240 -151
  9. package/dist/{6567.bundle.cc57e572.js → 3044.bundle.039294b9.js} +105 -76
  10. package/dist/{3386.bundle.7665dd43.js → 3386.bundle.a9fd7dfd.js} +92 -23
  11. package/dist/{4004.bundle.da822fd2.js → 4018.bundle.48c288e5.js} +128 -253
  12. package/dist/{2894.bundle.d612efb2.js → 513.bundle.9c0548cf.js} +1 -1
  13. package/dist/{5143.bundle.62bcf4ee.js → 5143.bundle.67167d39.js} +219 -147
  14. package/dist/{5895.bundle.b4892e1b.js → 5320.bundle.0c7b2cb7.js} +1473 -617
  15. package/dist/{5383.bundle.d393d2f5.js → 5383.bundle.79243338.js} +26 -4
  16. package/dist/{4324.bundle.8645d6b4.js → 5888.bundle.cd717f42.js} +1364 -8004
  17. package/dist/{8128.bundle.2afe5a05.js → 5914.bundle.00f408d2.js} +419 -49
  18. package/dist/{1284.bundle.a489bd1d.js → 5989.bundle.f8096a4e.js} +1175 -616
  19. package/dist/{6255.bundle.ee378f1c.js → 6255.bundle.521051c1.js} +42 -18
  20. package/dist/{829.bundle.e60fee3a.js → 641.bundle.4627a8e1.js} +472 -483
  21. package/dist/{1568.bundle.474a5a93.js → 9187.bundle.237037e4.js} +1 -1
  22. package/dist/{6711.bundle.baba2ccd.js → 9232.bundle.3b0caf8e.js} +10 -10
  23. package/dist/{1895.bundle.923d0bd4.js → 9620.bundle.67375c83.js} +82 -24
  24. package/dist/{app.bundle.3a861c86.js → app.bundle.5a277c45.js} +44 -44
  25. package/dist/{compute.bundle.caab94e6.js → compute.bundle.a8f26c49.js} +10 -10
  26. package/dist/index.html +1 -1
  27. package/dist/{interpolation.bundle.eed65b60.js → interpolation.bundle.aef2f614.js} +5 -5
  28. package/dist/{polySeg.bundle.34a58c4f.js → polySeg.bundle.ba052ac3.js} +11 -11
  29. package/dist/static/wasm/{27ff970b98.module.wasm → 0e14aeab30.module.wasm} +0 -0
  30. package/dist/static/wasm/58a146bc8c.module.wasm +0 -0
  31. package/dist/static/wasm/99a2672e64.module.wasm +0 -0
  32. package/dist/static/wasm/{11f8dc2413.module.wasm → d8b213f3ea.module.wasm} +0 -0
  33. package/dist/sw.js +1 -1
  34. package/package.json +6 -6
  35. package/dist/0.bundle.485115b4.js +0 -4498
  36. package/dist/static/wasm/58769f1d7d.module.wasm +0 -0
  37. /package/dist/{1895.bundle.css → 9620.bundle.css} +0 -0
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[6567], {
2
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[3044], {
3
3
  23172(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
4
  /**
5
5
  * Common utilities
@@ -2289,7 +2289,7 @@ function calculateViewportsSpatialRegistration(viewport1, viewport2) {
2289
2289
 
2290
2290
  },
2291
2291
  14974(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
2292
- /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(34047);
2292
+ /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(76368);
2293
2293
 
2294
2294
  /* export default */ __webpack_exports__.A = (_cornerstonejs_metadata__rspack_import_0/* .utilities.calibratedPixelSpacingMetadataProvider */.BF.ZX);
2295
2295
 
@@ -3047,7 +3047,7 @@ function getImageLegacy(element) {
3047
3047
 
3048
3048
  },
3049
3049
  61293(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
3050
- /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(34047);
3050
+ /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(76368);
3051
3051
 
3052
3052
  const { /* getPixelSpacingInformation */Cc: getPixelSpacingInformation, /* calculateRadiographicPixelSpacing */VD: calculateRadiographicPixelSpacing, /* getERMF */lJ: getERMF, } = _cornerstonejs_metadata__rspack_import_0/* .utilities */.BF;
3053
3053
 
@@ -4329,7 +4329,7 @@ const spatialRegistrationMetadataProvider = {
4329
4329
 
4330
4330
  },
4331
4331
  50863(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
4332
- /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(34047);
4332
+ /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(76368);
4333
4333
 
4334
4334
  const { /* splitImageIdsBy4DTags */Qy: splitImageIdsBy4DTags, /* handleMultiframe4D */FM: handleMultiframe4D, /* generateFrameImageId */Hf: generateFrameImageId } = _cornerstonejs_metadata__rspack_import_0/* .utilities */.BF;
4335
4335
  /* export default */ __webpack_exports__.Ay = (splitImageIdsBy4DTags);
@@ -4528,25 +4528,6 @@ __webpack_require__.d(__webpack_exports__, {
4528
4528
  });
4529
4529
 
4530
4530
 
4531
- },
4532
- 61761(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
4533
- /* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
4534
-
4535
- function getVoxelThicknessAlongNormal(volume, normal) {
4536
- const { direction, spacing } = volume;
4537
- const iVector = direction.slice(0, 3);
4538
- const jVector = direction.slice(3, 6);
4539
- const kVector = direction.slice(6, 9);
4540
- return (Math.abs(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(iVector, normal)) * spacing[0] +
4541
- Math.abs(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(jVector, normal)) * spacing[1] +
4542
- Math.abs(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(kVector, normal)) * spacing[2]);
4543
- }
4544
-
4545
- __webpack_require__.d(__webpack_exports__, {
4546
- A: () => (getVoxelThicknessAlongNormal)
4547
- });
4548
-
4549
-
4550
4531
  },
4551
4532
  67251(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
4552
4533
  /* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
@@ -4584,8 +4565,12 @@ function buildIndexSpaceSlab(volume, planePoint, normal, referencePlaneThickness
4584
4565
  const c0 = (origin[0] - planePoint[0]) * normal[0] +
4585
4566
  (origin[1] - planePoint[1]) * normal[1] +
4586
4567
  (origin[2] - planePoint[2]) * normal[2];
4587
- const halfWidth = (0,_slabMembership_js__rspack_import_2/* .getMembershipHalfWidth */.q$)(thickness, voxelThickness) -
4588
- (0,_slabMembership_js__rspack_import_2/* .getSlabEpsilon */.Xm)(voxelThickness);
4568
+ const rawHalfWidth = (0,_slabMembership_js__rspack_import_2/* .getSlabHalfWidth */.ks)(thickness, voxelThickness, options.depthCoverage);
4569
+ const epsilon = (0,_slabMembership_js__rspack_import_2/* .getSlabEpsilon */.Xm)(voxelThickness);
4570
+ const halfOpen = (0,_slabMembership_js__rspack_import_2/* .isSlabDepthLowInclusive */.K5)(options.depthCoverage);
4571
+ const depthLow = halfOpen ? -rawHalfWidth - epsilon : -rawHalfWidth + epsilon;
4572
+ const depthHigh = rawHalfWidth - epsilon;
4573
+ const halfWidth = halfOpen ? rawHalfWidth + epsilon : rawHalfWidth - epsilon;
4589
4574
  const outerAxis = pickOuterAxis(g);
4590
4575
  const remaining = [0, 1, 2].filter((axis) => axis !== outerAxis);
4591
4576
  let columnAxis = remaining[0];
@@ -4603,6 +4588,9 @@ function buildIndexSpaceSlab(volume, planePoint, normal, referencePlaneThickness
4603
4588
  voxelThickness,
4604
4589
  referencePlaneThickness: thickness,
4605
4590
  halfWidth,
4591
+ depthLow,
4592
+ depthHigh,
4593
+ halfOpen,
4606
4594
  outerAxis,
4607
4595
  rowAxis,
4608
4596
  columnAxis,
@@ -4627,6 +4615,19 @@ function integersWithProductInOpenInterval(coeff, lo, hi) {
4627
4615
  const max = Math.ceil(highExclusive) - 1;
4628
4616
  return min > max ? null : [min, max];
4629
4617
  }
4618
+ function integersWithProductInHalfOpenInterval(coeff, lo, hi) {
4619
+ if (lo >= hi) {
4620
+ return null;
4621
+ }
4622
+ if (coeff === 0) {
4623
+ return lo <= 0 && 0 < hi ? [-Infinity, Infinity] : null;
4624
+ }
4625
+ const a = lo / coeff;
4626
+ const b = hi / coeff;
4627
+ const min = coeff > 0 ? Math.ceil(a) : Math.floor(b) + 1;
4628
+ const max = coeff > 0 ? Math.ceil(b) - 1 : Math.floor(a);
4629
+ return min > max ? null : [min, max];
4630
+ }
4630
4631
  function clampRange(range, clampTo) {
4631
4632
  if (!range) {
4632
4633
  return null;
@@ -4641,12 +4642,15 @@ function clampRange(range, clampTo) {
4641
4642
  return min > max ? null : [min, max];
4642
4643
  }
4643
4644
  function getDepthRun(slab, outerIndex, rowIndex, clampTo) {
4644
- const { g, c0, halfWidth, outerAxis, rowAxis, columnAxis } = slab;
4645
+ const { g, c0, halfWidth, depthLow, depthHigh, halfOpen, outerAxis, rowAxis, columnAxis, } = slab;
4645
4646
  if (!(halfWidth > 0)) {
4646
4647
  return null;
4647
4648
  }
4648
4649
  const base = outerIndex * g[outerAxis] + rowIndex * g[rowAxis] + c0;
4649
- return clampRange(integersWithProductInOpenInterval(g[columnAxis], -halfWidth - base, halfWidth - base), clampTo);
4650
+ const solve = halfOpen
4651
+ ? integersWithProductInHalfOpenInterval
4652
+ : integersWithProductInOpenInterval;
4653
+ return clampRange(solve(g[columnAxis], depthLow - base, depthHigh - base), clampTo);
4650
4654
  }
4651
4655
  function getSlabAxisBound(slab, axis, bounds, fixed) {
4652
4656
  const { g, c0, halfWidth } = slab;
@@ -4691,9 +4695,9 @@ __webpack_require__.d(__webpack_exports__, {
4691
4695
 
4692
4696
 
4693
4697
  function* iterateVoxelsInShape(options) {
4694
- const { volume, planePoint, viewPlaneNormal: normal, referencePlaneThickness, getShapeRuns, isInShape, columnAxis: forcedColumnAxis, } = options;
4698
+ const { volume, planePoint, viewPlaneNormal: normal, referencePlaneThickness, depthCoverage, getShapeRuns, isInShape, columnAxis: forcedColumnAxis, } = options;
4695
4699
  const { dimensions, direction, spacing, origin } = volume;
4696
- const slab = (0,_indexSpaceSlab_js__rspack_import_0/* .buildIndexSpaceSlab */.r9)(volume, planePoint, normal, referencePlaneThickness, { columnAxis: forcedColumnAxis });
4700
+ const slab = (0,_indexSpaceSlab_js__rspack_import_0/* .buildIndexSpaceSlab */.r9)(volume, planePoint, normal, referencePlaneThickness, { columnAxis: forcedColumnAxis, depthCoverage });
4697
4701
  const { outerAxis, rowAxis, columnAxis } = slab;
4698
4702
  const volumeBounds = [0, 1, 2].map((axis) => [
4699
4703
  0,
@@ -4820,7 +4824,7 @@ __webpack_require__.d(__webpack_exports__, {
4820
4824
 
4821
4825
 
4822
4826
  },
4823
- 1766(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
4827
+ 24779(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
4824
4828
 
4825
4829
  // EXPORTS
4826
4830
  __webpack_require__.d(__webpack_exports__, {
@@ -4831,6 +4835,7 @@ __webpack_require__.d(__webpack_exports__, {
4831
4835
  NC: () => (/* reexport */ createPlaneBasis),
4832
4836
  oY: () => (/* reexport */ createPolylineShape),
4833
4837
  Tc: () => (/* reexport */ createRectangleShape),
4838
+ ZG: () => (/* reexport */ createUnionShape),
4834
4839
  NU: () => (/* reexport */ getAxisSteps),
4835
4840
  im: () => (/* reexport */ intersectRanges),
4836
4841
  n3: () => (/* reexport */ solveAbsLinearLeq),
@@ -5280,6 +5285,48 @@ function createPolylineShape(options) {
5280
5285
  };
5281
5286
  }
5282
5287
 
5288
+ ;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/utilities/voxelSlab/shapes/createUnionShape.js
5289
+ function createUnionShape(shapes) {
5290
+ if (shapes.length === 1) {
5291
+ return shapes[0];
5292
+ }
5293
+ function containsPoint(point) {
5294
+ return shapes.some((shape) => shape.containsPoint(point));
5295
+ }
5296
+ function* getRuns(outerIndex, rowIndex, depthRun, slab) {
5297
+ const runs = [];
5298
+ for (const shape of shapes) {
5299
+ for (const run of shape.getRuns(outerIndex, rowIndex, depthRun, slab)) {
5300
+ runs.push([run[0], run[1]]);
5301
+ }
5302
+ }
5303
+ if (!runs.length) {
5304
+ return;
5305
+ }
5306
+ runs.sort((a, b) => a[0] - b[0]);
5307
+ let [low, high] = runs[0];
5308
+ for (let index = 1; index < runs.length; index++) {
5309
+ const [nextLow, nextHigh] = runs[index];
5310
+ if (nextLow <= high + 1) {
5311
+ high = Math.max(high, nextHigh);
5312
+ continue;
5313
+ }
5314
+ yield [low, high];
5315
+ low = nextLow;
5316
+ high = nextHigh;
5317
+ }
5318
+ yield [low, high];
5319
+ }
5320
+ return {
5321
+ containsPoint,
5322
+ getRuns,
5323
+ getRequiredThickness: () => shapes.reduce((deepest, shape) => {
5324
+ const required = shape.getRequiredThickness();
5325
+ return required > deepest ? required : deepest;
5326
+ }, 0),
5327
+ };
5328
+ }
5329
+
5283
5330
  ;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/utilities/voxelSlab/shapes/index.js
5284
5331
 
5285
5332
 
@@ -5287,6 +5334,7 @@ function createPolylineShape(options) {
5287
5334
 
5288
5335
 
5289
5336
 
5337
+
5290
5338
  },
5291
5339
  83965(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
5292
5340
  /* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
@@ -5304,6 +5352,20 @@ function resolveReferencePlaneThickness(referencePlaneThickness, voxelThickness)
5304
5352
  function getMembershipHalfWidth(referencePlaneThickness, voxelThickness) {
5305
5353
  return (referencePlaneThickness + voxelThickness) / 2;
5306
5354
  }
5355
+ function getFillHalfWidth(fillDepth, voxelThickness) {
5356
+ const depth = Number.isFinite(fillDepth) && fillDepth > 0
5357
+ ? fillDepth
5358
+ : 0;
5359
+ return Math.max(depth, Math.abs(voxelThickness)) / 2;
5360
+ }
5361
+ function getSlabHalfWidth(thickness, voxelThickness, coverage = 'overlapping') {
5362
+ return coverage === 'centerInside'
5363
+ ? getFillHalfWidth(thickness, voxelThickness)
5364
+ : getMembershipHalfWidth(thickness, voxelThickness);
5365
+ }
5366
+ function isSlabDepthLowInclusive(coverage = 'overlapping') {
5367
+ return coverage === 'centerInside';
5368
+ }
5307
5369
  function getDisplayHalfWidth(viewportSlabThickness, referencePlaneThickness) {
5308
5370
  return (viewportSlabThickness + referencePlaneThickness) / 2;
5309
5371
  }
@@ -5336,13 +5398,16 @@ function asUnitNormal(normal) {
5336
5398
  __webpack_require__.d(__webpack_exports__, {
5337
5399
  $X: () => (isVoxelCenterInSlab),
5338
5400
  G9: () => (projectPointOntoPlane),
5401
+ K5: () => (isSlabDepthLowInclusive),
5339
5402
  Ko: () => (asUnitNormal),
5340
5403
  OP: () => (isWithinSlab),
5341
5404
  Xm: () => (getSlabEpsilon),
5342
5405
  gr: () => (resolveReferencePlaneThickness),
5343
5406
  k: () => (getDisplayHalfWidth),
5407
+ ks: () => (getSlabHalfWidth),
5344
5408
  ny: () => (signedDistanceToPlane),
5345
- q$: () => (getMembershipHalfWidth)
5409
+ q$: () => (getMembershipHalfWidth),
5410
+ xG: () => (getFillHalfWidth)
5346
5411
  }, {
5347
5412
  ni: SLAB_RELATIVE_EPSILON
5348
5413
  });
@@ -5441,45 +5506,7 @@ function worldToImageCoords(imageId, worldCoords) {
5441
5506
 
5442
5507
 
5443
5508
  },
5444
- 20325(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
5445
- /* import */ var _version_js__rspack_import_0 = __webpack_require__(88253);
5446
- /* import */ var _utilities_index_js__rspack_import_1 = __webpack_require__(28102);
5447
- /* import */ var _utilities_logging_index_js__rspack_import_2 = __webpack_require__(68272);
5448
- /* import */ var _utilities_object_index_js__rspack_import_3 = __webpack_require__(33430);
5449
- /* import */ var _utilities_math_index_js__rspack_import_4 = __webpack_require__(99511);
5450
-
5451
-
5452
-
5453
-
5454
-
5455
-
5456
- __webpack_require__.d(__webpack_exports__, {
5457
- Et: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.Et),
5458
- IQ: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.IQ),
5459
- Ph: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.Ph),
5460
- WC: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.WC),
5461
- m9: () => (/* reexport module object */ _utilities_logging_index_js__rspack_import_2),
5462
- n4: () => (/* reexport safe */ _utilities_math_index_js__rspack_import_4.n4)
5463
- });
5464
-
5465
-
5466
- },
5467
- 99511(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
5468
-
5469
- // EXPORTS
5470
- __webpack_require__.d(__webpack_exports__, {
5471
- n4: () => (/* reexport */ isEqual),
5472
- Ph: () => (/* reexport */ isEqualAbs),
5473
- WC: () => (/* reexport */ isEqualNegative),
5474
- Et: () => (/* reexport */ isNumber),
5475
- IQ: () => (/* reexport */ toNumber/* .toFiniteNumber */.IQ)
5476
- });
5477
-
5478
- // UNUSED EXPORTS: DEFAULT_EPSILON, areNumbersEqualWithTolerance, isEqualDefault, toNumber, toNumberDefault
5479
-
5480
- // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/utils/dist/esm/utilities/math/toNumber.js
5481
- var toNumber = __webpack_require__(15801);
5482
- ;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/utils/dist/esm/utilities/math/isEqual.js
5509
+ 90757(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
5483
5510
  const DEFAULT_EPSILON = 1e-5;
5484
5511
  function areNumbersEqualWithTolerance(num1, num2, tolerance) {
5485
5512
  return Math.abs(num1 - num2) <= tolerance;
@@ -5528,13 +5555,15 @@ function isNumber(n) {
5528
5555
  }
5529
5556
  return isFinite(n) && !isNaN(n);
5530
5557
  }
5531
- /* export default */ var math_isEqual = ((/* unused pure expression or super */ null && (isEqual)));
5532
-
5533
- ;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/utils/dist/esm/utilities/math/index.js
5534
-
5535
-
5536
-
5558
+ /* unused export default */ var __rspack_default_export = ((/* unused pure expression or super */ null && (isEqual)));
5537
5559
 
5560
+ __webpack_require__.d(__webpack_exports__, {
5561
+ Et: () => (isNumber),
5562
+ n4: () => (isEqual)
5563
+ }, {
5564
+ Ph: isEqualAbs,
5565
+ WC: isEqualNegative
5566
+ });
5538
5567
 
5539
5568
 
5540
5569
  },
@@ -2404,8 +2404,8 @@ var react = __webpack_require__(14041);
2404
2404
  var esm = __webpack_require__(62721);
2405
2405
  // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/index.js
2406
2406
  var dist_esm = __webpack_require__(17819);
2407
- // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/index.js + 28 modules
2408
- var metadata_dist_esm = __webpack_require__(34047);
2407
+ // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/index.js + 29 modules
2408
+ var metadata_dist_esm = __webpack_require__(76368);
2409
2409
  ;// CONCATENATED MODULE: ../../extensions/cornerstone/src/enums.ts
2410
2410
  const CORNERSTONE_3D_TOOLS_SOURCE_NAME = 'Cornerstone3DTools';
2411
2411
  const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';
@@ -2421,8 +2421,8 @@ var core_src = __webpack_require__(24178);
2421
2421
  var loaders = __webpack_require__(34270);
2422
2422
  // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/enums/RequestType.js
2423
2423
  var RequestType = __webpack_require__(43117);
2424
- // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/index.js + 83 modules
2425
- var dicom_image_loader_dist_esm = __webpack_require__(94693);
2424
+ // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/index.js + 84 modules
2425
+ var dicom_image_loader_dist_esm = __webpack_require__(83105);
2426
2426
  ;// CONCATENATED MODULE: ../../extensions/cornerstone/src/initWADOImageLoader.js
2427
2427
 
2428
2428
 
@@ -23764,8 +23764,8 @@ async function createSegmentationForViewport(servicesManager, { viewportId, opti
23764
23764
  return generatedSegmentationId;
23765
23765
  }
23766
23766
 
23767
- // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/index.js + 10 modules
23768
- var stateManagement_segmentation = __webpack_require__(93285);
23767
+ // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/index.js + 9 modules
23768
+ var stateManagement_segmentation = __webpack_require__(86274);
23769
23769
  ;// CONCATENATED MODULE: ../../extensions/cornerstone/src/commandsModule.ts
23770
23770
 
23771
23771
 
@@ -40761,26 +40761,70 @@ function SegmentationUtilityButton_temp(store) {
40761
40761
  /* export default */ var components_SegmentationUtilityButton = (SegmentationUtilityButton);
40762
40762
 
40763
40763
  ;// CONCATENATED MODULE: ../../extensions/cornerstone/src/utils/segmentationExportUtils.ts
40764
+
40764
40765
  /**
40765
- * Checks if a labelmap segmentation has exportable data
40766
- * A label map is exportable if it has any pixel data and
40767
- * it is referenced by a display set that is reconstructable.
40766
+ * The result of the voxel scan of each labelmap, kept until the segmentation
40767
+ * changes. The panel asks on each render, and a scan reads every voxel.
40768
+ */
40769
+ const hasPixelDataByLabelmap = new WeakMap();
40770
+ let isListeningForChanges = false;
40771
+ const listenForChanges = ()=>{
40772
+ if (isListeningForChanges) {
40773
+ return;
40774
+ }
40775
+ isListeningForChanges = true;
40776
+ const forget = (evt)=>{
40777
+ const labelmap = dist_esm.segmentation.state.getSegmentation(evt.detail?.segmentationId)?.representationData?.Labelmap;
40778
+ if (labelmap) {
40779
+ hasPixelDataByLabelmap.delete(labelmap);
40780
+ }
40781
+ };
40782
+ esm.eventTarget.addEventListener(dist_esm.Enums.Events.SEGMENTATION_DATA_MODIFIED, forget);
40783
+ esm.eventTarget.addEventListener(dist_esm.Enums.Events.SEGMENTATION_MODIFIED, forget);
40784
+ }; /**
40785
+ * Gets the image ids and the label map that the SEG export of a single-layer
40786
+ * labelmap uses.
40768
40787
  *
40769
- * @param labelmap - The labelmap representation data
40770
- * @param displaySetService - The display set service instance
40771
- * @returns boolean - Whether the labelmap has exportable data
40788
+ * The only layer can be a private overlap layer, so its label map applies also
40789
+ * when the layer has no image ids of its own (missing or empty) and the
40790
+ * top-level `imageIds` are used.
40791
+ *
40792
+ * @returns `layerWithoutImageIds` is the layer when its image ids are not used.
40772
40793
  */
40773
- const hasExportableLabelMapData = (labelmap, displaySetService)=>{
40774
- if (!labelmap) {
40775
- return false;
40794
+ function getSingleLayerExportSource(labelmap) {
40795
+ const layer = Object.values(labelmap.labelmaps ?? {})[0];
40796
+ if (layer?.imageIds?.length) {
40797
+ return {
40798
+ imageIds: layer.imageIds,
40799
+ labelToSegmentIndex: layer.labelToSegmentIndex
40800
+ };
40776
40801
  }
40777
- const imageIds = labelmap?.imageIds;
40778
- if (!imageIds?.length) {
40779
- return false;
40802
+ return {
40803
+ imageIds: labelmap.imageIds ?? [],
40804
+ labelToSegmentIndex: layer?.labelToSegmentIndex,
40805
+ layerWithoutImageIds: layer
40806
+ };
40807
+ } /** Gets the labelmap image ids of every layer that the SEG export uses. */
40808
+ const getExportImageIds = (labelmap)=>{
40809
+ const layers = Object.values(labelmap.labelmaps ?? {});
40810
+ if (layers.length > 1) {
40811
+ return layers.flatMap((layer)=>layer.imageIds ?? []);
40780
40812
  }
40813
+ return getSingleLayerExportSource(labelmap).imageIds;
40814
+ }; /**
40815
+ * Scans the voxels of every layer of a labelmap.
40816
+ *
40817
+ * @returns true when a voxel is set, false when no voxel is set, and undefined
40818
+ * when no voxel is set but an image is not in the cache yet. An undefined
40819
+ * result must not be kept: no segmentation event follows when the image loads.
40820
+ */
40821
+ const hasLabelmapPixelData = (labelmap)=>{
40822
+ const imageIds = getExportImageIds(labelmap);
40823
+ let isImageMissing = false;
40781
40824
  const hasPixelData = imageIds.some((imageId)=>{
40782
40825
  const pixelData = esm.cache.getImage(imageId)?.getPixelData();
40783
40826
  if (!pixelData) {
40827
+ isImageMissing = true;
40784
40828
  return false;
40785
40829
  }
40786
40830
  for(let i = 0; i < pixelData.length; i++){
@@ -40788,7 +40832,30 @@ const hasExportableLabelMapData = (labelmap, displaySetService)=>{
40788
40832
  return true;
40789
40833
  }
40790
40834
  }
40835
+ return false;
40791
40836
  });
40837
+ return hasPixelData || (isImageMissing ? undefined : false);
40838
+ }; /**
40839
+ * Checks if a labelmap segmentation has exportable data
40840
+ * A label map is exportable if it has any pixel data and
40841
+ * it is referenced by a display set that is reconstructable.
40842
+ *
40843
+ * @param labelmap - The labelmap representation data
40844
+ * @param displaySetService - The display set service instance
40845
+ * @returns boolean - Whether the labelmap has exportable data
40846
+ */
40847
+ const hasExportableLabelMapData = (labelmap, displaySetService)=>{
40848
+ if (!labelmap) {
40849
+ return false;
40850
+ }
40851
+ listenForChanges();
40852
+ let hasPixelData = hasPixelDataByLabelmap.get(labelmap);
40853
+ if (hasPixelData === undefined) {
40854
+ hasPixelData = hasLabelmapPixelData(labelmap);
40855
+ if (hasPixelData !== undefined) {
40856
+ hasPixelDataByLabelmap.set(labelmap, hasPixelData);
40857
+ }
40858
+ }
40792
40859
  if (!hasPixelData) {
40793
40860
  return false;
40794
40861
  }
@@ -43680,6 +43747,7 @@ function _askHydrate(uiViewportDialogService, customizationService, viewportId,
43680
43747
 
43681
43748
 
43682
43749
 
43750
+
43683
43751
  const utils_utils = {
43684
43752
  handleSegmentChange: handleSegmentChange,
43685
43753
  isReferenceViewable: isReferenceViewable,
@@ -43687,7 +43755,8 @@ const utils_utils = {
43687
43755
  setupSegmentationModifiedHandler: setupSegmentationModifiedHandler,
43688
43756
  promptHydrationDialog: utils_promptHydrationDialog,
43689
43757
  getCenterExtent: getCenterExtent,
43690
- createSegmentationForViewport: createSegmentationForViewport
43758
+ createSegmentationForViewport: createSegmentationForViewport,
43759
+ getSingleLayerExportSource: getSingleLayerExportSource
43691
43760
  };
43692
43761
  /* export default */ var src_utils = (utils_utils);
43693
43762
 
@@ -47264,8 +47333,8 @@ function getImageId({ instance, frame, config, thumbnail = false }) {
47264
47333
 
47265
47334
  // EXTERNAL MODULE: ../../node_modules/dcmjs/build/dcmjs.es.js
47266
47335
  var dcmjs_es = __webpack_require__(85631);
47267
- // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/index.js + 83 modules
47268
- var esm = __webpack_require__(94693);
47336
+ // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/index.js + 84 modules
47337
+ var esm = __webpack_require__(83105);
47269
47338
  ;// CONCATENATED MODULE: ../../extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoader.js
47270
47339
  /**
47271
47340
  * Class to define inheritance of load retrieve strategy.
@@ -59106,8 +59175,8 @@ function AboutModalDefault() {
59106
59175
  version = $[3];
59107
59176
  }
59108
59177
  const browser = `${t0}${t1} ${version}`;
59109
- const versionNumber = "3.14.0-beta.55";
59110
- const commitHash = "8bab06bb571c9781a207566e9d8b9bd5c5bebfc4";
59178
+ const versionNumber = "3.14.0-beta.56";
59179
+ const commitHash = "27908854e03a0f6869634c6c8bbe1598602fa639";
59111
59180
  let t2;
59112
59181
  if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
59113
59182
  t2 = versionNumber.split("-");