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

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.fff2b82a087ffa2c4940.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.8094d2feb687b9046b15.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.568d17baf69ba3388804.js} +26 -29
  12. package/dist/{9548.bundle.6f232a0a03e60854b49e.js → 9548.bundle.b2be52aaec2debea396d.js} +2 -2
  13. package/dist/{1807.bundle.4fe7031d498b59f1ed68.js → 9927.bundle.4a9fb7b5873501a159ed.js} +52 -21
  14. package/dist/{app.bundle.a16db06e6e1ae5b7b3c5.js → app.bundle.1756fbd046f02c1b7a57.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.c3829ed8098f0f1b69a8.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.202dcd5b86e749721e9f.js} +0 -0
  23. /package/dist/{1919.bundle.45c73b6e5367ff362580.js → 1919.bundle.cd85e7ea413fed53fb13.js} +0 -0
  24. /package/dist/{213.bundle.cf999dc57ee54e1a61d0.js → 213.bundle.021ef61da5cdffc1defe.js} +0 -0
  25. /package/dist/{2243.bundle.12b6ee3196121df88f63.js → 2243.bundle.309286cb89f54bb770a6.js} +0 -0
  26. /package/dist/{2424.bundle.bfb5c29973df67ab4d1d.js → 2424.bundle.f21d57e5ccb92cfc0f88.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.92d5749ac78d43b11736.js} +0 -0
  29. /package/dist/{414.bundle.24a6ae428cbbec6fac72.js → 414.bundle.51d4d38cacfbc6d2e94c.js} +0 -0
  30. /package/dist/{5457.bundle.1b6c9d9754568061510c.js → 5457.bundle.3f20c1023b151531373b.js} +0 -0
  31. /package/dist/{5485.bundle.8e456ebcf976c9c50dc3.js → 5485.bundle.866b734c05a608220ddd.js} +0 -0
  32. /package/dist/{6027.bundle.5be91623f59d577abbd4.js → 6027.bundle.37b2742db8bdcbb9c592.js} +0 -0
  33. /package/dist/{6201.bundle.c59a4ef10b5d2126f3fe.js → 6201.bundle.4bad77c81030ac05a764.js} +0 -0
  34. /package/dist/{6991.bundle.e3e4ba73befe78136d84.js → 6991.bundle.432775dfeffb5b3ba4a5.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.720a6d6be6d4f445c657.js} +0 -0
  37. /package/dist/{810.bundle.d472e7b39cb1da8d5c02.js → 810.bundle.3c848772b45e1c7e3f3b.js} +0 -0
  38. /package/dist/{85.bundle.ca9e53b4f5669c6af047.js → 85.bundle.69e832f162e15ffb1ad3.js} +0 -0
  39. /package/dist/{8558.bundle.ed93f8a5a7b3ea9acfce.js → 8558.bundle.7e20657bb87af1e1025b.js} +0 -0
  40. /package/dist/{934.bundle.9445c5082a67dba7e121.js → 934.bundle.78efed05024ae035417f.js} +0 -0
  41. /package/dist/{9862.bundle.e2c4c129f7907500b840.js → 9862.bundle.cb4de0892ea411293655.js} +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[3190,5400],{
1
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[1037,5400],{
2
2
 
3
3
  /***/ 5057:
4
4
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -6064,7 +6064,7 @@ function toLowHighRange(windowWidth, windowCenter, voiLUTFunction = _enums_VOILU
6064
6064
 
6065
6065
  /***/ }),
6066
6066
 
6067
- /***/ 94350:
6067
+ /***/ 75123:
6068
6068
  /***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
6069
6069
 
6070
6070
  "use strict";
@@ -6839,6 +6839,19 @@ const segmentationRepresentationModifiedListener_segmentationRepresentationModif
6839
6839
 
6840
6840
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/config.js
6841
6841
  var config = __webpack_require__(36625);
6842
+ ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/segmentation/segmentationRemovedEventListener.js
6843
+
6844
+ const segmentationRemovedEventListener_segmentationRemovedListener = function (evt) {
6845
+ const { segmentationId } = evt.detail;
6846
+ const annotationsToRemove = getAllAnnotations().filter((annotation) => segmentationId ===
6847
+ annotation?.data?.segmentation
6848
+ ?.segmentationId);
6849
+ annotationsToRemove.forEach((annotation) => {
6850
+ removeAnnotation(annotation.annotationUID);
6851
+ });
6852
+ };
6853
+ /* harmony default export */ const segmentationRemovedEventListener = ((/* unused pure expression or super */ null && (segmentationRemovedEventListener_segmentationRemovedListener)));
6854
+
6842
6855
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/init.js
6843
6856
 
6844
6857
 
@@ -6851,6 +6864,7 @@ var config = __webpack_require__(36625);
6851
6864
 
6852
6865
 
6853
6866
 
6867
+
6854
6868
  let csToolsInitialized = false;
6855
6869
  function init(defaultConfiguration = {}) {
6856
6870
  if (csToolsInitialized) {
@@ -6898,16 +6912,19 @@ function _addCornerstoneToolsEventListeners() {
6898
6912
  eventTarget.addEventListener(TOOLS_EVENTS.SEGMENTATION_DATA_MODIFIED, segmentationDataModifiedEventListener);
6899
6913
  eventTarget.addEventListener(TOOLS_EVENTS.SEGMENTATION_REPRESENTATION_MODIFIED, segmentationRepresentationModifiedListener);
6900
6914
  eventTarget.addEventListener(TOOLS_EVENTS.SEGMENTATION_REPRESENTATION_ADDED, segmentationRepresentationModifiedListener);
6915
+ eventTarget.addEventListener(TOOLS_EVENTS.SEGMENTATION_REMOVED, segmentationRemovedListener);
6901
6916
  }
6902
6917
  function _removeCornerstoneToolsEventListeners() {
6903
6918
  eventTarget.removeEventListener(TOOLS_EVENTS.ANNOTATION_COMPLETED, annotationCompletedListener);
6904
6919
  eventTarget.removeEventListener(TOOLS_EVENTS.ANNOTATION_MODIFIED, annotationModifiedListener);
6905
6920
  eventTarget.removeEventListener(TOOLS_EVENTS.ANNOTATION_SELECTION_CHANGE, annotationSelectionListener);
6906
6921
  eventTarget.removeEventListener(TOOLS_EVENTS.ANNOTATION_SELECTION_CHANGE, annotationSelectionListener);
6922
+ eventTarget.removeEventListener(TOOLS_EVENTS.ANNOTATION_REMOVED, annotationRemovedListener);
6907
6923
  eventTarget.removeEventListener(TOOLS_EVENTS.SEGMENTATION_MODIFIED, segmentationModifiedListener);
6908
6924
  eventTarget.removeEventListener(TOOLS_EVENTS.SEGMENTATION_DATA_MODIFIED, segmentationDataModifiedEventListener);
6909
6925
  eventTarget.removeEventListener(TOOLS_EVENTS.SEGMENTATION_REPRESENTATION_MODIFIED, segmentationRepresentationModifiedListener);
6910
6926
  eventTarget.removeEventListener(TOOLS_EVENTS.SEGMENTATION_REPRESENTATION_ADDED, segmentationRepresentationModifiedListener);
6927
+ eventTarget.removeEventListener(TOOLS_EVENTS.SEGMENTATION_REMOVED, segmentationRemovedListener);
6911
6928
  }
6912
6929
  /* harmony default export */ const esm_init = ((/* unused pure expression or super */ null && (init)));
6913
6930
 
@@ -6918,7 +6935,7 @@ var COLOR_LUT = __webpack_require__(93952);
6918
6935
 
6919
6936
 
6920
6937
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/version.js
6921
- const version = '4.5.20';
6938
+ const version = '4.9.0';
6922
6939
 
6923
6940
  ;// ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/callbacks/cameraSyncCallback.js
6924
6941
 
@@ -7182,6 +7199,7 @@ function createSlabThicknessSynchronizer_createPresentationViewSynchronizer(sync
7182
7199
 
7183
7200
 
7184
7201
 
7202
+
7185
7203
  const createStackImageSynchronizer = (/* unused pure expression or super */ null && (createImageSliceSynchronizer));
7186
7204
 
7187
7205
 
@@ -13934,6 +13952,11 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
13934
13952
  referenceLinesCenterGapRatio: null,
13935
13953
  filterActorUIDsToSetSlabThickness: [],
13936
13954
  slabThicknessBlendMode: esm.Enums.BlendModes.MAXIMUM_INTENSITY_BLEND,
13955
+ centerPoint: {
13956
+ enabled: false,
13957
+ color: 'rgba(255, 255, 0, 0.5)',
13958
+ size: 2,
13959
+ },
13937
13960
  mobile: {
13938
13961
  enabled: false,
13939
13962
  opacity: 0.8,
@@ -14560,6 +14583,17 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
14560
14583
  const circleUID = '0';
14561
14584
  (0,drawingSvg.drawCircle)(svgDrawingHelper, annotationUID, circleUID, referenceColorCoordinates, circleRadius, { color, fill: color });
14562
14585
  }
14586
+ if (this.configuration.centerPoint?.enabled) {
14587
+ const defaultColor = 'rgba(255, 255, 0, 0.5)';
14588
+ const defaultSize = 2;
14589
+ const maxAllowedSize = 5;
14590
+ const centerPointColor = this.configuration.centerPoint.color || defaultColor;
14591
+ const centerPointSize = Math.min(this.configuration.centerPoint.size || defaultSize, maxAllowedSize);
14592
+ (0,drawingSvg.drawCircle)(svgDrawingHelper, annotationUID, 'centerPoint', crosshairCenterCanvas, centerPointSize, {
14593
+ color: centerPointColor,
14594
+ fill: centerPointColor,
14595
+ });
14596
+ }
14563
14597
  return renderStatus;
14564
14598
  };
14565
14599
  this._getAnnotations = (enabledElement) => {
@@ -15609,7 +15643,7 @@ var point = __webpack_require__(82216);
15609
15643
  const MAGNIFY_CLASSNAME = 'advancedMagnifyTool';
15610
15644
  const MAGNIFY_VIEWPORT_INITIAL_RADIUS = 125;
15611
15645
  const { Events: csEvents } = esm.Enums;
15612
- const isSegmentation = (actor) => actor.uid !== actor.referencedId;
15646
+ const isSegmentation = (actor) => !!actor.representationUID;
15613
15647
  var AdvancedMagnifyToolActions;
15614
15648
  (function (AdvancedMagnifyToolActions) {
15615
15649
  AdvancedMagnifyToolActions["ShowZoomFactorsList"] = "showZoomFactorsList";
@@ -16336,7 +16370,7 @@ class AdvancedMagnifyViewport {
16336
16370
  const actors = sourceViewport.getActors();
16337
16371
  const volumeInputArray = actors
16338
16372
  .filter((actor) => !isSegmentation(actor))
16339
- .map((actor) => ({ volumeId: actor.uid }));
16373
+ .map((actor) => ({ volumeId: actor.referencedId }));
16340
16374
  magnifyViewport.setVolumes(volumeInputArray).then(() => {
16341
16375
  this._isViewportReady = true;
16342
16376
  this.update();
@@ -19035,6 +19069,7 @@ class HeightTool extends base/* AnnotationTool */.EC {
19035
19069
  (0,annotationState.removeAnnotation)(annotation.annotationUID);
19036
19070
  }
19037
19071
  (0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
19072
+ this.doneEditMemo();
19038
19073
  if (newAnnotation) {
19039
19074
  (0,helpers_state.triggerAnnotationCompleted)(annotation);
19040
19075
  }
@@ -19045,8 +19080,9 @@ class HeightTool extends base/* AnnotationTool */.EC {
19045
19080
  this.isDrawing = true;
19046
19081
  const eventDetail = evt.detail;
19047
19082
  const { element } = eventDetail;
19048
- const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
19083
+ const { annotation, viewportIdsToRender, handleIndex, movingTextBox, newAnnotation } = this.editData;
19049
19084
  const { data } = annotation;
19085
+ this.createMemo(element, annotation, { newAnnotation });
19050
19086
  if (movingTextBox) {
19051
19087
  const { deltaPoints } = eventDetail;
19052
19088
  const worldPosDelta = deltaPoints.world;
@@ -21606,7 +21642,6 @@ var ContourSegmentationBaseTool = __webpack_require__(36320);
21606
21642
 
21607
21643
 
21608
21644
 
21609
-
21610
21645
 
21611
21646
  const SPLINE_MIN_POINTS = 3;
21612
21647
  const SPLINE_CLICK_CLOSE_CURVE_DIST = 10;
@@ -21759,7 +21794,6 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
21759
21794
  data.handles.activeHandleIndex = null;
21760
21795
  this._deactivateModify(element);
21761
21796
  this._deactivateDraw(element);
21762
- (0,elementCursor.resetElementCursor)(element);
21763
21797
  const enabledElement = (0,esm.getEnabledElement)(element);
21764
21798
  const image = this.getTargetImageData(this.getTargetId(enabledElement.viewport));
21765
21799
  const { imageData, dimensions } = image;
@@ -22148,7 +22182,6 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
22148
22182
  this.isDrawing = false;
22149
22183
  this._deactivateDraw(element);
22150
22184
  this._deactivateModify(element);
22151
- (0,elementCursor.resetElementCursor)(element);
22152
22185
  const { annotation, viewportIdsToRender, newAnnotation } = this.editData;
22153
22186
  if (newAnnotation) {
22154
22187
  (0,annotationState.removeAnnotation)(annotation.annotationUID);
@@ -22501,7 +22534,6 @@ var LiveWirePath = __webpack_require__(38776);
22501
22534
 
22502
22535
 
22503
22536
 
22504
-
22505
22537
  const CLICK_CLOSE_CURVE_SQR_DIST = 10 ** 2;
22506
22538
  class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
22507
22539
  static { this.toolName = 'LivewireContour'; }
@@ -22604,7 +22636,6 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
22604
22636
  data.handles.activeHandleIndex = null;
22605
22637
  this._deactivateModify(element);
22606
22638
  this._deactivateDraw(element);
22607
- (0,elementCursor.resetElementCursor)(element);
22608
22639
  const enabledElement = (0,esm.getEnabledElement)(element);
22609
22640
  if ((this.isHandleOutsideImage &&
22610
22641
  this.configuration.preventHandleOutsideImage) ||
@@ -22752,7 +22783,6 @@ class LivewireContourTool extends ContourSegmentationBaseTool/* default */.A {
22752
22783
  this.isDrawing = false;
22753
22784
  this._deactivateDraw(element);
22754
22785
  this._deactivateModify(element);
22755
- (0,elementCursor.resetElementCursor)(element);
22756
22786
  const { annotation, viewportIdsToRender, newAnnotation } = this.editData;
22757
22787
  if (newAnnotation) {
22758
22788
  (0,annotationState.removeAnnotation)(annotation.annotationUID);
@@ -33822,8 +33852,8 @@ function internalAddSegmentationRepresentation(viewportId, representationInput)
33822
33852
  if (segmentKeys.length > 0) {
33823
33853
  firstSegmentIndex = segmentKeys.map((k) => Number(k)).sort()[0];
33824
33854
  }
33855
+ (0,_segmentIndex__WEBPACK_IMPORTED_MODULE_6__.setActiveSegmentIndex)(segmentationId, firstSegmentIndex);
33825
33856
  }
33826
- (0,_segmentIndex__WEBPACK_IMPORTED_MODULE_6__.setActiveSegmentIndex)(segmentationId, firstSegmentIndex);
33827
33857
  }
33828
33858
  if (representationInput.type === _enums__WEBPACK_IMPORTED_MODULE_2__.SegmentationRepresentations.Contour) {
33829
33859
  (0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* .triggerAnnotationRenderForViewportIds */ .t)([viewportId]);
@@ -35478,13 +35508,17 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
35478
35508
  if (!annotations || !annotations.length) {
35479
35509
  return;
35480
35510
  }
35511
+ const baseFilteredAnnotations = super.filterInteractableAnnotationsForElement(element, annotations);
35512
+ if (!baseFilteredAnnotations || !baseFilteredAnnotations.length) {
35513
+ return;
35514
+ }
35481
35515
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
35482
35516
  const { viewport } = enabledElement;
35483
35517
  let annotationsToDisplay;
35484
35518
  if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.VolumeViewport) {
35485
35519
  const camera = viewport.getCamera();
35486
35520
  const { spacingInNormalDirection } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.getTargetVolumeAndSpacingInNormalDir(viewport, camera);
35487
- annotationsToDisplay = this.filterAnnotationsWithinSlice(annotations, camera, spacingInNormalDirection);
35521
+ annotationsToDisplay = this.filterAnnotationsWithinSlice(baseFilteredAnnotations, camera, spacingInNormalDirection);
35488
35522
  }
35489
35523
  else {
35490
35524
  annotationsToDisplay = (0,_utilities_planar__WEBPACK_IMPORTED_MODULE_5__.filterAnnotationsForDisplay)(viewport, annotations);
@@ -35614,7 +35648,9 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
35614
35648
  if (!this.configuration.calculateStats) {
35615
35649
  return;
35616
35650
  }
35617
- this._calculateStatsIfActive(annotation, targetId, viewport, renderingEngine, enabledElement);
35651
+ if (annotation.invalidated) {
35652
+ this._calculateStatsIfActive(annotation, targetId, viewport, renderingEngine, enabledElement);
35653
+ }
35618
35654
  this._renderStats(annotation, viewport, enabledElement, svgDrawingHelper);
35619
35655
  return renderStatus;
35620
35656
  }
@@ -90,7 +90,7 @@
90
90
  /******/ __webpack_require__.x = () => {
91
91
  /******/ // Load entry module and return exports
92
92
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
93
- /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [3353], () => (__webpack_require__(83353)))
93
+ /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [5858], () => (__webpack_require__(15858)))
94
94
  /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
95
95
  /******/ return __webpack_exports__;
96
96
  /******/ };
@@ -170,7 +170,7 @@
170
170
  /******/ // This function allow to reference async chunks and sibling chunks for the entrypoint
171
171
  /******/ __webpack_require__.u = (chunkId) => {
172
172
  /******/ // return url for filenames based on template
173
- /******/ return "" + chunkId + ".bundle." + {"732":"6978ac30a1e36abf06db","3353":"a52e42421b9407ad28ce","8094":"5c44190a325ac23e3e5c"}[chunkId] + ".js";
173
+ /******/ return "" + chunkId + ".bundle." + {"732":"6978ac30a1e36abf06db","5858":"99a6b9de04c621694ffd","8094":"5c44190a325ac23e3e5c"}[chunkId] + ".js";
174
174
  /******/ };
175
175
  /******/ })();
176
176
  /******/
@@ -249,7 +249,7 @@
249
249
  /******/ (() => {
250
250
  /******/ var next = __webpack_require__.x;
251
251
  /******/ __webpack_require__.x = () => {
252
- /******/ return __webpack_require__.e(3353).then(next);
252
+ /******/ return __webpack_require__.e(5858).then(next);
253
253
  /******/ };
254
254
  /******/ })();
255
255
  /******/
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[6725],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[2018],{
3
3
 
4
- /***/ 46725:
4
+ /***/ 42018:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
6
 
7
7
  // ESM COMPAT FLAG
@@ -22,9 +22,13 @@ const id = package_namespaceObject.UU;
22
22
  var src = __webpack_require__(42356);
23
23
  // EXTERNAL MODULE: ../../../node_modules/i18next/dist/esm/i18next.js
24
24
  var i18next = __webpack_require__(40680);
25
+ ;// ../../../modes/segmentation/src/constants.ts
26
+ const MIN_SEGMENTATION_DRAWING_RADIUS = 0.5;
27
+ const MAX_SEGMENTATION_DRAWING_RADIUS = 99.5;
25
28
  ;// ../../../modes/segmentation/src/toolbarButtons.ts
26
29
 
27
30
 
31
+
28
32
  const setToolActiveToolbar = {
29
33
  commandName: 'setToolActiveToolbar',
30
34
  commandOptions: {
@@ -583,6 +587,9 @@ const toolbarButtons = [{
583
587
  name: 'evaluate.cornerstone.segmentation',
584
588
  toolNames: ['CircularBrush', 'SphereBrush'],
585
589
  disabledText: i18next/* default */.A.t('Buttons:Create new segmentation to enable this tool.')
590
+ }, {
591
+ name: 'evaluate.cornerstone.segmentation.synchronizeDrawingRadius',
592
+ radiusOptionId: 'brush-radius'
586
593
  }, {
587
594
  name: 'evaluate.cornerstone.hasSegmentationOfType',
588
595
  segmentationRepresentationType: 'Labelmap'
@@ -597,8 +604,9 @@ const toolbarButtons = [{
597
604
  name: 'Radius (mm)',
598
605
  id: 'brush-radius',
599
606
  type: 'range',
600
- min: 0.5,
601
- max: 99.5,
607
+ explicitRunOnly: true,
608
+ min: MIN_SEGMENTATION_DRAWING_RADIUS,
609
+ max: MAX_SEGMENTATION_DRAWING_RADIUS,
602
610
  step: 0.5,
603
611
  value: 25,
604
612
  commands: [{
@@ -777,6 +785,9 @@ const toolbarButtons = [{
777
785
  evaluate: [{
778
786
  name: 'evaluate.cornerstone.segmentation',
779
787
  toolNames: ['CircularEraser', 'SphereEraser']
788
+ }, {
789
+ name: 'evaluate.cornerstone.segmentation.synchronizeDrawingRadius',
790
+ radiusOptionId: 'eraser-radius'
780
791
  }, {
781
792
  name: 'evaluate.cornerstone.hasSegmentationOfType',
782
793
  segmentationRepresentationType: 'Labelmap'
@@ -785,8 +796,9 @@ const toolbarButtons = [{
785
796
  name: 'Radius (mm)',
786
797
  id: 'eraser-radius',
787
798
  type: 'range',
788
- min: 0.5,
789
- max: 99.5,
799
+ explicitRunOnly: true,
800
+ min: MIN_SEGMENTATION_DRAWING_RADIUS,
801
+ max: MAX_SEGMENTATION_DRAWING_RADIUS,
790
802
  step: 0.5,
791
803
  value: 25,
792
804
  commands: {
@@ -825,6 +837,9 @@ const toolbarButtons = [{
825
837
  evaluate: [{
826
838
  name: 'evaluate.cornerstone.segmentation',
827
839
  toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush', 'ThresholdCircularBrushDynamic', 'ThresholdSphereBrushDynamic']
840
+ }, {
841
+ name: 'evaluate.cornerstone.segmentation.synchronizeDrawingRadius',
842
+ radiusOptionId: 'threshold-radius'
828
843
  }, {
829
844
  name: 'evaluate.cornerstone.hasSegmentationOfType',
830
845
  segmentationRepresentationType: 'Labelmap'
@@ -839,8 +854,9 @@ const toolbarButtons = [{
839
854
  name: 'Radius (mm)',
840
855
  id: 'threshold-radius',
841
856
  type: 'range',
842
- min: 0.5,
843
- max: 99.5,
857
+ explicitRunOnly: true,
858
+ min: MIN_SEGMENTATION_DRAWING_RADIUS,
859
+ max: MAX_SEGMENTATION_DRAWING_RADIUS,
844
860
  step: 0.5,
845
861
  value: 25,
846
862
  commands: {
@@ -1031,6 +1047,7 @@ const toolbarButtons = [{
1031
1047
  }];
1032
1048
  /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
1033
1049
  ;// ../../../modes/segmentation/src/initToolGroups.ts
1050
+
1034
1051
  const colours = {
1035
1052
  'viewport-0': 'rgb(200, 0, 0)',
1036
1053
  'viewport-1': 'rgb(200, 200, 0)',
@@ -1079,7 +1096,9 @@ function createTools({
1079
1096
  toolName: 'CircularBrush',
1080
1097
  parentTool: 'Brush',
1081
1098
  configuration: {
1082
- activeStrategy: 'FILL_INSIDE_CIRCLE'
1099
+ activeStrategy: 'FILL_INSIDE_CIRCLE',
1100
+ minRadius: MIN_SEGMENTATION_DRAWING_RADIUS,
1101
+ maxRadius: MAX_SEGMENTATION_DRAWING_RADIUS
1083
1102
  }
1084
1103
  }, {
1085
1104
  toolName: toolNames.LabelmapSlicePropagation
@@ -1091,37 +1110,49 @@ function createTools({
1091
1110
  toolName: 'CircularEraser',
1092
1111
  parentTool: 'Brush',
1093
1112
  configuration: {
1094
- activeStrategy: 'ERASE_INSIDE_CIRCLE'
1113
+ activeStrategy: 'ERASE_INSIDE_CIRCLE',
1114
+ minRadius: MIN_SEGMENTATION_DRAWING_RADIUS,
1115
+ maxRadius: MAX_SEGMENTATION_DRAWING_RADIUS
1095
1116
  }
1096
1117
  }, {
1097
1118
  toolName: 'SphereBrush',
1098
1119
  parentTool: 'Brush',
1099
1120
  configuration: {
1100
- activeStrategy: 'FILL_INSIDE_SPHERE'
1121
+ activeStrategy: 'FILL_INSIDE_SPHERE',
1122
+ minRadius: MIN_SEGMENTATION_DRAWING_RADIUS,
1123
+ maxRadius: MAX_SEGMENTATION_DRAWING_RADIUS
1101
1124
  }
1102
1125
  }, {
1103
1126
  toolName: 'SphereEraser',
1104
1127
  parentTool: 'Brush',
1105
1128
  configuration: {
1106
- activeStrategy: 'ERASE_INSIDE_SPHERE'
1129
+ activeStrategy: 'ERASE_INSIDE_SPHERE',
1130
+ minRadius: MIN_SEGMENTATION_DRAWING_RADIUS,
1131
+ maxRadius: MAX_SEGMENTATION_DRAWING_RADIUS
1107
1132
  }
1108
1133
  }, {
1109
1134
  toolName: 'ThresholdCircularBrush',
1110
1135
  parentTool: 'Brush',
1111
1136
  configuration: {
1112
- activeStrategy: 'THRESHOLD_INSIDE_CIRCLE'
1137
+ activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
1138
+ minRadius: MIN_SEGMENTATION_DRAWING_RADIUS,
1139
+ maxRadius: MAX_SEGMENTATION_DRAWING_RADIUS
1113
1140
  }
1114
1141
  }, {
1115
1142
  toolName: 'ThresholdSphereBrush',
1116
1143
  parentTool: 'Brush',
1117
1144
  configuration: {
1118
- activeStrategy: 'THRESHOLD_INSIDE_SPHERE'
1145
+ activeStrategy: 'THRESHOLD_INSIDE_SPHERE',
1146
+ minRadius: MIN_SEGMENTATION_DRAWING_RADIUS,
1147
+ maxRadius: MAX_SEGMENTATION_DRAWING_RADIUS
1119
1148
  }
1120
1149
  }, {
1121
1150
  toolName: 'ThresholdCircularBrushDynamic',
1122
1151
  parentTool: 'Brush',
1123
1152
  configuration: {
1124
1153
  activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
1154
+ minRadius: MIN_SEGMENTATION_DRAWING_RADIUS,
1155
+ maxRadius: MAX_SEGMENTATION_DRAWING_RADIUS,
1125
1156
  threshold: {
1126
1157
  isDynamic: true,
1127
1158
  dynamicRadius: 3
@@ -1136,6 +1167,8 @@ function createTools({
1136
1167
  parentTool: 'Brush',
1137
1168
  configuration: {
1138
1169
  activeStrategy: 'THRESHOLD_INSIDE_SPHERE',
1170
+ minRadius: MIN_SEGMENTATION_DRAWING_RADIUS,
1171
+ maxRadius: MAX_SEGMENTATION_DRAWING_RADIUS,
1139
1172
  threshold: {
1140
1173
  isDynamic: true,
1141
1174
  dynamicRadius: 3
@@ -14368,8 +14368,8 @@ function internalAddSegmentationRepresentation_internalAddSegmentationRepresenta
14368
14368
  if (segmentKeys.length > 0) {
14369
14369
  firstSegmentIndex = segmentKeys.map((k) => Number(k)).sort()[0];
14370
14370
  }
14371
+ setActiveSegmentIndex(segmentationId, firstSegmentIndex);
14371
14372
  }
14372
- setActiveSegmentIndex(segmentationId, firstSegmentIndex);
14373
14373
  }
14374
14374
  if (representationInput.type === SegmentationRepresentations.Contour) {
14375
14375
  triggerAnnotationRenderForViewportIds([viewportId]);