@ohif/app 3.12.0-beta.99 → 3.12.1

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 (70) hide show
  1. package/dist/{1403.bundle.94a178e2572f1f0b2a2c.js → 1403.bundle.761239eb886a88301851.js} +37 -37
  2. package/dist/{1459.bundle.3785cdd0abf449adebf1.js → 1459.bundle.fcdd0dec6286845179bf.js} +5 -6
  3. package/dist/{147.bundle.205350dc3d21478277b1.js → 147.bundle.47af018b91121924a12c.js} +10 -18
  4. package/dist/{1608.bundle.f855c4bdb7f00eb66fca.js → 1608.bundle.b9abbf4ed6cc2e491dc3.js} +10 -10
  5. package/dist/{1730.bundle.37c569ae3ed057b69840.js → 1730.bundle.51e69967a025226592cd.js} +41 -40
  6. package/dist/{1927.bundle.019331c266d306772371.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
  7. package/dist/{1933.bundle.ab5e8036f6e1c854c965.js → 1933.bundle.e3ba7d4dcbbd75701d8e.js} +19 -17
  8. package/dist/{2018.bundle.469f9ad42597b6b29ff1.js → 2018.bundle.45c44470b4b098aa343f.js} +65 -66
  9. package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.aea8d3b39486dd5ab39e.js} +569 -558
  10. package/dist/{213.bundle.398730bb3ceb1af54413.js → 213.bundle.863ab5d320fc06043a4e.js} +5 -7
  11. package/dist/{3584.bundle.839a16d349815b3f7c97.js → 2199.bundle.974037f21bfd12c4e8af.js} +256 -2236
  12. package/dist/{2424.bundle.be90e7bcf0fd8db68b2f.js → 2424.bundle.b070e83baf101dad2121.js} +5 -7
  13. package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
  14. package/dist/{2701.bundle.aca0d4f24a6f2094c3c3.js → 2701.bundle.58a6a580073edbb4cc04.js} +9 -9
  15. package/dist/{2842.bundle.7852a204d3510fca8b27.js → 2816.bundle.838fa4d72921c026083c.js} +1136 -2342
  16. package/dist/{9195.bundle.e2fd5c6b5830c0ee25a8.js → 2851.bundle.70227d013c1937e846be.js} +318 -150
  17. package/dist/{1903.bundle.dc5248f7cb6ba1dc1072.js → 3081.bundle.930757b1a5aa8549e112.js} +752 -466
  18. package/dist/{3343.bundle.f8fe9316b0ff68d087f7.js → 3343.bundle.a4424b8418b8c0c1a9e4.js} +27 -25
  19. package/dist/{3461.bundle.50c752c623f39cf6c457.js → 3461.bundle.ab31c31a5ddc4baa72f7.js} +40 -40
  20. package/dist/{4202.bundle.790706560c6edb303476.js → 4202.bundle.4f76d3a50d6cf819fba0.js} +6 -6
  21. package/dist/{4019.bundle.01f63d5dd5b96ded0c00.js → 4287.bundle.87e14e648f2bce5e4176.js} +372 -567
  22. package/dist/{4775.bundle.d7f0645419f1df8e00b8.js → 4775.bundle.768f00df706f506f3789.js} +57 -51
  23. package/dist/{4819.bundle.ef1151f023b3784bc1be.js → 4819.bundle.6377aba4cf194120e7d4.js} +35 -34
  24. package/dist/{5028.bundle.b3611b7c7422a5c2e723.js → 5028.bundle.3a086ff61ec8dc1da4b1.js} +13 -15
  25. package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
  26. package/dist/{5457.bundle.9f2eb65ad85fcbb75e27.js → 5457.bundle.0063531ed24c06fba48b.js} +16 -23
  27. package/dist/{5462.bundle.a81a691eeef782ab95b9.js → 5462.bundle.d5bb9b3ddc510fea141f.js} +1108 -1030
  28. package/dist/{5485.bundle.71041ca4bc9e6ab57d92.js → 5485.bundle.b523d7015979fc641f7e.js} +17 -32
  29. package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
  30. package/dist/5724.bundle.62ea5c07c7809ab4cd74.js +297 -0
  31. package/dist/5724.css +2 -0
  32. package/dist/{5802.bundle.28ab859d9b48a5b2c31c.js → 5802.bundle.ae4d88742c353de462c2.js} +13 -18
  33. package/dist/{5830.bundle.b073c265c4fcea1afff3.js → 5830.bundle.791019deddd536980a11.js} +3 -3
  34. package/dist/{5858.bundle.d5f4bf849aaeebf5025c.js → 5858.bundle.466e58128de344ab53f3.js} +90 -86
  35. package/dist/{6027.bundle.160bd47ea03784276275.js → 6027.bundle.3cf6c827b4ce9066b426.js} +3 -5
  36. package/dist/{6163.bundle.1f096bdbe3a341c1710d.js → 6163.bundle.ac77880c970e788c9a07.js} +33 -33
  37. package/dist/{5549.bundle.d5def6a3124a3a481b7c.js → 6280.bundle.f22f9955eb906e1d7da8.js} +2475 -1200
  38. package/dist/{3353.bundle.a0f1654c642395bbbbbc.js → 6347.bundle.f8393c20d5159ed41b64.js} +358 -214
  39. package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.d8a592b03e9a5b7a66c2.js} +102 -96
  40. package/dist/{6376.bundle.272e755bdcbb5615a44e.js → 6376.bundle.527820a5cb1eece2a8d2.js} +6 -6
  41. package/dist/{5400.bundle.de97508611da1c00d58a.js → 6409.bundle.24edbaa283b7c521b8f7.js} +517 -146
  42. package/dist/6939.bundle.41fbdef87597b5172ec6.js +3 -3
  43. package/dist/7159.bundle.a5991a5d4f0dd8f1c95f.js +3 -3
  44. package/dist/{7190.bundle.d731ae6cf6e933a2c408.js → 7190.bundle.479332d662ffe08d1f92.js} +1462 -955
  45. package/dist/{732.bundle.6978ac30a1e36abf06db.js → 732.bundle.ea6f9d8504e37e01a208.js} +5 -13
  46. package/dist/{7431.bundle.999b2b65d4973bc56218.js → 7431.bundle.b31ebb4a2625e89d864e.js} +38 -32
  47. package/dist/{7639.bundle.e004d734044049fe8fe9.js → 7639.bundle.0147cdd1c23858221b62.js} +27 -25
  48. package/dist/7758.bundle.c8d106364298e7d288f0.js +3 -3
  49. package/dist/{8094.bundle.5c44190a325ac23e3e5c.js → 8094.bundle.148a66619607e37cbf19.js} +3 -4
  50. package/dist/{8305.bundle.ba43ed23edea2bf394b3.js → 8305.bundle.565339762503b9ae4f59.js} +57 -41
  51. package/dist/{85.bundle.a16e254910c60223df19.js → 85.bundle.b2365b2e4c3c6935f453.js} +3 -5
  52. package/dist/{8558.bundle.463ddb34a619cf47493e.js → 8558.bundle.9af6d13a22ddb44ea766.js} +60 -32
  53. package/dist/{8583.bundle.59c239cf891c2e10bf10.js → 8583.bundle.f51188077125da303398.js} +42 -39
  54. package/dist/{5448.bundle.9a36e001169ea3bfeb6c.js → 8665.bundle.dc56c125411422f9f686.js} +3753 -1424
  55. package/dist/{7412.bundle.aec4834a71fc27c4ce06.js → 9205.bundle.2a2f38a4ee23647f5fa4.js} +3413 -1271
  56. package/dist/{9845.bundle.31aec3fe7a5cdc247f4e.js → 9845.bundle.31f3e7e2d28fa6033ee5.js} +22 -14
  57. package/dist/{9862.bundle.3ca0ad5f54db87ccf91e.js → 9862.bundle.73ea2a7703bf1bb96275.js} +8 -6
  58. package/dist/{9927.bundle.f421cd167be94a7109f6.js → 9927.bundle.af31e6ce5cac195607fd.js} +19 -21
  59. package/dist/app-config.js +12 -0
  60. package/dist/{app.bundle.7df5bc1cd812bd602686.js → app.bundle.b2817894afde20b59bdb.js} +67903 -63389
  61. package/dist/app.bundle.css +1 -1
  62. package/dist/{compute.bundle.fdee4a0f193ee2e1b6da.js → compute.bundle.73440405025831e0e072.js} +10 -22
  63. package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js +3254 -1792
  64. package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js.map +1 -1
  65. package/dist/{histogram-worker.bundle.d4e40a8018d2698b072e.js → histogram-worker.bundle.5b679ce4142c803c80a4.js} +11 -23
  66. package/dist/index.html +1 -1
  67. package/dist/{interpolation.bundle.1938b79f9d6db363528a.js → interpolation.bundle.7554483d97f6119414f9.js} +14 -26
  68. package/dist/{polySeg.bundle.11f9746cd60c9811a412.js → polySeg.bundle.6373e24bd578ae0d41eb.js} +8 -20
  69. package/dist/sw.js +1 -1
  70. package/package.json +24 -24
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[5400],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[6409],{
3
3
 
4
- /***/ 18262:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4
+ /***/ 18262
5
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6
6
 
7
7
 
8
8
  // EXPORTS
@@ -91,10 +91,10 @@ function draw(element, fn) {
91
91
  /* harmony default export */ const drawingSvg_draw = (draw);
92
92
 
93
93
 
94
- /***/ }),
94
+ /***/ },
95
95
 
96
- /***/ 12004:
97
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
96
+ /***/ 12004
97
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
98
98
 
99
99
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
100
100
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -146,10 +146,10 @@ function drawCircle(svgDrawingHelper, annotationUID, circleUID, center, radius,
146
146
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (drawCircle);
147
147
 
148
148
 
149
- /***/ }),
149
+ /***/ },
150
150
 
151
- /***/ 56745:
152
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
151
+ /***/ 56745
152
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
153
153
 
154
154
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
155
155
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -164,10 +164,10 @@ function drawHandles(svgDrawingHelper, annotationUID, handleGroupUID, handlePoin
164
164
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (drawHandles);
165
165
 
166
166
 
167
- /***/ }),
167
+ /***/ },
168
168
 
169
- /***/ 1595:
170
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
169
+ /***/ 1595
170
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
171
171
 
172
172
 
173
173
  // EXPORTS
@@ -227,10 +227,10 @@ function drawLinkedTextBox(svgDrawingHelper, annotationUID, textBoxUID, textLine
227
227
  /* harmony default export */ const drawingSvg_drawLinkedTextBox = (drawLinkedTextBox);
228
228
 
229
229
 
230
- /***/ }),
230
+ /***/ },
231
231
 
232
- /***/ 97530:
233
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
232
+ /***/ 97530
233
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
234
234
 
235
235
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
236
236
  /* harmony export */ A: () => (/* binding */ drawRect)
@@ -248,10 +248,10 @@ function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, opt
248
248
  }
249
249
 
250
250
 
251
- /***/ }),
251
+ /***/ },
252
252
 
253
- /***/ 92686:
254
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
253
+ /***/ 92686
254
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
255
255
 
256
256
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
257
257
  /* harmony export */ Y: () => (/* binding */ segmentationStyle)
@@ -483,10 +483,10 @@ const segmentationStyle = new SegmentationStyle();
483
483
 
484
484
 
485
485
 
486
- /***/ }),
486
+ /***/ },
487
487
 
488
- /***/ 98798:
489
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
488
+ /***/ 98798
489
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
490
490
 
491
491
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
492
492
  /* harmony export */ Q: () => (/* binding */ triggerSegmentationDataModified)
@@ -508,10 +508,10 @@ function triggerSegmentationDataModified(segmentationId, modifiedSlicesToUse, se
508
508
  }
509
509
 
510
510
 
511
- /***/ }),
511
+ /***/ },
512
512
 
513
- /***/ 67165:
514
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
513
+ /***/ 67165
514
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
515
515
 
516
516
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
517
517
  /* harmony export */ T: () => (/* binding */ getActiveSegmentation)
@@ -524,10 +524,10 @@ function getActiveSegmentation(viewportId) {
524
524
  }
525
525
 
526
526
 
527
- /***/ }),
527
+ /***/ },
528
528
 
529
- /***/ 33658:
530
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
529
+ /***/ 33658
530
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
531
531
 
532
532
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
533
533
  /* harmony export */ I: () => (/* binding */ getSegmentationRepresentationVisibility)
@@ -540,10 +540,10 @@ function getSegmentationRepresentationVisibility(viewportId, specifier) {
540
540
  }
541
541
 
542
542
 
543
- /***/ }),
543
+ /***/ },
544
544
 
545
- /***/ 44188:
546
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
545
+ /***/ 44188
546
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
547
547
 
548
548
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
549
549
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -584,10 +584,10 @@ function internalAddRepresentationData({ segmentationId, type, data, }) {
584
584
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (internalAddRepresentationData);
585
585
 
586
586
 
587
- /***/ }),
587
+ /***/ },
588
588
 
589
- /***/ 65136:
590
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
589
+ /***/ 65136
590
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
591
591
 
592
592
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
593
593
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -614,10 +614,10 @@ function getToolGroupForViewport(viewportId, renderingEngineId) {
614
614
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getToolGroupForViewport);
615
615
 
616
616
 
617
- /***/ }),
617
+ /***/ },
618
618
 
619
- /***/ 37590:
620
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
619
+ /***/ 37590
620
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
621
621
 
622
622
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
623
623
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -662,10 +662,10 @@ class PlanarFreehandContourSegmentationTool extends _PlanarFreehandROITool__WEBP
662
662
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PlanarFreehandContourSegmentationTool);
663
663
 
664
664
 
665
- /***/ }),
665
+ /***/ },
666
666
 
667
- /***/ 28220:
668
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
667
+ /***/ 28220
668
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
669
669
 
670
670
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
671
671
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -673,7 +673,7 @@ class PlanarFreehandContourSegmentationTool extends _PlanarFreehandROITool__WEBP
673
673
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
674
674
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3823);
675
675
  /* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4096);
676
- /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95527);
676
+ /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(85895);
677
677
  /* harmony import */ var _utilities_planar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13165);
678
678
  /* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27730);
679
679
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(60810);
@@ -901,7 +901,7 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
901
901
  };
902
902
  this._renderStats = (annotation, viewport, enabledElement, svgDrawingHelper) => {
903
903
  const { data } = annotation;
904
- const targetId = this.getTargetId(viewport);
904
+ const targetId = this.getTargetId(viewport, data);
905
905
  const styleSpecifier = {
906
906
  toolGroupId: this.toolGroupId,
907
907
  toolName: this.getToolName(),
@@ -1271,29 +1271,29 @@ function defaultGetTextLines(data, targetId) {
1271
1271
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PlanarFreehandROITool);
1272
1272
 
1273
1273
 
1274
- /***/ }),
1274
+ /***/ },
1275
1275
 
1276
- /***/ 4010:
1277
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1276
+ /***/ 4010
1277
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1278
1278
 
1279
1279
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1280
1280
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
1281
1281
  /* harmony export */ });
1282
1282
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85817);
1283
1283
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15327);
1284
- /* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4096);
1285
- /* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27730);
1286
- /* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6802);
1287
- /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2076);
1288
- /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(29601);
1289
- /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(44049);
1290
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(74347);
1291
- /* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(85204);
1292
- /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(29857);
1293
- /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(60810);
1294
- /* harmony import */ var _utilities_math_rectangle__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(33657);
1295
- /* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(473);
1296
- /* harmony import */ var _utilities_planar_getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(35489);
1284
+ /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3823);
1285
+ /* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4096);
1286
+ /* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27730);
1287
+ /* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6802);
1288
+ /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2076);
1289
+ /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(29601);
1290
+ /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(44049);
1291
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(74347);
1292
+ /* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(85204);
1293
+ /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(29857);
1294
+ /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(60810);
1295
+ /* harmony import */ var _utilities_math_rectangle__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(33657);
1296
+ /* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(473);
1297
1297
  /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(7001);
1298
1298
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(58640);
1299
1299
  /* harmony import */ var _utilities_getPixelValueUnits__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(40634);
@@ -1366,8 +1366,8 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1366
1366
  cachedStats: {},
1367
1367
  },
1368
1368
  });
1369
- (0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .addAnnotation */ .lC)(annotation, element);
1370
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_11__.getViewportIdsWithToolToRender)(element, this.getToolName());
1369
+ (0,_stateManagement__WEBPACK_IMPORTED_MODULE_5__/* .addAnnotation */ .lC)(annotation, element);
1370
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__.getViewportIdsWithToolToRender)(element, this.getToolName());
1371
1371
  this.editData = {
1372
1372
  annotation,
1373
1373
  viewportIdsToRender,
@@ -1395,7 +1395,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1395
1395
  ]);
1396
1396
  const point = [canvasCoords[0], canvasCoords[1]];
1397
1397
  const { left, top, width, height } = rect;
1398
- const distanceToPoint = _utilities_math_rectangle__WEBPACK_IMPORTED_MODULE_12__.distanceToPoint([left, top, width, height], point);
1398
+ const distanceToPoint = _utilities_math_rectangle__WEBPACK_IMPORTED_MODULE_13__.distanceToPoint([left, top, width, height], point);
1399
1399
  if (distanceToPoint <= proximity) {
1400
1400
  return true;
1401
1401
  }
@@ -1405,7 +1405,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1405
1405
  const eventDetail = evt.detail;
1406
1406
  const { element } = eventDetail;
1407
1407
  annotation.highlighted = true;
1408
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_11__.getViewportIdsWithToolToRender)(element, this.getToolName());
1408
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__.getViewportIdsWithToolToRender)(element, this.getToolName());
1409
1409
  this.editData = {
1410
1410
  annotation,
1411
1411
  viewportIdsToRender,
@@ -1431,7 +1431,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1431
1431
  else {
1432
1432
  handleIndex = data.handles.points.findIndex((p) => p === handle);
1433
1433
  }
1434
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_11__.getViewportIdsWithToolToRender)(element, this.getToolName());
1434
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__.getViewportIdsWithToolToRender)(element, this.getToolName());
1435
1435
  this.editData = {
1436
1436
  annotation,
1437
1437
  viewportIdsToRender,
@@ -1462,11 +1462,11 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1462
1462
  this.isDrawing = false;
1463
1463
  if (this.isHandleOutsideImage &&
1464
1464
  this.configuration.preventHandleOutsideImage) {
1465
- (0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .removeAnnotation */ .O8)(annotation.annotationUID);
1465
+ (0,_stateManagement__WEBPACK_IMPORTED_MODULE_5__/* .removeAnnotation */ .O8)(annotation.annotationUID);
1466
1466
  }
1467
1467
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A)(viewportIdsToRender);
1468
1468
  if (newAnnotation) {
1469
- (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_7__.triggerAnnotationCompleted)(annotation);
1469
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__.triggerAnnotationCompleted)(annotation);
1470
1470
  }
1471
1471
  };
1472
1472
  this._dragCallback = (evt) => {
@@ -1548,7 +1548,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1548
1548
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
1549
1549
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A)(viewportIdsToRender);
1550
1550
  if (annotation.invalidated) {
1551
- (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_7__.triggerAnnotationModified)(annotation, element, _enums__WEBPACK_IMPORTED_MODULE_10__.ChangeTypes.HandlesUpdated);
1551
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__.triggerAnnotationModified)(annotation, element, _enums__WEBPACK_IMPORTED_MODULE_11__.ChangeTypes.HandlesUpdated);
1552
1552
  }
1553
1553
  };
1554
1554
  this.cancel = (element) => {
@@ -1563,55 +1563,55 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1563
1563
  data.handles.activeHandleIndex = null;
1564
1564
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A)(viewportIdsToRender);
1565
1565
  if (newAnnotation) {
1566
- (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_7__.triggerAnnotationCompleted)(annotation);
1566
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__.triggerAnnotationCompleted)(annotation);
1567
1567
  }
1568
1568
  this.editData = null;
1569
1569
  return annotation.annotationUID;
1570
1570
  }
1571
1571
  };
1572
1572
  this._activateDraw = (element) => {
1573
- _store_state__WEBPACK_IMPORTED_MODULE_9__/* .state */ .wk.isInteractingWithTool = true;
1574
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_UP, this._endCallback);
1575
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_DRAG, this._dragCallback);
1576
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_MOVE, this._dragCallback);
1577
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_CLICK, this._endCallback);
1578
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_END, this._endCallback);
1579
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_DRAG, this._dragCallback);
1580
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_TAP, this._endCallback);
1573
+ _store_state__WEBPACK_IMPORTED_MODULE_10__/* .state */ .wk.isInteractingWithTool = true;
1574
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_UP, this._endCallback);
1575
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_DRAG, this._dragCallback);
1576
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_MOVE, this._dragCallback);
1577
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_CLICK, this._endCallback);
1578
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_END, this._endCallback);
1579
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_DRAG, this._dragCallback);
1580
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_TAP, this._endCallback);
1581
1581
  };
1582
1582
  this._deactivateDraw = (element) => {
1583
- _store_state__WEBPACK_IMPORTED_MODULE_9__/* .state */ .wk.isInteractingWithTool = false;
1584
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_UP, this._endCallback);
1585
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_DRAG, this._dragCallback);
1586
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_MOVE, this._dragCallback);
1587
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_CLICK, this._endCallback);
1588
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_END, this._endCallback);
1589
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_DRAG, this._dragCallback);
1590
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_TAP, this._endCallback);
1583
+ _store_state__WEBPACK_IMPORTED_MODULE_10__/* .state */ .wk.isInteractingWithTool = false;
1584
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_UP, this._endCallback);
1585
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_DRAG, this._dragCallback);
1586
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_MOVE, this._dragCallback);
1587
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_CLICK, this._endCallback);
1588
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_END, this._endCallback);
1589
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_DRAG, this._dragCallback);
1590
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_TAP, this._endCallback);
1591
1591
  };
1592
1592
  this._activateModify = (element) => {
1593
- _store_state__WEBPACK_IMPORTED_MODULE_9__/* .state */ .wk.isInteractingWithTool = true;
1594
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_UP, this._endCallback);
1595
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_DRAG, this._dragCallback);
1596
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_CLICK, this._endCallback);
1597
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_END, this._endCallback);
1598
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_DRAG, this._dragCallback);
1599
- element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_TAP, this._endCallback);
1593
+ _store_state__WEBPACK_IMPORTED_MODULE_10__/* .state */ .wk.isInteractingWithTool = true;
1594
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_UP, this._endCallback);
1595
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_DRAG, this._dragCallback);
1596
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_CLICK, this._endCallback);
1597
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_END, this._endCallback);
1598
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_DRAG, this._dragCallback);
1599
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_TAP, this._endCallback);
1600
1600
  };
1601
1601
  this._deactivateModify = (element) => {
1602
- _store_state__WEBPACK_IMPORTED_MODULE_9__/* .state */ .wk.isInteractingWithTool = false;
1603
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_UP, this._endCallback);
1604
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_DRAG, this._dragCallback);
1605
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.MOUSE_CLICK, this._endCallback);
1606
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_END, this._endCallback);
1607
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_DRAG, this._dragCallback);
1608
- element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_10__.Events.TOUCH_TAP, this._endCallback);
1602
+ _store_state__WEBPACK_IMPORTED_MODULE_10__/* .state */ .wk.isInteractingWithTool = false;
1603
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_UP, this._endCallback);
1604
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_DRAG, this._dragCallback);
1605
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.MOUSE_CLICK, this._endCallback);
1606
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_END, this._endCallback);
1607
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_DRAG, this._dragCallback);
1608
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_11__.Events.TOUCH_TAP, this._endCallback);
1609
1609
  };
1610
1610
  this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
1611
1611
  let renderStatus = false;
1612
1612
  const { viewport } = enabledElement;
1613
1613
  const { element } = viewport;
1614
- let annotations = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .getAnnotations */ .Rh)(this.getToolName(), element);
1614
+ let annotations = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_5__/* .getAnnotations */ .Rh)(this.getToolName(), element);
1615
1615
  if (!annotations?.length) {
1616
1616
  return renderStatus;
1617
1617
  }
@@ -1619,7 +1619,6 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1619
1619
  if (!annotations?.length) {
1620
1620
  return renderStatus;
1621
1621
  }
1622
- const targetId = this.getTargetId(viewport);
1623
1622
  const renderingEngine = viewport.getRenderingEngine();
1624
1623
  const styleSpecifier = {
1625
1624
  toolGroupId: this.toolGroupId,
@@ -1631,6 +1630,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1631
1630
  const { annotationUID, data } = annotation;
1632
1631
  const { points, activeHandleIndex } = data.handles;
1633
1632
  const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
1633
+ const targetId = this.getTargetId(viewport, data);
1634
1634
  styleSpecifier.annotationUID = annotationUID;
1635
1635
  const { color, lineWidth, lineDash } = this.getAnnotationStyle({
1636
1636
  annotation,
@@ -1674,10 +1674,10 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1674
1674
  return renderStatus;
1675
1675
  }
1676
1676
  let activeHandleCanvasCoords;
1677
- if (!(0,_stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_6__.isAnnotationVisible)(annotationUID)) {
1677
+ if (!(0,_stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__.isAnnotationVisible)(annotationUID)) {
1678
1678
  continue;
1679
1679
  }
1680
- if (!(0,_stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_5__.isAnnotationLocked)(annotationUID) &&
1680
+ if (!(0,_stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__.isAnnotationLocked)(annotationUID) &&
1681
1681
  !this.editData &&
1682
1682
  activeHandleIndex !== null &&
1683
1683
  activeHandleIndex !== undefined) {
@@ -1686,13 +1686,13 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1686
1686
  const showHandlesAlways = Boolean((0,_stateManagement_annotation_config_helpers__WEBPACK_IMPORTED_MODULE_20__/* .getStyleProperty */ .h)('showHandlesAlways', {}));
1687
1687
  if (activeHandleCanvasCoords || showHandlesAlways) {
1688
1688
  const handleGroupUID = '0';
1689
- (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_8__.drawHandles)(svgDrawingHelper, annotationUID, handleGroupUID, showHandlesAlways ? canvasCoordinates : activeHandleCanvasCoords, {
1689
+ (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.drawHandles)(svgDrawingHelper, annotationUID, handleGroupUID, showHandlesAlways ? canvasCoordinates : activeHandleCanvasCoords, {
1690
1690
  color,
1691
1691
  });
1692
1692
  }
1693
1693
  const dataId = `${annotationUID}-rect`;
1694
1694
  const rectangleUID = '0';
1695
- (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_8__.drawRectByCoordinates)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates, {
1695
+ (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.drawRectByCoordinates)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates, {
1696
1696
  color,
1697
1697
  lineDash,
1698
1698
  lineWidth,
@@ -1717,13 +1717,13 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1717
1717
  continue;
1718
1718
  }
1719
1719
  if (!data.handles.textBox.hasMoved) {
1720
- const canvasTextBoxCoords = (0,_utilities_drawing__WEBPACK_IMPORTED_MODULE_13__.getTextBoxCoordsCanvas)(canvasCoordinates);
1720
+ const canvasTextBoxCoords = (0,_utilities_drawing__WEBPACK_IMPORTED_MODULE_14__.getTextBoxCoordsCanvas)(canvasCoordinates);
1721
1721
  data.handles.textBox.worldPosition =
1722
1722
  viewport.canvasToWorld(canvasTextBoxCoords);
1723
1723
  }
1724
1724
  const textBoxPosition = viewport.worldToCanvas(data.handles.textBox.worldPosition);
1725
1725
  const textBoxUID = '1';
1726
- const boundingBox = (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_8__.drawLinkedTextBox)(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, canvasCoordinates, {}, options);
1726
+ const boundingBox = (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.drawLinkedTextBox)(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, canvasCoordinates, {}, options);
1727
1727
  const { x: left, y: top, width, height } = boundingBox;
1728
1728
  data.handles.textBox.worldBoundingBox = {
1729
1729
  topLeft: viewport.canvasToWorld([left, top]),
@@ -1750,8 +1750,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1750
1750
  const { data } = annotation;
1751
1751
  const { viewport } = enabledElement;
1752
1752
  const { element } = viewport;
1753
- const worldPos1 = data.handles.points[0];
1754
- const worldPos2 = data.handles.points[3];
1753
+ const worldHandles = data.handles.points;
1755
1754
  const { cachedStats } = data;
1756
1755
  const targetIds = Object.keys(cachedStats);
1757
1756
  for (let i = 0; i < targetIds.length; i++) {
@@ -1761,14 +1760,9 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1761
1760
  continue;
1762
1761
  }
1763
1762
  const { dimensions, imageData, metadata, voxelManager } = image;
1764
- const pos1Index = transformWorldToIndex(imageData, worldPos1);
1765
- pos1Index[0] = Math.floor(pos1Index[0]);
1766
- pos1Index[1] = Math.floor(pos1Index[1]);
1767
- pos1Index[2] = Math.floor(pos1Index[2]);
1768
- const pos2Index = transformWorldToIndex(imageData, worldPos2);
1769
- pos2Index[0] = Math.floor(pos2Index[0]);
1770
- pos2Index[1] = Math.floor(pos2Index[1]);
1771
- pos2Index[2] = Math.floor(pos2Index[2]);
1763
+ const indexHandles = worldHandles.map((worldHandle) => transformWorldToIndex(imageData, worldHandle));
1764
+ const pos1Index = indexHandles[0].map(Math.floor);
1765
+ const pos2Index = indexHandles[3].map(Math.floor);
1772
1766
  if (this._isInsideVolume(pos1Index, pos2Index, dimensions)) {
1773
1767
  this.isHandleOutsideImage = false;
1774
1768
  const iMin = Math.min(pos1Index[0], pos2Index[0]);
@@ -1782,10 +1776,12 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1782
1776
  [jMin, jMax],
1783
1777
  [kMin, kMax],
1784
1778
  ];
1785
- const { worldWidth, worldHeight } = (0,_utilities_planar_getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .A)(viewPlaneNormal, viewUp, worldPos1, worldPos2);
1786
1779
  const handles = [pos1Index, pos2Index];
1787
- const { scale, areaUnit } = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__/* .getCalibratedLengthUnitsAndScale */ .Op)(image, handles);
1788
- const area = Math.abs(worldWidth * worldHeight) / (scale * scale);
1780
+ const calibrate = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_3__/* .getCalibratedLengthUnitsAndScale */ .Op)(image, handles);
1781
+ const width = RectangleROITool.calculateLengthInIndex(calibrate, indexHandles.slice(0, 2));
1782
+ const height = RectangleROITool.calculateLengthInIndex(calibrate, indexHandles.slice(2, 4));
1783
+ const area = Math.abs(width * height);
1784
+ const { areaUnit } = calibrate;
1789
1785
  const pixelUnitsOptions = {
1790
1786
  isPreScaled: (0,_utilities_viewport_isViewportPreScaled__WEBPACK_IMPORTED_MODULE_18__/* .isViewportPreScaled */ .u)(viewport, targetId),
1791
1787
  isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
@@ -1823,7 +1819,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1823
1819
  const invalidated = annotation.invalidated;
1824
1820
  annotation.invalidated = false;
1825
1821
  if (invalidated) {
1826
- (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_7__.triggerAnnotationModified)(annotation, element, _enums__WEBPACK_IMPORTED_MODULE_10__.ChangeTypes.StatsUpdated);
1822
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__.triggerAnnotationModified)(annotation, element, _enums__WEBPACK_IMPORTED_MODULE_11__.ChangeTypes.StatsUpdated);
1827
1823
  }
1828
1824
  return cachedStats;
1829
1825
  };
@@ -1831,7 +1827,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1831
1827
  return (_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.indexWithinDimensions(index1, dimensions) &&
1832
1828
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.indexWithinDimensions(index2, dimensions));
1833
1829
  };
1834
- this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(this._calculateCachedStats, 100, { trailing: true });
1830
+ this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(this._calculateCachedStats, 100, { trailing: true });
1835
1831
  }
1836
1832
  static { this.hydrate = (viewportId, points, options) => {
1837
1833
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElementByViewportId)(viewportId);
@@ -1863,7 +1859,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
1863
1859
  ...serializableOptions,
1864
1860
  },
1865
1861
  };
1866
- (0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .addAnnotation */ .lC)(annotation, viewport.element);
1862
+ (0,_stateManagement__WEBPACK_IMPORTED_MODULE_5__/* .addAnnotation */ .lC)(annotation, viewport.element);
1867
1863
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A)([viewport.id]);
1868
1864
  }; }
1869
1865
  }
@@ -1894,10 +1890,312 @@ function defaultGetTextLines(data, targetId) {
1894
1890
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RectangleROITool);
1895
1891
 
1896
1892
 
1897
- /***/ }),
1893
+ /***/ },
1898
1894
 
1899
- /***/ 23631:
1900
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1895
+ /***/ 91350
1896
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1897
+
1898
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1899
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
1900
+ /* harmony export */ });
1901
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
1902
+ /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3823);
1903
+ /* harmony import */ var _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6030);
1904
+ /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2076);
1905
+ /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29601);
1906
+ /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(82056);
1907
+ /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44049);
1908
+ /* harmony import */ var _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(75183);
1909
+ /* harmony import */ var _stateManagement_annotation_annotationSelection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17343);
1910
+ /* harmony import */ var _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(56534);
1911
+ /* harmony import */ var _utilities_safeStructuredClone__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(33459);
1912
+
1913
+
1914
+
1915
+
1916
+
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+ const { DefaultHistoryMemo } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.HistoryMemo;
1924
+ class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A {
1925
+ static createAnnotationForViewport(viewport, ...annotationBaseData) {
1926
+ return this.createAnnotation({ metadata: viewport.getViewReference() }, ...annotationBaseData);
1927
+ }
1928
+ static createAndAddAnnotation(viewport, ...annotationBaseData) {
1929
+ const annotation = this.createAnnotationForViewport(viewport, ...annotationBaseData);
1930
+ (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__.addAnnotation)(annotation, viewport.element);
1931
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_6__.triggerAnnotationModified)(annotation, viewport.element);
1932
+ }
1933
+ constructor(toolProps, defaultToolProps) {
1934
+ super(toolProps, defaultToolProps);
1935
+ this.mouseMoveCallback = (evt, filteredAnnotations) => {
1936
+ if (!filteredAnnotations) {
1937
+ return false;
1938
+ }
1939
+ const { element, currentPoints } = evt.detail;
1940
+ const canvasCoords = currentPoints.canvas;
1941
+ let annotationsNeedToBeRedrawn = false;
1942
+ for (const annotation of filteredAnnotations) {
1943
+ if ((0,_stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__.isAnnotationLocked)(annotation.annotationUID) ||
1944
+ !(0,_stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__.isAnnotationVisible)(annotation.annotationUID)) {
1945
+ continue;
1946
+ }
1947
+ const { data } = annotation;
1948
+ const activateHandleIndex = data.handles
1949
+ ? data.handles.activeHandleIndex
1950
+ : undefined;
1951
+ const near = this._imagePointNearToolOrHandle(element, annotation, canvasCoords, 6);
1952
+ const nearToolAndNotMarkedActive = near && !annotation.highlighted;
1953
+ const notNearToolAndMarkedActive = !near && annotation.highlighted;
1954
+ if (nearToolAndNotMarkedActive || notNearToolAndMarkedActive) {
1955
+ annotation.highlighted = !annotation.highlighted;
1956
+ annotationsNeedToBeRedrawn = true;
1957
+ }
1958
+ else if (data.handles &&
1959
+ data.handles.activeHandleIndex !== activateHandleIndex) {
1960
+ annotationsNeedToBeRedrawn = true;
1961
+ }
1962
+ }
1963
+ return annotationsNeedToBeRedrawn;
1964
+ };
1965
+ this.isSuvScaled = AnnotationTool.isSuvScaled;
1966
+ if (toolProps.configuration?.getTextLines) {
1967
+ this.configuration.getTextLines = toolProps.configuration.getTextLines;
1968
+ }
1969
+ if (toolProps.configuration?.statsCalculator) {
1970
+ this.configuration.statsCalculator =
1971
+ toolProps.configuration.statsCalculator;
1972
+ }
1973
+ }
1974
+ getHandleNearImagePoint(element, annotation, canvasCoords, proximity) {
1975
+ const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
1976
+ const { viewport } = enabledElement;
1977
+ const { data } = annotation;
1978
+ const { isCanvasAnnotation } = data;
1979
+ const { points, textBox } = data.handles;
1980
+ if (textBox) {
1981
+ const { worldBoundingBox } = textBox;
1982
+ if (worldBoundingBox) {
1983
+ const canvasBoundingBox = {
1984
+ topLeft: viewport.worldToCanvas(worldBoundingBox.topLeft),
1985
+ topRight: viewport.worldToCanvas(worldBoundingBox.topRight),
1986
+ bottomLeft: viewport.worldToCanvas(worldBoundingBox.bottomLeft),
1987
+ bottomRight: viewport.worldToCanvas(worldBoundingBox.bottomRight),
1988
+ };
1989
+ if (canvasCoords[0] >= canvasBoundingBox.topLeft[0] &&
1990
+ canvasCoords[0] <= canvasBoundingBox.bottomRight[0] &&
1991
+ canvasCoords[1] >= canvasBoundingBox.topLeft[1] &&
1992
+ canvasCoords[1] <= canvasBoundingBox.bottomRight[1]) {
1993
+ data.handles.activeHandleIndex = null;
1994
+ return textBox;
1995
+ }
1996
+ }
1997
+ }
1998
+ for (let i = 0; i < points?.length; i++) {
1999
+ const point = points[i];
2000
+ const annotationCanvasCoordinate = isCanvasAnnotation
2001
+ ? point.slice(0, 2)
2002
+ : viewport.worldToCanvas(point);
2003
+ const near = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.distance */ .Zc.distance(canvasCoords, annotationCanvasCoordinate) < proximity;
2004
+ if (near === true) {
2005
+ data.handles.activeHandleIndex = i;
2006
+ return point;
2007
+ }
2008
+ }
2009
+ data.handles.activeHandleIndex = null;
2010
+ }
2011
+ getLinkedTextBoxStyle(specifications, annotation) {
2012
+ return {
2013
+ visibility: this.getStyle('textBoxVisibility', specifications, annotation),
2014
+ fontFamily: this.getStyle('textBoxFontFamily', specifications, annotation),
2015
+ fontSize: this.getStyle('textBoxFontSize', specifications, annotation),
2016
+ color: this.getStyle('textBoxColor', specifications, annotation),
2017
+ shadow: this.getStyle('textBoxShadow', specifications, annotation),
2018
+ background: this.getStyle('textBoxBackground', specifications, annotation),
2019
+ lineWidth: this.getStyle('textBoxLinkLineWidth', specifications, annotation),
2020
+ lineDash: this.getStyle('textBoxLinkLineDash', specifications, annotation),
2021
+ textBoxBorderRadius: this.getStyle('textBoxBorderRadius', specifications, annotation),
2022
+ textBoxMargin: this.getStyle('textBoxMargin', specifications, annotation),
2023
+ textBoxLinkLineColor: this.getStyle('textBoxLinkLineColor', specifications, annotation),
2024
+ };
2025
+ }
2026
+ static isSuvScaled(viewport, targetId, imageId) {
2027
+ if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
2028
+ const volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getVolumeId(targetId);
2029
+ const volume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
2030
+ return volume?.scaling?.PT !== undefined;
2031
+ }
2032
+ const scalingModule = imageId && _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.metaData.get('scalingModule', imageId);
2033
+ return typeof scalingModule?.suvbw === 'number';
2034
+ }
2035
+ getAnnotationStyle(context) {
2036
+ const { annotation, styleSpecifier } = context;
2037
+ const getStyle = (property) => this.getStyle(property, styleSpecifier, annotation);
2038
+ const { annotationUID } = annotation;
2039
+ const visibility = (0,_stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__.isAnnotationVisible)(annotationUID);
2040
+ const locked = (0,_stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__.isAnnotationLocked)(annotationUID);
2041
+ const lineWidth = getStyle('lineWidth');
2042
+ const lineDash = getStyle('lineDash');
2043
+ const angleArcLineDash = getStyle('angleArcLineDash');
2044
+ const color = getStyle('color');
2045
+ const markerSize = getStyle('markerSize');
2046
+ const shadow = getStyle('shadow');
2047
+ const textboxStyle = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
2048
+ return {
2049
+ visibility,
2050
+ locked,
2051
+ color,
2052
+ lineWidth,
2053
+ lineDash,
2054
+ lineOpacity: 1,
2055
+ fillColor: color,
2056
+ fillOpacity: 0,
2057
+ shadow,
2058
+ textbox: textboxStyle,
2059
+ markerSize,
2060
+ angleArcLineDash,
2061
+ };
2062
+ }
2063
+ _imagePointNearToolOrHandle(element, annotation, canvasCoords, proximity) {
2064
+ const handleNearImagePoint = this.getHandleNearImagePoint(element, annotation, canvasCoords, proximity);
2065
+ if (handleNearImagePoint) {
2066
+ return true;
2067
+ }
2068
+ const toolNewImagePoint = this.isPointNearTool(element, annotation, canvasCoords, proximity, 'mouse');
2069
+ if (toolNewImagePoint) {
2070
+ return true;
2071
+ }
2072
+ }
2073
+ static createAnnotationState(annotation, deleting) {
2074
+ const { data, annotationUID } = annotation;
2075
+ return {
2076
+ annotationUID,
2077
+ data: (0,_utilities_safeStructuredClone__WEBPACK_IMPORTED_MODULE_10__/* .safeStructuredClone */ .W)(data),
2078
+ deleting,
2079
+ };
2080
+ }
2081
+ static createAnnotationMemo(element, annotation, options) {
2082
+ if (!annotation) {
2083
+ return;
2084
+ }
2085
+ const { newAnnotation, deleting = newAnnotation ? false : undefined } = options || {};
2086
+ const { annotationUID } = annotation;
2087
+ const state = AnnotationTool.createAnnotationState(annotation, deleting);
2088
+ const annotationMemo = {
2089
+ restoreMemo: () => {
2090
+ const newState = AnnotationTool.createAnnotationState(annotation, deleting);
2091
+ const { viewport } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element) || {};
2092
+ viewport?.setViewReference(annotation.metadata);
2093
+ if (state.deleting === true) {
2094
+ state.deleting = false;
2095
+ Object.assign(annotation.data, state.data);
2096
+ if (annotation.data.contour) {
2097
+ const annotationData = annotation.data;
2098
+ annotationData.contour.polyline = state.data.contour.pointsManager.points;
2099
+ delete state.data.contour.pointsManager;
2100
+ if (annotationData.segmentation) {
2101
+ (0,_utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_9__.addContourSegmentationAnnotation)(annotation);
2102
+ }
2103
+ }
2104
+ state.data = newState.data;
2105
+ (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__.addAnnotation)(annotation, element);
2106
+ (0,_stateManagement_annotation_annotationSelection__WEBPACK_IMPORTED_MODULE_8__.setAnnotationSelected)(annotation.annotationUID, true);
2107
+ viewport?.render();
2108
+ return;
2109
+ }
2110
+ if (state.deleting === false) {
2111
+ state.deleting = true;
2112
+ state.data = newState.data;
2113
+ (0,_stateManagement_annotation_annotationSelection__WEBPACK_IMPORTED_MODULE_8__.setAnnotationSelected)(annotation.annotationUID);
2114
+ (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__.removeAnnotation)(annotation.annotationUID);
2115
+ viewport?.render();
2116
+ return;
2117
+ }
2118
+ const currentAnnotation = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__.getAnnotation)(annotationUID);
2119
+ if (!currentAnnotation) {
2120
+ console.warn('No current annotation');
2121
+ return;
2122
+ }
2123
+ Object.assign(currentAnnotation.data, state.data);
2124
+ if (currentAnnotation.data.contour) {
2125
+ currentAnnotation.data
2126
+ .contour.polyline = state.data.contour.pointsManager.points;
2127
+ }
2128
+ state.data = newState.data;
2129
+ currentAnnotation.invalidated = true;
2130
+ if (element) {
2131
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_6__.triggerAnnotationModified)(currentAnnotation, element, _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A.History);
2132
+ }
2133
+ },
2134
+ id: annotationUID,
2135
+ operationType: 'annotation',
2136
+ };
2137
+ DefaultHistoryMemo.push(annotationMemo);
2138
+ return annotationMemo;
2139
+ }
2140
+ createMemo(element, annotation, options) {
2141
+ this.memo ||= AnnotationTool.createAnnotationMemo(element, annotation, options);
2142
+ }
2143
+ startGroupRecording() {
2144
+ DefaultHistoryMemo.startGroupRecording();
2145
+ }
2146
+ endGroupRecording() {
2147
+ DefaultHistoryMemo.endGroupRecording();
2148
+ }
2149
+ static hydrateBase(ToolClass, enabledElement, points, options = {}) {
2150
+ if (!enabledElement) {
2151
+ return null;
2152
+ }
2153
+ const { viewport } = enabledElement;
2154
+ const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
2155
+ const camera = viewport.getCamera();
2156
+ const viewPlaneNormal = options.viewplaneNormal ?? camera.viewPlaneNormal;
2157
+ const viewUp = options.viewUp ?? camera.viewUp;
2158
+ const instance = options.toolInstance || new ToolClass();
2159
+ let referencedImageId;
2160
+ let finalViewPlaneNormal = viewPlaneNormal;
2161
+ let finalViewUp = viewUp;
2162
+ if (options.referencedImageId) {
2163
+ referencedImageId = options.referencedImageId;
2164
+ finalViewPlaneNormal = undefined;
2165
+ finalViewUp = undefined;
2166
+ }
2167
+ else {
2168
+ if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.StackViewport) {
2169
+ const closestImageIndex = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getClosestStackImageIndexForPoint(points[0], viewport);
2170
+ if (closestImageIndex !== undefined) {
2171
+ referencedImageId = viewport.getImageIds()[closestImageIndex];
2172
+ }
2173
+ }
2174
+ else if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
2175
+ referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
2176
+ }
2177
+ else {
2178
+ throw new Error('Unsupported viewport type');
2179
+ }
2180
+ }
2181
+ return {
2182
+ FrameOfReferenceUID,
2183
+ referencedImageId,
2184
+ viewPlaneNormal: finalViewPlaneNormal,
2185
+ viewUp: finalViewUp,
2186
+ instance,
2187
+ viewport,
2188
+ };
2189
+ }
2190
+ }
2191
+ AnnotationTool.toolName = 'AnnotationTool';
2192
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AnnotationTool);
2193
+
2194
+
2195
+ /***/ },
2196
+
2197
+ /***/ 23631
2198
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1901
2199
 
1902
2200
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1903
2201
  /* harmony export */ A: () => (/* binding */ LabelmapBaseTool)
@@ -2029,7 +2327,13 @@ class LabelmapBaseTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool */
2029
2327
  }
2030
2328
  getEditData({ viewport, representationData, segmentsLocked, segmentationId, }) {
2031
2329
  if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
2330
+ if (!representationData[_enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.Labelmap]) {
2331
+ return;
2332
+ }
2032
2333
  const { volumeId } = representationData[_enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.Labelmap];
2334
+ if (!volumeId) {
2335
+ return;
2336
+ }
2033
2337
  const actors = viewport.getActors();
2034
2338
  const isStackViewport = viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.StackViewport;
2035
2339
  if (isStackViewport) {
@@ -2043,7 +2347,9 @@ class LabelmapBaseTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool */
2043
2347
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.dispatchEvent(event);
2044
2348
  return null;
2045
2349
  }
2046
- const volumes = actors.map((actorEntry) => _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(actorEntry.referencedId));
2350
+ const volumes = actors
2351
+ .filter((actorEntry) => actorEntry.referencedId)
2352
+ .map((actorEntry) => _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(actorEntry.referencedId));
2047
2353
  const segmentationVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
2048
2354
  const referencedVolumeIdToThreshold = volumes.find((volume) => _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.isEqual(volume.dimensions, segmentationVolume.dimensions))?.volumeId || volumes[0]?.volumeId;
2049
2355
  return {
@@ -2141,6 +2447,7 @@ class LabelmapBaseTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool */
2141
2447
  previewColor,
2142
2448
  previewSegmentIndex,
2143
2449
  createMemo: this.createMemo.bind(this),
2450
+ hoverData: this._hoverData,
2144
2451
  };
2145
2452
  return operationData;
2146
2453
  }
@@ -2286,10 +2593,10 @@ function lightenColor(r, g, b, a, factor = 0.4) {
2286
2593
  }
2287
2594
 
2288
2595
 
2289
- /***/ }),
2596
+ /***/ },
2290
2597
 
2291
- /***/ 52905:
2292
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2598
+ /***/ 52905
2599
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2293
2600
 
2294
2601
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2295
2602
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -2410,10 +2717,10 @@ function debounce(func, wait, options) {
2410
2717
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (debounce);
2411
2718
 
2412
2719
 
2413
- /***/ }),
2720
+ /***/ },
2414
2721
 
2415
- /***/ 1239:
2416
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2722
+ /***/ 1239
2723
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2417
2724
 
2418
2725
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2419
2726
  /* harmony export */ A: () => (/* binding */ getTextBoxCoordsCanvas)
@@ -2444,10 +2751,10 @@ function _determineCorners(canvasPoints) {
2444
2751
  }
2445
2752
 
2446
2753
 
2447
- /***/ }),
2754
+ /***/ },
2448
2755
 
2449
- /***/ 40133:
2450
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2756
+ /***/ 40133
2757
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2451
2758
 
2452
2759
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2453
2760
  /* harmony export */ A: () => (/* binding */ getViewportForAnnotation)
@@ -2466,10 +2773,10 @@ function getViewportForAnnotation(annotation) {
2466
2773
  }
2467
2774
 
2468
2775
 
2469
- /***/ }),
2776
+ /***/ },
2470
2777
 
2471
- /***/ 45217:
2472
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2778
+ /***/ 45217
2779
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2473
2780
 
2474
2781
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2475
2782
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -2481,10 +2788,10 @@ function isObject(value) {
2481
2788
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isObject);
2482
2789
 
2483
2790
 
2484
- /***/ }),
2791
+ /***/ },
2485
2792
 
2486
- /***/ 62783:
2487
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2793
+ /***/ 62783
2794
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2488
2795
 
2489
2796
 
2490
2797
  // EXPORTS
@@ -2507,10 +2814,74 @@ function pointInSphere(sphere, pointLPS) {
2507
2814
 
2508
2815
 
2509
2816
 
2510
- /***/ }),
2817
+ /***/ },
2818
+
2819
+ /***/ 33459
2820
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2821
+
2822
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2823
+ /* harmony export */ W: () => (/* binding */ safeStructuredClone)
2824
+ /* harmony export */ });
2825
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
2826
+
2827
+ const { PointsManager } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
2828
+ function cloneContourValue(_key, value) {
2829
+ if (value == null || typeof value !== 'object' || !('polyline' in value)) {
2830
+ return value;
2831
+ }
2832
+ const contour = value;
2833
+ return {
2834
+ ...contour,
2835
+ polyline: null,
2836
+ pointsManager: PointsManager.create3(contour.polyline.length, contour.polyline),
2837
+ };
2838
+ }
2839
+ const OMIT_KEYS = new Map([
2840
+ ['pointsInVolume', null],
2841
+ ['projectionPoints', null],
2842
+ ['contour', cloneContourValue],
2843
+ ['spline', null],
2844
+ ]);
2845
+ function omitUncloneableKeys(obj) {
2846
+ const result = {};
2847
+ for (const [key, value] of Object.entries(obj)) {
2848
+ if (OMIT_KEYS.has(key)) {
2849
+ const handler = OMIT_KEYS.get(key);
2850
+ if (handler) {
2851
+ result[key] = handler(key, value);
2852
+ }
2853
+ continue;
2854
+ }
2855
+ if (value === null || value === undefined || typeof value !== 'object') {
2856
+ result[key] = value;
2857
+ }
2858
+ else if (Array.isArray(value)) {
2859
+ result[key] = value.map((value) => safeStructuredClone(value));
2860
+ }
2861
+ else {
2862
+ result[key] = omitUncloneableKeys(value);
2863
+ }
2864
+ }
2865
+ return result;
2866
+ }
2867
+ function safeStructuredClone(value) {
2868
+ if (value === null || value === undefined) {
2869
+ return value;
2870
+ }
2871
+ if (typeof value !== 'object') {
2872
+ return value;
2873
+ }
2874
+ if (Array.isArray(value)) {
2875
+ return value.map((item) => safeStructuredClone(item));
2876
+ }
2877
+ return omitUncloneableKeys(value);
2878
+ }
2879
+
2880
+
2881
+ /***/ },
2511
2882
 
2512
- /***/ 27730:
2513
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2883
+ /***/ 27730
2884
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2514
2885
 
2515
2886
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2516
2887
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
@@ -2538,10 +2909,10 @@ function throttle(func, wait, options) {
2538
2909
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle);
2539
2910
 
2540
2911
 
2541
- /***/ }),
2912
+ /***/ },
2542
2913
 
2543
- /***/ 18990:
2544
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2914
+ /***/ 18990
2915
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2545
2916
 
2546
2917
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2547
2918
  /* harmony export */ u: () => (/* binding */ isViewportPreScaled)
@@ -2565,6 +2936,6 @@ function isViewportPreScaled(viewport, targetId) {
2565
2936
 
2566
2937
 
2567
2938
 
2568
- /***/ })
2939
+ /***/ }
2569
2940
 
2570
2941
  }]);