@ohif/app 3.9.0-beta.4 → 3.9.0-beta.41

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 (233) hide show
  1. package/dist/{117.bundle.a80b1511ef4b302fb7cc.js → 117.bundle.1f7b56504d506e7259e3.js} +66 -69
  2. package/dist/{889.bundle.6df37a2db81b97f4a76a.js → 121.bundle.e65afd9bfd1a425d0050.js} +40 -12
  3. package/dist/{998.bundle.f2ba5b6c1aa0caa6d672.js → 129.bundle.0be30c39fe5d8557b083.js} +40 -25
  4. package/dist/{574.bundle.72bd5061ccd504235419.js → 139.bundle.09e5af0a9ae8a285af77.js} +25 -37
  5. package/dist/{989.bundle.bf32dc457ea9abccca09.js → 14.bundle.cfafff5ce33c8fe9e536.js} +5 -5
  6. package/dist/{783.bundle.1f650e1ef1b10d19870f.js → 140.bundle.ebaef33bd84b37213744.js} +2 -2
  7. package/dist/{164.bundle.1da1cadb56951caef1d6.js → 164.bundle.2b23bfbcb23497d7c87a.js} +548 -301
  8. package/dist/{544.bundle.e8227e98860e39636a00.js → 172.bundle.e0ee762bee7496d6491e.js} +16 -30
  9. package/dist/{487.bundle.a517b1d6cd2d82b9a7ea.js → 194.bundle.9044099acbadc4c02d04.js} +5 -5
  10. package/dist/{699.bundle.f62694527f6dfe417f81.js → 211.bundle.318a1dde2daf28c0ca7e.js} +43 -5
  11. package/dist/{776.bundle.91747df457143051f872.js → 218.bundle.e00a7676e115e4bd4f0f.js} +10 -12
  12. package/dist/{236.bundle.4ca7987e1d57f60ec13a.js → 236.bundle.34db90a140e37d34fd71.js} +544 -221
  13. package/dist/{530.bundle.17b9a34fefff133e5379.js → 265.bundle.b32a0cc143efa80ee3cc.js} +8 -12
  14. package/dist/{862.bundle.55dde21bab4c841b6259.js → 323.bundle.955cc8f5eb5c01295118.js} +5 -9
  15. package/dist/{342.bundle.340982440de15f540a89.js → 342.bundle.fcb2038060a062129d34.js} +7 -0
  16. package/dist/{550.bundle.4f728d9ab7a8c7685abd.js → 363.bundle.e7332abbff673d8a79e4.js} +234 -150
  17. package/dist/{806.bundle.50e039eb624382ee1fce.js → 370.bundle.bd9884c274c26a54dfae.js} +101 -18
  18. package/dist/{682.bundle.0909fbf9a76430e4bbc9.js → 382.bundle.3060bce26740a347900b.js} +38 -5
  19. package/dist/{907.bundle.d2c612ec56380e73df89.js → 444.bundle.1a872eddff40579d7c84.js} +4 -4
  20. package/dist/{483.bundle.a353efc5a5dd563c903c.js → 483.bundle.0f1848f6a2cf34829fef.js} +16 -3
  21. package/dist/{35.bundle.0168d78bfad0cb784112.js → 501.bundle.2f703ca4598a3be0d748.js} +950 -348
  22. package/dist/{905.bundle.c1c60224a599e789feb4.js → 552.bundle.61343aead612379fb815.js} +3 -3
  23. package/dist/{981.bundle.cccdc8caaa5a11f4a998.js → 555.bundle.e849661a6879ce530191.js} +14 -13
  24. package/dist/{939.bundle.9d93b2e47c52338747a2.js → 612.bundle.297a033523539e0b47f9.js} +2 -2
  25. package/dist/{295.bundle.9926ff25c6dbf53845b1.js → 675.bundle.c9720f40fd7c7e9b7e54.js} +5 -9
  26. package/dist/{325.bundle.1c54c1689fb4b1955e8c.js → 717.bundle.444382300af90e310557.js} +58 -26
  27. package/dist/{722.bundle.2547630541b670f10d6e.js → 722.bundle.1242e0348afc63ca4f5e.js} +10 -4
  28. package/dist/{121.bundle.b582314ec0024fdf2d15.js → 792.bundle.485ad2f98823a4b3feb1.js} +6 -10
  29. package/dist/{721.bundle.0de8f780088aee87dbd9.js → 799.bundle.1dde0deef2be81924d9d.js} +12 -12
  30. package/dist/{448.bundle.077b4b50ee63487516eb.js → 806.bundle.05f48607cfe443d63fc6.js} +19 -6
  31. package/dist/{297.bundle.194d8985ab974839b5b6.js → 837.bundle.ff9fe44bf863a5bceabc.js} +2 -2
  32. package/dist/{961.bundle.6aea7b3de9e93a9ebab1.js → 853.bundle.72427df14c9e5f55b0d6.js} +4 -4
  33. package/dist/{473.bundle.6cd4be953853f35b29c3.js → 914.bundle.e15be8089bf422ed7b51.js} +512 -274
  34. package/dist/{94.bundle.08683468d52365475d9a.js → 920.bundle.2ce2755d7ba79de478a2.js} +39 -9
  35. package/dist/{390.bundle.5a21388b461ee51db594.js → 944.bundle.260e4bf5a03ad05d11b7.js} +655 -95
  36. package/dist/{243.bundle.391c2805222b849abc2c.js → 989.bundle.50e94f736258c5d8f5b6.js} +4 -4
  37. package/dist/app-config.js +5 -1
  38. package/dist/{app.bundle.9e22e72ec23a08cde379.js → app.bundle.6834e46debda9e53f119.js} +167495 -48675
  39. package/dist/app.bundle.css +5 -4
  40. package/dist/assets/images/action-new-dialog.svg +14 -0
  41. package/dist/assets/images/arrow-down.svg +5 -0
  42. package/dist/assets/images/arrow-left-small.svg +6 -0
  43. package/dist/assets/images/arrow-left.svg +6 -0
  44. package/dist/assets/images/arrow-right-small.svg +6 -0
  45. package/dist/assets/images/arrow-right.svg +6 -0
  46. package/dist/assets/images/calendar.svg +5 -0
  47. package/dist/assets/images/cancel.svg +8 -0
  48. package/dist/assets/images/checkbox-active.svg +9 -0
  49. package/dist/assets/images/checkbox-checked.svg +9 -0
  50. package/dist/assets/images/checkbox-default.svg +3 -0
  51. package/dist/assets/images/checkbox-unchecked.svg +3 -0
  52. package/dist/assets/images/chevron-down.svg +3 -0
  53. package/dist/assets/images/chevron-left.svg +3 -0
  54. package/dist/assets/images/chevron-menu.svg +12 -0
  55. package/dist/assets/images/chevron-next.svg +6 -0
  56. package/dist/assets/images/chevron-prev.svg +6 -0
  57. package/dist/assets/images/chevron-right.svg +3 -0
  58. package/dist/assets/images/circled-checkmark.svg +6 -0
  59. package/dist/assets/images/clipboard.svg +1 -0
  60. package/dist/assets/images/closeIcon.svg +3 -0
  61. package/dist/assets/images/content-next.svg +9 -0
  62. package/dist/assets/images/content-prev.svg +9 -0
  63. package/dist/assets/images/dotted-circle.svg +3 -0
  64. package/dist/assets/images/edit-patient.svg +15 -0
  65. package/dist/assets/images/exclamation.svg +9 -0
  66. package/dist/assets/images/external-link.svg +5 -0
  67. package/dist/assets/images/eye-hidden.svg +8 -0
  68. package/dist/assets/images/eye-visible.svg +6 -0
  69. package/dist/assets/images/focus-frame-target.svg +13 -0
  70. package/dist/assets/images/group-layers.svg +6 -0
  71. package/dist/assets/images/icon-add.svg +15 -0
  72. package/dist/assets/images/icon-alert-small.svg +8 -0
  73. package/dist/assets/images/icon-chevron-patient.svg +12 -0
  74. package/dist/assets/images/icon-clear-field.svg +8 -0
  75. package/dist/assets/images/icon-close.svg +8 -0
  76. package/dist/assets/images/icon-color-lut.svg +23 -0
  77. package/dist/assets/images/icon-delete.svg +17 -0
  78. package/dist/assets/images/icon-disclosure-close.svg +12 -0
  79. package/dist/assets/images/icon-disclosure-open.svg +12 -0
  80. package/dist/assets/images/icon-display-settings.svg +21 -0
  81. package/dist/assets/images/icon-more-menu.svg +17 -0
  82. package/dist/assets/images/icon-mpr-alt.svg +9 -0
  83. package/dist/assets/images/icon-multiple-patients.svg +21 -0
  84. package/dist/assets/images/icon-next-inactive.svg +6 -0
  85. package/dist/assets/images/icon-next.svg +6 -0
  86. package/dist/assets/images/icon-patient.svg +13 -0
  87. package/dist/assets/images/icon-pause.svg +6 -0
  88. package/dist/assets/images/icon-play.svg +6 -0
  89. package/dist/assets/images/icon-prev-inactive.svg +6 -0
  90. package/dist/assets/images/icon-prev.svg +6 -0
  91. package/dist/assets/images/icon-rename.svg +15 -0
  92. package/dist/assets/images/icon-search.svg +9 -0
  93. package/dist/assets/images/icon-settings.svg +13 -0
  94. package/dist/assets/images/icon-status-alert.svg +8 -0
  95. package/dist/assets/images/icon-tool-scissor.svg +17 -0
  96. package/dist/assets/images/icon-toolbar-back.svg +12 -0
  97. package/dist/assets/images/icon-transferring.svg +6 -0
  98. package/dist/assets/images/icon-upload.svg +6 -0
  99. package/dist/assets/images/icons-alert-outline.svg +8 -0
  100. package/dist/assets/images/illustration-investigational-use.svg +20 -0
  101. package/dist/assets/images/info-action.svg +10 -0
  102. package/dist/assets/images/info-link.svg +7 -0
  103. package/dist/assets/images/info.svg +3 -0
  104. package/dist/assets/images/launch-arrow.svg +7 -0
  105. package/dist/assets/images/launch-info.svg +8 -0
  106. package/dist/assets/images/layout-advanced-3d-four-up.svg +13 -0
  107. package/dist/assets/images/layout-advanced-3d-main.svg +12 -0
  108. package/dist/assets/images/layout-advanced-3d-only.svg +9 -0
  109. package/dist/assets/images/layout-advanced-3d-primary.svg +12 -0
  110. package/dist/assets/images/layout-advanced-axial-primary.svg +11 -0
  111. package/dist/assets/images/layout-advanced-mpr.svg +11 -0
  112. package/dist/assets/images/layout-common-1x1.svg +9 -0
  113. package/dist/assets/images/layout-common-1x2.svg +10 -0
  114. package/dist/assets/images/layout-common-2x2.svg +11 -0
  115. package/dist/assets/images/layout-common-2x3.svg +12 -0
  116. package/dist/assets/images/list-bullets.svg +10 -0
  117. package/dist/assets/images/loading-ohif-mark.svg +5 -0
  118. package/dist/assets/images/lock.svg +1 -0
  119. package/dist/assets/images/logo-ohif-small.svg +5 -0
  120. package/dist/assets/images/magnifier.svg +7 -0
  121. package/dist/assets/images/navigation-panel-right-hide.svg +5 -0
  122. package/dist/assets/images/navigation-panel-right-reveal.svg +5 -0
  123. package/dist/assets/images/next-arrow.svg +12 -0
  124. package/dist/assets/images/notifications-error.svg +8 -0
  125. package/dist/assets/images/notifications-info.svg +8 -0
  126. package/dist/assets/images/notifications-success.svg +6 -0
  127. package/dist/assets/images/notifications-warning.svg +8 -0
  128. package/dist/assets/images/notificationwarning-diamond.svg +10 -0
  129. package/dist/assets/images/ohif-logo-color-darkbg.svg +20 -0
  130. package/dist/assets/images/ohif-logo.svg +18 -0
  131. package/dist/assets/images/old-play.svg +9 -0
  132. package/dist/assets/images/old-stop.svg +9 -0
  133. package/dist/assets/images/old-trash.svg +9 -0
  134. package/dist/assets/images/panel-group-more.svg +6 -0
  135. package/dist/assets/images/panel-group-open-close.svg +6 -0
  136. package/dist/assets/images/pencil.svg +4 -0
  137. package/dist/assets/images/power-off.svg +11 -0
  138. package/dist/assets/images/prev-arrow.svg +12 -0
  139. package/dist/assets/images/profile.svg +1 -0
  140. package/dist/assets/images/push-left.svg +5 -0
  141. package/dist/assets/images/push-right.svg +5 -0
  142. package/dist/assets/images/row-add.svg +8 -0
  143. package/dist/assets/images/row-edit.svg +9 -0
  144. package/dist/assets/images/row-hidden.svg +11 -0
  145. package/dist/assets/images/row-lock.svg +7 -0
  146. package/dist/assets/images/row-shown.svg +9 -0
  147. package/dist/assets/images/row-unlock.svg +7 -0
  148. package/dist/assets/images/settings.svg +6 -0
  149. package/dist/assets/images/side-panel-close-left.svg +14 -0
  150. package/dist/assets/images/side-panel-close-right.svg +14 -0
  151. package/dist/assets/images/sorting-active-down.svg +6 -0
  152. package/dist/assets/images/sorting-active-up.svg +6 -0
  153. package/dist/assets/images/sorting.svg +6 -0
  154. package/dist/assets/images/status-alert-warning.svg +9 -0
  155. package/dist/assets/images/status-alert.svg +7 -0
  156. package/dist/assets/images/status-locked.svg +7 -0
  157. package/dist/assets/images/status-tracked.svg +7 -0
  158. package/dist/assets/images/status-untracked.svg +6 -0
  159. package/dist/assets/images/tab-4d.svg +13 -0
  160. package/dist/assets/images/tab-linear.svg +8 -0
  161. package/dist/assets/images/tab-patient-info.svg +7 -0
  162. package/dist/assets/images/tab-roi-threshold.svg +10 -0
  163. package/dist/assets/images/tab-segmentation.svg +11 -0
  164. package/dist/assets/images/tab-studies.svg +13 -0
  165. package/dist/assets/images/tool-3d-rotate.svg +20 -0
  166. package/dist/assets/images/tool-angle.svg +12 -0
  167. package/dist/assets/images/tool-annotate.svg +11 -0
  168. package/dist/assets/images/tool-bidirectional.svg +21 -0
  169. package/dist/assets/images/tool-calibrate.svg +19 -0
  170. package/dist/assets/images/tool-capture.svg +10 -0
  171. package/dist/assets/images/tool-cine.svg +9 -0
  172. package/dist/assets/images/tool-circle.svg +8 -0
  173. package/dist/assets/images/tool-cobb-angle.svg +14 -0
  174. package/dist/assets/images/tool-create-threshold.svg +9 -0
  175. package/dist/assets/images/tool-crosshair.svg +14 -0
  176. package/dist/assets/images/tool-dicom-tag-browser.svg +15 -0
  177. package/dist/assets/images/tool-flip-horizontal.svg +10 -0
  178. package/dist/assets/images/tool-freehand-polygon.svg +37 -0
  179. package/dist/assets/images/tool-freehand-roi.svg +12 -0
  180. package/dist/assets/images/tool-freehand.svg +34 -0
  181. package/dist/assets/images/tool-fusion-color.svg +13 -0
  182. package/dist/assets/images/tool-invert.svg +10 -0
  183. package/dist/assets/images/tool-layout-default.svg +22 -0
  184. package/dist/assets/images/tool-length.svg +16 -0
  185. package/dist/assets/images/tool-magnetic-roi.svg +17 -0
  186. package/dist/assets/images/tool-magnify.svg +7 -0
  187. package/dist/assets/images/tool-measure-elipse.svg +12 -0
  188. package/dist/assets/images/tool-more-menu.svg +6 -0
  189. package/dist/assets/images/tool-move.svg +13 -0
  190. package/dist/assets/images/tool-polygon.svg +3 -0
  191. package/dist/assets/images/tool-quick-magnify.svg +11 -0
  192. package/dist/assets/images/tool-rectangle.svg +12 -0
  193. package/dist/assets/images/tool-reference-lines.svg +13 -0
  194. package/dist/assets/images/tool-reset.svg +9 -0
  195. package/dist/assets/images/tool-rotate-right.svg +12 -0
  196. package/dist/assets/images/tool-seg-brush.svg +9 -0
  197. package/dist/assets/images/tool-seg-eraser.svg +10 -0
  198. package/dist/assets/images/tool-seg-shape.svg +9 -0
  199. package/dist/assets/images/tool-seg-threshold.svg +17 -0
  200. package/dist/assets/images/tool-spline-roi.svg +14 -0
  201. package/dist/assets/images/tool-stack-image-sync.svg +10 -0
  202. package/dist/assets/images/tool-stack-scroll.svg +10 -0
  203. package/dist/assets/images/tool-toggle-dicom-overlay.svg +9 -0
  204. package/dist/assets/images/tool-ultrasound-bidirectional.svg +15 -0
  205. package/dist/assets/images/tool-window-level.svg +9 -0
  206. package/dist/assets/images/tool-window-region.svg +12 -0
  207. package/dist/assets/images/tool-zoom.svg +9 -0
  208. package/dist/assets/images/tracked.svg +6 -0
  209. package/dist/assets/images/ui-arrow-down.svg +3 -0
  210. package/dist/assets/images/ui-arrow-left.svg +3 -0
  211. package/dist/assets/images/ui-arrow-right.svg +3 -0
  212. package/dist/assets/images/ui-arrow-up.svg +3 -0
  213. package/dist/assets/images/unlink.svg +9 -0
  214. package/dist/assets/images/viewport-status-tracked.svg +13 -0
  215. package/dist/assets/images/viewport-window-level.svg +17 -0
  216. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  217. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  218. package/dist/google.js +1 -0
  219. package/dist/{histogram-worker.bundle.829e14ec12c2b41a4323.js → histogram-worker.bundle.6b31e5ed4c4a7a6998f2.js} +2 -2
  220. package/dist/index.html +1 -1
  221. package/dist/{polySeg.bundle.1799686b019040500219.js → polySeg.bundle.df492df5042827938ba4.js} +3 -3
  222. package/dist/{suv-peak-worker.bundle.25f8b85eab9ec06da48d.js → suv-peak-worker.bundle.8f4b505fad3d371489fe.js} +4 -4
  223. package/dist/sw.js +1 -1
  224. package/package.json +26 -23
  225. /package/dist/{998.css → 129.css} +0 -0
  226. /package/dist/{574.css → 139.css} +0 -0
  227. /package/dist/{544.css → 172.css} +0 -0
  228. /package/dist/{550.css → 363.css} +0 -0
  229. /package/dist/{325.css → 404.css} +0 -0
  230. /package/dist/{481.css → 717.css} +0 -0
  231. /package/dist/{726.bundle.c8de818cf1a3ff0cf7d2.js → 726.bundle.90d63d40a19b058034ee.js} +0 -0
  232. /package/dist/{835.bundle.4c0eaa2c1a427ee41817.js → 835.bundle.5d1951da8bbc6afdf3e0.js} +0 -0
  233. /package/dist/{931.bundle.d270a1fda9a2836c3cc5.js → 931.bundle.058f8de4606f27b31f4f.js} +0 -0
@@ -975,7 +975,7 @@ const CursorNames = [...svgCursorNames, ...standardCursorNames];
975
975
 
976
976
  /***/ }),
977
977
 
978
- /***/ 2746:
978
+ /***/ 49574:
979
979
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
980
980
 
981
981
  // ESM COMPAT FLAG
@@ -995,6 +995,7 @@ __webpack_require__.d(__webpack_exports__, {
995
995
  drawPath: () => (/* reexport */ drawPath),
996
996
  drawPolyline: () => (/* reexport */ drawPolyline),
997
997
  drawRect: () => (/* reexport */ drawRect),
998
+ drawRectByCoordinates: () => (/* reexport */ drawRectByCoordinates),
998
999
  drawRedactionRect: () => (/* reexport */ drawRedactionRect),
999
1000
  drawTextBox: () => (/* reexport */ drawingSvg_drawTextBox),
1000
1001
  setAttributesIfNecessary: () => (/* reexport */ drawingSvg_setAttributesIfNecessary),
@@ -1514,11 +1515,11 @@ function drawLinkedTextBox(svgDrawingHelper, annotationUID, textBoxUID, textLine
1514
1515
  }
1515
1516
  /* harmony default export */ const drawingSvg_drawLinkedTextBox = (drawLinkedTextBox);
1516
1517
 
1517
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawRect.js
1518
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawRectByCoordinates.js
1518
1519
 
1519
1520
 
1520
1521
 
1521
- function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, options = {}, dataId = '') {
1522
+ function drawRectByCoordinates(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates, options = {}, dataId = '') {
1522
1523
  const { color, width: _width, lineWidth, lineDash, } = Object.assign({
1523
1524
  color: 'rgb(0, 255, 0)',
1524
1525
  width: '2',
@@ -1529,16 +1530,28 @@ function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, opt
1529
1530
  const svgns = 'http://www.w3.org/2000/svg';
1530
1531
  const svgNodeHash = drawingSvg_getHash(annotationUID, 'rect', rectangleUID);
1531
1532
  const existingRect = svgDrawingHelper.getSvgNode(svgNodeHash);
1532
- const tlhc = [Math.min(start[0], end[0]), Math.min(start[1], end[1])];
1533
- const width = Math.abs(start[0] - end[0]);
1534
- const height = Math.abs(start[1] - end[1]);
1533
+ const [topLeft, topRight, bottomLeft, bottomRight] = canvasCoordinates;
1534
+ const width = Math.hypot(topLeft[0] - topRight[0], topLeft[1] - topRight[1]);
1535
+ const height = Math.hypot(topLeft[0] - bottomLeft[0], topLeft[1] - bottomLeft[1]);
1536
+ const center = [
1537
+ (bottomRight[0] + topLeft[0]) / 2,
1538
+ (bottomRight[1] + topLeft[1]) / 2,
1539
+ ];
1540
+ const leftEdgeCenter = [
1541
+ (bottomLeft[0] + topLeft[0]) / 2,
1542
+ (bottomLeft[1] + topLeft[1]) / 2,
1543
+ ];
1544
+ const angle = (Math.atan2(center[1] - leftEdgeCenter[1], center[0] - leftEdgeCenter[0]) *
1545
+ 180) /
1546
+ Math.PI;
1535
1547
  const attributes = {
1536
- x: `${tlhc[0]}`,
1537
- y: `${tlhc[1]}`,
1548
+ x: `${center[0] - width / 2}`,
1549
+ y: `${center[1] - height / 2}`,
1538
1550
  width: `${width}`,
1539
1551
  height: `${height}`,
1540
1552
  stroke: color,
1541
1553
  fill: 'transparent',
1554
+ transform: `rotate(${angle} ${center[0]} ${center[1]})`,
1542
1555
  'stroke-width': strokeWidth,
1543
1556
  'stroke-dasharray': lineDash,
1544
1557
  };
@@ -1556,6 +1569,16 @@ function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, opt
1556
1569
  }
1557
1570
  }
1558
1571
 
1572
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawRect.js
1573
+
1574
+ function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, options = {}, dataId = '') {
1575
+ const topLeft = [start[0], start[1]];
1576
+ const topRight = [end[0], start[1]];
1577
+ const bottomLeft = [start[0], end[1]];
1578
+ const bottomRight = [end[0], end[1]];
1579
+ drawRectByCoordinates(svgDrawingHelper, annotationUID, rectangleUID, [topLeft, topRight, bottomLeft, bottomRight], options, dataId);
1580
+ }
1581
+
1559
1582
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawArrow.js
1560
1583
 
1561
1584
  function drawArrow(svgDrawingHelper, annotationUID, arrowUID, start, end, options = {}) {
@@ -1661,6 +1684,7 @@ function drawRedactionRect(svgDrawingHelper, annotationUID, rectangleUID, start,
1661
1684
 
1662
1685
 
1663
1686
 
1687
+
1664
1688
  /***/ }),
1665
1689
 
1666
1690
  /***/ 42111:
@@ -1891,7 +1915,7 @@ var WorkerTypes_ChangeTypes;
1891
1915
 
1892
1916
  /***/ }),
1893
1917
 
1894
- /***/ 44926:
1918
+ /***/ 94101:
1895
1919
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1896
1920
 
1897
1921
 
@@ -1899,6 +1923,7 @@ var WorkerTypes_ChangeTypes;
1899
1923
  __webpack_require__.d(__webpack_exports__, {
1900
1924
  dj: () => (/* reexport */ annotationInterpolationEventDispatcher),
1901
1925
  aB: () => (/* reexport */ cameraModifiedEventDispatcher),
1926
+ we: () => (/* reexport */ cameraResetEventDispatcher),
1902
1927
  In: () => (/* reexport */ imageRenderedEventDispatcher),
1903
1928
  z5: () => (/* reexport */ imageSpacingCalibratedEventDispatcher),
1904
1929
  V$: () => (/* reexport */ eventDispatchers_keyboardToolEventDispatcher),
@@ -2086,6 +2111,34 @@ const annotationInterpolationEventDispatcher_disable = function () {
2086
2111
  disable: annotationInterpolationEventDispatcher_disable,
2087
2112
  });
2088
2113
 
2114
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/cameraResetEventDispatcher.js
2115
+
2116
+
2117
+
2118
+ const { Active: cameraResetEventDispatcher_Active, Passive: cameraResetEventDispatcher_Passive, Enabled: cameraResetEventDispatcher_Enabled } = enums.ToolModes;
2119
+ const onCameraReset = function (evt) {
2120
+ const enabledTools = (0,getToolsWithModesForMouseEvent/* default */.A)(evt, [
2121
+ cameraResetEventDispatcher_Active,
2122
+ cameraResetEventDispatcher_Passive,
2123
+ cameraResetEventDispatcher_Enabled,
2124
+ ]);
2125
+ enabledTools.forEach((tool) => {
2126
+ if (tool.onResetCamera) {
2127
+ tool.onResetCamera(evt);
2128
+ }
2129
+ });
2130
+ };
2131
+ const cameraResetEventDispatcher_enable = function (element) {
2132
+ element.addEventListener(esm.Enums.Events.CAMERA_RESET, onCameraReset);
2133
+ };
2134
+ const cameraResetEventDispatcher_disable = function (element) {
2135
+ element.removeEventListener(esm.Enums.Events.CAMERA_RESET, onCameraReset);
2136
+ };
2137
+ /* harmony default export */ const cameraResetEventDispatcher = ({
2138
+ enable: cameraResetEventDispatcher_enable,
2139
+ disable: cameraResetEventDispatcher_disable,
2140
+ });
2141
+
2089
2142
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js
2090
2143
 
2091
2144
 
@@ -2097,6 +2150,7 @@ const annotationInterpolationEventDispatcher_disable = function () {
2097
2150
 
2098
2151
 
2099
2152
 
2153
+
2100
2154
  /***/ }),
2101
2155
 
2102
2156
  /***/ 90202:
@@ -2111,7 +2165,7 @@ const annotationInterpolationEventDispatcher_disable = function () {
2111
2165
  /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74119);
2112
2166
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90252);
2113
2167
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38296);
2114
- /* harmony import */ var _utilities_contours__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75534);
2168
+ /* harmony import */ var _utilities_contours__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75908);
2115
2169
  /* harmony import */ var _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7259);
2116
2170
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
2117
2171
  /* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(81848);
@@ -2214,12 +2268,14 @@ function findIntersectingContour(viewport, sourcePolyline, contourSegmentationAn
2214
2268
  function createPolylineHole(viewport, targetAnnotation, holeAnnotation) {
2215
2269
  const { windingDirection: targetWindingDirection } = targetAnnotation.data.contour;
2216
2270
  const { windingDirection: holeWindingDirection } = holeAnnotation.data.contour;
2217
- if (targetWindingDirection === holeWindingDirection) {
2218
- holeAnnotation.data.contour.polyline.reverse();
2219
- holeAnnotation.data.contour.windingDirection = targetWindingDirection * -1;
2220
- }
2221
2271
  (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.addChildAnnotation)(targetAnnotation, holeAnnotation);
2222
2272
  _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__.removeContourSegmentationAnnotation(holeAnnotation);
2273
+ const { contour: holeContour } = holeAnnotation.data;
2274
+ const holePolyline = convertContourPolylineToCanvasSpace(holeContour.polyline, viewport);
2275
+ _utilities_contours__WEBPACK_IMPORTED_MODULE_5__.updateContourPolyline(holeAnnotation, {
2276
+ points: holePolyline,
2277
+ closed: holeContour.closed,
2278
+ }, viewport);
2223
2279
  const { element } = viewport;
2224
2280
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
2225
2281
  const { renderingEngine } = enabledElement;
@@ -2716,7 +2772,7 @@ function _imageChangeEventListener(evt) {
2716
2772
  imageActor.getMapper().setInputData(imageData);
2717
2773
  },
2718
2774
  },
2719
- ], true, false);
2775
+ ]);
2720
2776
  (0,triggerSegmentationRender/* default */.Ay)(toolGroup.id);
2721
2777
  return;
2722
2778
  }
@@ -2892,6 +2948,7 @@ __webpack_require__.r(__webpack_exports__);
2892
2948
  /* harmony export */ UltrasoundDirectionalTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.oi),
2893
2949
  /* harmony export */ VideoRedactionTool: () => (/* reexport safe */ _tools_annotation_VideoRedactionTool__WEBPACK_IMPORTED_MODULE_11__.A),
2894
2950
  /* harmony export */ VolumeRotateMouseWheelTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.Y1),
2951
+ /* harmony export */ WindowLevelRegionTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.TG),
2895
2952
  /* harmony export */ WindowLevelTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.Du),
2896
2953
  /* harmony export */ ZoomTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.OQ),
2897
2954
  /* harmony export */ addTool: () => (/* reexport safe */ _store__WEBPACK_IMPORTED_MODULE_1__.Gx),
@@ -2911,7 +2968,7 @@ __webpack_require__.r(__webpack_exports__);
2911
2968
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61738);
2912
2969
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55965);
2913
2970
  /* harmony import */ var _synchronizers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42375);
2914
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2746);
2971
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
2915
2972
  /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(74119);
2916
2973
  /* harmony import */ var _cursors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32916);
2917
2974
  /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(40969);
@@ -2952,7 +3009,7 @@ __webpack_require__.r(__webpack_exports__);
2952
3009
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
2953
3010
  /* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(55588);
2954
3011
  /* harmony import */ var _eventListeners__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(60878);
2955
- /* harmony import */ var _eventDispatchers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(44926);
3012
+ /* harmony import */ var _eventDispatchers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(94101);
2956
3013
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(52610);
2957
3014
 
2958
3015
 
@@ -3119,6 +3176,8 @@ class AnnotationGroup {
3119
3176
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
3120
3177
  /* harmony import */ var _annotationLocking__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48428);
3121
3178
  /* harmony import */ var _annotationVisibility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21009);
3179
+ /* harmony import */ var _utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99595);
3180
+
3122
3181
 
3123
3182
 
3124
3183
 
@@ -3215,6 +3274,8 @@ class FrameOfReferenceSpecificAnnotationManager {
3215
3274
  toolSpecificAnnotations.push(annotation);
3216
3275
  (0,_annotationLocking__WEBPACK_IMPORTED_MODULE_2__.checkAndDefineIsLockedProperty)(annotation);
3217
3276
  (0,_annotationVisibility__WEBPACK_IMPORTED_MODULE_3__.checkAndDefineIsVisibleProperty)(annotation);
3277
+ (0,_utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__/* .checkAndDefineTextBoxProperty */ .Q)(annotation);
3278
+ (0,_utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__/* .checkAndDefineCachedStatsProperty */ .d)(annotation);
3218
3279
  };
3219
3280
  this.removeAnnotation = (annotationUID) => {
3220
3281
  const { annotations } = this;
@@ -3237,14 +3298,27 @@ class FrameOfReferenceSpecificAnnotationManager {
3237
3298
  };
3238
3299
  this.removeAnnotations = (groupKey, toolName) => {
3239
3300
  const annotations = this.annotations;
3240
- if (annotations[groupKey]) {
3241
- if (toolName) {
3242
- delete annotations[groupKey][toolName];
3301
+ const removedAnnotations = [];
3302
+ if (!annotations[groupKey]) {
3303
+ return removedAnnotations;
3304
+ }
3305
+ if (toolName) {
3306
+ const annotationsForTool = annotations[groupKey][toolName];
3307
+ for (const annotation of annotationsForTool) {
3308
+ this.removeAnnotation(annotation.annotationUID);
3309
+ removedAnnotations.push(annotation);
3243
3310
  }
3244
- else {
3245
- delete annotations[groupKey];
3311
+ }
3312
+ else {
3313
+ for (const toolName in annotations[groupKey]) {
3314
+ const annotationsForTool = annotations[groupKey][toolName];
3315
+ for (const annotation of annotationsForTool) {
3316
+ this.removeAnnotation(annotation.annotationUID);
3317
+ removedAnnotations.push(annotation);
3318
+ }
3246
3319
  }
3247
3320
  }
3321
+ return removedAnnotations;
3248
3322
  };
3249
3323
  this.saveAnnotations = (groupKey, toolName) => {
3250
3324
  const annotations = this.annotations;
@@ -3297,7 +3371,12 @@ class FrameOfReferenceSpecificAnnotationManager {
3297
3371
  return count;
3298
3372
  };
3299
3373
  this.removeAllAnnotations = () => {
3300
- this.annotations = {};
3374
+ const removedAnnotations = [];
3375
+ for (const annotation of this.getAllAnnotations()) {
3376
+ this.removeAnnotation(annotation.annotationUID);
3377
+ removedAnnotations.push(annotation);
3378
+ }
3379
+ return removedAnnotations;
3301
3380
  };
3302
3381
  if (!uid) {
3303
3382
  uid = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.uuidv4();
@@ -3527,18 +3606,17 @@ __webpack_require__.r(__webpack_exports__);
3527
3606
  /* harmony export */ invalidateAnnotation: () => (/* binding */ invalidateAnnotation),
3528
3607
  /* harmony export */ removeAllAnnotations: () => (/* binding */ removeAllAnnotations),
3529
3608
  /* harmony export */ removeAnnotation: () => (/* binding */ removeAnnotation),
3609
+ /* harmony export */ removeAnnotations: () => (/* binding */ removeAnnotations),
3530
3610
  /* harmony export */ resetAnnotationManager: () => (/* binding */ resetAnnotationManager),
3531
3611
  /* harmony export */ setAnnotationManager: () => (/* binding */ setAnnotationManager)
3532
3612
  /* harmony export */ });
3533
3613
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
3534
- /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
3535
- /* harmony import */ var _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22581);
3536
- /* harmony import */ var _helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
3537
-
3614
+ /* harmony import */ var _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22581);
3615
+ /* harmony import */ var _helpers_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54177);
3538
3616
 
3539
3617
 
3540
3618
 
3541
- let defaultManager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_2__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
3619
+ let defaultManager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
3542
3620
  function getAnnotationManager() {
3543
3621
  return defaultManager;
3544
3622
  }
@@ -3546,7 +3624,7 @@ function setAnnotationManager(annotationManager) {
3546
3624
  defaultManager = annotationManager;
3547
3625
  }
3548
3626
  function resetAnnotationManager() {
3549
- defaultManager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_2__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
3627
+ defaultManager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
3550
3628
  }
3551
3629
  function getAnnotations(toolName, annotationGroupSelector) {
3552
3630
  const manager = getAnnotationManager();
@@ -3596,11 +3674,11 @@ function addAnnotation(annotation, annotationGroupSelector) {
3596
3674
  if (annotationGroupSelector instanceof HTMLDivElement) {
3597
3675
  const groupKey = manager.getGroupKey(annotationGroupSelector);
3598
3676
  manager.addAnnotation(annotation, groupKey);
3599
- (0,_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationAddedForElement */ .$f)(annotation, annotationGroupSelector);
3677
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationAddedForElement */ .$f)(annotation, annotationGroupSelector);
3600
3678
  }
3601
3679
  else {
3602
3680
  manager.addAnnotation(annotation);
3603
- (0,_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationAddedForFOR */ ._3)(annotation);
3681
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationAddedForFOR */ ._3)(annotation);
3604
3682
  }
3605
3683
  return annotation.annotationUID;
3606
3684
  }
@@ -3620,12 +3698,7 @@ function removeAnnotation(annotationUID) {
3620
3698
  }
3621
3699
  annotation.childAnnotationUIDs?.forEach((childAnnotationUID) => removeAnnotation(childAnnotationUID));
3622
3700
  manager.removeAnnotation(annotationUID);
3623
- const eventType = _enums__WEBPACK_IMPORTED_MODULE_1__.Events.ANNOTATION_REMOVED;
3624
- const eventDetail = {
3625
- annotation,
3626
- annotationManagerUID: manager.uid,
3627
- };
3628
- (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, eventType, eventDetail);
3701
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationRemoved */ .SH)({ annotation, annotationManagerUID: manager.uid });
3629
3702
  }
3630
3703
  function getAnnotation(annotationUID) {
3631
3704
  const manager = getAnnotationManager();
@@ -3634,7 +3707,24 @@ function getAnnotation(annotationUID) {
3634
3707
  }
3635
3708
  function removeAllAnnotations() {
3636
3709
  const manager = getAnnotationManager();
3637
- manager.removeAllAnnotations();
3710
+ const removedAnnotations = manager.removeAllAnnotations();
3711
+ for (const annotation of removedAnnotations) {
3712
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationRemoved */ .SH)({
3713
+ annotation,
3714
+ annotationManagerUID: manager.uid,
3715
+ });
3716
+ }
3717
+ }
3718
+ function removeAnnotations(toolName, annotationGroupSelector) {
3719
+ const manager = getAnnotationManager();
3720
+ const groupKey = manager.getGroupKey(annotationGroupSelector);
3721
+ const removedAnnotations = manager.removeAnnotations(groupKey, toolName);
3722
+ for (const annotation of removedAnnotations) {
3723
+ (0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationRemoved */ .SH)({
3724
+ annotation,
3725
+ annotationManagerUID: manager.uid,
3726
+ });
3727
+ }
3638
3728
  }
3639
3729
  function invalidateAnnotation(annotation) {
3640
3730
  let currAnnotation = annotation;
@@ -4008,6 +4098,7 @@ __webpack_require__.r(__webpack_exports__);
4008
4098
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4009
4099
  /* harmony export */ $f: () => (/* binding */ triggerAnnotationAddedForElement),
4010
4100
  /* harmony export */ PS: () => (/* binding */ triggerContourAnnotationCompleted),
4101
+ /* harmony export */ SH: () => (/* binding */ triggerAnnotationRemoved),
4011
4102
  /* harmony export */ XF: () => (/* binding */ triggerAnnotationModified),
4012
4103
  /* harmony export */ _3: () => (/* binding */ triggerAnnotationAddedForFOR),
4013
4104
  /* harmony export */ dZ: () => (/* binding */ triggerAnnotationCompleted)
@@ -4057,6 +4148,10 @@ function triggerAnnotationAddedForFOR(annotation) {
4057
4148
  (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, eventType, eventDetail);
4058
4149
  });
4059
4150
  }
4151
+ function triggerAnnotationRemoved(eventDetail) {
4152
+ const eventType = _enums__WEBPACK_IMPORTED_MODULE_1__.Events.ANNOTATION_REMOVED;
4153
+ (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, eventType, eventDetail);
4154
+ }
4060
4155
  function triggerAnnotationModified(annotation, element, changeType = _enums__WEBPACK_IMPORTED_MODULE_1__.ChangeTypes.HandlesUpdated) {
4061
4156
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
4062
4157
  const { viewportId, renderingEngineId } = enabledElement;
@@ -7011,8 +7106,8 @@ function removeTool(ToolClass) {
7011
7106
 
7012
7107
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 17 modules
7013
7108
  var eventListeners = __webpack_require__(60878);
7014
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js + 7 modules
7015
- var eventDispatchers = __webpack_require__(44926);
7109
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js + 8 modules
7110
+ var eventDispatchers = __webpack_require__(94101);
7016
7111
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/triggerAnnotationRender.js
7017
7112
  var triggerAnnotationRender = __webpack_require__(6805);
7018
7113
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/addEnabledElement.js
@@ -7034,6 +7129,7 @@ function addEnabledElement(evt) {
7034
7129
  eventDispatchers/* imageRenderedEventDispatcher */.In.enable(element);
7035
7130
  eventDispatchers/* cameraModifiedEventDispatcher */.aB.enable(element);
7036
7131
  eventDispatchers/* imageSpacingCalibratedEventDispatcher */.z5.enable(element);
7132
+ eventDispatchers/* cameraResetEventDispatcher */.we.enable(element);
7037
7133
  eventDispatchers/* mouseToolEventDispatcher */.n6.enable(element);
7038
7134
  eventDispatchers/* keyboardToolEventDispatcher */.V$.enable(element);
7039
7135
  eventDispatchers/* touchToolEventDispatcher */.$m.enable(element);
@@ -7124,6 +7220,7 @@ function removeEnabledElement(elementDisabledEvt) {
7124
7220
  eventDispatchers/* imageRenderedEventDispatcher */.In.disable(element);
7125
7221
  eventDispatchers/* cameraModifiedEventDispatcher */.aB.disable(element);
7126
7222
  eventDispatchers/* imageSpacingCalibratedEventDispatcher */.z5.disable(element);
7223
+ eventDispatchers/* cameraResetEventDispatcher */.we.disable(element);
7127
7224
  eventDispatchers/* mouseToolEventDispatcher */.n6.disable(element);
7128
7225
  eventDispatchers/* keyboardToolEventDispatcher */.V$.disable(element);
7129
7226
  eventDispatchers/* touchToolEventDispatcher */.$m.disable(element);
@@ -7338,7 +7435,7 @@ function presentationViewSyncCallback(_synchronizerInstance, sourceViewport, tar
7338
7435
  const tViewport = renderingEngine.getViewport(targetViewport.viewportId);
7339
7436
  const sViewport = renderingEngine.getViewport(sourceViewport.viewportId);
7340
7437
  const presentationView = sViewport.getViewPresentation(options);
7341
- tViewport.setView(null, presentationView);
7438
+ tViewport.setViewPresentation(presentationView);
7342
7439
  tViewport.render();
7343
7440
  }
7344
7441
 
@@ -7580,7 +7677,7 @@ const createStackImageSynchronizer = createImageSliceSynchronizer;
7580
7677
  /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48428);
7581
7678
  /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21009);
7582
7679
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54177);
7583
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2746);
7680
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
7584
7681
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
7585
7682
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84901);
7586
7683
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(90252);
@@ -8071,10 +8168,10 @@ class AnnotationEraserTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .BaseToo
8071
8168
  continue;
8072
8169
  }
8073
8170
  const annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotations)(toolName, element);
8074
- if (!annotations) {
8171
+ if (!annotations.length) {
8075
8172
  continue;
8076
8173
  }
8077
- const interactableAnnotations = toolInstance.filterInteractableAnnotationsForElement(element, annotations);
8174
+ const interactableAnnotations = toolInstance.filterInteractableAnnotationsForElement(element, annotations) || [];
8078
8175
  for (const annotation of interactableAnnotations) {
8079
8176
  if (toolInstance.isPointNearTool(element, annotation, currentPoints.canvas, 10, interactionType)) {
8080
8177
  annotationsToRemove.push(annotation.annotationUID);
@@ -8108,7 +8205,7 @@ AnnotationEraserTool.toolName = 'Eraser';
8108
8205
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92136);
8109
8206
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52610);
8110
8207
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38296);
8111
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2746);
8208
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(49574);
8112
8209
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(61738);
8113
8210
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84901);
8114
8211
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(90252);
@@ -8158,7 +8255,12 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
8158
8255
  supportedInteractionTypes: ['Mouse'],
8159
8256
  configuration: {
8160
8257
  shadow: true,
8161
- viewportIndicators: true,
8258
+ viewportIndicators: false,
8259
+ viewportIndicatorsConfig: {
8260
+ radius: 5,
8261
+ x: null,
8262
+ y: null,
8263
+ },
8162
8264
  autoPan: {
8163
8265
  enabled: false,
8164
8266
  panSize: 10,
@@ -8222,12 +8324,20 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
8222
8324
  viewportsInfo.forEach(({ viewportId, renderingEngineId }) => {
8223
8325
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__.getEnabledElementByIds)(viewportId, renderingEngineId);
8224
8326
  const { viewport } = enabledElement;
8327
+ const resetPan = true;
8328
+ const resetZoom = true;
8329
+ const resetToCenter = true;
8330
+ const resetRotation = true;
8331
+ const supressEvents = true;
8332
+ viewport.resetCamera(resetPan, resetZoom, resetToCenter, resetRotation, supressEvents);
8333
+ viewport.resetSlabThickness();
8225
8334
  const { element } = viewport;
8226
8335
  let annotations = this._getAnnotations(enabledElement);
8227
8336
  annotations = this.filterInteractableAnnotationsForElement(element, annotations);
8228
8337
  if (annotations.length) {
8229
8338
  (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__.removeAnnotation)(annotations[0].annotationUID);
8230
8339
  }
8340
+ viewport.render();
8231
8341
  });
8232
8342
  this.computeToolCenter(viewportsInfo);
8233
8343
  };
@@ -8365,6 +8475,9 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
8365
8475
  const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_10__.getViewportIdsWithToolToRender)(element, this.getToolName(), requireSameOrientation);
8366
8476
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
8367
8477
  };
8478
+ this.onResetCamera = (evt) => {
8479
+ this.resetCrosshairs();
8480
+ };
8368
8481
  this.mouseMoveCallback = (evt, filteredToolAnnotations) => {
8369
8482
  const { element, currentPoints } = evt.detail;
8370
8483
  const canvasCoords = currentPoints.canvas;
@@ -8746,12 +8859,16 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
8746
8859
  renderStatus = true;
8747
8860
  data.handles.rotationPoints = newRtpoints;
8748
8861
  data.handles.slabThicknessPoints = newStpoints;
8862
+ debugger;
8749
8863
  if (this.configuration.viewportIndicators) {
8864
+ const { viewportIndicatorsConfig } = this.configuration;
8865
+ const xOffset = viewportIndicatorsConfig?.xOffset || 0.95;
8866
+ const yOffset = viewportIndicatorsConfig?.yOffset || 0.05;
8750
8867
  const referenceColorCoordinates = [
8751
- clientWidth * 0.95,
8752
- clientHeight * 0.05,
8868
+ clientWidth * xOffset,
8869
+ clientHeight * yOffset,
8753
8870
  ];
8754
- const circleRadius = canvasDiagonalLength * 0.01;
8871
+ const circleRadius = viewportIndicatorsConfig?.circleRadius || canvasDiagonalLength * 0.01;
8755
8872
  const circleUID = '0';
8756
8873
  (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, referenceColorCoordinates, circleRadius, { color, fill: color });
8757
8874
  }
@@ -10125,7 +10242,7 @@ OrientationMarkerTool.toolName = 'OrientationMarker';
10125
10242
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
10126
10243
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
10127
10244
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52610);
10128
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2746);
10245
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
10129
10246
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
10130
10247
  /* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(28062);
10131
10248
 
@@ -10420,7 +10537,7 @@ PlanarRotateTool.toolName = 'PlanarRotate';
10420
10537
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
10421
10538
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38296);
10422
10539
  /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21009);
10423
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2746);
10540
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
10424
10541
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
10425
10542
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
10426
10543
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44753);
@@ -10750,7 +10867,7 @@ ReferenceCursors.toolName = 'ReferenceCursors';
10750
10867
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44753);
10751
10868
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
10752
10869
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
10753
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2746);
10870
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
10754
10871
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
10755
10872
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
10756
10873
  /* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(28062);
@@ -10991,7 +11108,7 @@ ReferenceLines.toolName = 'ReferenceLines';
10991
11108
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44753);
10992
11109
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92136);
10993
11110
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
10994
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2746);
11111
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
10995
11112
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52610);
10996
11113
 
10997
11114
 
@@ -11293,8 +11410,8 @@ class ScaleOverlayTool extends _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MOD
11293
11410
  viewportId: enabledElement.viewport.id,
11294
11411
  };
11295
11412
  const canvasSize = {
11296
- width: canvas.width,
11297
- height: canvas.height,
11413
+ width: canvas.width / window.devicePixelRatio || 1,
11414
+ height: canvas.height / window.devicePixelRatio || 1,
11298
11415
  };
11299
11416
  const topLeft = annotation.data.handles.points[0];
11300
11417
  const topRight = annotation.data.handles.points[1];
@@ -11711,7 +11828,7 @@ SculptorTool.toolName = 'SculptorTool';
11711
11828
  /* harmony export */ });
11712
11829
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
11713
11830
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38296);
11714
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2746);
11831
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49574);
11715
11832
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52610);
11716
11833
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23072);
11717
11834
  /* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28062);
@@ -12044,6 +12161,7 @@ class TrackballRotateTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .BaseTool
12044
12161
  }) {
12045
12162
  super(toolProps, defaultToolProps);
12046
12163
  this._resizeObservers = new Map();
12164
+ this._hasResolutionChanged = false;
12047
12165
  this.preMouseDownCallback = (evt) => {
12048
12166
  const eventDetail = evt.detail;
12049
12167
  const { element } = eventDetail;
@@ -12053,15 +12171,19 @@ class TrackballRotateTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .BaseTool
12053
12171
  const actor = actorEntry.actor;
12054
12172
  const mapper = actor.getMapper();
12055
12173
  const originalSampleDistance = mapper.getSampleDistance();
12056
- mapper.setSampleDistance(originalSampleDistance * 2);
12057
- if (this.cleanUp !== null) {
12058
- document.removeEventListener('mouseup', this.cleanUp);
12174
+ if (!this._hasResolutionChanged) {
12175
+ mapper.setSampleDistance(originalSampleDistance * 2);
12176
+ this._hasResolutionChanged = true;
12177
+ if (this.cleanUp !== null) {
12178
+ document.removeEventListener('mouseup', this.cleanUp);
12179
+ }
12180
+ this.cleanUp = () => {
12181
+ mapper.setSampleDistance(originalSampleDistance);
12182
+ viewport.render();
12183
+ this._hasResolutionChanged = false;
12184
+ };
12185
+ document.addEventListener('mouseup', this.cleanUp, { once: true });
12059
12186
  }
12060
- this.cleanUp = () => {
12061
- mapper.setSampleDistance(originalSampleDistance);
12062
- viewport.render();
12063
- };
12064
- document.addEventListener('mouseup', this.cleanUp, { once: true });
12065
12187
  return true;
12066
12188
  };
12067
12189
  this._getViewportsInfo = () => {
@@ -12264,6 +12386,250 @@ VolumeRotateMouseWheelTool.toolName = 'VolumeRotateMouseWheel';
12264
12386
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (VolumeRotateMouseWheelTool);
12265
12387
 
12266
12388
 
12389
+ /***/ }),
12390
+
12391
+ /***/ 60747:
12392
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
12393
+
12394
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12395
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
12396
+ /* harmony export */ });
12397
+ /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96214);
12398
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
12399
+ /* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95778);
12400
+ /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
12401
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
12402
+ /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61738);
12403
+ /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(84901);
12404
+ /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(90252);
12405
+ /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40233);
12406
+ /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23072);
12407
+ /* harmony import */ var _utilities_voi__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14149);
12408
+ /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(74119);
12409
+
12410
+
12411
+
12412
+
12413
+
12414
+
12415
+
12416
+
12417
+
12418
+
12419
+
12420
+
12421
+ class WindowLevelRegionTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationTool */ .EC {
12422
+ constructor(toolProps = {}, defaultToolProps = {
12423
+ supportedInteractionTypes: ['Mouse', 'Touch'],
12424
+ configuration: {
12425
+ minWindowWidth: 10,
12426
+ },
12427
+ }) {
12428
+ super(toolProps, defaultToolProps);
12429
+ this.addNewAnnotation = (evt) => {
12430
+ const eventDetail = evt.detail;
12431
+ const { currentPoints, element } = eventDetail;
12432
+ const worldPos = currentPoints.world;
12433
+ const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
12434
+ const { viewport, renderingEngine } = enabledElement;
12435
+ this.isDrawing = true;
12436
+ const camera = viewport.getCamera();
12437
+ const { viewPlaneNormal, viewUp } = camera;
12438
+ const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
12439
+ const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
12440
+ const annotation = {
12441
+ invalidated: true,
12442
+ highlighted: true,
12443
+ metadata: {
12444
+ toolName: this.getToolName(),
12445
+ viewPlaneNormal: [...viewPlaneNormal],
12446
+ viewUp: [...viewUp],
12447
+ FrameOfReferenceUID,
12448
+ referencedImageId,
12449
+ },
12450
+ data: {
12451
+ handles: {
12452
+ points: [
12453
+ [...worldPos],
12454
+ [...worldPos],
12455
+ [...worldPos],
12456
+ [...worldPos],
12457
+ ],
12458
+ },
12459
+ cachedStats: {},
12460
+ },
12461
+ };
12462
+ (0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .addAnnotation */ .lC)(annotation, element);
12463
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__.getViewportIdsWithToolToRender)(element, this.getToolName());
12464
+ this.editData = {
12465
+ annotation,
12466
+ viewportIdsToRender,
12467
+ };
12468
+ this._activateDraw(element);
12469
+ (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.hideElementCursor)(element);
12470
+ evt.preventDefault();
12471
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
12472
+ return annotation;
12473
+ };
12474
+ this._endCallback = (evt) => {
12475
+ const eventDetail = evt.detail;
12476
+ const { element } = eventDetail;
12477
+ const { annotation, viewportIdsToRender } = this.editData;
12478
+ this._deactivateDraw(element);
12479
+ (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.resetElementCursor)(element);
12480
+ const { renderingEngine } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
12481
+ this.editData = null;
12482
+ this.isDrawing = false;
12483
+ (0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .removeAnnotation */ .O8)(annotation.annotationUID);
12484
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
12485
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationCompleted */ .dZ)(annotation);
12486
+ this.applyWindowLevelRegion(annotation, element);
12487
+ };
12488
+ this._dragCallback = (evt) => {
12489
+ this.isDrawing = true;
12490
+ const eventDetail = evt.detail;
12491
+ const { element } = eventDetail;
12492
+ const { annotation, viewportIdsToRender } = this.editData;
12493
+ const { data } = annotation;
12494
+ const { currentPoints } = eventDetail;
12495
+ const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
12496
+ const { worldToCanvas, canvasToWorld } = enabledElement.viewport;
12497
+ const worldPos = currentPoints.world;
12498
+ const { points } = data.handles;
12499
+ const DEFAULT_HANDLE_INDEX = 3;
12500
+ points[DEFAULT_HANDLE_INDEX] = [...worldPos];
12501
+ const bottomLeftCanvas = worldToCanvas(points[0]);
12502
+ const topRightCanvas = worldToCanvas(points[3]);
12503
+ const bottomRightCanvas = [
12504
+ topRightCanvas[0],
12505
+ bottomLeftCanvas[1],
12506
+ ];
12507
+ const topLeftCanvas = [
12508
+ bottomLeftCanvas[0],
12509
+ topRightCanvas[1],
12510
+ ];
12511
+ const bottomRightWorld = canvasToWorld(bottomRightCanvas);
12512
+ const topLeftWorld = canvasToWorld(topLeftCanvas);
12513
+ points[1] = bottomRightWorld;
12514
+ points[2] = topLeftWorld;
12515
+ annotation.invalidated = true;
12516
+ const { renderingEngine } = enabledElement;
12517
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
12518
+ };
12519
+ this._activateDraw = (element) => {
12520
+ _store__WEBPACK_IMPORTED_MODULE_5__/* .state */ .wk.isInteractingWithTool = true;
12521
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_UP, this._endCallback);
12522
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_DRAG, this._dragCallback);
12523
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_MOVE, this._dragCallback);
12524
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_CLICK, this._endCallback);
12525
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_END, this._endCallback);
12526
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_DRAG, this._dragCallback);
12527
+ element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_TAP, this._endCallback);
12528
+ };
12529
+ this._deactivateDraw = (element) => {
12530
+ _store__WEBPACK_IMPORTED_MODULE_5__/* .state */ .wk.isInteractingWithTool = false;
12531
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_UP, this._endCallback);
12532
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_DRAG, this._dragCallback);
12533
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_MOVE, this._dragCallback);
12534
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_CLICK, this._endCallback);
12535
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_END, this._endCallback);
12536
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_DRAG, this._dragCallback);
12537
+ element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_TAP, this._endCallback);
12538
+ };
12539
+ this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
12540
+ let renderStatus = false;
12541
+ const { viewport } = enabledElement;
12542
+ const { element } = viewport;
12543
+ let annotations = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotations */ .Rh)(this.getToolName(), element);
12544
+ if (!annotations?.length) {
12545
+ return renderStatus;
12546
+ }
12547
+ annotations = this.filterInteractableAnnotationsForElement(element, annotations);
12548
+ if (!annotations?.length) {
12549
+ return renderStatus;
12550
+ }
12551
+ const styleSpecifier = {
12552
+ toolGroupId: this.toolGroupId,
12553
+ toolName: this.getToolName(),
12554
+ viewportId: enabledElement.viewport.id,
12555
+ };
12556
+ for (let i = 0; i < annotations.length; i++) {
12557
+ const annotation = annotations[i];
12558
+ const { annotationUID, data } = annotation;
12559
+ const { points } = data.handles;
12560
+ const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
12561
+ styleSpecifier.annotationUID = annotationUID;
12562
+ const { color, lineWidth, lineDash } = this.getAnnotationStyle({
12563
+ annotation,
12564
+ styleSpecifier,
12565
+ });
12566
+ if (!viewport.getRenderingEngine()) {
12567
+ console.warn('Rendering Engine has been destroyed');
12568
+ return renderStatus;
12569
+ }
12570
+ const dataId = `${annotationUID}-rect`;
12571
+ const rectangleUID = '0';
12572
+ (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_4__.drawRect)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates[0], canvasCoordinates[3], {
12573
+ color,
12574
+ lineDash,
12575
+ lineWidth,
12576
+ }, dataId);
12577
+ renderStatus = true;
12578
+ }
12579
+ return renderStatus;
12580
+ };
12581
+ this.applyWindowLevelRegion = (annotation, element) => {
12582
+ const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
12583
+ const { viewport } = enabledElement;
12584
+ const imageData = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.extractWindowLevelRegionToolData(viewport);
12585
+ const { data } = annotation;
12586
+ const { points } = data.handles;
12587
+ const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
12588
+ const startCanvas = canvasCoordinates[0];
12589
+ const endCanvas = canvasCoordinates[3];
12590
+ let left = Math.min(startCanvas[0], endCanvas[0]);
12591
+ let top = Math.min(startCanvas[1], endCanvas[1]);
12592
+ let width = Math.abs(startCanvas[0] - endCanvas[0]);
12593
+ let height = Math.abs(startCanvas[1] - endCanvas[1]);
12594
+ left = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.clip)(left, 0, imageData.width);
12595
+ top = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.clip)(top, 0, imageData.height);
12596
+ width = Math.floor(Math.min(width, Math.abs(imageData.width - left)));
12597
+ height = Math.floor(Math.min(height, Math.abs(imageData.height - top)));
12598
+ const pixelLuminanceData = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.getLuminanceFromRegion(imageData, Math.round(left), Math.round(top), width, height);
12599
+ const minMaxMean = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.calculateMinMaxMean(pixelLuminanceData, imageData.minPixelValue, imageData.maxPixelValue);
12600
+ if (this.configuration.minWindowWidth === undefined) {
12601
+ this.configuration.minWindowWidth = 10;
12602
+ }
12603
+ const windowWidth = Math.max(Math.abs(minMaxMean.max - minMaxMean.min), this.configuration.minWindowWidth);
12604
+ const windowCenter = minMaxMean.mean;
12605
+ const voiRange = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.windowLevel.toLowHighRange(windowWidth, windowCenter);
12606
+ viewport.setProperties({ voiRange });
12607
+ viewport.render();
12608
+ };
12609
+ this.cancel = () => {
12610
+ return null;
12611
+ };
12612
+ this.isPointNearTool = () => {
12613
+ return null;
12614
+ };
12615
+ this.toolSelectedCallback = () => {
12616
+ return null;
12617
+ };
12618
+ this.handleSelectedCallback = () => {
12619
+ return null;
12620
+ };
12621
+ this._activateModify = () => {
12622
+ return null;
12623
+ };
12624
+ this._deactivateModify = () => {
12625
+ return null;
12626
+ };
12627
+ }
12628
+ }
12629
+ WindowLevelRegionTool.toolName = 'WindowLevelRegion';
12630
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WindowLevelRegionTool);
12631
+
12632
+
12267
12633
  /***/ }),
12268
12634
 
12269
12635
  /***/ 455:
@@ -12681,7 +13047,7 @@ ZoomTool.toolName = 'Zoom';
12681
13047
  /* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(21954);
12682
13048
  /* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(52475);
12683
13049
  /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(74119);
12684
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2746);
13050
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
12685
13051
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
12686
13052
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(90252);
12687
13053
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(23072);
@@ -12737,6 +13103,7 @@ class AngleTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .AnnotationTool */
12737
13103
  viewUp: [...viewUp],
12738
13104
  FrameOfReferenceUID,
12739
13105
  referencedImageId,
13106
+ ...viewport.getViewReference({ points: [worldPos] }),
12740
13107
  },
12741
13108
  data: {
12742
13109
  handles: {
@@ -13152,7 +13519,7 @@ AngleTool.toolName = 'Angle';
13152
13519
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
13153
13520
  /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48428);
13154
13521
  /* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21954);
13155
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2746);
13522
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
13156
13523
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
13157
13524
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
13158
13525
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23072);
@@ -13204,6 +13571,7 @@ class ArrowAnnotateTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .Annotation
13204
13571
  viewUp: [...viewUp],
13205
13572
  FrameOfReferenceUID,
13206
13573
  referencedImageId,
13574
+ ...viewport.getViewReference({ points: [worldPos] }),
13207
13575
  },
13208
13576
  data: {
13209
13577
  text: '',
@@ -13601,7 +13969,7 @@ ArrowAnnotateTool.toolName = 'ArrowAnnotate';
13601
13969
  /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48428);
13602
13970
  /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21009);
13603
13971
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54177);
13604
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2746);
13972
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(49574);
13605
13973
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(61738);
13606
13974
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(84901);
13607
13975
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(90252);
@@ -14275,6 +14643,7 @@ class BidirectionalTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .Annotation
14275
14643
  viewUp: [...viewUp],
14276
14644
  FrameOfReferenceUID,
14277
14645
  referencedImageId,
14646
+ ...viewport.getViewReference({ points: [worldPos] }),
14278
14647
  },
14279
14648
  data: {
14280
14649
  handles: {
@@ -14357,7 +14726,7 @@ BidirectionalTool.toolName = 'Bidirectional';
14357
14726
  /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
14358
14727
  /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
14359
14728
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
14360
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2746);
14729
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
14361
14730
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
14362
14731
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
14363
14732
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
@@ -14427,6 +14796,7 @@ class CircleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationTool
14427
14796
  viewUp: [...viewUp],
14428
14797
  FrameOfReferenceUID,
14429
14798
  referencedImageId,
14799
+ ...viewport.getViewReference({ points: [worldPos] }),
14430
14800
  },
14431
14801
  data: {
14432
14802
  label: '',
@@ -14978,7 +15348,7 @@ CircleROITool.toolName = 'CircleROI';
14978
15348
  /* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21954);
14979
15349
  /* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(52475);
14980
15350
  /* harmony import */ var _utilities_math_midPoint__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(76727);
14981
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2746);
15351
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(49574);
14982
15352
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(61738);
14983
15353
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(90252);
14984
15354
  /* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(10910);
@@ -15037,6 +15407,7 @@ class CobbAngleTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationTool
15037
15407
  viewUp: [...viewUp],
15038
15408
  FrameOfReferenceUID,
15039
15409
  referencedImageId,
15410
+ ...viewport.getViewReference({ points: [worldPos] }),
15040
15411
  },
15041
15412
  data: {
15042
15413
  handles: {
@@ -15678,7 +16049,7 @@ CobbAngleTool.toolName = 'CobbAngle';
15678
16049
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
15679
16050
  /* harmony export */ });
15680
16051
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
15681
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2746);
16052
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49574);
15682
16053
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90252);
15683
16054
  /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(40233);
15684
16055
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23072);
@@ -15838,7 +16209,7 @@ DragProbeTool.toolName = 'DragProbe';
15838
16209
  /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
15839
16210
  /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
15840
16211
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
15841
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2746);
16212
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
15842
16213
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
15843
16214
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
15844
16215
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
@@ -15907,6 +16278,7 @@ class EllipticalROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .Annotation
15907
16278
  viewUp: [...viewUp],
15908
16279
  FrameOfReferenceUID,
15909
16280
  referencedImageId,
16281
+ ...viewport.getViewReference({ points: [worldPos] }),
15910
16282
  },
15911
16283
  data: {
15912
16284
  label: '',
@@ -16415,63 +16787,55 @@ class EllipticalROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .Annotation
16415
16787
  post2Index[0] = Math.floor(post2Index[0]);
16416
16788
  post2Index[1] = Math.floor(post2Index[1]);
16417
16789
  post2Index[2] = Math.floor(post2Index[2]);
16418
- if (this._isInsideVolume(pos1Index, post2Index, dimensions)) {
16419
- this.isHandleOutsideImage = false;
16420
- const iMin = Math.min(pos1Index[0], post2Index[0]);
16421
- const iMax = Math.max(pos1Index[0], post2Index[0]);
16422
- const jMin = Math.min(pos1Index[1], post2Index[1]);
16423
- const jMax = Math.max(pos1Index[1], post2Index[1]);
16424
- const kMin = Math.min(pos1Index[2], post2Index[2]);
16425
- const kMax = Math.max(pos1Index[2], post2Index[2]);
16426
- const boundsIJK = [
16427
- [iMin, iMax],
16428
- [jMin, jMax],
16429
- [kMin, kMax],
16430
- ];
16431
- const center = [
16432
- (topLeftWorld[0] + bottomRightWorld[0]) / 2,
16433
- (topLeftWorld[1] + bottomRightWorld[1]) / 2,
16434
- (topLeftWorld[2] + bottomRightWorld[2]) / 2,
16435
- ];
16436
- const ellipseObj = {
16437
- center,
16438
- xRadius: Math.abs(topLeftWorld[0] - bottomRightWorld[0]) / 2,
16439
- yRadius: Math.abs(topLeftWorld[1] - bottomRightWorld[1]) / 2,
16440
- zRadius: Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2,
16441
- };
16442
- const { worldWidth, worldHeight } = (0,_utilities_planar_getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .A)(viewPlaneNormal, viewUp, worldPos1, worldPos2);
16443
- const isEmptyArea = worldWidth === 0 && worldHeight === 0;
16444
- const handles = [pos1Index, post2Index];
16445
- const { scale, areaUnits } = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__/* .getCalibratedLengthUnitsAndScale */ .Op)(image, handles);
16446
- const area = Math.abs(Math.PI * (worldWidth / 2) * (worldHeight / 2)) /
16447
- scale /
16448
- scale;
16449
- const modalityUnitOptions = {
16450
- isPreScaled: (0,_utilities_viewport_isViewportPreScaled__WEBPACK_IMPORTED_MODULE_19__/* .isViewportPreScaled */ .u)(viewport, targetId),
16451
- isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
16452
- };
16453
- const modalityUnit = (0,_utilities_getModalityUnit__WEBPACK_IMPORTED_MODULE_18__/* .getModalityUnit */ .c)(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
16454
- const pointsInShape = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__.pointInShapeCallback)(imageData, (pointLPS) => (0,_utilities_math_ellipse__WEBPACK_IMPORTED_MODULE_15__.pointInEllipse)(ellipseObj, pointLPS, { fast: true }), this.configuration.statsCalculator.statsCallback, boundsIJK);
16455
- const stats = this.configuration.statsCalculator.getStatistics();
16456
- cachedStats[targetId] = {
16457
- Modality: metadata.Modality,
16458
- area,
16459
- mean: stats.mean?.value,
16460
- max: stats.max?.value,
16461
- stdDev: stats.stdDev?.value,
16462
- statsArray: stats.array,
16463
- pointsInShape,
16464
- isEmptyArea,
16465
- areaUnit: areaUnits,
16466
- modalityUnit,
16467
- };
16468
- }
16469
- else {
16470
- this.isHandleOutsideImage = true;
16471
- cachedStats[targetId] = {
16472
- Modality: metadata.Modality,
16473
- };
16474
- }
16790
+ this.isHandleOutsideImage = !this._isInsideVolume(pos1Index, post2Index, dimensions);
16791
+ const iMin = Math.min(pos1Index[0], post2Index[0]);
16792
+ const iMax = Math.max(pos1Index[0], post2Index[0]);
16793
+ const jMin = Math.min(pos1Index[1], post2Index[1]);
16794
+ const jMax = Math.max(pos1Index[1], post2Index[1]);
16795
+ const kMin = Math.min(pos1Index[2], post2Index[2]);
16796
+ const kMax = Math.max(pos1Index[2], post2Index[2]);
16797
+ const boundsIJK = [
16798
+ [iMin, iMax],
16799
+ [jMin, jMax],
16800
+ [kMin, kMax],
16801
+ ];
16802
+ const center = [
16803
+ (topLeftWorld[0] + bottomRightWorld[0]) / 2,
16804
+ (topLeftWorld[1] + bottomRightWorld[1]) / 2,
16805
+ (topLeftWorld[2] + bottomRightWorld[2]) / 2,
16806
+ ];
16807
+ const ellipseObj = {
16808
+ center,
16809
+ xRadius: Math.abs(topLeftWorld[0] - bottomRightWorld[0]) / 2,
16810
+ yRadius: Math.abs(topLeftWorld[1] - bottomRightWorld[1]) / 2,
16811
+ zRadius: Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2,
16812
+ };
16813
+ const { worldWidth, worldHeight } = (0,_utilities_planar_getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .A)(viewPlaneNormal, viewUp, worldPos1, worldPos2);
16814
+ const isEmptyArea = worldWidth === 0 && worldHeight === 0;
16815
+ const handles = [pos1Index, post2Index];
16816
+ const { scale, areaUnits } = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__/* .getCalibratedLengthUnitsAndScale */ .Op)(image, handles);
16817
+ const area = Math.abs(Math.PI * (worldWidth / 2) * (worldHeight / 2)) /
16818
+ scale /
16819
+ scale;
16820
+ const modalityUnitOptions = {
16821
+ isPreScaled: (0,_utilities_viewport_isViewportPreScaled__WEBPACK_IMPORTED_MODULE_19__/* .isViewportPreScaled */ .u)(viewport, targetId),
16822
+ isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
16823
+ };
16824
+ const modalityUnit = (0,_utilities_getModalityUnit__WEBPACK_IMPORTED_MODULE_18__/* .getModalityUnit */ .c)(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
16825
+ const pointsInShape = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__.pointInShapeCallback)(imageData, (pointLPS) => (0,_utilities_math_ellipse__WEBPACK_IMPORTED_MODULE_15__.pointInEllipse)(ellipseObj, pointLPS, { fast: true }), this.configuration.statsCalculator.statsCallback, boundsIJK);
16826
+ const stats = this.configuration.statsCalculator.getStatistics();
16827
+ cachedStats[targetId] = {
16828
+ Modality: metadata.Modality,
16829
+ area,
16830
+ mean: stats.mean?.value,
16831
+ max: stats.max?.value,
16832
+ stdDev: stats.stdDev?.value,
16833
+ statsArray: stats.array,
16834
+ pointsInShape,
16835
+ isEmptyArea,
16836
+ areaUnit: areaUnits,
16837
+ modalityUnit,
16838
+ };
16475
16839
  }
16476
16840
  annotation.invalidated = false;
16477
16841
  (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__/* .triggerAnnotationModified */ .XF)(annotation, element);
@@ -16544,7 +16908,7 @@ EllipticalROITool.toolName = 'EllipticalROI';
16544
16908
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96214);
16545
16909
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
16546
16910
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54177);
16547
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2746);
16911
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
16548
16912
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61738);
16549
16913
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(90252);
16550
16914
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23072);
@@ -16745,7 +17109,7 @@ KeyImageTool.toolName = 'KeyImage';
16745
17109
  /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21009);
16746
17110
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54177);
16747
17111
  /* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21954);
16748
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2746);
17112
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(49574);
16749
17113
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(61738);
16750
17114
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(90252);
16751
17115
  /* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(10910);
@@ -17193,7 +17557,7 @@ LengthTool.toolName = 'Length';
17193
17557
  /* harmony import */ var _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1320);
17194
17558
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
17195
17559
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
17196
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2746);
17560
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
17197
17561
 
17198
17562
 
17199
17563
 
@@ -17246,7 +17610,7 @@ class LivewireContourSegmentationTool extends _LivewireContourTool__WEBPACK_IMPO
17246
17610
  }
17247
17611
  this.updateAnnotation(acceptedPath);
17248
17612
  this.scissors = null;
17249
- this.scissorsRight = null;
17613
+ this.scissorsNext = null;
17250
17614
  this.editData = null;
17251
17615
  annotation.data.handles.interpolationSources = null;
17252
17616
  if (repeatInterpolation) {
@@ -17296,7 +17660,7 @@ LivewireContourSegmentationTool.toolName = 'LivewireContourSegmentationTool';
17296
17660
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44753);
17297
17661
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
17298
17662
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
17299
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2746);
17663
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
17300
17664
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
17301
17665
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
17302
17666
  /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
@@ -17591,7 +17955,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
17591
17955
  element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_5__.Events.TOUCH_TAP, this._mouseDownCallback);
17592
17956
  };
17593
17957
  }
17594
- setupBaseEditData(worldPos, element, annotation, rightPos, contourHoleProcessingEnabled) {
17958
+ setupBaseEditData(worldPos, element, annotation, nextPos, contourHoleProcessingEnabled) {
17595
17959
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
17596
17960
  const { viewport } = enabledElement;
17597
17961
  this.isDrawing = true;
@@ -17634,12 +17998,12 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
17634
17998
  const { voiRange } = viewport.getProperties();
17635
17999
  const startPos = worldToSlice(worldPos);
17636
18000
  this.scissors = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_12__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
17637
- if (rightPos) {
17638
- this.scissorsRight = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_12__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
17639
- this.scissorsRight.startSearch(worldToSlice(rightPos));
18001
+ if (nextPos) {
18002
+ this.scissorsNext = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_12__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
18003
+ this.scissorsNext.startSearch(worldToSlice(nextPos));
17640
18004
  }
17641
18005
  this.scissors.startSearch(startPos);
17642
- const newAnnotation = !rightPos;
18006
+ const newAnnotation = !nextPos;
17643
18007
  const confirmedPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
17644
18008
  const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
17645
18009
  const currentPathNext = newAnnotation ? undefined : new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
@@ -17655,7 +18019,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
17655
18019
  lastCanvasPoint,
17656
18020
  confirmedPath,
17657
18021
  currentPath,
17658
- confirmedPathRight: currentPathNext,
18022
+ confirmedPathNext: currentPathNext,
17659
18023
  closed: false,
17660
18024
  handleIndex: this.editData?.handleIndex ?? annotation.handles?.activeHandleIndex,
17661
18025
  worldToSlice,
@@ -17681,7 +18045,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
17681
18045
  clearEditData() {
17682
18046
  this.editData = null;
17683
18047
  this.scissors = null;
17684
- this.scissorsRight = null;
18048
+ this.scissorsNext = null;
17685
18049
  this.isDrawing = false;
17686
18050
  }
17687
18051
  editHandle(worldPos, element, annotation, handleIndex) {
@@ -17690,11 +18054,11 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
17690
18054
  const { length: numHandles } = handlePoints;
17691
18055
  const previousHandle = handlePoints[(handleIndex - 1 + numHandles) % numHandles];
17692
18056
  const nextHandle = handlePoints[(handleIndex + 1) % numHandles];
17693
- if (!this.editData?.confirmedPathRight) {
18057
+ if (!this.editData?.confirmedPathNext) {
17694
18058
  this.setupBaseEditData(previousHandle, element, annotation, nextHandle);
17695
18059
  const { polyline } = data.contour;
17696
18060
  const confirmedPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
17697
- const confirmedPathRight = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
18061
+ const confirmedPathNext = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
17698
18062
  const { worldToSlice } = this.editData;
17699
18063
  const previousIndex = (0,_utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(annotation, handleIndex - 1);
17700
18064
  const nextIndex = (0,_utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(annotation, handleIndex + 1);
@@ -17702,17 +18066,14 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
17702
18066
  throw new Error(`Can't find handle index ${nextIndex === -1 && nextHandle} ${previousIndex === -1 && previousHandle}`);
17703
18067
  }
17704
18068
  if (handleIndex === 0) {
17705
- confirmedPathRight.addPoints(polyline.slice(nextIndex + 1, previousIndex).map(worldToSlice));
17706
- }
17707
- else if (nextIndex < previousIndex) {
17708
- throw new Error(`Expected right index after left index, but were: ${previousIndex} ${nextIndex}`);
18069
+ confirmedPathNext.addPoints(polyline.slice(nextIndex + 1, previousIndex).map(worldToSlice));
17709
18070
  }
17710
18071
  else {
17711
18072
  confirmedPath.addPoints(polyline.slice(0, previousIndex + 1).map(worldToSlice));
17712
- confirmedPathRight.addPoints(polyline.slice(nextIndex, polyline.length).map(worldToSlice));
18073
+ confirmedPathNext.addPoints(polyline.slice(nextIndex, polyline.length).map(worldToSlice));
17713
18074
  }
17714
18075
  this.editData.confirmedPath = confirmedPath;
17715
- this.editData.confirmedPathRight = confirmedPathRight;
18076
+ this.editData.confirmedPathNext = confirmedPathNext;
17716
18077
  }
17717
18078
  const { editData, scissors } = this;
17718
18079
  const { worldToSlice, sliceToWorld } = editData;
@@ -17732,14 +18093,14 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
17732
18093
  }
17733
18094
  handlePoints[handleIndex] = sliceToWorld(slicePos);
17734
18095
  const pathPointsLeft = scissors.findPathToPoint(slicePos);
17735
- const pathPointsRight = this.scissorsRight.findPathToPoint(slicePos);
18096
+ const pathPointsRight = this.scissorsNext.findPathToPoint(slicePos);
17736
18097
  const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
17737
18098
  currentPath.prependPath(editData.confirmedPath);
17738
18099
  if (handleIndex !== 0) {
17739
18100
  currentPath.addPoints(pathPointsLeft);
17740
18101
  }
17741
18102
  currentPath.addPoints(pathPointsRight.reverse());
17742
- currentPath.appendPath(editData.confirmedPathRight);
18103
+ currentPath.appendPath(editData.confirmedPathNext);
17743
18104
  if (handleIndex === 0) {
17744
18105
  currentPath.addPoints(pathPointsLeft);
17745
18106
  }
@@ -17798,17 +18159,19 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
17798
18159
  if (!this.editData || !livewirePath) {
17799
18160
  return;
17800
18161
  }
17801
- const { annotation, sliceToWorld } = this.editData;
18162
+ const { annotation, sliceToWorld, worldToSlice, closed, newAnnotation } = this.editData;
17802
18163
  let { pointArray: imagePoints } = livewirePath;
17803
18164
  if (imagePoints.length > 1) {
17804
18165
  imagePoints = [...imagePoints, imagePoints[0]];
17805
18166
  }
18167
+ const targetWindingDirection = newAnnotation && closed ? _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_10__/* .ContourWindingDirection */ .W.Clockwise : undefined;
17806
18168
  this.updateContourPolyline(annotation, {
17807
18169
  points: imagePoints,
17808
- closed: annotation.data.contour.closed,
17809
- targetWindingDirection: _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_10__/* .ContourWindingDirection */ .W.Clockwise,
18170
+ closed,
18171
+ targetWindingDirection,
17810
18172
  }, {
17811
18173
  canvasToWorld: sliceToWorld,
18174
+ worldToCanvas: worldToSlice,
17812
18175
  });
17813
18176
  }
17814
18177
  }
@@ -17873,7 +18236,7 @@ PlanarFreehandContourSegmentationTool.toolName =
17873
18236
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
17874
18237
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54177);
17875
18238
  /* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24592);
17876
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2746);
18239
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
17877
18240
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
17878
18241
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84901);
17879
18242
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(90252);
@@ -18252,7 +18615,7 @@ ProbeTool.toolName = 'Probe';
18252
18615
  /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
18253
18616
  /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
18254
18617
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
18255
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2746);
18618
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
18256
18619
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
18257
18620
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
18258
18621
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
@@ -18318,6 +18681,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
18318
18681
  viewUp: [...viewUp],
18319
18682
  FrameOfReferenceUID,
18320
18683
  referencedImageId,
18684
+ ...viewport.getViewReference({ points: [worldPos] }),
18321
18685
  },
18322
18686
  data: {
18323
18687
  label: '',
@@ -18665,7 +19029,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
18665
19029
  }
18666
19030
  const dataId = `${annotationUID}-rect`;
18667
19031
  const rectangleUID = '0';
18668
- (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.drawRect)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates[0], canvasCoordinates[3], {
19032
+ (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.drawRectByCoordinates)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates, {
18669
19033
  color,
18670
19034
  lineDash,
18671
19035
  lineWidth,
@@ -18850,7 +19214,7 @@ SplineContourSegmentationTool.toolName = 'SplineContourSegmentationTool';
18850
19214
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
18851
19215
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44753);
18852
19216
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
18853
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2746);
19217
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
18854
19218
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
18855
19219
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
18856
19220
  /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
@@ -19606,7 +19970,7 @@ SplineROITool.toolName = 'SplineROI';
19606
19970
  /* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21090);
19607
19971
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38296);
19608
19972
  /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54177);
19609
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2746);
19973
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
19610
19974
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
19611
19975
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
19612
19976
  /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(74119);
@@ -20093,7 +20457,7 @@ UltrasoundDirectionalTool.toolName = 'UltrasoundDirectionalTool';
20093
20457
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96214);
20094
20458
  /* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21090);
20095
20459
  /* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95778);
20096
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2746);
20460
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
20097
20461
  /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61738);
20098
20462
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(84901);
20099
20463
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
@@ -21154,6 +21518,7 @@ __webpack_require__.d(__webpack_exports__, {
21154
21518
  So: () => (/* reexport */ TrackballRotateTool/* default */.A),
21155
21519
  oi: () => (/* reexport */ UltrasoundDirectionalTool/* default */.A),
21156
21520
  Y1: () => (/* reexport */ VolumeRotateMouseWheelTool/* default */.A),
21521
+ TG: () => (/* reexport */ WindowLevelRegionTool/* default */.A),
21157
21522
  Du: () => (/* reexport */ WindowLevelTool/* default */.A),
21158
21523
  OQ: () => (/* reexport */ ZoomTool/* default */.A)
21159
21524
  });
@@ -21166,6 +21531,8 @@ var PanTool = __webpack_require__(25294);
21166
21531
  var TrackballRotateTool = __webpack_require__(15924);
21167
21532
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/WindowLevelTool.js
21168
21533
  var WindowLevelTool = __webpack_require__(455);
21534
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/WindowLevelRegionTool.js
21535
+ var WindowLevelRegionTool = __webpack_require__(60747);
21169
21536
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/StackScrollTool.js
21170
21537
  var StackScrollTool = __webpack_require__(20132);
21171
21538
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/PlanarRotateTool.js
@@ -21248,8 +21615,8 @@ var esm = __webpack_require__(92136);
21248
21615
  var stateManagement = __webpack_require__(95778);
21249
21616
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/annotationLocking.js
21250
21617
  var annotationLocking = __webpack_require__(48428);
21251
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/index.js + 17 modules
21252
- var drawingSvg = __webpack_require__(2746);
21618
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/index.js + 18 modules
21619
+ var drawingSvg = __webpack_require__(49574);
21253
21620
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewportFilters/index.js + 4 modules
21254
21621
  var viewportFilters = __webpack_require__(90252);
21255
21622
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/cursors/elementCursor.js
@@ -21785,6 +22152,7 @@ var SegmentSelectTool = __webpack_require__(34041);
21785
22152
 
21786
22153
 
21787
22154
 
22155
+
21788
22156
 
21789
22157
 
21790
22158
  /***/ }),
@@ -21803,7 +22171,7 @@ var SegmentSelectTool = __webpack_require__(34041);
21803
22171
  /* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4069);
21804
22172
  /* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11852);
21805
22173
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(84901);
21806
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2746);
22174
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(49574);
21807
22175
  /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(40233);
21808
22176
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23072);
21809
22177
  /* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(63421);
@@ -22277,7 +22645,7 @@ BrushTool.toolName = 'Brush';
22277
22645
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84901);
22278
22646
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
22279
22647
  /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48428);
22280
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2746);
22648
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
22281
22649
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(90252);
22282
22650
  /* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21090);
22283
22651
  /* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21009);
@@ -22643,7 +23011,7 @@ CircleROIStartEndThresholdTool.toolName = 'CircleROIStartEndThreshold';
22643
23011
  /* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4069);
22644
23012
  /* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11852);
22645
23013
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
22646
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2746);
23014
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
22647
23015
  /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
22648
23016
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23072);
22649
23017
  /* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(63421);
@@ -23144,7 +23512,7 @@ PaintFillTool.toolName = 'PaintFill';
23144
23512
  /* harmony import */ var _strategies_eraseRectangle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66211);
23145
23513
  /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
23146
23514
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
23147
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2746);
23515
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
23148
23516
  /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(40233);
23149
23517
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23072);
23150
23518
  /* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63421);
@@ -23518,7 +23886,7 @@ SegmentSelectTool.toolName = 'SegmentSelectTool';
23518
23886
  /* harmony import */ var _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61604);
23519
23887
  /* harmony import */ var _strategies_eraseSphere__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4373);
23520
23888
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
23521
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2746);
23889
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
23522
23890
  /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
23523
23891
  /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23072);
23524
23892
  /* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(63421);
@@ -23827,56 +24195,6 @@ __webpack_require__.r(__webpack_exports__);
23827
24195
 
23828
24196
 
23829
24197
 
23830
- /***/ }),
23831
-
23832
- /***/ 75534:
23833
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23834
-
23835
- __webpack_require__.r(__webpack_exports__);
23836
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23837
- /* harmony export */ AnnotationToPointData: () => (/* reexport safe */ _AnnotationToPointData__WEBPACK_IMPORTED_MODULE_5__.A),
23838
- /* harmony export */ acceptAutogeneratedInterpolations: () => (/* reexport safe */ _interpolation_acceptAutogeneratedInterpolations__WEBPACK_IMPORTED_MODULE_9__.A),
23839
- /* harmony export */ areCoplanarContours: () => (/* reexport safe */ _areCoplanarContours__WEBPACK_IMPORTED_MODULE_0__.A),
23840
- /* harmony export */ calculatePerimeter: () => (/* reexport safe */ _calculatePerimeter__WEBPACK_IMPORTED_MODULE_12__.A),
23841
- /* harmony export */ contourFinder: () => (/* reexport safe */ _contourFinder__WEBPACK_IMPORTED_MODULE_1__.Ay),
23842
- /* harmony export */ detectContourHoles: () => (/* reexport safe */ _detectContourHoles__WEBPACK_IMPORTED_MODULE_3__.A),
23843
- /* harmony export */ findHandlePolylineIndex: () => (/* reexport safe */ _findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_11__.A),
23844
- /* harmony export */ generateContourSetsFromLabelmap: () => (/* reexport safe */ _generateContourSetsFromLabelmap__WEBPACK_IMPORTED_MODULE_4__.d),
23845
- /* harmony export */ getContourHolesDataCanvas: () => (/* reexport safe */ _getContourHolesDataCanvas__WEBPACK_IMPORTED_MODULE_7__.A),
23846
- /* harmony export */ getContourHolesDataWorld: () => (/* reexport safe */ _getContourHolesDataWorld__WEBPACK_IMPORTED_MODULE_6__.A),
23847
- /* harmony export */ getDeduplicatedVTKPolyDataPoints: () => (/* reexport safe */ _getDeduplicatedVTKPolyDataPoints__WEBPACK_IMPORTED_MODULE_2__.v),
23848
- /* harmony export */ interpolation: () => (/* reexport module object */ _interpolation__WEBPACK_IMPORTED_MODULE_10__),
23849
- /* harmony export */ updateContourPolyline: () => (/* reexport safe */ _updateContourPolyline__WEBPACK_IMPORTED_MODULE_8__.A)
23850
- /* harmony export */ });
23851
- /* harmony import */ var _areCoplanarContours__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14633);
23852
- /* harmony import */ var _contourFinder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11716);
23853
- /* harmony import */ var _getDeduplicatedVTKPolyDataPoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19866);
23854
- /* harmony import */ var _detectContourHoles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92806);
23855
- /* harmony import */ var _generateContourSetsFromLabelmap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36392);
23856
- /* harmony import */ var _AnnotationToPointData__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(93712);
23857
- /* harmony import */ var _getContourHolesDataWorld__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98043);
23858
- /* harmony import */ var _getContourHolesDataCanvas__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(88267);
23859
- /* harmony import */ var _updateContourPolyline__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(89111);
23860
- /* harmony import */ var _interpolation_acceptAutogeneratedInterpolations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(65864);
23861
- /* harmony import */ var _interpolation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(69115);
23862
- /* harmony import */ var _findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84045);
23863
- /* harmony import */ var _calculatePerimeter__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(53891);
23864
-
23865
-
23866
-
23867
-
23868
-
23869
-
23870
-
23871
-
23872
-
23873
-
23874
-
23875
-
23876
-
23877
-
23878
-
23879
-
23880
24198
  /***/ }),
23881
24199
 
23882
24200
  /***/ 65903:
@@ -23915,6 +24233,7 @@ __webpack_require__.r(__webpack_exports__);
23915
24233
  // EXPORTS
23916
24234
  __webpack_require__.d(__webpack_exports__, {
23917
24235
  annotationFrameRange: () => (/* reexport */ annotationFrameRange/* default */.A),
24236
+ annotationHydration: () => (/* reexport */ annotationHydration/* annotationHydration */.i),
23918
24237
  boundingBox: () => (/* reexport */ boundingBox),
23919
24238
  calibrateImageSpacing: () => (/* reexport */ calibrateImageSpacing/* default */.A),
23920
24239
  cine: () => (/* reexport */ cine),
@@ -23929,6 +24248,7 @@ __webpack_require__.d(__webpack_exports__, {
23929
24248
  getCalibratedAspect: () => (/* reexport */ getCalibratedUnits/* getCalibratedAspect */.CQ),
23930
24249
  getCalibratedLengthUnitsAndScale: () => (/* reexport */ getCalibratedUnits/* getCalibratedLengthUnitsAndScale */.Op),
23931
24250
  getCalibratedProbeUnitsAndValue: () => (/* reexport */ getCalibratedUnits/* getCalibratedProbeUnitsAndValue */.Xw),
24251
+ getClosestImageIdForStackViewport: () => (/* reexport */ annotationHydration/* getClosestImageIdForStackViewport */.x),
23932
24252
  getSphereBoundsInfo: () => (/* reexport */ getSphereBoundsInfo/* getSphereBoundsInfo */.R),
23933
24253
  getViewportForAnnotation: () => (/* reexport */ getViewportForAnnotation/* default */.A),
23934
24254
  isObject: () => (/* reexport */ isObject/* default */.A),
@@ -24004,8 +24324,10 @@ var annotationFrameRange = __webpack_require__(41209);
24004
24324
  var pointInSurroundingSphereCallback = __webpack_require__(5093);
24005
24325
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getViewportForAnnotation.js
24006
24326
  var getViewportForAnnotation = __webpack_require__(39490);
24007
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/index.js
24008
- var contours = __webpack_require__(75534);
24327
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/annotationHydration.js
24328
+ var annotationHydration = __webpack_require__(25781);
24329
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/index.js + 9 modules
24330
+ var contours = __webpack_require__(75908);
24009
24331
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/index.js
24010
24332
  var segmentation = __webpack_require__(10351);
24011
24333
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/drawing/index.js + 1 modules
@@ -24043,8 +24365,8 @@ var touch = __webpack_require__(54868);
24043
24365
  var dynamicVolume = __webpack_require__(16390);
24044
24366
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/polyData/utils.js
24045
24367
  var utils = __webpack_require__(46514);
24046
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/index.js
24047
- var voi = __webpack_require__(10413);
24368
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/index.js + 4 modules
24369
+ var voi = __webpack_require__(14149);
24048
24370
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contourSegmentation/index.js
24049
24371
  var contourSegmentation = __webpack_require__(7259);
24050
24372
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/index.js
@@ -24083,6 +24405,7 @@ var contourSegmentation = __webpack_require__(7259);
24083
24405
 
24084
24406
 
24085
24407
 
24408
+
24086
24409
 
24087
24410
 
24088
24411
  const roundNumber = esm.utilities.roundNumber;
@@ -24482,7 +24805,7 @@ function triggerSegmentationRender(toolGroupId) {
24482
24805
  /* unused harmony export triggerAnnotationRender */
24483
24806
  /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
24484
24807
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
24485
- /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2746);
24808
+ /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49574);
24486
24809
  /* harmony import */ var _getToolsWithModesForElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42360);
24487
24810
 
24488
24811