@ohif/app 3.12.0-beta.80 → 3.12.0-beta.81

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 (41) hide show
  1. package/dist/{3190.bundle.cd955568fe4d80ab2e4b.js → 1037.bundle.7502b1bb0e5eee58a1d8.js} +51 -15
  2. package/dist/{1927.bundle.081901df8d9b33633806.js → 1927.bundle.da6db325e08bacb0bca0.js} +3 -3
  3. package/dist/{6725.bundle.0d2cdc2107924a76f362.js → 2018.bundle.48b73891bb66796a3b2d.js} +47 -14
  4. package/dist/{306.bundle.a2380c4b23436c127faf.js → 306.bundle.c671a09e1eacf6bcfc84.js} +1 -1
  5. package/dist/{3613.bundle.f5fceb4697407a89921b.js → 3613.bundle.3542f5bb1f69651bc239.js} +98 -45
  6. package/dist/{4019.bundle.6505ff57ca48af03da8a.js → 4019.bundle.8172183f816ea5500dd5.js} +46 -8
  7. package/dist/{4092.bundle.00d575990d745230c1b2.js → 4092.bundle.9ab4766b293d4e447551.js} +19 -0
  8. package/dist/{5400.bundle.eb0f5866140b5db31518.js → 5400.bundle.3ebba479fc068cd8c700.js} +8 -2
  9. package/dist/{3353.bundle.a52e42421b9407ad28ce.js → 5858.bundle.99a6b9de04c621694ffd.js} +850 -747
  10. package/dist/{7412.bundle.94802a6a629f62daab88.js → 7412.bundle.dd19b713fc5158ef34c1.js} +157 -139
  11. package/dist/{7948.bundle.ca4da4046481100dccca.js → 7948.bundle.2c6514eb65957b44b127.js} +23 -27
  12. package/dist/{9548.bundle.6f232a0a03e60854b49e.js → 9548.bundle.ee365804b810d67b2766.js} +2 -2
  13. package/dist/{1807.bundle.4fe7031d498b59f1ed68.js → 9927.bundle.174996e11c1432053378.js} +52 -21
  14. package/dist/{app.bundle.a16db06e6e1ae5b7b3c5.js → app.bundle.619935f4e9b60960eec1.js} +936 -689
  15. package/dist/{compute.bundle.f6f1236073e2a486ddfb.js → compute.bundle.ea0325cee6d2a4be77d7.js} +1 -1
  16. package/dist/index.html +1 -1
  17. package/dist/{polySeg.bundle.d0ed88f3bfea700c211b.js → polySeg.bundle.19444130c84583d811bd.js} +3 -3
  18. package/dist/sw.js +1 -1
  19. package/package.json +21 -21
  20. /package/dist/{1459.bundle.d8ca1f502eeb88a6e020.js → 1459.bundle.68ad9f4d048db1ded95e.js} +0 -0
  21. /package/dist/{147.bundle.53fe889b205dd91c245b.js → 147.bundle.9dac0500e2fa57626fdb.js} +0 -0
  22. /package/dist/{1604.bundle.b8b471d4b94ff2cf56ab.js → 1604.bundle.43520d5718d17febb2cf.js} +0 -0
  23. /package/dist/{1919.bundle.45c73b6e5367ff362580.js → 1919.bundle.27d4d453ec440181e449.js} +0 -0
  24. /package/dist/{213.bundle.cf999dc57ee54e1a61d0.js → 213.bundle.0d4bbf28ab97c107cdd5.js} +0 -0
  25. /package/dist/{2243.bundle.12b6ee3196121df88f63.js → 2243.bundle.873b4152dd2f550e76c6.js} +0 -0
  26. /package/dist/{2424.bundle.bfb5c29973df67ab4d1d.js → 2424.bundle.d8e65c4cd46695af1843.js} +0 -0
  27. /package/dist/{2518.bundle.b21d8c66dc8deb8ba922.js → 2518.bundle.ac5afa27c4799530d767.js} +0 -0
  28. /package/dist/{4113.bundle.6849f66f615847ada125.js → 4113.bundle.bebb8ac4abb95780b383.js} +0 -0
  29. /package/dist/{414.bundle.24a6ae428cbbec6fac72.js → 414.bundle.401bcf7a053bec6d5b32.js} +0 -0
  30. /package/dist/{5457.bundle.1b6c9d9754568061510c.js → 5457.bundle.f137a9e71ccf98addfbf.js} +0 -0
  31. /package/dist/{5485.bundle.8e456ebcf976c9c50dc3.js → 5485.bundle.08a4230790c12a80eb29.js} +0 -0
  32. /package/dist/{6027.bundle.5be91623f59d577abbd4.js → 6027.bundle.2a306549492ad8e7c2cd.js} +0 -0
  33. /package/dist/{6201.bundle.c59a4ef10b5d2126f3fe.js → 6201.bundle.d06a18bf366ae85c52b2.js} +0 -0
  34. /package/dist/{6991.bundle.e3e4ba73befe78136d84.js → 6991.bundle.1a945d91824788fde106.js} +0 -0
  35. /package/dist/{7431.bundle.ad1982d7c54a5931d409.js → 7431.bundle.be686be30c718b6f0165.js} +0 -0
  36. /package/dist/{7639.bundle.4fc45f7230e0fa936753.js → 7639.bundle.75968faa6648c318a4db.js} +0 -0
  37. /package/dist/{810.bundle.d472e7b39cb1da8d5c02.js → 810.bundle.d5ba529e18a59343a305.js} +0 -0
  38. /package/dist/{85.bundle.ca9e53b4f5669c6af047.js → 85.bundle.9e0a56a0cc52c4656d85.js} +0 -0
  39. /package/dist/{8558.bundle.ed93f8a5a7b3ea9acfce.js → 8558.bundle.226b7ea0dbfc9168e743.js} +0 -0
  40. /package/dist/{934.bundle.9445c5082a67dba7e121.js → 934.bundle.939f1fec0da4d0d82572.js} +0 -0
  41. /package/dist/{9862.bundle.e2c4c129f7907500b840.js → 9862.bundle.cb4de0892ea411293655.js} +0 -0
@@ -2846,6 +2846,29 @@ function annotationRemovedListener(evt) {
2846
2846
 
2847
2847
 
2848
2848
 
2849
+ /***/ }),
2850
+
2851
+ /***/ 16028:
2852
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2853
+
2854
+ "use strict";
2855
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2856
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
2857
+ /* harmony export */ });
2858
+ /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82056);
2859
+
2860
+ const segmentationRemovedListener = function (evt) {
2861
+ const { segmentationId } = evt.detail;
2862
+ const annotationsToRemove = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_0__.getAllAnnotations)().filter((annotation) => segmentationId ===
2863
+ annotation?.data?.segmentation
2864
+ ?.segmentationId);
2865
+ annotationsToRemove.forEach((annotation) => {
2866
+ (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_0__.removeAnnotation)(annotation.annotationUID);
2867
+ });
2868
+ };
2869
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (segmentationRemovedListener);
2870
+
2871
+
2849
2872
  /***/ }),
2850
2873
 
2851
2874
  /***/ 44150:
@@ -3016,6 +3039,8 @@ __webpack_require__.r(__webpack_exports__);
3016
3039
  /* harmony import */ var _stateManagement_segmentation_SegmentationStateManager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59475);
3017
3040
  /* harmony import */ var _eventListeners_segmentation_segmentationRepresentationModifiedListener__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(44150);
3018
3041
  /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(36625);
3042
+ /* harmony import */ var _eventListeners_segmentation_segmentationRemovedEventListener__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(16028);
3043
+
3019
3044
 
3020
3045
 
3021
3046
 
@@ -3074,16 +3099,19 @@ function _addCornerstoneToolsEventListeners() {
3074
3099
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_DATA_MODIFIED, _eventListeners__WEBPACK_IMPORTED_MODULE_5__/* .segmentationDataModifiedEventListener */ .qI);
3075
3100
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_REPRESENTATION_MODIFIED, _eventListeners_segmentation_segmentationRepresentationModifiedListener__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A);
3076
3101
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_REPRESENTATION_ADDED, _eventListeners_segmentation_segmentationRepresentationModifiedListener__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A);
3102
+ _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_REMOVED, _eventListeners_segmentation_segmentationRemovedEventListener__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .A);
3077
3103
  }
3078
3104
  function _removeCornerstoneToolsEventListeners() {
3079
3105
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.ANNOTATION_COMPLETED, _eventListeners__WEBPACK_IMPORTED_MODULE_5__/* .annotationCompletedListener */ .tQ);
3080
3106
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.ANNOTATION_MODIFIED, _eventListeners__WEBPACK_IMPORTED_MODULE_5__/* .annotationModifiedListener */ .nm);
3081
3107
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.ANNOTATION_SELECTION_CHANGE, _eventListeners__WEBPACK_IMPORTED_MODULE_5__/* .annotationSelectionListener */ .ge);
3082
3108
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.ANNOTATION_SELECTION_CHANGE, _eventListeners__WEBPACK_IMPORTED_MODULE_5__/* .annotationSelectionListener */ .ge);
3109
+ _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.ANNOTATION_REMOVED, _eventListeners__WEBPACK_IMPORTED_MODULE_5__/* .annotationRemovedListener */ .Gg);
3083
3110
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_MODIFIED, _eventListeners__WEBPACK_IMPORTED_MODULE_5__/* .segmentationModifiedListener */ .sp);
3084
3111
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_DATA_MODIFIED, _eventListeners__WEBPACK_IMPORTED_MODULE_5__/* .segmentationDataModifiedEventListener */ .qI);
3085
3112
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_REPRESENTATION_MODIFIED, _eventListeners_segmentation_segmentationRepresentationModifiedListener__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A);
3086
3113
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_REPRESENTATION_ADDED, _eventListeners_segmentation_segmentationRepresentationModifiedListener__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A);
3114
+ _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_2__.Events.SEGMENTATION_REMOVED, _eventListeners_segmentation_segmentationRemovedEventListener__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .A);
3087
3115
  }
3088
3116
  /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (init)));
3089
3117
 
@@ -5487,23 +5515,6 @@ function getNextColorLUTIndex() {
5487
5515
  }
5488
5516
 
5489
5517
 
5490
- /***/ }),
5491
-
5492
- /***/ 33283:
5493
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5494
-
5495
- "use strict";
5496
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5497
- /* harmony export */ T: () => (/* binding */ getSegmentation)
5498
- /* harmony export */ });
5499
- /* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
5500
-
5501
- function getSegmentation(segmentationId) {
5502
- const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
5503
- return segmentationStateManager.getSegmentation(segmentationId);
5504
- }
5505
-
5506
-
5507
5518
  /***/ }),
5508
5519
 
5509
5520
  /***/ 93210:
@@ -6194,8 +6205,8 @@ function internalAddSegmentationRepresentation(viewportId, representationInput)
6194
6205
  if (segmentKeys.length > 0) {
6195
6206
  firstSegmentIndex = segmentKeys.map((k) => Number(k)).sort()[0];
6196
6207
  }
6208
+ (0,_segmentIndex__WEBPACK_IMPORTED_MODULE_6__.setActiveSegmentIndex)(segmentationId, firstSegmentIndex);
6197
6209
  }
6198
- (0,_segmentIndex__WEBPACK_IMPORTED_MODULE_6__.setActiveSegmentIndex)(segmentationId, firstSegmentIndex);
6199
6210
  }
6200
6211
  if (representationInput.type === _enums__WEBPACK_IMPORTED_MODULE_2__.SegmentationRepresentations.Contour) {
6201
6212
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* .triggerAnnotationRenderForViewportIds */ .t)([viewportId]);
@@ -8832,7 +8843,8 @@ __webpack_require__.r(__webpack_exports__);
8832
8843
  /* harmony export */ createSlabThicknessSynchronizer: () => (/* reexport safe */ _synchronizers_createSlabThicknessSynchronizer__WEBPACK_IMPORTED_MODULE_5__.A),
8833
8844
  /* harmony export */ createStackImageSynchronizer: () => (/* binding */ createStackImageSynchronizer),
8834
8845
  /* harmony export */ createVOISynchronizer: () => (/* reexport safe */ _synchronizers_createVOISynchronizer__WEBPACK_IMPORTED_MODULE_2__.A),
8835
- /* harmony export */ createZoomPanSynchronizer: () => (/* reexport safe */ _synchronizers_createZoomPanSynchronizer__WEBPACK_IMPORTED_MODULE_3__.A)
8846
+ /* harmony export */ createZoomPanSynchronizer: () => (/* reexport safe */ _synchronizers_createZoomPanSynchronizer__WEBPACK_IMPORTED_MODULE_3__.A),
8847
+ /* harmony export */ imageSliceSyncCallback: () => (/* reexport safe */ _callbacks_imageSliceSyncCallback__WEBPACK_IMPORTED_MODULE_6__.A)
8836
8848
  /* harmony export */ });
8837
8849
  /* harmony import */ var _synchronizers_createCameraPositionSynchronizer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90839);
8838
8850
  /* harmony import */ var _synchronizers_createPresentationViewSynchronizer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31130);
@@ -8840,6 +8852,8 @@ __webpack_require__.r(__webpack_exports__);
8840
8852
  /* harmony import */ var _synchronizers_createZoomPanSynchronizer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3889);
8841
8853
  /* harmony import */ var _synchronizers_createImageSliceSynchronizer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76266);
8842
8854
  /* harmony import */ var _synchronizers_createSlabThicknessSynchronizer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7137);
8855
+ /* harmony import */ var _callbacks_imageSliceSyncCallback__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(69877);
8856
+
8843
8857
 
8844
8858
 
8845
8859
 
@@ -9043,7 +9057,7 @@ function createZoomPanSynchronizer(synchronizerName) {
9043
9057
  const MAGNIFY_CLASSNAME = 'advancedMagnifyTool';
9044
9058
  const MAGNIFY_VIEWPORT_INITIAL_RADIUS = 125;
9045
9059
  const { Events: csEvents } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.Enums;
9046
- const isSegmentation = (actor) => actor.uid !== actor.referencedId;
9060
+ const isSegmentation = (actor) => !!actor.representationUID;
9047
9061
  var AdvancedMagnifyToolActions;
9048
9062
  (function (AdvancedMagnifyToolActions) {
9049
9063
  AdvancedMagnifyToolActions["ShowZoomFactorsList"] = "showZoomFactorsList";
@@ -9770,7 +9784,7 @@ class AdvancedMagnifyViewport {
9770
9784
  const actors = sourceViewport.getActors();
9771
9785
  const volumeInputArray = actors
9772
9786
  .filter((actor) => !isSegmentation(actor))
9773
- .map((actor) => ({ volumeId: actor.uid }));
9787
+ .map((actor) => ({ volumeId: actor.referencedId }));
9774
9788
  magnifyViewport.setVolumes(volumeInputArray).then(() => {
9775
9789
  this._isViewportReady = true;
9776
9790
  this.update();
@@ -10103,6 +10117,11 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
10103
10117
  referenceLinesCenterGapRatio: null,
10104
10118
  filterActorUIDsToSetSlabThickness: [],
10105
10119
  slabThicknessBlendMode: _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__.Enums.BlendModes.MAXIMUM_INTENSITY_BLEND,
10120
+ centerPoint: {
10121
+ enabled: false,
10122
+ color: 'rgba(255, 255, 0, 0.5)',
10123
+ size: 2,
10124
+ },
10106
10125
  mobile: {
10107
10126
  enabled: false,
10108
10127
  opacity: 0.8,
@@ -10729,6 +10748,17 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
10729
10748
  const circleUID = '0';
10730
10749
  (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, referenceColorCoordinates, circleRadius, { color, fill: color });
10731
10750
  }
10751
+ if (this.configuration.centerPoint?.enabled) {
10752
+ const defaultColor = 'rgba(255, 255, 0, 0.5)';
10753
+ const defaultSize = 2;
10754
+ const maxAllowedSize = 5;
10755
+ const centerPointColor = this.configuration.centerPoint.color || defaultColor;
10756
+ const centerPointSize = Math.min(this.configuration.centerPoint.size || defaultSize, maxAllowedSize);
10757
+ (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, 'centerPoint', crosshairCenterCanvas, centerPointSize, {
10758
+ color: centerPointColor,
10759
+ fill: centerPointColor,
10760
+ });
10761
+ }
10732
10762
  return renderStatus;
10733
10763
  };
10734
10764
  this._getAnnotations = (enabledElement) => {
@@ -21996,6 +22026,7 @@ class HeightTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationTool */
21996
22026
  (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__.removeAnnotation)(annotation.annotationUID);
21997
22027
  }
21998
22028
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .A)(viewportIdsToRender);
22029
+ this.doneEditMemo();
21999
22030
  if (newAnnotation) {
22000
22031
  (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__.triggerAnnotationCompleted)(annotation);
22001
22032
  }
@@ -22006,8 +22037,9 @@ class HeightTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationTool */
22006
22037
  this.isDrawing = true;
22007
22038
  const eventDetail = evt.detail;
22008
22039
  const { element } = eventDetail;
22009
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
22040
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation } = this.editData;
22010
22041
  const { data } = annotation;
22042
+ this.createMemo(element, annotation, { newAnnotation });
22011
22043
  if (movingTextBox) {
22012
22044
  const { deltaPoints } = eventDetail;
22013
22045
  const worldPosDelta = deltaPoints.world;
@@ -23516,20 +23548,18 @@ class LivewireContourSegmentationTool extends _LivewireContourTool__WEBPACK_IMPO
23516
23548
  /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74347);
23517
23549
  /* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85204);
23518
23550
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99737);
23519
- /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7001);
23520
- /* harmony import */ var _eventDispatchers_shared_getMouseModifier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76910);
23521
- /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95527);
23522
- /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(58640);
23523
- /* harmony import */ var _utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(98013);
23524
- /* harmony import */ var _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(93126);
23525
- /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(44049);
23526
- /* harmony import */ var _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(78044);
23527
- /* harmony import */ var _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(38776);
23528
- /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(60810);
23529
- /* harmony import */ var _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(36320);
23530
- /* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(473);
23531
- /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(53860);
23532
-
23551
+ /* harmony import */ var _eventDispatchers_shared_getMouseModifier__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76910);
23552
+ /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95527);
23553
+ /* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(58640);
23554
+ /* harmony import */ var _utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(98013);
23555
+ /* harmony import */ var _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(93126);
23556
+ /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(44049);
23557
+ /* harmony import */ var _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(78044);
23558
+ /* harmony import */ var _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(38776);
23559
+ /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(60810);
23560
+ /* harmony import */ var _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(36320);
23561
+ /* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(473);
23562
+ /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(53860);
23533
23563
 
23534
23564
 
23535
23565
 
@@ -23549,7 +23579,7 @@ class LivewireContourSegmentationTool extends _LivewireContourTool__WEBPACK_IMPO
23549
23579
 
23550
23580
 
23551
23581
  const CLICK_CLOSE_CURVE_SQR_DIST = 10 ** 2;
23552
- class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A {
23582
+ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .A {
23553
23583
  static { this.toolName = 'LivewireContour'; }
23554
23584
  constructor(toolProps = {}, defaultToolProps = {
23555
23585
  supportedInteractionTypes: ['Mouse', 'Touch'],
@@ -23590,7 +23620,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23590
23620
  let startPoint = canvasPoints[canvasPoints.length - 1];
23591
23621
  for (let i = 0; i < canvasPoints.length; i++) {
23592
23622
  const endPoint = canvasPoints[i];
23593
- const distanceToPointSquared = _utilities_math__WEBPACK_IMPORTED_MODULE_8__.lineSegment.distanceToPointSquared(startPoint, endPoint, canvasCoords);
23623
+ const distanceToPointSquared = _utilities_math__WEBPACK_IMPORTED_MODULE_7__.lineSegment.distanceToPointSquared(startPoint, endPoint, canvasCoords);
23594
23624
  if (distanceToPointSquared <= proximitySquared) {
23595
23625
  return true;
23596
23626
  }
@@ -23602,7 +23632,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23602
23632
  const eventDetail = evt.detail;
23603
23633
  const { element } = eventDetail;
23604
23634
  annotation.highlighted = true;
23605
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_15__.getViewportIdsWithToolToRender)(element, this.getToolName());
23635
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_14__.getViewportIdsWithToolToRender)(element, this.getToolName());
23606
23636
  this.editData = {
23607
23637
  annotation,
23608
23638
  viewportIdsToRender,
@@ -23611,7 +23641,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23611
23641
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
23612
23642
  const { renderingEngine } = enabledElement;
23613
23643
  this._activateModify(element);
23614
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
23644
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(viewportIdsToRender);
23615
23645
  evt.preventDefault();
23616
23646
  };
23617
23647
  this.handleSelectedCallback = (evt, annotation, handle) => {
@@ -23628,7 +23658,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23628
23658
  const { points } = data.handles;
23629
23659
  handleIndex = points.findIndex((p) => p === handle);
23630
23660
  }
23631
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_15__.getViewportIdsWithToolToRender)(element, this.getToolName());
23661
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_14__.getViewportIdsWithToolToRender)(element, this.getToolName());
23632
23662
  this.editData = {
23633
23663
  annotation,
23634
23664
  viewportIdsToRender,
@@ -23638,7 +23668,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23638
23668
  this._activateModify(element);
23639
23669
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
23640
23670
  const { renderingEngine } = enabledElement;
23641
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
23671
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(viewportIdsToRender);
23642
23672
  evt.preventDefault();
23643
23673
  };
23644
23674
  this._endCallback = (evt, clearAnnotation = false) => {
@@ -23650,17 +23680,16 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23650
23680
  data.handles.activeHandleIndex = null;
23651
23681
  this._deactivateModify(element);
23652
23682
  this._deactivateDraw(element);
23653
- (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__.resetElementCursor)(element);
23654
23683
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
23655
23684
  if ((this.isHandleOutsideImage &&
23656
23685
  this.configuration.preventHandleOutsideImage) ||
23657
23686
  clearAnnotation) {
23658
23687
  (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.removeAnnotation)(annotation.annotationUID);
23659
23688
  this.clearEditData();
23660
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
23689
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(viewportIdsToRender);
23661
23690
  return;
23662
23691
  }
23663
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
23692
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(viewportIdsToRender);
23664
23693
  const changeType = newAnnotation
23665
23694
  ? _enums__WEBPACK_IMPORTED_MODULE_5__.ChangeTypes.Completed
23666
23695
  : _enums__WEBPACK_IMPORTED_MODULE_5__.ChangeTypes.HandlesUpdated;
@@ -23669,10 +23698,10 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23669
23698
  };
23670
23699
  this.triggerChangeEvent = (annotation, enabledElement, changeType = _enums__WEBPACK_IMPORTED_MODULE_5__.ChangeTypes.StatsUpdated, contourHoleProcessingEnabled = false) => {
23671
23700
  if (changeType === _enums__WEBPACK_IMPORTED_MODULE_5__.ChangeTypes.Completed) {
23672
- (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_12__.triggerContourAnnotationCompleted)(annotation, contourHoleProcessingEnabled);
23701
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_11__.triggerContourAnnotationCompleted)(annotation, contourHoleProcessingEnabled);
23673
23702
  }
23674
23703
  else {
23675
- (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_12__.triggerAnnotationModified)(annotation, enabledElement.viewport.element, changeType);
23704
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_11__.triggerAnnotationModified)(annotation, enabledElement.viewport.element, changeType);
23676
23705
  }
23677
23706
  };
23678
23707
  this._mouseDownCallback = (evt) => {
@@ -23703,7 +23732,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23703
23732
  const controlPoint = controlPoints[i];
23704
23733
  const worldControlPoint = sliceToWorld(controlPoint);
23705
23734
  const canvasControlPoint = viewport.worldToCanvas(worldControlPoint);
23706
- const distSquared = _utilities_math__WEBPACK_IMPORTED_MODULE_8__.point.distanceToPointSquared(canvasPos, canvasControlPoint);
23735
+ const distSquared = _utilities_math__WEBPACK_IMPORTED_MODULE_7__.point.distanceToPointSquared(canvasPos, canvasControlPoint);
23707
23736
  if (distSquared <= CLICK_CLOSE_CURVE_SQR_DIST &&
23708
23737
  distSquared < closestHandlePoint.distSquared) {
23709
23738
  closestHandlePoint.distSquared = distSquared;
@@ -23716,7 +23745,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23716
23745
  }
23717
23746
  const { snapHandleNearby } = this.configuration;
23718
23747
  if (snapHandleNearby && !this.editData.closed) {
23719
- const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__/* .LivewirePath */ .j();
23748
+ const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
23720
23749
  const snapPoint = this.scissors.findMinNearby(worldToSlice(worldPosOriginal), 1);
23721
23750
  const pathPoints = this.scissors.findPathToPoint(snapPoint);
23722
23751
  currentPath.addPoints(pathPoints);
@@ -23731,7 +23760,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23731
23760
  annotation.data.handles.points.push(sliceToWorld(lastPoint));
23732
23761
  this.scissors.startSearch(worldToSlice(worldPos));
23733
23762
  annotation.invalidated = true;
23734
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
23763
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(viewportIdsToRender);
23735
23764
  if (this.editData.closed) {
23736
23765
  this.updateAnnotation(this.editData.confirmedPath);
23737
23766
  this._endCallback(evt);
@@ -23742,7 +23771,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23742
23771
  const { element, currentPoints } = evt.detail;
23743
23772
  const { world: worldPos, canvas: canvasPos } = currentPoints;
23744
23773
  const { renderingEngine } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
23745
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_15__.getViewportIdsWithToolToRender)(element, this.getToolName());
23774
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_14__.getViewportIdsWithToolToRender)(element, this.getToolName());
23746
23775
  this.editData.lastCanvasPoint = canvasPos;
23747
23776
  const { width: imgWidth, height: imgHeight } = this.scissors;
23748
23777
  const { worldToSlice } = this.editData;
@@ -23754,11 +23783,11 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23754
23783
  return;
23755
23784
  }
23756
23785
  const pathPoints = this.scissors.findPathToPoint(slicePoint);
23757
- const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__/* .LivewirePath */ .j();
23786
+ const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
23758
23787
  currentPath.addPoints(pathPoints);
23759
23788
  currentPath.prependPath(this.editData.confirmedPath);
23760
23789
  this.editData.currentPath = currentPath;
23761
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
23790
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(viewportIdsToRender);
23762
23791
  evt.preventDefault();
23763
23792
  };
23764
23793
  this._dragCallback = (evt) => {
@@ -23789,7 +23818,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23789
23818
  this.editData.hasMoved = true;
23790
23819
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
23791
23820
  const { renderingEngine } = enabledElement;
23792
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
23821
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(viewportIdsToRender);
23793
23822
  };
23794
23823
  this.cancel = (element) => {
23795
23824
  if (!this.isDrawing) {
@@ -23798,12 +23827,11 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23798
23827
  this.isDrawing = false;
23799
23828
  this._deactivateDraw(element);
23800
23829
  this._deactivateModify(element);
23801
- (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__.resetElementCursor)(element);
23802
23830
  const { annotation, viewportIdsToRender, newAnnotation } = this.editData;
23803
23831
  if (newAnnotation) {
23804
23832
  (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.removeAnnotation)(annotation.annotationUID);
23805
23833
  }
23806
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(viewportIdsToRender);
23834
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(viewportIdsToRender);
23807
23835
  this.doneEditMemo();
23808
23836
  this.scissors = null;
23809
23837
  return annotation.annotationUID;
@@ -23874,8 +23902,8 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23874
23902
  const deltaInX = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.distance */ .eR.distance(originalWorldPoint, deltaXPoint);
23875
23903
  const deltaInY = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.distance */ .eR.distance(originalWorldPoint, deltaYPoint);
23876
23904
  const { imageData } = image;
23877
- const { scale, areaUnit } = (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.getCalibratedLengthUnitsAndScale)(image, () => {
23878
- const { maxX: canvasMaxX, maxY: canvasMaxY, minX: canvasMinX, minY: canvasMinY, } = _utilities_math__WEBPACK_IMPORTED_MODULE_8__.polyline.getAABB(canvasCoordinates);
23905
+ const { scale, areaUnit } = (0,_utilities__WEBPACK_IMPORTED_MODULE_17__.getCalibratedLengthUnitsAndScale)(image, () => {
23906
+ const { maxX: canvasMaxX, maxY: canvasMaxY, minX: canvasMinX, minY: canvasMinY, } = _utilities_math__WEBPACK_IMPORTED_MODULE_7__.polyline.getAABB(canvasCoordinates);
23879
23907
  const topLeftBBWorld = viewport.canvasToWorld([
23880
23908
  canvasMinX,
23881
23909
  canvasMinY,
@@ -23888,7 +23916,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23888
23916
  const bottomRightBBIndex = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.transformWorldToIndex(imageData, bottomRightBBWorld);
23889
23917
  return [topLeftBBIndex, bottomRightBBIndex];
23890
23918
  });
23891
- let area = _utilities_math__WEBPACK_IMPORTED_MODULE_8__.polyline.getArea(canvasCoordinates) / scale / scale;
23919
+ let area = _utilities_math__WEBPACK_IMPORTED_MODULE_7__.polyline.getArea(canvasCoordinates) / scale / scale;
23892
23920
  area *= deltaInX * deltaInY;
23893
23921
  cachedStats[targetId] = {
23894
23922
  Modality: metadata.Modality,
@@ -23915,7 +23943,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23915
23943
  }
23916
23944
  const canvasCoordinates = data.handles.points.map((p) => viewport.worldToCanvas(p));
23917
23945
  if (!data.handles.textBox.hasMoved) {
23918
- const canvasTextBoxCoords = (0,_utilities_drawing__WEBPACK_IMPORTED_MODULE_17__.getTextBoxCoordsCanvas)(canvasCoordinates);
23946
+ const canvasTextBoxCoords = (0,_utilities_drawing__WEBPACK_IMPORTED_MODULE_16__.getTextBoxCoordsCanvas)(canvasCoordinates);
23919
23947
  data.handles.textBox.worldPosition =
23920
23948
  viewport.canvasToWorld(canvasTextBoxCoords);
23921
23949
  }
@@ -23941,7 +23969,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23941
23969
  };
23942
23970
  (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.eventTarget, eventType, eventDetail);
23943
23971
  };
23944
- this._throttledCalculateCachedStats = (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.throttle)(this._calculateCachedStats, 100, { trailing: true });
23972
+ this._throttledCalculateCachedStats = (0,_utilities__WEBPACK_IMPORTED_MODULE_17__.throttle)(this._calculateCachedStats, 100, { trailing: true });
23945
23973
  }
23946
23974
  setupBaseEditData(worldPos, element, annotation, nextPos, contourHoleProcessingEnabled) {
23947
23975
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
@@ -23986,19 +24014,19 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
23986
24014
  scalarData = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.convertToGrayscale(scalarData, width, height);
23987
24015
  const { voiRange } = viewport.getProperties();
23988
24016
  const startPos = worldToSlice(worldPos);
23989
- this.scissors = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_13__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
24017
+ this.scissors = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_12__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
23990
24018
  if (nextPos) {
23991
- this.scissorsNext = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_13__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
24019
+ this.scissorsNext = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_12__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
23992
24020
  this.scissorsNext.startSearch(worldToSlice(nextPos));
23993
24021
  }
23994
24022
  this.scissors.startSearch(startPos);
23995
24023
  const newAnnotation = !nextPos;
23996
- const confirmedPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__/* .LivewirePath */ .j();
23997
- const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__/* .LivewirePath */ .j();
23998
- const currentPathNext = newAnnotation ? undefined : new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__/* .LivewirePath */ .j();
24024
+ const confirmedPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
24025
+ const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
24026
+ const currentPathNext = newAnnotation ? undefined : new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
23999
24027
  confirmedPath.addPoint(startPos);
24000
24028
  confirmedPath.addControlPoint(startPos);
24001
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_15__.getViewportIdsWithToolToRender)(element, this.getToolName());
24029
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_14__.getViewportIdsWithToolToRender)(element, this.getToolName());
24002
24030
  const lastCanvasPoint = viewport.worldToCanvas(worldPos);
24003
24031
  this.editData = {
24004
24032
  annotation,
@@ -24021,13 +24049,13 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
24021
24049
  const { currentPoints, element } = eventDetail;
24022
24050
  const { world: worldPos } = currentPoints;
24023
24051
  const annotation = this.createAnnotation(evt);
24024
- const contourHoleProcessingEnabled = (0,_eventDispatchers_shared_getMouseModifier__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)(evt.detail.event) ===
24052
+ const contourHoleProcessingEnabled = (0,_eventDispatchers_shared_getMouseModifier__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)(evt.detail.event) ===
24025
24053
  this.configuration.contourHoleAdditionModifierKey;
24026
24054
  this.setupBaseEditData(worldPos, element, annotation, undefined, contourHoleProcessingEnabled);
24027
24055
  this.addAnnotation(annotation, element);
24028
24056
  this._activateDraw(element);
24029
24057
  evt.preventDefault();
24030
- (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(this.editData.viewportIdsToRender);
24058
+ (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(this.editData.viewportIdsToRender);
24031
24059
  return annotation;
24032
24060
  }
24033
24061
  clearEditData() {
@@ -24045,11 +24073,11 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
24045
24073
  if (!this.editData?.confirmedPathNext) {
24046
24074
  this.setupBaseEditData(previousHandle, element, annotation, nextHandle);
24047
24075
  const { polyline } = data.contour;
24048
- const confirmedPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__/* .LivewirePath */ .j();
24049
- const confirmedPathNext = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__/* .LivewirePath */ .j();
24076
+ const confirmedPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
24077
+ const confirmedPathNext = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
24050
24078
  const { worldToSlice } = this.editData;
24051
- const previousIndex = (0,_utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A)(annotation, handleIndex - 1);
24052
- const nextIndex = (0,_utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A)(annotation, handleIndex + 1);
24079
+ const previousIndex = (0,_utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(annotation, handleIndex - 1);
24080
+ const nextIndex = (0,_utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(annotation, handleIndex + 1);
24053
24081
  if (nextIndex === -1 || previousIndex === -1) {
24054
24082
  throw new Error(`Can't find handle index ${nextIndex === -1 && nextHandle} ${previousIndex === -1 && previousHandle}`);
24055
24083
  }
@@ -24082,7 +24110,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
24082
24110
  handlePoints[handleIndex] = sliceToWorld(slicePos);
24083
24111
  const pathPointsLeft = scissors.findPathToPoint(slicePos);
24084
24112
  const pathPointsRight = this.scissorsNext.findPathToPoint(slicePos);
24085
- const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_14__/* .LivewirePath */ .j();
24113
+ const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
24086
24114
  currentPath.prependPath(editData.confirmedPath);
24087
24115
  if (handleIndex !== 0) {
24088
24116
  currentPath.addPoints(pathPointsLeft);
@@ -24168,7 +24196,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
24168
24196
  if (imagePoints.length > 1) {
24169
24197
  imagePoints = [...imagePoints, imagePoints[0]];
24170
24198
  }
24171
- const targetWindingDirection = newAnnotation && closed ? _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_11__/* .ContourWindingDirection */ .W.Clockwise : undefined;
24199
+ const targetWindingDirection = newAnnotation && closed ? _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_10__/* .ContourWindingDirection */ .W.Clockwise : undefined;
24172
24200
  this.updateContourPolyline(annotation, {
24173
24201
  points: imagePoints,
24174
24202
  closed,
@@ -24922,22 +24950,20 @@ class SplineContourSegmentationTool extends _SplineROITool__WEBPACK_IMPORTED_MOD
24922
24950
  /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74347);
24923
24951
  /* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85204);
24924
24952
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99737);
24925
- /* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7001);
24926
- /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95527);
24927
- /* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(27730);
24928
- /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(60810);
24929
- /* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(473);
24930
- /* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(4096);
24931
- /* harmony import */ var _eventDispatchers_shared_getMouseModifier__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(76910);
24932
- /* harmony import */ var _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(93126);
24933
- /* harmony import */ var _splines_CardinalSpline__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(71543);
24934
- /* harmony import */ var _splines_LinearSpline__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(63802);
24935
- /* harmony import */ var _splines_CatmullRomSpline__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(31147);
24936
- /* harmony import */ var _splines_BSpline__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(34115);
24937
- /* harmony import */ var _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(36320);
24938
- /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(53860);
24939
- /* harmony import */ var _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(56534);
24940
-
24953
+ /* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(95527);
24954
+ /* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(27730);
24955
+ /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(60810);
24956
+ /* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(473);
24957
+ /* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4096);
24958
+ /* harmony import */ var _eventDispatchers_shared_getMouseModifier__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(76910);
24959
+ /* harmony import */ var _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(93126);
24960
+ /* harmony import */ var _splines_CardinalSpline__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(71543);
24961
+ /* harmony import */ var _splines_LinearSpline__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(63802);
24962
+ /* harmony import */ var _splines_CatmullRomSpline__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(31147);
24963
+ /* harmony import */ var _splines_BSpline__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(34115);
24964
+ /* harmony import */ var _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(36320);
24965
+ /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(53860);
24966
+ /* harmony import */ var _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(56534);
24941
24967
 
24942
24968
 
24943
24969
 
@@ -24986,7 +25012,7 @@ const splineToolNames = [
24986
25012
  'BSplineROI',
24987
25013
  'CardinalSplineROI',
24988
25014
  ];
24989
- class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .A {
25015
+ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .A {
24990
25016
  static { this.toolName = 'SplineROI'; }
24991
25017
  static { this.SplineTypes = SplineTypesEnum; }
24992
25018
  static { this.Actions = SplineToolActions; }
@@ -25005,17 +25031,17 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25005
25031
  spline: {
25006
25032
  configuration: {
25007
25033
  [SplineTypesEnum.Cardinal]: {
25008
- Class: _splines_CardinalSpline__WEBPACK_IMPORTED_MODULE_14__/* .CardinalSpline */ .A,
25034
+ Class: _splines_CardinalSpline__WEBPACK_IMPORTED_MODULE_13__/* .CardinalSpline */ .A,
25009
25035
  scale: 0.5,
25010
25036
  },
25011
25037
  [SplineTypesEnum.CatmullRom]: {
25012
- Class: _splines_CatmullRomSpline__WEBPACK_IMPORTED_MODULE_16__/* .CatmullRomSpline */ .e,
25038
+ Class: _splines_CatmullRomSpline__WEBPACK_IMPORTED_MODULE_15__/* .CatmullRomSpline */ .e,
25013
25039
  },
25014
25040
  [SplineTypesEnum.Linear]: {
25015
- Class: _splines_LinearSpline__WEBPACK_IMPORTED_MODULE_15__/* .LinearSpline */ .F,
25041
+ Class: _splines_LinearSpline__WEBPACK_IMPORTED_MODULE_14__/* .LinearSpline */ .F,
25016
25042
  },
25017
25043
  [SplineTypesEnum.BSpline]: {
25018
- Class: _splines_BSpline__WEBPACK_IMPORTED_MODULE_17__/* .BSpline */ .k,
25044
+ Class: _splines_BSpline__WEBPACK_IMPORTED_MODULE_16__/* .BSpline */ .k,
25019
25045
  controlPointAdditionEnabled: false,
25020
25046
  controlPointDeletionEnabled: false,
25021
25047
  showControlPointsConnectors: true,
@@ -25065,14 +25091,14 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25065
25091
  const eventDetail = evt.detail;
25066
25092
  const { element } = eventDetail;
25067
25093
  annotation.highlighted = true;
25068
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__.getViewportIdsWithToolToRender)(element, this.getToolName());
25094
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__.getViewportIdsWithToolToRender)(element, this.getToolName());
25069
25095
  this.editData = {
25070
25096
  annotation,
25071
25097
  viewportIdsToRender,
25072
25098
  movingTextBox: false,
25073
25099
  };
25074
25100
  this._activateModify(element);
25075
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25101
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25076
25102
  evt.preventDefault();
25077
25103
  };
25078
25104
  this.handleSelectedCallback = (evt, annotation, handle) => {
@@ -25089,7 +25115,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25089
25115
  const { points } = data.handles;
25090
25116
  handleIndex = points.findIndex((p) => p === handle);
25091
25117
  }
25092
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__.getViewportIdsWithToolToRender)(element, this.getToolName());
25118
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__.getViewportIdsWithToolToRender)(element, this.getToolName());
25093
25119
  this.editData = {
25094
25120
  annotation,
25095
25121
  viewportIdsToRender,
@@ -25097,7 +25123,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25097
25123
  movingTextBox,
25098
25124
  };
25099
25125
  this._activateModify(element);
25100
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25126
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25101
25127
  evt.preventDefault();
25102
25128
  };
25103
25129
  this._endCallback = (evt) => {
@@ -25109,7 +25135,6 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25109
25135
  data.handles.activeHandleIndex = null;
25110
25136
  this._deactivateModify(element);
25111
25137
  this._deactivateDraw(element);
25112
- (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__.resetElementCursor)(element);
25113
25138
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
25114
25139
  const image = this.getTargetImageData(this.getTargetId(enabledElement.viewport));
25115
25140
  const { imageData, dimensions } = image;
@@ -25134,7 +25159,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25134
25159
  this.fireChangeOnUpdate.annotationUID = annotation.annotationUID;
25135
25160
  this.fireChangeOnUpdate.changeType = changeType;
25136
25161
  }
25137
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25162
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25138
25163
  this.doneEditMemo();
25139
25164
  this.editData = null;
25140
25165
  this.isDrawing = false;
@@ -25167,9 +25192,9 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25167
25192
  }
25168
25193
  const { element } = evt.detail;
25169
25194
  const { renderingEngine } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
25170
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__.getViewportIdsWithToolToRender)(element, this.getToolName());
25195
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__.getViewportIdsWithToolToRender)(element, this.getToolName());
25171
25196
  this.editData.lastCanvasPoint = evt.detail.currentPoints.canvas;
25172
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25197
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25173
25198
  evt.preventDefault();
25174
25199
  };
25175
25200
  this._mouseDownCallback = (evt) => {
@@ -25204,7 +25229,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25204
25229
  }
25205
25230
  data.contour.closed = data.contour.closed || closeContour;
25206
25231
  annotation.invalidated = true;
25207
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25232
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25208
25233
  if (data.contour.closed) {
25209
25234
  this._endCallback(evt);
25210
25235
  }
@@ -25241,7 +25266,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25241
25266
  this.editData.hasMoved = true;
25242
25267
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
25243
25268
  const { renderingEngine } = enabledElement;
25244
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25269
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25245
25270
  };
25246
25271
  this.triggerAnnotationCompleted = (annotation, contourHoleProcessingEnabled) => {
25247
25272
  const eventType = _enums__WEBPACK_IMPORTED_MODULE_5__.Events.ANNOTATION_COMPLETED;
@@ -25317,7 +25342,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25317
25342
  }
25318
25343
  const canvasCoordinates = data.handles.points.map((p) => viewport.worldToCanvas(p));
25319
25344
  if (!data.handles.textBox.hasMoved) {
25320
- const canvasTextBoxCoords = (0,_utilities_drawing__WEBPACK_IMPORTED_MODULE_10__.getTextBoxCoordsCanvas)(canvasCoordinates);
25345
+ const canvasTextBoxCoords = (0,_utilities_drawing__WEBPACK_IMPORTED_MODULE_9__.getTextBoxCoordsCanvas)(canvasCoordinates);
25321
25346
  data.handles.textBox.worldPosition =
25322
25347
  viewport.canvasToWorld(canvasTextBoxCoords);
25323
25348
  }
@@ -25354,8 +25379,8 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25354
25379
  const { index, point: canvasPoint } = spline.addControlPointAtU(closestPointInfo.uValue);
25355
25380
  data.handles.points.splice(index, 0, canvasToWorld(canvasPoint));
25356
25381
  annotation.invalidated = true;
25357
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__.getViewportIdsWithToolToRender)(element, this.getToolName());
25358
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25382
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__.getViewportIdsWithToolToRender)(element, this.getToolName());
25383
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25359
25384
  };
25360
25385
  this.deleteControlPointCallback = (evt, annotation) => {
25361
25386
  const splineType = annotation.data.spline.type;
@@ -25411,8 +25436,8 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25411
25436
  const deltaInX = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.distance */ .eR.distance(originalWorldPoint, deltaXPoint);
25412
25437
  const deltaInY = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.distance */ .eR.distance(originalWorldPoint, deltaYPoint);
25413
25438
  const { imageData } = image;
25414
- const { scale, areaUnit } = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_11__/* .getCalibratedLengthUnitsAndScale */ .Op)(image, () => {
25415
- const { maxX: canvasMaxX, maxY: canvasMaxY, minX: canvasMinX, minY: canvasMinY, } = _utilities_math__WEBPACK_IMPORTED_MODULE_7__.polyline.getAABB(canvasCoordinates);
25439
+ const { scale, areaUnit } = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_10__/* .getCalibratedLengthUnitsAndScale */ .Op)(image, () => {
25440
+ const { maxX: canvasMaxX, maxY: canvasMaxY, minX: canvasMinX, minY: canvasMinY, } = _utilities_math__WEBPACK_IMPORTED_MODULE_6__.polyline.getAABB(canvasCoordinates);
25416
25441
  const topLeftBBWorld = viewport.canvasToWorld([
25417
25442
  canvasMinX,
25418
25443
  canvasMinY,
@@ -25425,7 +25450,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25425
25450
  const bottomRightBBIndex = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.transformWorldToIndex(imageData, bottomRightBBWorld);
25426
25451
  return [topLeftBBIndex, bottomRightBBIndex];
25427
25452
  });
25428
- let area = _utilities_math__WEBPACK_IMPORTED_MODULE_7__.polyline.getArea(canvasCoordinates) / scale / scale;
25453
+ let area = _utilities_math__WEBPACK_IMPORTED_MODULE_6__.polyline.getArea(canvasCoordinates) / scale / scale;
25429
25454
  area *= deltaInX * deltaInY;
25430
25455
  cachedStats[targetId] = {
25431
25456
  Modality: metadata.Modality,
@@ -25440,7 +25465,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25440
25465
  }
25441
25466
  return cachedStats;
25442
25467
  };
25443
- this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(this._calculateCachedStats, 100, { trailing: true });
25468
+ this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)(this._calculateCachedStats, 100, { trailing: true });
25444
25469
  this.annotationCompletedBinded = this.annotationCompleted.bind(this);
25445
25470
  }
25446
25471
  annotationCompleted(evt) {
@@ -25450,7 +25475,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25450
25475
  !this.isContourSegmentationTool()) {
25451
25476
  return;
25452
25477
  }
25453
- (0,_utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_20__.convertContourSegmentationAnnotation)(annotation);
25478
+ (0,_utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_19__.convertContourSegmentationAnnotation)(annotation);
25454
25479
  }
25455
25480
  initializeListeners() {
25456
25481
  _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_5__.Events.ANNOTATION_COMPLETED, this.annotationCompletedBinded);
@@ -25471,12 +25496,12 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25471
25496
  const eventDetail = evt.detail;
25472
25497
  const { currentPoints, element } = eventDetail;
25473
25498
  const { canvas: canvasPos } = currentPoints;
25474
- const contourHoleProcessingEnabled = (0,_eventDispatchers_shared_getMouseModifier__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .A)(evt.detail.event) ===
25499
+ const contourHoleProcessingEnabled = (0,_eventDispatchers_shared_getMouseModifier__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .A)(evt.detail.event) ===
25475
25500
  this.configuration.contourHoleAdditionModifierKey;
25476
25501
  const annotation = this.createAnnotation(evt);
25477
25502
  this.isDrawing = true;
25478
25503
  this.addAnnotation(annotation, element);
25479
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__.getViewportIdsWithToolToRender)(element, this.getToolName());
25504
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__.getViewportIdsWithToolToRender)(element, this.getToolName());
25480
25505
  this.editData = {
25481
25506
  annotation,
25482
25507
  viewportIdsToRender,
@@ -25488,7 +25513,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25488
25513
  };
25489
25514
  this._activateDraw(element);
25490
25515
  evt.preventDefault();
25491
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25516
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25492
25517
  return annotation;
25493
25518
  }
25494
25519
  cancel(element) {
@@ -25498,7 +25523,6 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25498
25523
  this.isDrawing = false;
25499
25524
  this._deactivateDraw(element);
25500
25525
  this._deactivateModify(element);
25501
- (0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__.resetElementCursor)(element);
25502
25526
  const { annotation, viewportIdsToRender, newAnnotation } = this.editData;
25503
25527
  if (newAnnotation) {
25504
25528
  (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.removeAnnotation)(annotation.annotationUID);
@@ -25506,7 +25530,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25506
25530
  super.cancelAnnotation(annotation);
25507
25531
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
25508
25532
  const { renderingEngine } = enabledElement;
25509
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25533
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25510
25534
  this.editData = null;
25511
25535
  return annotation.annotationUID;
25512
25536
  }
@@ -25541,7 +25565,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25541
25565
  this.updateContourPolyline(annotation, {
25542
25566
  points: splinePolylineCanvas,
25543
25567
  closed: data.contour.closed,
25544
- targetWindingDirection: _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_13__/* .ContourWindingDirection */ .W.Clockwise,
25568
+ targetWindingDirection: _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_12__/* .ContourWindingDirection */ .W.Clockwise,
25545
25569
  }, viewport, { updateWindingDirection: data.contour.closed });
25546
25570
  });
25547
25571
  super.renderAnnotationInstance(renderContext);
@@ -25678,9 +25702,9 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25678
25702
  controlPoints.splice(controlPointIndex, 1);
25679
25703
  }
25680
25704
  const { renderingEngine } = enabledElement;
25681
- const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__.getViewportIdsWithToolToRender)(element, this.getToolName());
25705
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__.getViewportIdsWithToolToRender)(element, this.getToolName());
25682
25706
  annotation.invalidated = true;
25683
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25707
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
25684
25708
  }
25685
25709
  _isSplineROIAnnotation(annotation) {
25686
25710
  return !!annotation.data?.spline;
@@ -25713,7 +25737,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25713
25737
  spline.resolution = resolution;
25714
25738
  annotation.invalidated = true;
25715
25739
  }
25716
- if (spline instanceof _splines_CardinalSpline__WEBPACK_IMPORTED_MODULE_14__/* .CardinalSpline */ .A &&
25740
+ if (spline instanceof _splines_CardinalSpline__WEBPACK_IMPORTED_MODULE_13__/* .CardinalSpline */ .A &&
25717
25741
  !spline.fixedScale &&
25718
25742
  scale !== undefined &&
25719
25743
  spline.scale !== scale) {
@@ -25767,7 +25791,7 @@ class SplineROITool extends _base_ContourSegmentationBaseTool__WEBPACK_IMPORTED_
25767
25791
  },
25768
25792
  };
25769
25793
  (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.addAnnotation)(annotation, viewport.element);
25770
- (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.triggerAnnotationRenderForViewportIds)([viewport.id]);
25794
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_18__.triggerAnnotationRenderForViewportIds)([viewport.id]);
25771
25795
  }; }
25772
25796
  }
25773
25797
  function defaultGetTextLines(data, targetId) {
@@ -29427,7 +29451,6 @@ function removeRepresentation(viewportId, segmentationId, renderImmediate = fals
29427
29451
  return;
29428
29452
  }
29429
29453
  const { viewport } = enabledElement;
29430
- (0,_removeContourFromElement__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(viewportId, segmentationId);
29431
29454
  if (!renderImmediate) {
29432
29455
  return;
29433
29456
  }
@@ -39243,9 +39266,7 @@ class InstanceVolumetricCalculator extends _math_basic_BasicStatsCalculator__WEB
39243
39266
  /* harmony export */ });
39244
39267
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77609);
39245
39268
  /* harmony import */ var _triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58640);
39246
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15327);
39247
- /* harmony import */ var _getBrushToolInstances__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14957);
39248
-
39269
+ /* harmony import */ var _getBrushToolInstances__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14957);
39249
39270
 
39250
39271
 
39251
39272
 
@@ -39254,19 +39275,16 @@ function setBrushSizeForToolGroup(toolGroupId, brushSize, toolName) {
39254
39275
  if (toolGroup === undefined) {
39255
39276
  return;
39256
39277
  }
39257
- const brushBasedToolInstances = (0,_getBrushToolInstances__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .n)(toolGroupId, toolName);
39278
+ const brushBasedToolInstances = (0,_getBrushToolInstances__WEBPACK_IMPORTED_MODULE_2__/* .getBrushToolInstances */ .n)(toolGroupId, toolName);
39258
39279
  brushBasedToolInstances.forEach((tool) => {
39259
- tool.configuration.brushSize = brushSize;
39280
+ const minRadius = tool.configuration.minRadius;
39281
+ const maxRadius = tool.configuration.maxRadius;
39282
+ let newBrushSize = minRadius ? Math.max(brushSize, minRadius) : brushSize;
39283
+ newBrushSize = maxRadius ? Math.min(newBrushSize, maxRadius) : newBrushSize;
39284
+ tool.configuration.brushSize = newBrushSize;
39260
39285
  tool.invalidateBrushCursor();
39261
39286
  });
39262
- const viewportsInfo = toolGroup.getViewportsInfo();
39263
- const viewportsInfoArray = Object.keys(viewportsInfo).map((key) => viewportsInfo[key]);
39264
- if (!viewportsInfoArray.length) {
39265
- return;
39266
- }
39267
- const { renderingEngineId } = viewportsInfoArray[0];
39268
39287
  const viewportIds = toolGroup.getViewportIds();
39269
- const renderingEngine = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__.getRenderingEngine)(renderingEngineId);
39270
39288
  (0,_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(viewportIds);
39271
39289
  }
39272
39290
  function getBrushSizeForToolGroup(toolGroupId, toolName) {
@@ -39278,7 +39296,7 @@ function getBrushSizeForToolGroup(toolGroupId, toolName) {
39278
39296
  if (!Object.keys(toolInstances).length) {
39279
39297
  return;
39280
39298
  }
39281
- const brushBasedToolInstances = (0,_getBrushToolInstances__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .n)(toolGroupId, toolName);
39299
+ const brushBasedToolInstances = (0,_getBrushToolInstances__WEBPACK_IMPORTED_MODULE_2__/* .getBrushToolInstances */ .n)(toolGroupId, toolName);
39282
39300
  const brushToolInstance = brushBasedToolInstances[0];
39283
39301
  if (!brushToolInstance) {
39284
39302
  return;
@@ -44304,7 +44322,7 @@ __webpack_require__.r(__webpack_exports__);
44304
44322
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44305
44323
  /* harmony export */ r: () => (/* binding */ version)
44306
44324
  /* harmony export */ });
44307
- const version = '4.5.20';
44325
+ const version = '4.9.0';
44308
44326
 
44309
44327
 
44310
44328
  /***/ }),