@ohif/app 3.8.0-beta.60 → 3.8.0-beta.62

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 (35) hide show
  1. package/dist/{457.bundle.64785b282dc8c9b64c92.js → 191.bundle.4850ab82949bb6f0eb73.js} +542 -403
  2. package/dist/{250.bundle.13a1f5d003a00c2b8694.js → 250.bundle.a064577944a0691bc77d.js} +11 -4
  3. package/dist/{270.bundle.4e3cd0e72bbff21f9596.js → 270.bundle.36c4e95efb89ad8bd8ae.js} +1 -1
  4. package/dist/{290.bundle.fdf51412462b919e2772.js → 290.bundle.8b4d7dfbc7cfe418a0f1.js} +2 -2
  5. package/dist/{317.bundle.9d9acdf28d8dfd3ab39e.js → 317.bundle.7ef949a52571bc04e7e1.js} +9 -5
  6. package/dist/{339.bundle.d514a9189b0bbdedac75.js → 339.bundle.2271a993c53d0728c816.js} +4 -4
  7. package/dist/342.bundle.a039c24e9f661f3b884d.js +6020 -0
  8. package/dist/{50.bundle.5f1ddd2697906f8bde6b.js → 50.bundle.a18826e121bdd0c2a707.js} +4 -4
  9. package/dist/{307.bundle.6e884b1c8766c69560bd.js → 504.bundle.aa165082e2acc5ccf080.js} +167 -119
  10. package/dist/{544.bundle.3f48123a58d3bdc052f5.js → 544.bundle.3cf20da53f349abd8d67.js} +2 -2
  11. package/dist/{559.bundle.7426bb86db4352f1c401.js → 559.bundle.42a8edafa1c7df761194.js} +9 -9
  12. package/dist/{594.bundle.9eb2863c4d3fbe4120c5.js → 594.bundle.6667c5cc14b924d7bee6.js} +9 -2
  13. package/dist/{68.bundle.7ca79597088a0784c4ee.js → 68.bundle.0420d25b4736f20b15b2.js} +11 -4
  14. package/dist/{704.bundle.9ecbe7b05ea278ef6ba8.js → 704.bundle.242ba4e0b0be7d1fec94.js} +4 -4
  15. package/dist/{724.bundle.46d9ce1eb6867cdd81c0.js → 724.bundle.941cd2a3b43a84d5893f.js} +9 -2
  16. package/dist/{862.bundle.d20d6b2d29fd89bf2f83.js → 862.bundle.e3fe2aae7903cc2ae8df.js} +2 -2
  17. package/dist/{889.bundle.d77bbd1805d4f0bd0565.js → 889.bundle.6850a0b8c412e3befab5.js} +4 -4
  18. package/dist/{905.bundle.53a0daccf13d3e134ab9.js → 905.bundle.eb7bdaec4276399e5bef.js} +9 -4
  19. package/dist/{963.bundle.8110049ad01d956455a2.js → 963.bundle.3daa5c08231526d905fb.js} +5 -5
  20. package/dist/{214.bundle.7f5beb123035a163bf85.js → 987.bundle.e7c041a6dfb4ddb41813.js} +584 -413
  21. package/dist/app-config.js +1 -0
  22. package/dist/{app.bundle.f783ca295d5aa9042c31.js → app.bundle.a78a51e39321426c5460.js} +211 -145
  23. package/dist/app.bundle.css +1 -1
  24. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  25. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  26. package/dist/index.html +1 -1
  27. package/dist/{polySeg.bundle.cffa671e87c4c9110149.js → polySeg.bundle.99be036bab9b7f011b0c.js} +4 -4
  28. package/dist/sw.js +1 -1
  29. package/package.json +18 -18
  30. package/dist/342.bundle.8f20bc9a1fa5fed22d2d.js +0 -51866
  31. /package/dist/{155.bundle.a089b4e1dd8a13064c21.js → 155.bundle.19e63774cdf16306b5b6.js} +0 -0
  32. /package/dist/{164.bundle.6f0b21868890158eda40.js → 164.bundle.0b17fced9916487eb49f.js} +0 -0
  33. /package/dist/{188.bundle.903a17abf035c26e672f.js → 188.bundle.7e085b90e138357e6789.js} +0 -0
  34. /package/dist/{907.bundle.b1f7dffcc6187de1b7ad.js → 907.bundle.fc8115500a085ab2bbec.js} +0 -0
  35. /package/dist/{961.bundle.54abd182a494b2e1d8ec.js → 961.bundle.f5d9e73fa771ce7e73f3.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[457],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[191],{
3
3
 
4
4
  /***/ 1904:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -428,8 +428,8 @@ function getDefinedCursors(context, symbol) {
428
428
  const standardCursorNames = STANDARD_CURSORS.values();
429
429
 
430
430
 
431
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
432
- var esm = __webpack_require__(39526);
431
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
432
+ var esm = __webpack_require__(50719);
433
433
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/cursors/ImageMouseCursor.js
434
434
 
435
435
 
@@ -1027,7 +1027,7 @@ function setNewAttributesIfValid(attributes, svgNode) {
1027
1027
 
1028
1028
  function drawCircle(svgDrawingHelper, annotationUID, circleUID, center, radius, options = {}, dataId = '') {
1029
1029
  const { color, fill, width, lineWidth, lineDash, fillOpacity, strokeOpacity, } = Object.assign({
1030
- color: 'dodgerblue',
1030
+ color: 'rgb(0, 255, 0)',
1031
1031
  fill: 'transparent',
1032
1032
  width: '2',
1033
1033
  lineDash: undefined,
@@ -1071,7 +1071,7 @@ function drawCircle(svgDrawingHelper, annotationUID, circleUID, center, radius,
1071
1071
 
1072
1072
  function drawEllipseByCoordinates(svgDrawingHelper, annotationUID, ellipseUID, canvasCoordinates, options = {}, dataId = '') {
1073
1073
  const { color, width, lineWidth, lineDash } = Object.assign({
1074
- color: 'dodgerblue',
1074
+ color: 'rgb(0, 255, 0)',
1075
1075
  width: '2',
1076
1076
  lineWidth: undefined,
1077
1077
  lineDash: undefined,
@@ -1130,7 +1130,7 @@ function drawEllipse(svgDrawingHelper, annotationUID, ellipseUID, corner1, corne
1130
1130
 
1131
1131
  function drawHandle(svgDrawingHelper, annotationUID, handleGroupUID, handle, options = {}, uniqueIndex) {
1132
1132
  const { color, handleRadius, width, lineWidth, fill, type, opacity } = Object.assign({
1133
- color: 'dodgerblue',
1133
+ color: 'rgb(0, 255, 0)',
1134
1134
  handleRadius: '6',
1135
1135
  width: '2',
1136
1136
  lineWidth: undefined,
@@ -1204,7 +1204,7 @@ function drawLine(svgDrawingHelper, annotationUID, lineUID, start, end, options
1204
1204
  return;
1205
1205
  }
1206
1206
  const { color, width, lineWidth, lineDash, shadow } = Object.assign({
1207
- color: 'dodgerblue',
1207
+ color: 'rgb(0, 255, 0)',
1208
1208
  width: '2',
1209
1209
  lineWidth: undefined,
1210
1210
  lineDash: undefined,
@@ -1249,7 +1249,7 @@ function drawPolyline(svgDrawingHelper, annotationUID, polylineUID, points, opti
1249
1249
  if (points.length < 2) {
1250
1250
  return;
1251
1251
  }
1252
- const { color = 'dodgerblue', width = 10, fillColor = 'none', fillOpacity = 0, lineWidth, lineDash, closePath = false, } = options;
1252
+ const { color = 'rgb(0, 255, 0)', width = 10, fillColor = 'none', fillOpacity = 0, lineWidth, lineDash, closePath = false, } = options;
1253
1253
  const strokeWidth = lineWidth || width;
1254
1254
  const svgns = 'http://www.w3.org/2000/svg';
1255
1255
  const svgNodeHash = drawingSvg_getHash(annotationUID, 'polyline', polylineUID);
@@ -1288,7 +1288,7 @@ function drawPolyline(svgDrawingHelper, annotationUID, polylineUID, points, opti
1288
1288
  function drawPath(svgDrawingHelper, annotationUID, pathUID, points, options) {
1289
1289
  const hasSubArrays = points.length && points[0].length && Array.isArray(points[0][0]);
1290
1290
  const pointsArrays = hasSubArrays ? points : [points];
1291
- const { color = 'dodgerblue', width = 10, fillColor = 'none', fillOpacity = 0, lineWidth, lineDash, closePath = false, } = options;
1291
+ const { color = 'rgb(0, 255, 0)', width = 10, fillColor = 'none', fillOpacity = 0, lineWidth, lineDash, closePath = false, } = options;
1292
1292
  const strokeWidth = lineWidth || width;
1293
1293
  const svgns = 'http://www.w3.org/2000/svg';
1294
1294
  const svgNodeHash = drawingSvg_getHash(annotationUID, 'path', pathUID);
@@ -1506,7 +1506,7 @@ function drawLinkedTextBox(svgDrawingHelper, annotationUID, textBoxUID, textLine
1506
1506
 
1507
1507
  function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, options = {}, dataId = '') {
1508
1508
  const { color, width: _width, lineWidth, lineDash, } = Object.assign({
1509
- color: 'dodgerblue',
1509
+ color: 'rgb(0, 255, 0)',
1510
1510
  width: '2',
1511
1511
  lineWidth: undefined,
1512
1512
  lineDash: undefined,
@@ -1549,7 +1549,7 @@ function drawArrow(svgDrawingHelper, annotationUID, arrowUID, start, end, option
1549
1549
  return;
1550
1550
  }
1551
1551
  const { color, width, lineWidth, lineDash } = Object.assign({
1552
- color: 'dodgerblue',
1552
+ color: 'rgb(0, 255, 0)',
1553
1553
  width: '2',
1554
1554
  lineWidth: undefined,
1555
1555
  lineDash: undefined,
@@ -1594,7 +1594,7 @@ function drawArrow(svgDrawingHelper, annotationUID, arrowUID, start, end, option
1594
1594
 
1595
1595
  function drawRedactionRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, options = {}) {
1596
1596
  const { color, width: _width, lineWidth, lineDash, } = Object.assign({
1597
- color: 'dodgerblue',
1597
+ color: 'rgb(0, 255, 0)',
1598
1598
  width: '2',
1599
1599
  lineWidth: undefined,
1600
1600
  lineDash: undefined,
@@ -1753,6 +1753,7 @@ var StrategyCallbacks;
1753
1753
  StrategyCallbacks["CreateIsInThreshold"] = "createIsInThreshold";
1754
1754
  StrategyCallbacks["Initialize"] = "initialize";
1755
1755
  StrategyCallbacks["INTERNAL_setValue"] = "setValue";
1756
+ StrategyCallbacks["ComputeInnerCircleRadius"] = "computeInnerCircleRadius";
1756
1757
  })(StrategyCallbacks || (StrategyCallbacks = {}));
1757
1758
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StrategyCallbacks);
1758
1759
 
@@ -1889,8 +1890,8 @@ __webpack_require__.d(__webpack_exports__, {
1889
1890
  $m: () => (/* reexport */ eventDispatchers_touchToolEventDispatcher)
1890
1891
  });
1891
1892
 
1892
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
1893
- var esm = __webpack_require__(39526);
1893
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
1894
+ var esm = __webpack_require__(50719);
1894
1895
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/triggerAnnotationRender.js
1895
1896
  var triggerAnnotationRender = __webpack_require__(6805);
1896
1897
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/imageRenderedEventDispatcher.js
@@ -2082,7 +2083,262 @@ const annotationInterpolationEventDispatcher_disable = function () {
2082
2083
 
2083
2084
  /***/ }),
2084
2085
 
2085
- /***/ 8914:
2086
+ /***/ 90202:
2087
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2088
+
2089
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2090
+ /* harmony export */ A: () => (/* binding */ contourSegmentationCompletedListener),
2091
+ /* harmony export */ r: () => (/* binding */ createPolylineHole)
2092
+ /* harmony export */ });
2093
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
2094
+ /* harmony import */ var _utilities_getViewportsForAnnotation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65903);
2095
+ /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21013);
2096
+ /* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90252);
2097
+ /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38296);
2098
+ /* harmony import */ var _utilities_contours__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75908);
2099
+ /* harmony import */ var _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15916);
2100
+ /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
2101
+ /* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(94152);
2102
+ /* harmony import */ var _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(96950);
2103
+ /* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(54177);
2104
+
2105
+
2106
+
2107
+
2108
+
2109
+
2110
+
2111
+
2112
+
2113
+
2114
+
2115
+ const DEFAULT_CONTOUR_SEG_TOOLNAME = 'PlanarFreehandContourSegmentationTool';
2116
+ async function contourSegmentationCompletedListener(evt) {
2117
+ const sourceAnnotation = evt.detail
2118
+ .annotation;
2119
+ if (!_utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__.isContourSegmentationAnnotation(sourceAnnotation)) {
2120
+ return;
2121
+ }
2122
+ const viewport = getViewport(sourceAnnotation);
2123
+ const contourSegmentationAnnotations = getValidContourSegmentationAnnotations(viewport, sourceAnnotation);
2124
+ if (!contourSegmentationAnnotations.length) {
2125
+ return;
2126
+ }
2127
+ const sourcePolyline = convertContourPolylineToCanvasSpace(sourceAnnotation.data.contour.polyline, viewport);
2128
+ const targetAnnotationInfo = findIntersectingContour(viewport, sourcePolyline, contourSegmentationAnnotations);
2129
+ if (!targetAnnotationInfo) {
2130
+ return;
2131
+ }
2132
+ const { targetAnnotation, targetPolyline, isContourHole } = targetAnnotationInfo;
2133
+ if (isContourHole) {
2134
+ const { contourHoleProcessingEnabled = false } = evt.detail;
2135
+ if (!contourHoleProcessingEnabled) {
2136
+ return;
2137
+ }
2138
+ createPolylineHole(viewport, targetAnnotation, sourceAnnotation);
2139
+ }
2140
+ else {
2141
+ combinePolylines(viewport, targetAnnotation, targetPolyline, sourceAnnotation, sourcePolyline);
2142
+ }
2143
+ }
2144
+ function isFreehandContourSegToolRegisteredForViewport(viewport, silent = false) {
2145
+ const { toolName } = _tools__WEBPACK_IMPORTED_MODULE_8__.PlanarFreehandContourSegmentationTool;
2146
+ const toolGroup = _store__WEBPACK_IMPORTED_MODULE_7__/* .ToolGroupManager.getToolGroupForViewport */ .dU.getToolGroupForViewport(viewport.id, viewport.renderingEngineId);
2147
+ let errorMessage;
2148
+ if (!toolGroup.hasTool(toolName)) {
2149
+ errorMessage = `Tool ${toolName} not added to ${toolGroup.id} toolGroup`;
2150
+ }
2151
+ else if (!toolGroup.getToolOptions(toolName)) {
2152
+ errorMessage = `Tool ${toolName} must be in active/passive state`;
2153
+ }
2154
+ if (errorMessage && !silent) {
2155
+ console.warn(errorMessage);
2156
+ }
2157
+ return !errorMessage;
2158
+ }
2159
+ function getViewport(annotation) {
2160
+ const viewports = (0,_utilities_getViewportsForAnnotation__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(annotation);
2161
+ const viewportWithToolRegistered = viewports.find((viewport) => isFreehandContourSegToolRegisteredForViewport(viewport, true));
2162
+ return viewportWithToolRegistered ?? viewports[0];
2163
+ }
2164
+ function convertContourPolylineToCanvasSpace(polyline, viewport) {
2165
+ const numPoints = polyline.length;
2166
+ const projectedPolyline = new Array(numPoints);
2167
+ for (let i = 0; i < numPoints; i++) {
2168
+ projectedPolyline[i] = viewport.worldToCanvas(polyline[i]);
2169
+ }
2170
+ return projectedPolyline;
2171
+ }
2172
+ function getValidContourSegmentationAnnotations(viewport, sourceAnnotation) {
2173
+ const { annotationUID: sourceAnnotationUID } = sourceAnnotation;
2174
+ const allAnnotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.getAllAnnotations)();
2175
+ return allAnnotations.filter((targetAnnotation) => targetAnnotation.annotationUID &&
2176
+ targetAnnotation.annotationUID !== sourceAnnotationUID &&
2177
+ _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__.isContourSegmentationAnnotation(targetAnnotation) &&
2178
+ _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__.areSameSegment(targetAnnotation, sourceAnnotation) &&
2179
+ viewport.isReferenceViewable(targetAnnotation.metadata));
2180
+ }
2181
+ function findIntersectingContour(viewport, sourcePolyline, contourSegmentationAnnotations) {
2182
+ const sourceAABB = _utilities__WEBPACK_IMPORTED_MODULE_2__.math.polyline.getAABB(sourcePolyline);
2183
+ for (let i = 0; i < contourSegmentationAnnotations.length; i++) {
2184
+ const targetAnnotation = contourSegmentationAnnotations[i];
2185
+ const targetPolyline = convertContourPolylineToCanvasSpace(targetAnnotation.data.contour.polyline, viewport);
2186
+ const targetAABB = _utilities__WEBPACK_IMPORTED_MODULE_2__.math.polyline.getAABB(targetPolyline);
2187
+ const aabbIntersect = _utilities__WEBPACK_IMPORTED_MODULE_2__.math.aabb.intersectAABB(sourceAABB, targetAABB);
2188
+ const lineSegmentsIntersect = aabbIntersect &&
2189
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.math.polyline.intersectPolyline(sourcePolyline, targetPolyline);
2190
+ const isContourHole = aabbIntersect &&
2191
+ !lineSegmentsIntersect &&
2192
+ _utilities__WEBPACK_IMPORTED_MODULE_2__.math.polyline.containsPoints(targetPolyline, sourcePolyline);
2193
+ if (lineSegmentsIntersect || isContourHole) {
2194
+ return { targetAnnotation, targetPolyline, isContourHole };
2195
+ }
2196
+ }
2197
+ }
2198
+ function createPolylineHole(viewport, targetAnnotation, holeAnnotation) {
2199
+ const { windingDirection: targetWindingDirection } = targetAnnotation.data.contour;
2200
+ const { windingDirection: holeWindingDirection } = holeAnnotation.data.contour;
2201
+ if (targetWindingDirection === holeWindingDirection) {
2202
+ holeAnnotation.data.contour.polyline.reverse();
2203
+ holeAnnotation.data.contour.windingDirection = targetWindingDirection * -1;
2204
+ }
2205
+ (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.addChildAnnotation)(targetAnnotation, holeAnnotation);
2206
+ _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__.removeContourSegmentationAnnotation(holeAnnotation);
2207
+ const { element } = viewport;
2208
+ const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
2209
+ const { renderingEngine } = enabledElement;
2210
+ const updatedToolNames = new Set([
2211
+ DEFAULT_CONTOUR_SEG_TOOLNAME,
2212
+ targetAnnotation.metadata.toolName,
2213
+ holeAnnotation.metadata.toolName,
2214
+ ]);
2215
+ for (const toolName of updatedToolNames.values()) {
2216
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_3__.getViewportIdsWithToolToRender)(element, toolName);
2217
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_2__.triggerAnnotationRenderForViewportIds)(renderingEngine, viewportIdsToRender);
2218
+ }
2219
+ }
2220
+ function getContourHolesData(viewport, annotation) {
2221
+ return (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.getChildAnnotations)(annotation).map((holeAnnotation) => {
2222
+ const polyline = convertContourPolylineToCanvasSpace(holeAnnotation.data.contour.polyline, viewport);
2223
+ return { annotation: holeAnnotation, polyline };
2224
+ });
2225
+ }
2226
+ function combinePolylines(viewport, targetAnnotation, targetPolyline, sourceAnnotation, sourcePolyline) {
2227
+ if (!(0,_store__WEBPACK_IMPORTED_MODULE_7__/* .hasTool */ .J2)(_tools__WEBPACK_IMPORTED_MODULE_8__.PlanarFreehandContourSegmentationTool)) {
2228
+ console.warn(`${_tools__WEBPACK_IMPORTED_MODULE_8__.PlanarFreehandContourSegmentationTool.toolName} is not registered in cornerstone`);
2229
+ return;
2230
+ }
2231
+ if (!isFreehandContourSegToolRegisteredForViewport(viewport)) {
2232
+ return;
2233
+ }
2234
+ const sourceStartPoint = sourcePolyline[0];
2235
+ const mergePolylines = _utilities__WEBPACK_IMPORTED_MODULE_2__.math.polyline.containsPoint(targetPolyline, sourceStartPoint);
2236
+ const contourHolesData = getContourHolesData(viewport, targetAnnotation);
2237
+ const unassignedContourHolesSet = new Set(contourHolesData);
2238
+ const reassignedContourHolesMap = new Map();
2239
+ const assignHoleToPolyline = (parentPolyline, holeData) => {
2240
+ let holes = reassignedContourHolesMap.get(parentPolyline);
2241
+ if (!holes) {
2242
+ holes = [];
2243
+ reassignedContourHolesMap.set(parentPolyline, holes);
2244
+ }
2245
+ holes.push(holeData);
2246
+ unassignedContourHolesSet.delete(holeData);
2247
+ };
2248
+ const newPolylines = [];
2249
+ if (mergePolylines) {
2250
+ const mergedPolyline = _utilities__WEBPACK_IMPORTED_MODULE_2__.math.polyline.mergePolylines(targetPolyline, sourcePolyline);
2251
+ newPolylines.push(mergedPolyline);
2252
+ Array.from(unassignedContourHolesSet.keys()).forEach((holeData) => assignHoleToPolyline(mergedPolyline, holeData));
2253
+ }
2254
+ else {
2255
+ const subtractedPolylines = _utilities__WEBPACK_IMPORTED_MODULE_2__.math.polyline.subtractPolylines(targetPolyline, sourcePolyline);
2256
+ subtractedPolylines.forEach((newPolyline) => {
2257
+ newPolylines.push(newPolyline);
2258
+ Array.from(unassignedContourHolesSet.keys()).forEach((holeData) => {
2259
+ const containsHole = _utilities__WEBPACK_IMPORTED_MODULE_2__.math.polyline.containsPoints(newPolyline, holeData.polyline);
2260
+ if (containsHole) {
2261
+ assignHoleToPolyline(newPolyline, holeData);
2262
+ unassignedContourHolesSet.delete(holeData);
2263
+ }
2264
+ });
2265
+ });
2266
+ }
2267
+ Array.from(reassignedContourHolesMap.values()).forEach((contourHolesDataArray) => contourHolesDataArray.forEach((contourHoleData) => (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.clearParentAnnotation)(contourHoleData.annotation)));
2268
+ const { element } = viewport;
2269
+ const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
2270
+ const { metadata, data } = targetAnnotation;
2271
+ const { handles, segmentation } = data;
2272
+ const { textBox } = handles;
2273
+ (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.removeAnnotation)(sourceAnnotation.annotationUID);
2274
+ (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.removeAnnotation)(targetAnnotation.annotationUID);
2275
+ for (let i = 0; i < newPolylines.length; i++) {
2276
+ const polyline = newPolylines[i];
2277
+ const startPoint = viewport.canvasToWorld(polyline[0]);
2278
+ const endPoint = viewport.canvasToWorld(polyline[polyline.length - 1]);
2279
+ const newAnnotation = {
2280
+ metadata: {
2281
+ ...metadata,
2282
+ toolName: DEFAULT_CONTOUR_SEG_TOOLNAME,
2283
+ originalToolName: metadata.originalToolName || metadata.toolName,
2284
+ },
2285
+ data: {
2286
+ cachedStats: {},
2287
+ handles: {
2288
+ points: [startPoint, endPoint],
2289
+ textBox: textBox ? { ...textBox } : undefined,
2290
+ },
2291
+ contour: {
2292
+ polyline: [],
2293
+ closed: true,
2294
+ },
2295
+ spline: targetAnnotation.data.spline,
2296
+ segmentation: {
2297
+ ...segmentation,
2298
+ },
2299
+ },
2300
+ annotationUID: _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.uuidv4(),
2301
+ highlighted: true,
2302
+ invalidated: true,
2303
+ isLocked: false,
2304
+ isVisible: undefined,
2305
+ interpolationUID: targetAnnotation.interpolationUID,
2306
+ interpolationCompleted: targetAnnotation.interpolationCompleted,
2307
+ };
2308
+ _utilities_contours__WEBPACK_IMPORTED_MODULE_5__.updateContourPolyline(newAnnotation, {
2309
+ points: polyline,
2310
+ closed: true,
2311
+ targetWindingDirection: _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_9__/* .ContourWindingDirection */ .W.Clockwise,
2312
+ }, viewport);
2313
+ (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.addAnnotation)(newAnnotation, element);
2314
+ _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__.addContourSegmentationAnnotation(newAnnotation);
2315
+ (0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_10__/* .triggerAnnotationModified */ .XF)(newAnnotation, viewport.element);
2316
+ reassignedContourHolesMap
2317
+ .get(polyline)
2318
+ ?.forEach((holeData) => (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.addChildAnnotation)(newAnnotation, holeData.annotation));
2319
+ }
2320
+ updateViewports(enabledElement, targetAnnotation, sourceAnnotation);
2321
+ }
2322
+ function updateViewports(enabledElement, targetAnnotation, sourceAnnotation) {
2323
+ const { viewport } = enabledElement;
2324
+ const { element } = viewport;
2325
+ const { renderingEngine } = enabledElement;
2326
+ const updatedTtoolNames = new Set([
2327
+ DEFAULT_CONTOUR_SEG_TOOLNAME,
2328
+ targetAnnotation.metadata.toolName,
2329
+ sourceAnnotation.metadata.toolName,
2330
+ ]);
2331
+ for (const toolName of updatedTtoolNames.values()) {
2332
+ const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_3__.getViewportIdsWithToolToRender)(element, toolName);
2333
+ (0,_utilities__WEBPACK_IMPORTED_MODULE_2__.triggerAnnotationRenderForViewportIds)(renderingEngine, viewportIdsToRender);
2334
+ }
2335
+ return new Promise((resolve) => window.requestAnimationFrame(resolve));
2336
+ }
2337
+
2338
+
2339
+ /***/ }),
2340
+
2341
+ /***/ 60878:
2086
2342
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2087
2343
 
2088
2344
 
@@ -2190,8 +2446,8 @@ const segmentationRepresentationModifiedListener = function (evt) {
2190
2446
  var SegmentationRepresentations = __webpack_require__(83946);
2191
2447
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 2 modules
2192
2448
  var segmentationState = __webpack_require__(30322);
2193
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
2194
- var esm = __webpack_require__(39526);
2449
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
2450
+ var esm = __webpack_require__(50719);
2195
2451
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js
2196
2452
  var ToolGroupManager = __webpack_require__(52610);
2197
2453
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js
@@ -2471,259 +2727,8 @@ function _imageChangeEventListener(evt) {
2471
2727
 
2472
2728
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contourSegmentation/index.js + 3 modules
2473
2729
  var contourSegmentation = __webpack_require__(15916);
2474
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getViewportsForAnnotation.js
2475
- var getViewportsForAnnotation = __webpack_require__(65903);
2476
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/index.js + 25 modules
2477
- var utilities = __webpack_require__(21013);
2478
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewportFilters/index.js + 4 modules
2479
- var viewportFilters = __webpack_require__(90252);
2480
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/annotationState.js
2481
- var annotationState = __webpack_require__(38296);
2482
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/index.js + 9 modules
2483
- var contours = __webpack_require__(75908);
2484
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/index.js + 4 modules
2485
- var store = __webpack_require__(61738);
2486
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/index.js + 42 modules
2487
- var tools = __webpack_require__(94152);
2488
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/types/ContourAnnotation.js
2489
- var ContourAnnotation = __webpack_require__(96950);
2490
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/helpers/state.js
2491
- var state = __webpack_require__(54177);
2492
- ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js
2493
-
2494
-
2495
-
2496
-
2497
-
2498
-
2499
-
2500
-
2501
-
2502
-
2503
-
2504
- const DEFAULT_CONTOUR_SEG_TOOLNAME = 'PlanarFreehandContourSegmentationTool';
2505
- async function contourSegmentationCompletedListener(evt) {
2506
- const sourceAnnotation = evt.detail
2507
- .annotation;
2508
- if (!contourSegmentation.isContourSegmentationAnnotation(sourceAnnotation)) {
2509
- return;
2510
- }
2511
- const viewport = getViewport(sourceAnnotation);
2512
- const contourSegmentationAnnotations = getValidContourSegmentationAnnotations(viewport, sourceAnnotation);
2513
- if (!contourSegmentationAnnotations.length) {
2514
- return;
2515
- }
2516
- const sourcePolyline = convertContourPolylineToCanvasSpace(sourceAnnotation.data.contour.polyline, viewport);
2517
- const targetAnnotationInfo = findIntersectingContour(viewport, sourcePolyline, contourSegmentationAnnotations);
2518
- if (!targetAnnotationInfo) {
2519
- return;
2520
- }
2521
- const { targetAnnotation, targetPolyline, isContourHole } = targetAnnotationInfo;
2522
- if (isContourHole) {
2523
- const { contourHoleProcessingEnabled = false } = evt.detail;
2524
- if (!contourHoleProcessingEnabled) {
2525
- return;
2526
- }
2527
- createPolylineHole(viewport, targetAnnotation, sourceAnnotation);
2528
- }
2529
- else {
2530
- combinePolylines(viewport, targetAnnotation, targetPolyline, sourceAnnotation, sourcePolyline);
2531
- }
2532
- }
2533
- function isFreehandContourSegToolRegisteredForViewport(viewport, silent = false) {
2534
- const { toolName } = tools.PlanarFreehandContourSegmentationTool;
2535
- const toolGroup = store/* ToolGroupManager.getToolGroupForViewport */.dU.getToolGroupForViewport(viewport.id, viewport.renderingEngineId);
2536
- let errorMessage;
2537
- if (!toolGroup.hasTool(toolName)) {
2538
- errorMessage = `Tool ${toolName} not added to ${toolGroup.id} toolGroup`;
2539
- }
2540
- else if (!toolGroup.getToolOptions(toolName)) {
2541
- errorMessage = `Tool ${toolName} must be in active/passive state`;
2542
- }
2543
- if (errorMessage && !silent) {
2544
- console.warn(errorMessage);
2545
- }
2546
- return !errorMessage;
2547
- }
2548
- function getViewport(annotation) {
2549
- const viewports = (0,getViewportsForAnnotation/* default */.A)(annotation);
2550
- const viewportWithToolRegistered = viewports.find((viewport) => isFreehandContourSegToolRegisteredForViewport(viewport, true));
2551
- return viewportWithToolRegistered ?? viewports[0];
2552
- }
2553
- function convertContourPolylineToCanvasSpace(polyline, viewport) {
2554
- const numPoints = polyline.length;
2555
- const projectedPolyline = new Array(numPoints);
2556
- for (let i = 0; i < numPoints; i++) {
2557
- projectedPolyline[i] = viewport.worldToCanvas(polyline[i]);
2558
- }
2559
- return projectedPolyline;
2560
- }
2561
- function getValidContourSegmentationAnnotations(viewport, sourceAnnotation) {
2562
- const { annotationUID: sourceAnnotationUID } = sourceAnnotation;
2563
- const allAnnotations = (0,annotationState.getAllAnnotations)();
2564
- return allAnnotations.filter((targetAnnotation) => targetAnnotation.annotationUID &&
2565
- targetAnnotation.annotationUID !== sourceAnnotationUID &&
2566
- contourSegmentation.isContourSegmentationAnnotation(targetAnnotation) &&
2567
- contourSegmentation.areSameSegment(targetAnnotation, sourceAnnotation) &&
2568
- viewport.isReferenceViewable(targetAnnotation.metadata));
2569
- }
2570
- function findIntersectingContour(viewport, sourcePolyline, contourSegmentationAnnotations) {
2571
- const sourceAABB = utilities.math.polyline.getAABB(sourcePolyline);
2572
- for (let i = 0; i < contourSegmentationAnnotations.length; i++) {
2573
- const targetAnnotation = contourSegmentationAnnotations[i];
2574
- const targetPolyline = convertContourPolylineToCanvasSpace(targetAnnotation.data.contour.polyline, viewport);
2575
- const targetAABB = utilities.math.polyline.getAABB(targetPolyline);
2576
- const aabbIntersect = utilities.math.aabb.intersectAABB(sourceAABB, targetAABB);
2577
- const lineSegmentsIntersect = aabbIntersect &&
2578
- utilities.math.polyline.intersectPolyline(sourcePolyline, targetPolyline);
2579
- const isContourHole = aabbIntersect &&
2580
- !lineSegmentsIntersect &&
2581
- utilities.math.polyline.containsPoints(targetPolyline, sourcePolyline);
2582
- if (lineSegmentsIntersect || isContourHole) {
2583
- return { targetAnnotation, targetPolyline, isContourHole };
2584
- }
2585
- }
2586
- }
2587
- function createPolylineHole(viewport, targetAnnotation, holeAnnotation) {
2588
- const { windingDirection: targetWindingDirection } = targetAnnotation.data.contour;
2589
- const { windingDirection: holeWindingDirection } = holeAnnotation.data.contour;
2590
- if (targetWindingDirection === holeWindingDirection) {
2591
- holeAnnotation.data.contour.polyline.reverse();
2592
- holeAnnotation.data.contour.windingDirection = targetWindingDirection * -1;
2593
- }
2594
- (0,annotationState.addChildAnnotation)(targetAnnotation, holeAnnotation);
2595
- contourSegmentation.removeContourSegmentationAnnotation(holeAnnotation);
2596
- const { element } = viewport;
2597
- const enabledElement = (0,esm.getEnabledElement)(element);
2598
- const { renderingEngine } = enabledElement;
2599
- const updatedToolNames = new Set([
2600
- DEFAULT_CONTOUR_SEG_TOOLNAME,
2601
- targetAnnotation.metadata.toolName,
2602
- holeAnnotation.metadata.toolName,
2603
- ]);
2604
- for (const toolName of updatedToolNames.values()) {
2605
- const viewportIdsToRender = (0,viewportFilters.getViewportIdsWithToolToRender)(element, toolName);
2606
- (0,utilities.triggerAnnotationRenderForViewportIds)(renderingEngine, viewportIdsToRender);
2607
- }
2608
- }
2609
- function getContourHolesData(viewport, annotation) {
2610
- return (0,annotationState.getChildAnnotations)(annotation).map((holeAnnotation) => {
2611
- const polyline = convertContourPolylineToCanvasSpace(holeAnnotation.data.contour.polyline, viewport);
2612
- return { annotation: holeAnnotation, polyline };
2613
- });
2614
- }
2615
- function combinePolylines(viewport, targetAnnotation, targetPolyline, sourceAnnotation, sourcePolyline) {
2616
- if (!(0,store/* hasTool */.J2)(tools.PlanarFreehandContourSegmentationTool)) {
2617
- console.warn(`${tools.PlanarFreehandContourSegmentationTool.toolName} is not registered in cornerstone`);
2618
- return;
2619
- }
2620
- if (!isFreehandContourSegToolRegisteredForViewport(viewport)) {
2621
- return;
2622
- }
2623
- const sourceStartPoint = sourcePolyline[0];
2624
- const mergePolylines = utilities.math.polyline.containsPoint(targetPolyline, sourceStartPoint);
2625
- const contourHolesData = getContourHolesData(viewport, targetAnnotation);
2626
- const unassignedContourHolesSet = new Set(contourHolesData);
2627
- const reassignedContourHolesMap = new Map();
2628
- const assignHoleToPolyline = (parentPolyline, holeData) => {
2629
- let holes = reassignedContourHolesMap.get(parentPolyline);
2630
- if (!holes) {
2631
- holes = [];
2632
- reassignedContourHolesMap.set(parentPolyline, holes);
2633
- }
2634
- holes.push(holeData);
2635
- unassignedContourHolesSet.delete(holeData);
2636
- };
2637
- const newPolylines = [];
2638
- if (mergePolylines) {
2639
- const mergedPolyline = utilities.math.polyline.mergePolylines(targetPolyline, sourcePolyline);
2640
- newPolylines.push(mergedPolyline);
2641
- Array.from(unassignedContourHolesSet.keys()).forEach((holeData) => assignHoleToPolyline(mergedPolyline, holeData));
2642
- }
2643
- else {
2644
- const subtractedPolylines = utilities.math.polyline.subtractPolylines(targetPolyline, sourcePolyline);
2645
- subtractedPolylines.forEach((newPolyline) => {
2646
- newPolylines.push(newPolyline);
2647
- Array.from(unassignedContourHolesSet.keys()).forEach((holeData) => {
2648
- const containsHole = utilities.math.polyline.containsPoints(newPolyline, holeData.polyline);
2649
- if (containsHole) {
2650
- assignHoleToPolyline(newPolyline, holeData);
2651
- unassignedContourHolesSet.delete(holeData);
2652
- }
2653
- });
2654
- });
2655
- }
2656
- Array.from(reassignedContourHolesMap.values()).forEach((contourHolesDataArray) => contourHolesDataArray.forEach((contourHoleData) => (0,annotationState.clearParentAnnotation)(contourHoleData.annotation)));
2657
- const { element } = viewport;
2658
- const enabledElement = (0,esm.getEnabledElement)(element);
2659
- const { metadata, data } = targetAnnotation;
2660
- const { handles, segmentation } = data;
2661
- const { textBox } = handles;
2662
- (0,annotationState.removeAnnotation)(sourceAnnotation.annotationUID);
2663
- (0,annotationState.removeAnnotation)(targetAnnotation.annotationUID);
2664
- for (let i = 0; i < newPolylines.length; i++) {
2665
- const polyline = newPolylines[i];
2666
- const startPoint = viewport.canvasToWorld(polyline[0]);
2667
- const endPoint = viewport.canvasToWorld(polyline[polyline.length - 1]);
2668
- const newAnnotation = {
2669
- metadata: {
2670
- ...metadata,
2671
- toolName: DEFAULT_CONTOUR_SEG_TOOLNAME,
2672
- originalToolName: metadata.originalToolName || metadata.toolName,
2673
- },
2674
- data: {
2675
- cachedStats: {},
2676
- handles: {
2677
- points: [startPoint, endPoint],
2678
- textBox: textBox ? { ...textBox } : undefined,
2679
- },
2680
- contour: {
2681
- polyline: [],
2682
- closed: true,
2683
- },
2684
- spline: targetAnnotation.data.spline,
2685
- segmentation: {
2686
- ...segmentation,
2687
- },
2688
- },
2689
- annotationUID: esm.utilities.uuidv4(),
2690
- highlighted: true,
2691
- invalidated: true,
2692
- isLocked: false,
2693
- isVisible: undefined,
2694
- interpolationUID: targetAnnotation.interpolationUID,
2695
- interpolationCompleted: targetAnnotation.interpolationCompleted,
2696
- };
2697
- contours.updateContourPolyline(newAnnotation, {
2698
- points: polyline,
2699
- closed: true,
2700
- targetWindingDirection: ContourAnnotation/* ContourWindingDirection */.W.Clockwise,
2701
- }, viewport);
2702
- (0,annotationState.addAnnotation)(newAnnotation, element);
2703
- contourSegmentation.addContourSegmentationAnnotation(newAnnotation);
2704
- (0,state/* triggerAnnotationModified */.XF)(newAnnotation, viewport.element);
2705
- reassignedContourHolesMap
2706
- .get(polyline)
2707
- ?.forEach((holeData) => (0,annotationState.addChildAnnotation)(newAnnotation, holeData.annotation));
2708
- }
2709
- updateViewports(enabledElement, targetAnnotation, sourceAnnotation);
2710
- }
2711
- function updateViewports(enabledElement, targetAnnotation, sourceAnnotation) {
2712
- const { viewport } = enabledElement;
2713
- const { element } = viewport;
2714
- const { renderingEngine } = enabledElement;
2715
- const updatedTtoolNames = new Set([
2716
- DEFAULT_CONTOUR_SEG_TOOLNAME,
2717
- targetAnnotation.metadata.toolName,
2718
- sourceAnnotation.metadata.toolName,
2719
- ]);
2720
- for (const toolName of updatedTtoolNames.values()) {
2721
- const viewportIdsToRender = (0,viewportFilters.getViewportIdsWithToolToRender)(element, toolName);
2722
- (0,utilities.triggerAnnotationRenderForViewportIds)(renderingEngine, viewportIdsToRender);
2723
- }
2724
- return new Promise((resolve) => window.requestAnimationFrame(resolve));
2725
- }
2726
-
2730
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js
2731
+ var contourSegmentationCompleted = __webpack_require__(90202);
2727
2732
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationRemoved.js
2728
2733
 
2729
2734
  function contourSegmentationRemovedListener(evt) {
@@ -2741,10 +2746,12 @@ function contourSegmentationRemovedListener(evt) {
2741
2746
  function annotationCompletedListener(evt) {
2742
2747
  const annotation = evt.detail.annotation;
2743
2748
  if (contourSegmentation.isContourSegmentationAnnotation(annotation)) {
2744
- contourSegmentationCompletedListener(evt);
2749
+ (0,contourSegmentationCompleted/* default */.A)(evt);
2745
2750
  }
2746
2751
  }
2747
2752
 
2753
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/index.js + 25 modules
2754
+ var utilities = __webpack_require__(21013);
2748
2755
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/annotations/annotationSelectionListener.js
2749
2756
 
2750
2757
 
@@ -2803,7 +2810,7 @@ function annotationRemovedListener(evt) {
2803
2810
 
2804
2811
  /***/ }),
2805
2812
 
2806
- /***/ 72980:
2813
+ /***/ 20767:
2807
2814
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2808
2815
 
2809
2816
  // ESM COMPAT FLAG
@@ -2896,6 +2903,7 @@ __webpack_require__.r(synchronizers_namespaceObject);
2896
2903
  __webpack_require__.d(synchronizers_namespaceObject, {
2897
2904
  createCameraPositionSynchronizer: () => (createCameraPositionSynchronizer),
2898
2905
  createImageSliceSynchronizer: () => (createImageSliceSynchronizer),
2906
+ createSlabThicknessSynchronizer: () => (createPresentationViewSynchronizer),
2899
2907
  createStackImageSynchronizer: () => (createStackImageSynchronizer),
2900
2908
  createVOISynchronizer: () => (createVOISynchronizer),
2901
2909
  createZoomPanSynchronizer: () => (createZoomPanSynchronizer)
@@ -2905,8 +2913,8 @@ __webpack_require__.d(synchronizers_namespaceObject, {
2905
2913
  var types_namespaceObject = {};
2906
2914
  __webpack_require__.r(types_namespaceObject);
2907
2915
 
2908
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
2909
- var esm = __webpack_require__(39526);
2916
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
2917
+ var esm = __webpack_require__(50719);
2910
2918
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/annotationState.js
2911
2919
  var annotationState = __webpack_require__(38296);
2912
2920
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 2 modules
@@ -2917,8 +2925,8 @@ var enums = __webpack_require__(84901);
2917
2925
  var store = __webpack_require__(61738);
2918
2926
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/state.js
2919
2927
  var state = __webpack_require__(55588);
2920
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 18 modules
2921
- var eventListeners = __webpack_require__(8914);
2928
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 17 modules
2929
+ var eventListeners = __webpack_require__(60878);
2922
2930
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js + 7 modules
2923
2931
  var eventDispatchers = __webpack_require__(44926);
2924
2932
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js
@@ -3025,9 +3033,9 @@ function createCameraPositionSynchronizer(synchronizerName) {
3025
3033
 
3026
3034
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/callbacks/voiSyncCallback.js
3027
3035
 
3028
- function voiSyncCallback(synchronizerInstance, sourceViewport, targetViewport, voiModifiedEvent, options) {
3029
- const eventDetail = voiModifiedEvent.detail;
3030
- const { volumeId, range, invertStateChanged, invert } = eventDetail;
3036
+ function voiSyncCallback(synchronizerInstance, sourceViewport, targetViewport, modifiedEvent, options) {
3037
+ const eventDetail = modifiedEvent.detail;
3038
+ const { volumeId, range, invertStateChanged, invert, colormap } = eventDetail;
3031
3039
  const renderingEngine = (0,esm.getRenderingEngine)(targetViewport.renderingEngineId);
3032
3040
  if (!renderingEngine) {
3033
3041
  throw new Error(`Rendering Engine does not exist: ${targetViewport.renderingEngineId}`);
@@ -3039,8 +3047,17 @@ function voiSyncCallback(synchronizerInstance, sourceViewport, targetViewport, v
3039
3047
  if (options?.syncInvertState && invertStateChanged) {
3040
3048
  tProperties.invert = invert;
3041
3049
  }
3050
+ if (options?.syncColormap && colormap) {
3051
+ tProperties.colormap = colormap;
3052
+ }
3042
3053
  if (tViewport instanceof esm.BaseVolumeViewport) {
3043
- tViewport.setProperties(tProperties, volumeId);
3054
+ const isFusion = tViewport._actors && tViewport._actors.size > 1;
3055
+ if (isFusion) {
3056
+ tViewport.setProperties(tProperties, volumeId);
3057
+ }
3058
+ else {
3059
+ tViewport.setProperties(tProperties);
3060
+ }
3044
3061
  }
3045
3062
  else if (tViewport instanceof esm.StackViewport) {
3046
3063
  tViewport.setProperties(tProperties);
@@ -3056,7 +3073,10 @@ function voiSyncCallback(synchronizerInstance, sourceViewport, targetViewport, v
3056
3073
 
3057
3074
 
3058
3075
  function createVOISynchronizer(synchronizerName, options = { syncInvertState: true }) {
3059
- const VOISynchronizer = (0,SynchronizerManager.createSynchronizer)(synchronizerName, esm.Enums.Events.VOI_MODIFIED, voiSyncCallback, options);
3076
+ const VOISynchronizer = (0,SynchronizerManager.createSynchronizer)(synchronizerName, esm.Enums.Events.VOI_MODIFIED, voiSyncCallback, {
3077
+ auxiliaryEventNames: [esm.Enums.Events.COLORMAP_MODIFIED],
3078
+ ...options,
3079
+ });
3060
3080
  return VOISynchronizer;
3061
3081
  }
3062
3082
 
@@ -3186,11 +3206,39 @@ function createImageSliceSynchronizer(synchronizerName) {
3186
3206
  return stackImageSynchronizer;
3187
3207
  }
3188
3208
 
3209
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/callbacks/slabThicknessSyncCallback.js
3210
+
3211
+ function slabThicknessSyncCallback(_synchronizerInstance, sourceViewport, targetViewport) {
3212
+ const renderingEngine = (0,esm.getRenderingEngine)(targetViewport.renderingEngineId);
3213
+ if (!renderingEngine) {
3214
+ throw new Error(`No RenderingEngine for Id: ${targetViewport.renderingEngineId}`);
3215
+ }
3216
+ const tViewport = renderingEngine.getViewport(targetViewport.viewportId);
3217
+ const sViewport = renderingEngine.getViewport(sourceViewport.viewportId);
3218
+ const slabThickness = sViewport.getSlabThickness?.();
3219
+ if (!slabThickness) {
3220
+ return;
3221
+ }
3222
+ tViewport.setSlabThickness?.(slabThickness);
3223
+ tViewport.render();
3224
+ }
3225
+
3226
+ ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/synchronizers/createSlabThicknessSynchronizer.js
3227
+
3228
+
3229
+
3230
+ const { CAMERA_MODIFIED: createSlabThicknessSynchronizer_CAMERA_MODIFIED } = esm.Enums.Events;
3231
+ function createPresentationViewSynchronizer(synchronizerName) {
3232
+ const presentationView = (0,SynchronizerManager.createSynchronizer)(synchronizerName, createSlabThicknessSynchronizer_CAMERA_MODIFIED, slabThicknessSyncCallback);
3233
+ return presentationView;
3234
+ }
3235
+
3189
3236
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/index.js
3190
3237
 
3191
3238
 
3192
3239
 
3193
3240
 
3241
+
3194
3242
  const createStackImageSynchronizer = createImageSliceSynchronizer;
3195
3243
 
3196
3244
 
@@ -3719,7 +3767,7 @@ VideoRedactionTool.toolName = 'VideoRedaction';
3719
3767
  /* harmony export */ });
3720
3768
  /* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48463);
3721
3769
  /* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0__);
3722
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39526);
3770
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50719);
3723
3771
  /* harmony import */ var _annotationLocking__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48428);
3724
3772
  /* harmony import */ var _annotationVisibility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21009);
3725
3773
 
@@ -3929,7 +3977,7 @@ __webpack_require__.r(__webpack_exports__);
3929
3977
  /* harmony export */ setAnnotationLocked: () => (/* binding */ setAnnotationLocked),
3930
3978
  /* harmony export */ unlockAllAnnotations: () => (/* binding */ unlockAllAnnotations)
3931
3979
  /* harmony export */ });
3932
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
3980
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
3933
3981
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
3934
3982
 
3935
3983
 
@@ -4034,7 +4082,7 @@ __webpack_require__.r(__webpack_exports__);
4034
4082
  /* harmony export */ isAnnotationSelected: () => (/* binding */ isAnnotationSelected),
4035
4083
  /* harmony export */ setAnnotationSelected: () => (/* binding */ setAnnotationSelected)
4036
4084
  /* harmony export */ });
4037
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
4085
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
4038
4086
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
4039
4087
  /* harmony import */ var _annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
4040
4088
 
@@ -4078,7 +4126,7 @@ function getAnnotationsSelected() {
4078
4126
  function getAnnotationsSelectedByToolName(toolName) {
4079
4127
  return getAnnotationsSelected().filter((annotationUID) => {
4080
4128
  const annotation = (0,_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotation)(annotationUID);
4081
- return annotation.metadata.toolName === toolName;
4129
+ return annotation?.metadata?.toolName === toolName;
4082
4130
  });
4083
4131
  }
4084
4132
  function isAnnotationSelected(annotationUID) {
@@ -4133,7 +4181,7 @@ __webpack_require__.r(__webpack_exports__);
4133
4181
  /* harmony export */ resetAnnotationManager: () => (/* binding */ resetAnnotationManager),
4134
4182
  /* harmony export */ setAnnotationManager: () => (/* binding */ setAnnotationManager)
4135
4183
  /* harmony export */ });
4136
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
4184
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
4137
4185
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
4138
4186
  /* harmony import */ var _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22581);
4139
4187
  /* harmony import */ var _helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
@@ -4263,7 +4311,7 @@ __webpack_require__.r(__webpack_exports__);
4263
4311
  /* harmony export */ setAnnotationVisibility: () => (/* binding */ setAnnotationVisibility),
4264
4312
  /* harmony export */ showAllAnnotations: () => (/* binding */ showAllAnnotations)
4265
4313
  /* harmony export */ });
4266
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
4314
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
4267
4315
  /* harmony import */ var _annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38296);
4268
4316
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84901);
4269
4317
  /* harmony import */ var _annotationSelection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42351);
@@ -4607,7 +4655,7 @@ var ToolStyle = __webpack_require__(31862);
4607
4655
  /* harmony export */ _3: () => (/* binding */ triggerAnnotationAddedForFOR),
4608
4656
  /* harmony export */ dZ: () => (/* binding */ triggerAnnotationCompleted)
4609
4657
  /* harmony export */ });
4610
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
4658
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
4611
4659
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
4612
4660
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52610);
4613
4661
 
@@ -4715,8 +4763,8 @@ var annotationState = __webpack_require__(38296);
4715
4763
  var annotationVisibility = __webpack_require__(21009);
4716
4764
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js
4717
4765
  var FrameOfReferenceSpecificAnnotationManager = __webpack_require__(22581);
4718
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
4719
- var esm = __webpack_require__(39526);
4766
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
4767
+ var esm = __webpack_require__(50719);
4720
4768
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/Events.js
4721
4769
  var Events = __webpack_require__(28117);
4722
4770
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/AnnotationGroup.js
@@ -4938,7 +4986,7 @@ function getSegmentVisibility(toolGroupId, segmentationRepresentationUID, segmen
4938
4986
  /* harmony export */ jU: () => (/* binding */ getSurfaceActorUID)
4939
4987
  /* harmony export */ });
4940
4988
  /* unused harmony exports generateCacheId, updatePolyDataCache */
4941
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
4989
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
4942
4990
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
4943
4991
  /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21013);
4944
4992
  /* harmony import */ var _polySeg_registerPolySegWorker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65807);
@@ -5203,8 +5251,8 @@ function addSegmentations(segmentationInputArray) {
5203
5251
 
5204
5252
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js
5205
5253
  var ToolGroupManager = __webpack_require__(52610);
5206
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
5207
- var esm = __webpack_require__(39526);
5254
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
5255
+ var esm = __webpack_require__(50719);
5208
5256
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/config/segmentationConfig.js
5209
5257
 
5210
5258
  function getGlobalConfig() {
@@ -6608,7 +6656,7 @@ async function canConvertFromTo(fromRepresentationType, toRepresentationType) {
6608
6656
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6609
6657
  /* harmony export */ b: () => (/* binding */ registerPolySegWorker)
6610
6658
  /* harmony export */ });
6611
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
6659
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
6612
6660
 
6613
6661
  let registered = false;
6614
6662
  function registerPolySegWorker() {
@@ -6714,8 +6762,8 @@ __webpack_require__.d(__webpack_exports__, {
6714
6762
  // EXTERNAL MODULE: ../../../node_modules/lodash.clonedeep/index.js
6715
6763
  var lodash_clonedeep = __webpack_require__(48463);
6716
6764
  var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);
6717
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
6718
- var esm = __webpack_require__(39526);
6765
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
6766
+ var esm = __webpack_require__(50719);
6719
6767
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js + 3 modules
6720
6768
  var enums = __webpack_require__(84901);
6721
6769
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/displayTools/Contour/contourConfig.js
@@ -7156,7 +7204,7 @@ __webpack_require__.r(__webpack_exports__);
7156
7204
  /* harmony export */ triggerSegmentationRepresentationModified: () => (/* binding */ triggerSegmentationRepresentationModified),
7157
7205
  /* harmony export */ triggerSegmentationRepresentationRemoved: () => (/* binding */ triggerSegmentationRepresentationRemoved)
7158
7206
  /* harmony export */ });
7159
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
7207
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
7160
7208
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
7161
7209
  /* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30322);
7162
7210
  /* harmony import */ var _utilities_segmentation_getUniqueSegmentIndices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94510);
@@ -7230,7 +7278,7 @@ function triggerSegmentationDataModified(segmentationId, modifiedSlicesToUse) {
7230
7278
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7231
7279
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
7232
7280
  /* harmony export */ });
7233
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
7281
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
7234
7282
 
7235
7283
  class Synchronizer {
7236
7284
  constructor(synchronizerId, eventName, eventHandler, options) {
@@ -7271,6 +7319,9 @@ class Synchronizer {
7271
7319
  setOptions(viewportId, options = {}) {
7272
7320
  this._viewportOptions[viewportId] = options;
7273
7321
  }
7322
+ setEnabled(enabled) {
7323
+ this._enabled = enabled;
7324
+ }
7274
7325
  getOptions(viewportId) {
7275
7326
  return this._viewportOptions[viewportId];
7276
7327
  }
@@ -7559,7 +7610,7 @@ function destroySynchronizer(synchronizerId) {
7559
7610
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7560
7611
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
7561
7612
  /* harmony export */ });
7562
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
7613
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
7563
7614
  /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61738);
7564
7615
 
7565
7616
 
@@ -7670,8 +7721,8 @@ function removeTool(ToolClass) {
7670
7721
  }
7671
7722
  /* harmony default export */ const store_addTool = ((/* unused pure expression or super */ null && (addTool)));
7672
7723
 
7673
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 18 modules
7674
- var eventListeners = __webpack_require__(8914);
7724
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 17 modules
7725
+ var eventListeners = __webpack_require__(60878);
7675
7726
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js + 7 modules
7676
7727
  var eventDispatchers = __webpack_require__(44926);
7677
7728
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/triggerAnnotationRender.js
@@ -7745,8 +7796,8 @@ function _appendChild(newNode, referenceNode) {
7745
7796
  referenceNode.querySelector('div.viewport-element').appendChild(newNode);
7746
7797
  }
7747
7798
 
7748
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
7749
- var esm = __webpack_require__(39526);
7799
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
7800
+ var esm = __webpack_require__(50719);
7750
7801
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/filterToolsWithAnnotationsForElement.js
7751
7802
  var store_filterToolsWithAnnotationsForElement = __webpack_require__(9933);
7752
7803
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getToolsWithModesForElement.js
@@ -7944,7 +7995,7 @@ function resetSvgNodeCache() {
7944
7995
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
7945
7996
  /* harmony export */ });
7946
7997
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83636);
7947
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39526);
7998
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50719);
7948
7999
  /* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24592);
7949
8000
  /* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21013);
7950
8001
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96214);
@@ -8693,9 +8744,9 @@ BidirectionalTool.toolName = 'Bidirectional';
8693
8744
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8694
8745
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
8695
8746
  /* harmony export */ });
8696
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
8747
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
8697
8748
  /* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87682);
8698
- /* harmony import */ var _PlanarFreehandROITool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96180);
8749
+ /* harmony import */ var _PlanarFreehandROITool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(78279);
8699
8750
 
8700
8751
 
8701
8752
 
@@ -8736,7 +8787,7 @@ PlanarFreehandContourSegmentationTool.toolName =
8736
8787
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8737
8788
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
8738
8789
  /* harmony export */ });
8739
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
8790
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
8740
8791
  /* harmony import */ var _BaseTool__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22338);
8741
8792
  /* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
8742
8793
  /* harmony import */ var _utilities_triggerAnnotationRender__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6805);
@@ -8796,7 +8847,7 @@ class AnnotationDisplayTool extends _BaseTool__WEBPACK_IMPORTED_MODULE_1__/* ["d
8796
8847
  referencedImageId = targetId.split('videoId:')[1];
8797
8848
  }
8798
8849
  else {
8799
- const volumeId = targetId.split(/volumeId:|\?/)[1];
8850
+ const volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getVolumeId(targetId);
8800
8851
  const imageVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
8801
8852
  referencedImageId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
8802
8853
  }
@@ -8818,7 +8869,7 @@ AnnotationDisplayTool.toolName = 'AnnotationDisplayTool';
8818
8869
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8819
8870
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
8820
8871
  /* harmony export */ });
8821
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
8872
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
8822
8873
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83636);
8823
8874
  /* harmony import */ var _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28062);
8824
8875
  /* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48428);
@@ -8960,7 +9011,7 @@ class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__
8960
9011
  }
8961
9012
  isSuvScaled(viewport, targetId, imageId) {
8962
9013
  if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
8963
- const volumeId = targetId.split(/volumeId:|\?/)[1];
9014
+ const volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getVolumeId(targetId);
8964
9015
  const volume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
8965
9016
  return volume.scaling?.PT !== undefined;
8966
9017
  }
@@ -9014,7 +9065,7 @@ AnnotationTool.toolName = 'AnnotationTool';
9014
9065
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9015
9066
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
9016
9067
  /* harmony export */ });
9017
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
9068
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
9018
9069
  /* harmony import */ var _enums_ToolModes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12468);
9019
9070
 
9020
9071
 
@@ -9080,7 +9131,7 @@ class BaseTool {
9080
9131
  return viewports[0].getImageData();
9081
9132
  }
9082
9133
  else if (targetId.startsWith('volumeId:')) {
9083
- const volumeId = targetId.split(/volumeId:|\?/)[1];
9134
+ const volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getVolumeId(targetId);
9084
9135
  const viewports = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getViewportsWithVolumeId(volumeId, renderingEngine.id);
9085
9136
  if (!viewports || !viewports.length) {
9086
9137
  return;
@@ -9217,7 +9268,7 @@ function isValidLabelmapConfig(config) {
9217
9268
  /* unused harmony exports render, removeSegmentationRepresentation */
9218
9269
  /* harmony import */ var _kitware_vtk_js_Common_DataModel_PiecewiseFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29853);
9219
9270
  /* harmony import */ var _kitware_vtk_js_Rendering_Core_ColorTransferFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37452);
9220
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39526);
9271
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50719);
9221
9272
  /* harmony import */ var _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(83946);
9222
9273
  /* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30322);
9223
9274
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52610);
@@ -9495,7 +9546,7 @@ async function _addLabelmapToViewport(viewport, labelmapData, segmentationRepres
9495
9546
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9496
9547
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
9497
9548
  /* harmony export */ });
9498
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
9549
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
9499
9550
  /* harmony import */ var _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83946);
9500
9551
  /* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63421);
9501
9552
  /* harmony import */ var _stateManagement_segmentation_config_segmentationVisibility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23308);
@@ -9673,8 +9724,8 @@ __webpack_require__.d(__webpack_exports__, {
9673
9724
 
9674
9725
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/base/index.js
9675
9726
  var base = __webpack_require__(96214);
9676
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
9677
- var esm = __webpack_require__(39526);
9727
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
9728
+ var esm = __webpack_require__(50719);
9678
9729
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/PanTool.js
9679
9730
 
9680
9731
 
@@ -9872,7 +9923,7 @@ class WindowLevelTool extends base/* BaseTool */.oS {
9872
9923
  const properties = viewport.getProperties();
9873
9924
  if (viewport instanceof esm.VolumeViewport) {
9874
9925
  const targetId = this.getTargetId(viewport);
9875
- volumeId = targetId.split(/volumeId:|\?/)[1];
9926
+ volumeId = esm.utilities.getVolumeId(targetId);
9876
9927
  viewportsContainingVolumeUID = esm.utilities.getViewportsWithVolumeId(volumeId, renderingEngine.id);
9877
9928
  ({ lower, upper } = properties.voiRange);
9878
9929
  const volume = esm.cache.getVolume(volumeId);
@@ -10158,7 +10209,7 @@ class StackScrollMouseWheelTool extends base/* BaseTool */.oS {
10158
10209
  const { viewport } = (0,esm.getEnabledElement)(element);
10159
10210
  const delta = direction * (invert ? -1 : 1);
10160
10211
  const targetId = this.getTargetId(viewport);
10161
- const volumeId = targetId.split(/volumeId:|\?/)[1];
10212
+ const volumeId = esm.utilities.getVolumeId(targetId);
10162
10213
  (0,utilities_scroll/* default */.A)(viewport, {
10163
10214
  delta,
10164
10215
  debounceLoading: this.configuration.debounceIfNotLoaded,
@@ -10419,6 +10470,7 @@ var ToolGroupManager = __webpack_require__(52610);
10419
10470
 
10420
10471
 
10421
10472
 
10473
+
10422
10474
  class MIPJumpToClickTool extends base/* BaseTool */.oS {
10423
10475
  constructor(toolProps = {}, defaultToolProps = {
10424
10476
  supportedInteractionTypes: ['Mouse', 'Touch'],
@@ -10436,7 +10488,7 @@ class MIPJumpToClickTool extends base/* BaseTool */.oS {
10436
10488
  if (!targetId.startsWith('volumeId')) {
10437
10489
  throw new Error(`MIPJumpToClickTool: targetId is not a volumeId, you should only use MIPJumpToClickTool with a volumeId as the targetId`);
10438
10490
  }
10439
- const volumeId = targetId.split(/volumeId:|\?/)[1];
10491
+ const volumeId = esm.utilities.getVolumeId(targetId);
10440
10492
  let maxIntensity = -Infinity;
10441
10493
  const maxFn = (intensity, point) => {
10442
10494
  if (intensity > maxIntensity) {
@@ -10595,6 +10647,20 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
10595
10647
  const viewports = (0,ToolGroupManager.getToolGroup)(this.toolGroupId).viewportsInfo;
10596
10648
  return viewports;
10597
10649
  };
10650
+ this.resetCrosshairs = () => {
10651
+ const viewportsInfo = this._getViewportsInfo();
10652
+ viewportsInfo.forEach(({ viewportId, renderingEngineId }) => {
10653
+ const enabledElement = (0,esm.getEnabledElementByIds)(viewportId, renderingEngineId);
10654
+ const { viewport } = enabledElement;
10655
+ const { element } = viewport;
10656
+ let annotations = this._getAnnotations(enabledElement);
10657
+ annotations = this.filterInteractableAnnotationsForElement(element, annotations);
10658
+ if (annotations.length) {
10659
+ (0,annotationState.removeAnnotation)(annotations[0].annotationUID);
10660
+ }
10661
+ });
10662
+ this.computeToolCenter(viewportsInfo);
10663
+ };
10598
10664
  this.computeToolCenter = (viewportsInfo) => {
10599
10665
  if (!viewportsInfo.length || viewportsInfo.length === 1) {
10600
10666
  throw new Error('For crosshairs to operate, at least two viewports must be given.');
@@ -12545,6 +12611,7 @@ var AnnotationDisplayTool = __webpack_require__(28062);
12545
12611
 
12546
12612
 
12547
12613
 
12614
+
12548
12615
  const { EPSILON: ReferenceLinesTool_EPSILON } = esm.CONSTANTS;
12549
12616
  class ReferenceLines extends AnnotationDisplayTool/* default */.A {
12550
12617
  constructor(toolProps = {}, defaultToolProps = {
@@ -12565,7 +12632,7 @@ class ReferenceLines extends AnnotationDisplayTool/* default */.A {
12565
12632
  let viewports = renderingEngine.getViewports();
12566
12633
  viewports = (0,viewportFilters.filterViewportsWithToolEnabled)(viewports, this.getToolName());
12567
12634
  const sourceViewport = renderingEngine.getViewport(this.configuration.sourceViewportId);
12568
- if (!sourceViewport || !sourceViewport.getImageData()) {
12635
+ if (!sourceViewport?.getImageData()) {
12569
12636
  return;
12570
12637
  }
12571
12638
  const { element } = sourceViewport;
@@ -12598,7 +12665,7 @@ class ReferenceLines extends AnnotationDisplayTool/* default */.A {
12598
12665
  sourceViewportCanvasCornersInWorld;
12599
12666
  }
12600
12667
  this.editData = {
12601
- sourceViewport,
12668
+ sourceViewportId: sourceViewport.id,
12602
12669
  renderingEngine,
12603
12670
  annotation,
12604
12671
  };
@@ -12609,13 +12676,17 @@ class ReferenceLines extends AnnotationDisplayTool/* default */.A {
12609
12676
  this.onSetToolEnabled = () => {
12610
12677
  this._init();
12611
12678
  };
12679
+ this.onSetToolConfiguration = () => {
12680
+ this._init();
12681
+ };
12612
12682
  this.onCameraModified = (evt) => {
12613
12683
  this._init();
12614
12684
  };
12615
12685
  this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
12616
12686
  const { viewport: targetViewport } = enabledElement;
12617
- const { annotation, sourceViewport } = this.editData;
12687
+ const { annotation, sourceViewportId } = this.editData;
12618
12688
  let renderStatus = false;
12689
+ const { viewport: sourceViewport } = (0,esm.getEnabledElementByViewportId)(sourceViewportId) || {};
12619
12690
  if (!sourceViewport) {
12620
12691
  return renderStatus;
12621
12692
  }
@@ -15255,10 +15326,10 @@ class RectangleROITool extends base/* AnnotationTool */.EC {
15255
15326
  cachedStats[targetId] = {
15256
15327
  Modality: metadata.Modality,
15257
15328
  area,
15258
- mean: stats[1]?.value,
15259
- stdDev: stats[2]?.value,
15260
- max: stats[0]?.value,
15261
- statsArray: stats,
15329
+ mean: stats.mean?.value,
15330
+ stdDev: stats.stdDev?.value,
15331
+ max: stats.max?.value,
15332
+ statsArray: stats.array,
15262
15333
  pointsInShape: pointsInShape,
15263
15334
  areaUnit: (0,getCalibratedUnits/* getCalibratedAreaUnits */.Ss)(null, image),
15264
15335
  modalityUnit,
@@ -15908,11 +15979,11 @@ class EllipticalROITool extends base/* AnnotationTool */.EC {
15908
15979
  cachedStats[targetId] = {
15909
15980
  Modality: metadata.Modality,
15910
15981
  area,
15911
- mean: stats[1]?.value,
15912
- max: stats[0]?.value,
15913
- stdDev: stats[2]?.value,
15914
- statsArray: stats,
15915
- pointsInShape: pointsInShape,
15982
+ mean: stats.mean?.value,
15983
+ max: stats.max?.value,
15984
+ stdDev: stats.stdDev?.value,
15985
+ statsArray: stats.array,
15986
+ pointsInShape,
15916
15987
  isEmptyArea,
15917
15988
  areaUnit: (0,getCalibratedUnits/* getCalibratedAreaUnits */.Ss)(null, image),
15918
15989
  modalityUnit,
@@ -16509,10 +16580,10 @@ class CircleROITool extends base/* AnnotationTool */.EC {
16509
16580
  cachedStats[targetId] = {
16510
16581
  Modality: metadata.Modality,
16511
16582
  area,
16512
- mean: stats[1]?.value,
16513
- max: stats[0]?.value,
16514
- stdDev: stats[2]?.value,
16515
- statsArray: stats,
16583
+ mean: stats.mean?.value,
16584
+ max: stats.max?.value,
16585
+ stdDev: stats.stdDev?.value,
16586
+ statsArray: stats.array,
16516
16587
  pointsInShape: pointsInShape,
16517
16588
  isEmptyArea,
16518
16589
  areaUnit: (0,getCalibratedUnits/* getCalibratedAreaUnits */.Ss)(null, image),
@@ -17106,10 +17177,12 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
17106
17177
  const splineType = annotation.data.spline.type;
17107
17178
  const splineConfig = this._getSplineConfig(splineType);
17108
17179
  const spline = annotation.data.spline.instance;
17109
- const splineAnnotationsGroup = [
17110
- annotation,
17111
- ...(0,annotationState.getChildAnnotations)(annotation),
17112
- ].filter((annotation) => this._isSplineROIAnnotation(annotation));
17180
+ const childAnnotations = (0,annotationState.getChildAnnotations)(annotation);
17181
+ const missingAnnotation = childAnnotations.findIndex((it) => !it);
17182
+ if (missingAnnotation !== -1) {
17183
+ throw new Error(`Can't find annotation for child ${annotation.childAnnotationUIDs.join()}`);
17184
+ }
17185
+ const splineAnnotationsGroup = [annotation, ...childAnnotations].filter((annotation) => this._isSplineROIAnnotation(annotation));
17113
17186
  splineAnnotationsGroup.forEach((annotation) => {
17114
17187
  const spline = this._updateSplineInstance(element, annotation);
17115
17188
  const splinePolylineCanvas = spline.getPolylinePoints();
@@ -17308,8 +17381,8 @@ class SplineContourSegmentationTool extends annotation_SplineROITool {
17308
17381
  SplineContourSegmentationTool.toolName = 'SplineContourSegmentationTool';
17309
17382
  /* harmony default export */ const annotation_SplineContourSegmentationTool = (SplineContourSegmentationTool);
17310
17383
 
17311
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/PlanarFreehandROITool.js + 9 modules
17312
- var PlanarFreehandROITool = __webpack_require__(96180);
17384
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/PlanarFreehandROITool.js + 8 modules
17385
+ var PlanarFreehandROITool = __webpack_require__(78279);
17313
17386
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js
17314
17387
  var PlanarFreehandContourSegmentationTool = __webpack_require__(20070);
17315
17388
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/findHandlePolylineIndex.js
@@ -18783,6 +18856,9 @@ function AngleTool_defaultGetTextLines(data, targetId) {
18783
18856
  if (angle === undefined) {
18784
18857
  return;
18785
18858
  }
18859
+ if (isNaN(angle)) {
18860
+ return [`${angle}`];
18861
+ }
18786
18862
  const textLines = [`${(0,utilities.roundNumber)(angle)} ${String.fromCharCode(176)}`];
18787
18863
  return textLines;
18788
18864
  }
@@ -20914,7 +20990,7 @@ class RectangleROIThresholdTool extends annotation_RectangleROITool {
20914
20990
  referencedImageId = targetId.split('imageId:')[1];
20915
20991
  }
20916
20992
  else {
20917
- volumeId = targetId.split(/volumeId:|\?/)[1];
20993
+ volumeId = esm.utilities.getVolumeId(targetId);
20918
20994
  const imageVolume = esm.cache.getVolume(volumeId);
20919
20995
  referencedImageId = esm.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
20920
20996
  }
@@ -21065,7 +21141,7 @@ class RectangleROIStartEndThresholdTool extends annotation_RectangleROITool {
21065
21141
  }
21066
21142
  else {
21067
21143
  const targetId = this.getTargetId(viewport);
21068
- volumeId = targetId.split(/volumeId:|\?/)[1];
21144
+ volumeId = esm.utilities.getVolumeId(targetId);
21069
21145
  imageVolume = esm.cache.getVolume(volumeId);
21070
21146
  referencedImageId = esm.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
21071
21147
  }
@@ -21304,13 +21380,13 @@ class RectangleROIStartEndThresholdTool extends annotation_RectangleROITool {
21304
21380
  }
21305
21381
  _calculateCachedStatsTool(annotation, enabledElement) {
21306
21382
  const data = annotation.data;
21307
- const { element, viewport } = enabledElement;
21383
+ const { viewport } = enabledElement;
21308
21384
  const { cachedStats } = data;
21309
21385
  const targetId = this.getTargetId(viewport);
21310
21386
  const imageVolume = esm.cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
21311
21387
  this._computeProjectionPoints(annotation, imageVolume);
21312
21388
  annotation.invalidated = false;
21313
- (0,state/* triggerAnnotationModified */.XF)(annotation, element);
21389
+ (0,state/* triggerAnnotationModified */.XF)(annotation, viewport.element);
21314
21390
  return cachedStats;
21315
21391
  }
21316
21392
  _getEndSliceIndex(imageVolume, worldPos, spacingInNormal, viewPlaneNormal) {
@@ -21368,7 +21444,6 @@ class CircleROIStartEndThresholdTool extends annotation_CircleROITool {
21368
21444
  const eventDetail = evt.detail;
21369
21445
  const { currentPoints, element } = eventDetail;
21370
21446
  const worldPos = currentPoints.world;
21371
- const canvasPos = currentPoints.canvas;
21372
21447
  const enabledElement = (0,esm.getEnabledElement)(element);
21373
21448
  const { viewport, renderingEngine } = enabledElement;
21374
21449
  this.isDrawing = true;
@@ -21380,7 +21455,7 @@ class CircleROIStartEndThresholdTool extends annotation_CircleROITool {
21380
21455
  }
21381
21456
  else {
21382
21457
  const targetId = this.getTargetId(viewport);
21383
- volumeId = targetId.split(/volumeId:|\?/)[1];
21458
+ volumeId = esm.utilities.getVolumeId(targetId);
21384
21459
  imageVolume = esm.cache.getVolume(volumeId);
21385
21460
  referencedImageId = esm.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
21386
21461
  }
@@ -22325,7 +22400,7 @@ SegmentSelectTool.toolName = 'SegmentSelectTool';
22325
22400
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22326
22401
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
22327
22402
  /* harmony export */ });
22328
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
22403
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
22329
22404
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83636);
22330
22405
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96214);
22331
22406
  /* harmony import */ var _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(61604);
@@ -22366,6 +22441,7 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
22366
22441
  strategySpecificConfiguration: {
22367
22442
  THRESHOLD: {
22368
22443
  threshold: [-150, -70],
22444
+ dynamicRadius: 0,
22369
22445
  },
22370
22446
  },
22371
22447
  defaultStrategy: 'FILL_INSIDE_CIRCLE',
@@ -22379,7 +22455,6 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
22379
22455
  dragMoveDistance: 4,
22380
22456
  dragTimeMs: 500,
22381
22457
  },
22382
- centerRadius: 2,
22383
22458
  actions: {
22384
22459
  [_enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.AcceptPreview]: {
22385
22460
  method: _enums__WEBPACK_IMPORTED_MODULE_7__.StrategyCallbacks.AcceptPreview,
@@ -22687,6 +22762,14 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
22687
22762
  leftCursorInWorld,
22688
22763
  rightCursorInWorld,
22689
22764
  ];
22765
+ const activeStrategy = this.configuration.activeStrategy;
22766
+ const strategy = this.configuration.strategies[activeStrategy];
22767
+ if (typeof strategy.computeInnerCircleRadius === 'function') {
22768
+ strategy.computeInnerCircleRadius({
22769
+ configuration: this.configuration,
22770
+ viewport,
22771
+ });
22772
+ }
22690
22773
  data.invalidated = false;
22691
22774
  }
22692
22775
  rejectPreview(element = this._previewData.element) {
@@ -22755,10 +22838,14 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
22755
22838
  (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_8__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, center, radius, {
22756
22839
  color,
22757
22840
  });
22758
- const { centerRadius } = this.configuration;
22759
- if (centerRadius >= 0) {
22841
+ const activeStrategy = this.configuration.activeStrategy;
22842
+ const { dynamicRadiusInCanvas } = this.configuration
22843
+ .strategySpecificConfiguration[activeStrategy] || {
22844
+ dynamicRadiusInCanvas: 0,
22845
+ };
22846
+ if (dynamicRadiusInCanvas) {
22760
22847
  const circleUID1 = '1';
22761
- (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_8__.drawCircle)(svgDrawingHelper, annotationUID, circleUID1, center, 2, {
22848
+ (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_8__.drawCircle)(svgDrawingHelper, annotationUID, circleUID1, center, dynamicRadiusInCanvas, {
22762
22849
  color,
22763
22850
  });
22764
22851
  }
@@ -22776,7 +22863,7 @@ BrushTool.toolName = 'Brush';
22776
22863
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22777
22864
  /* harmony export */ r: () => (/* binding */ isVolumeSegmentation)
22778
22865
  /* harmony export */ });
22779
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
22866
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
22780
22867
 
22781
22868
  function isVolumeSegmentation(operationData, viewport) {
22782
22869
  const { imageIdReferenceMap } = operationData;
@@ -22840,7 +22927,7 @@ function extend2DBoundingBoxInViewAxis(boundsIJK, numSlicesToProject) {
22840
22927
  /* harmony export */ C: () => (/* binding */ getBoundingBoxAroundShapeWorld),
22841
22928
  /* harmony export */ g: () => (/* binding */ getBoundingBoxAroundShapeIJK)
22842
22929
  /* harmony export */ });
22843
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
22930
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
22844
22931
 
22845
22932
  const { EPSILON } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS;
22846
22933
  function calculateBoundingBox(points, dimensions, isWorld = false) {
@@ -22947,6 +23034,9 @@ function clipToBox(point, box) {
22947
23034
  /* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30322);
22948
23035
 
22949
23036
  function addContourSegmentationAnnotation(annotation) {
23037
+ if (annotation.parentAnnotationUID) {
23038
+ return;
23039
+ }
22950
23040
  if (!annotation.data.segmentation) {
22951
23041
  throw new Error('addContourSegmentationAnnotation: annotation does not have a segmentation data');
22952
23042
  }
@@ -23032,7 +23122,7 @@ function removeContourSegmentationAnnotation(annotation) {
23032
23122
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23033
23123
  /* harmony export */ A: () => (/* binding */ findHandlePolylineIndex)
23034
23124
  /* harmony export */ });
23035
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
23125
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
23036
23126
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83636);
23037
23127
 
23038
23128
 
@@ -23296,8 +23386,8 @@ function processContourHoles(contours, points, useXOR = true) {
23296
23386
  }
23297
23387
  /* harmony default export */ const detectContourHoles = ({ processContourHoles });
23298
23388
 
23299
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
23300
- var dist_esm = __webpack_require__(39526);
23389
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
23390
+ var dist_esm = __webpack_require__(50719);
23301
23391
  // EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Filters/General/ImageMarchingSquares.js
23302
23392
  var ImageMarchingSquares = __webpack_require__(52754);
23303
23393
  // EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Common/Core/DataArray.js
@@ -23536,7 +23626,7 @@ __webpack_require__.r(__webpack_exports__);
23536
23626
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23537
23627
  /* harmony export */ A: () => (/* binding */ updateContourPolyline)
23538
23628
  /* harmony export */ });
23539
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
23629
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
23540
23630
  /* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39956);
23541
23631
  /* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95778);
23542
23632
 
@@ -23763,7 +23853,7 @@ function _determineCorners(canvasPoints) {
23763
23853
  /* harmony export */ Xw: () => (/* binding */ getCalibratedProbeUnitsAndValue),
23764
23854
  /* harmony export */ yH: () => (/* binding */ getCalibratedScale)
23765
23855
  /* harmony export */ });
23766
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
23856
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
23767
23857
 
23768
23858
  const { CalibrationTypes } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.Enums;
23769
23859
  const PIXEL_UNITS = 'px';
@@ -23865,6 +23955,10 @@ const getCalibratedLengthUnitsAndScale = (image, handles) => {
23865
23955
  else if (calibration.scale) {
23866
23956
  scale = calibration.scale;
23867
23957
  }
23958
+ const types = [CalibrationTypes.ERMF, CalibrationTypes.USER, CalibrationTypes.ERROR, CalibrationTypes.PROJECTION];
23959
+ if (types.includes(calibration?.type)) {
23960
+ calibrationType = calibration.type;
23961
+ }
23868
23962
  return {
23869
23963
  units: units + (calibrationType ? ` ${calibrationType}` : ''),
23870
23964
  areaUnits: areaUnits + (calibrationType ? ` ${calibrationType}` : ''),
@@ -23926,7 +24020,7 @@ const getCalibratedAspect = (image) => image.calibration?.aspect || 1;
23926
24020
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23927
24021
  /* harmony export */ R: () => (/* binding */ getSphereBoundsInfo)
23928
24022
  /* harmony export */ });
23929
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
24023
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
23930
24024
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83636);
23931
24025
  /* harmony import */ var _boundingBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15306);
23932
24026
 
@@ -23996,7 +24090,7 @@ function getViewportForAnnotation(annotation) {
23996
24090
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23997
24091
  /* harmony export */ A: () => (/* binding */ getViewportsForAnnotation)
23998
24092
  /* harmony export */ });
23999
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
24093
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
24000
24094
 
24001
24095
  const { isEqual } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
24002
24096
  function getViewportsForAnnotation(annotation) {
@@ -24137,8 +24231,8 @@ __webpack_require__.d(voi_namespaceObject, {
24137
24231
  colorbar: () => (colorbar_namespaceObject)
24138
24232
  });
24139
24233
 
24140
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
24141
- var esm = __webpack_require__(39526);
24234
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
24235
+ var esm = __webpack_require__(50719);
24142
24236
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/annotationState.js
24143
24237
  var annotationState = __webpack_require__(38296);
24144
24238
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js
@@ -24473,6 +24567,9 @@ function getToolState(element) {
24473
24567
  const { viewportId } = enabledElement;
24474
24568
  return state[viewportId];
24475
24569
  }
24570
+ function getToolStateByViewportId(viewportId) {
24571
+ return state[viewportId];
24572
+ }
24476
24573
 
24477
24574
 
24478
24575
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/cine/playClip.js
@@ -24521,7 +24618,10 @@ function playClip(element, playClipOptions) {
24521
24618
  addToolState(element, playClipData);
24522
24619
  }
24523
24620
  else {
24524
- _stopClip(element, isDynamicCinePlaying);
24621
+ _stopClip(element, {
24622
+ stopDynamicCine: !isDynamicCinePlaying,
24623
+ viewportId: viewport.id,
24624
+ });
24525
24625
  }
24526
24626
  playClipData.dynamicCineEnabled = playClipOptions.dynamicCineEnabled;
24527
24627
  if (playClipOptions.framesPerSecond < 0 ||
@@ -24543,7 +24643,10 @@ function playClip(element, playClipOptions) {
24543
24643
  let newStepIndex = currentStepIndex + (playClipData.reverse ? -1 : 1);
24544
24644
  const newStepIndexOutOfRange = newStepIndex < 0 || newStepIndex >= numScrollSteps;
24545
24645
  if (!loop && newStepIndexOutOfRange) {
24546
- _stopClip(element, isDynamicCinePlaying);
24646
+ _stopClip(element, {
24647
+ stopDynamicCine: !isDynamicCinePlaying,
24648
+ viewportId: viewport.id,
24649
+ });
24547
24650
  const eventDetail = { element };
24548
24651
  triggerEvent(element, events.CLIP_STOPPED, eventDetail);
24549
24652
  return;
@@ -24580,20 +24683,33 @@ function playClip(element, playClipOptions) {
24580
24683
  };
24581
24684
  triggerEvent(element, events.CLIP_STARTED, eventDetail);
24582
24685
  }
24583
- function stopClip(element) {
24584
- _stopClip(element, true);
24686
+ function stopClip(element, viewportId) {
24687
+ _stopClip(element, {
24688
+ stopDynamicCine: true,
24689
+ viewportId,
24690
+ });
24585
24691
  }
24586
- function _stopClip(element, stopDynamicCine) {
24692
+ function _stopClip(element, options = { stopDynamicCine: true, viewportId: undefined }) {
24693
+ const { stopDynamicCine, viewportId } = options;
24587
24694
  const enabledElement = (0,esm.getEnabledElement)(element);
24695
+ let toolState;
24588
24696
  if (!enabledElement) {
24589
- return;
24697
+ if (viewportId) {
24698
+ toolState = getToolStateByViewportId(viewportId);
24699
+ }
24700
+ else {
24701
+ return;
24702
+ }
24590
24703
  }
24591
- const { viewport } = enabledElement;
24592
- const cineToolData = getToolState(viewport.element);
24593
- if (cineToolData) {
24594
- _stopClipWithData(cineToolData);
24704
+ else {
24705
+ const { viewport } = enabledElement;
24706
+ toolState = getToolState(viewport.element);
24707
+ }
24708
+ if (toolState) {
24709
+ _stopClipWithData(toolState);
24595
24710
  }
24596
- if (stopDynamicCine && viewport instanceof esm.BaseVolumeViewport) {
24711
+ if (stopDynamicCine &&
24712
+ enabledElement?.viewport instanceof esm.BaseVolumeViewport) {
24597
24713
  _stopDynamicVolumeCine(element);
24598
24714
  }
24599
24715
  }
@@ -25899,22 +26015,45 @@ class BasicStatsCalculator extends basic_Calculator {
25899
26015
  const mean = this.sum.map((sum) => sum / this.count);
25900
26016
  const stdDev = this.squaredDiffSum.map((squaredDiffSum) => Math.sqrt(squaredDiffSum / this.count));
25901
26017
  const stdDevWithSumSquare = this.sumSquares.map((it, idx) => Math.sqrt(this.sumSquares[idx] / this.count - mean[idx] ** 2));
25902
- const currentMax = this.max;
26018
+ const named = {
26019
+ max: {
26020
+ name: 'max',
26021
+ label: 'Max Pixel',
26022
+ value: singleArrayAsNumber(this.max),
26023
+ unit: null,
26024
+ },
26025
+ mean: {
26026
+ name: 'mean',
26027
+ label: 'Mean Pixel',
26028
+ value: singleArrayAsNumber(mean),
26029
+ unit: null,
26030
+ },
26031
+ stdDev: {
26032
+ name: 'stdDev',
26033
+ label: 'Standard Deviation',
26034
+ value: singleArrayAsNumber(stdDev),
26035
+ unit: null,
26036
+ },
26037
+ stdDevWithSumSquare: {
26038
+ name: 'stdDevWithSumSquare',
26039
+ value: singleArrayAsNumber(stdDevWithSumSquare),
26040
+ unit: null,
26041
+ },
26042
+ count: {
26043
+ name: 'count',
26044
+ label: 'Pixel Count',
26045
+ value: this.count,
26046
+ unit: null,
26047
+ },
26048
+ array: [],
26049
+ };
26050
+ named.array.push(named.max, named.mean, named.stdDev, named.stdDevWithSumSquare, named.count);
25903
26051
  this.max = [-Infinity];
25904
26052
  this.sum = [0];
25905
26053
  this.sumSquares = [0];
25906
26054
  this.squaredDiffSum = [0];
25907
26055
  this.count = 0;
25908
- return [
25909
- { name: 'max', value: singleArrayAsNumber(currentMax), unit: null },
25910
- { name: 'mean', value: singleArrayAsNumber(mean), unit: null },
25911
- { name: 'stdDev', value: singleArrayAsNumber(stdDev), unit: null },
25912
- {
25913
- name: 'stdDevWithSumSquare',
25914
- value: singleArrayAsNumber(stdDevWithSumSquare),
25915
- unit: null,
25916
- },
25917
- ];
26056
+ return named;
25918
26057
  }; }
25919
26058
  }
25920
26059
  function singleArrayAsNumber(val) {
@@ -26942,8 +27081,8 @@ function getClosestLineSegmentIntersection(points, p1, q1, closed = true) {
26942
27081
  };
26943
27082
  }
26944
27083
 
26945
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
26946
- var dist_esm = __webpack_require__(39526);
27084
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
27085
+ var dist_esm = __webpack_require__(50719);
26947
27086
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js
26948
27087
 
26949
27088
 
@@ -27516,7 +27655,7 @@ function pointToString(point, decimals = 5) {
27516
27655
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27517
27656
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
27518
27657
  /* harmony export */ });
27519
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
27658
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
27520
27659
  /* harmony import */ var _boundingBox_getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14471);
27521
27660
  /* harmony import */ var _boundingBox_extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42290);
27522
27661
 
@@ -27574,7 +27713,7 @@ function getBoundsIJKFromRectangleAnnotations(annotations, referenceVolume, opti
27574
27713
  /* harmony export */ l: () => (/* binding */ isAxisAlignedRectangle)
27575
27714
  /* harmony export */ });
27576
27715
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83636);
27577
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39526);
27716
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50719);
27578
27717
 
27579
27718
 
27580
27719
  const { isEqual } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities;
@@ -27608,7 +27747,7 @@ function calculateAnglesWithAxes(vec, axes) {
27608
27747
  /* harmony export */ A: () => (/* binding */ scroll)
27609
27748
  /* harmony export */ });
27610
27749
  /* unused harmony export scrollVolume */
27611
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
27750
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
27612
27751
 
27613
27752
  function scroll(viewport, options) {
27614
27753
  const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(viewport.element);
@@ -27676,10 +27815,10 @@ function scrollVolume(viewport, volumeId, delta, scrollSlabs = false) {
27676
27815
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27677
27816
  /* harmony export */ A: () => (/* binding */ InterpolationManager)
27678
27817
  /* harmony export */ });
27679
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
27818
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
27680
27819
  /* harmony import */ var _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45200);
27681
27820
  /* harmony import */ var _contours_interpolation_getInterpolationDataCollection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23237);
27682
- /* harmony import */ var _contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25034);
27821
+ /* harmony import */ var _contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7727);
27683
27822
  /* harmony import */ var _deleteRelatedAnnotations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20629);
27684
27823
  /* harmony import */ var _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42111);
27685
27824
  /* harmony import */ var _getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39490);
@@ -28005,7 +28144,7 @@ function lpad(string, character, length) {
28005
28144
  /* harmony export */ OX: () => (/* binding */ getUniqueSegmentIndices)
28006
28145
  /* harmony export */ });
28007
28146
  /* unused harmony export setSegmentationClean */
28008
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
28147
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
28009
28148
  /* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30322);
28010
28149
  /* harmony import */ var _tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16124);
28011
28150
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(84901);
@@ -28265,8 +28404,8 @@ function _validateAnnotations(annotations) {
28265
28404
  }
28266
28405
  /* harmony default export */ const segmentation_rectangleROIThresholdVolumeByRange = (rectangleROIThresholdVolumeByRange);
28267
28406
 
28268
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
28269
- var esm = __webpack_require__(39526);
28407
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
28408
+ var esm = __webpack_require__(50719);
28270
28409
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.js
28271
28410
 
28272
28411
  function createMergedLabelmapForIndex(labelmaps, segmentIndex = 1, volumeId = 'mergedLabelmap') {
@@ -29081,7 +29220,7 @@ function getHoveredContourSegmentationAnnotation(segmentationId) {
29081
29220
  /* harmony export */ h6: () => (/* binding */ triggerSegmentationRender),
29082
29221
  /* harmony export */ px: () => (/* binding */ segmentationRenderingEngine)
29083
29222
  /* harmony export */ });
29084
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
29223
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
29085
29224
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
29086
29225
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52610);
29087
29226
  /* harmony import */ var _tools_displayTools_SegmentationDisplayTool__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31163);
@@ -29205,7 +29344,7 @@ function triggerSegmentationRender(toolGroupId) {
29205
29344
  /* harmony export */ Q5: () => (/* binding */ getVoxelOverlap),
29206
29345
  /* harmony export */ zf: () => (/* binding */ processVolumes)
29207
29346
  /* harmony export */ });
29208
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
29347
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
29209
29348
  /* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52610);
29210
29349
  /* harmony import */ var _tools_segmentation_BrushTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53712);
29211
29350
  /* harmony import */ var _boundingBox_getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14471);
@@ -29491,7 +29630,7 @@ function _getDistance3D(point0, point1) {
29491
29630
  /* harmony export */ ou: () => (/* binding */ annotationRenderingEngine)
29492
29631
  /* harmony export */ });
29493
29632
  /* unused harmony export triggerAnnotationRender */
29494
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
29633
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
29495
29634
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
29496
29635
  /* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2746);
29497
29636
  /* harmony import */ var _getToolsWithModesForElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42360);
@@ -29670,7 +29809,7 @@ __webpack_require__.r(__webpack_exports__);
29670
29809
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29671
29810
  /* harmony export */ u: () => (/* binding */ isViewportPreScaled)
29672
29811
  /* harmony export */ });
29673
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
29812
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
29674
29813
 
29675
29814
  function isViewportPreScaled(viewport, targetId) {
29676
29815
  if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
@@ -29700,7 +29839,7 @@ function isViewportPreScaled(viewport, targetId) {
29700
29839
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29701
29840
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
29702
29841
  /* harmony export */ });
29703
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
29842
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
29704
29843
  /* harmony import */ var _clip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88484);
29705
29844
  /* harmony import */ var _scroll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21783);
29706
29845
 
@@ -29749,7 +29888,7 @@ function _getImageIndexToJump(numberOfSlices, imageIndex) {
29749
29888
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29750
29889
  /* harmony export */ A: () => (/* binding */ jumpToWorld)
29751
29890
  /* harmony export */ });
29752
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39526);
29891
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
29753
29892
  /* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83636);
29754
29893
 
29755
29894
 
@@ -29848,8 +29987,8 @@ function _toolGroupHasActiveEnabledOrPassiveTool(toolGroup, toolName) {
29848
29987
  return toolMode === Active || toolMode === Passive || toolMode === Enabled;
29849
29988
  }
29850
29989
 
29851
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 382 modules
29852
- var esm = __webpack_require__(39526);
29990
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 383 modules
29991
+ var esm = __webpack_require__(50719);
29853
29992
  // EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 10 modules
29854
29993
  var gl_matrix_esm = __webpack_require__(83636);
29855
29994
  ;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewportFilters/filterViewportsWithParallelNormals.js