@ohif/app 3.12.0-beta.67 → 3.12.0-beta.69
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.
- package/dist/{1447.bundle.40045129a43f8dd9c901.js → 1447.bundle.0e8117bd9e72c339bd04.js} +2 -2
- package/dist/{2518.bundle.57c229a14e22d23db384.js → 2518.bundle.bdbd870da5355fdf502a.js} +8 -3
- package/dist/{319.bundle.fc959064ddf2f6978b54.js → 319.bundle.cd9383a345b9da2ba840.js} +1 -1
- package/dist/{3409.bundle.ded798747ea65b47c72c.js → 3409.bundle.2d77e2bddb2a19e798ed.js} +14 -1
- package/dist/{9819.bundle.29fb49e6d25cf486a204.js → 3613.bundle.14721af2527117f720b0.js} +492 -17
- package/dist/{4019.bundle.13e7f662a9e489b74a27.js → 4019.bundle.acd0f85d0467cb10d86a.js} +14 -7
- package/dist/{4113.bundle.d57b077bf8b22a2fffe6.js → 4113.bundle.cdb5aabbb16c44b3937d.js} +7 -11
- package/dist/{2345.bundle.c17b90bde0073fd7dbb6.js → 5400.bundle.eb0f5866140b5db31518.js} +5 -61
- package/dist/{7412.bundle.9ff692981e3c3af1dfaf.js → 7412.bundle.a8aa0b243b2a05031789.js} +660 -417
- package/dist/{8558.bundle.81679f1abf949872a8d7.js → 8558.bundle.29e3ea8a442b8a40e89d.js} +1 -1
- package/dist/{9856.bundle.4d469a7b62ac0c005da2.js → 9856.bundle.31827ec7e09a8978744c.js} +77 -10
- package/dist/{9892.bundle.34f911ad728a17a0ad60.js → 9892.bundle.7a23896727af274e8c43.js} +154 -457
- package/dist/{app.bundle.5e500cc3ae1ec8449424.js → app.bundle.fb405f7159a5d06049af.js} +28 -26
- package/dist/{compute.bundle.bf2d925bfc81c7f05c06.js → compute.bundle.5d0df54f99d2a555a02a.js} +3 -3
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.1d99496fc36c90c48d48.js → polySeg.bundle.eb47d9d9105dcfbb56fc.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +21 -21
- /package/dist/{1459.bundle.a3c4154b8f8a929875f6.js → 1459.bundle.6d1fa1c8fdbb81f0f359.js} +0 -0
- /package/dist/{147.bundle.5081555db809adebded5.js → 147.bundle.23cc8fbbd94c0b65d337.js} +0 -0
- /package/dist/{1604.bundle.54c4d82c28d03adab00b.js → 1604.bundle.47f2f0635a91795b3c49.js} +0 -0
- /package/dist/{1807.bundle.92de522ae4def176aff6.js → 1807.bundle.68fc01f6cad9998763ea.js} +0 -0
- /package/dist/{1919.bundle.b709d24082a089fb96f9.js → 1919.bundle.1931c96cc842a6098baa.js} +0 -0
- /package/dist/{213.bundle.06da551965e6495eaf22.js → 213.bundle.f9c868b449c1a68b6f35.js} +0 -0
- /package/dist/{2243.bundle.49e31757e1b67c1631af.js → 2243.bundle.2e464ef173f36231cf06.js} +0 -0
- /package/dist/{2424.bundle.b84347c7c65b70298931.js → 2424.bundle.a9eecc0e2aeb8699f135.js} +0 -0
- /package/dist/{414.bundle.62d7f459bd4c3888de2a.js → 414.bundle.46f922eb0a1911124a73.js} +0 -0
- /package/dist/{5457.bundle.74835d952cd31adf54df.js → 5457.bundle.ee43997565093fa2caec.js} +0 -0
- /package/dist/{5485.bundle.7b59b0105c66003eb8c5.js → 5485.bundle.a15a2f530189848c31ee.js} +0 -0
- /package/dist/{6027.bundle.39d04080242ce96ac848.js → 6027.bundle.8971d7d4eec7b0b4cfb7.js} +0 -0
- /package/dist/{6201.bundle.568aac152c31949d09a4.js → 6201.bundle.cc73f3d377cacd418cb0.js} +0 -0
- /package/dist/{6991.bundle.a0f689bfa5ad3f3ee4a8.js → 6991.bundle.77f5d56a53a04f524bc3.js} +0 -0
- /package/dist/{7197.bundle.c0d2f4d7071f1d49223f.js → 7197.bundle.364e03cf01a6b56217f9.js} +0 -0
- /package/dist/{7431.bundle.859d7586ac7a86c27fb8.js → 7431.bundle.6dee1ec831da974a7433.js} +0 -0
- /package/dist/{7639.bundle.3bae54d7c31bb87eb68e.js → 7639.bundle.e6024d8f644419db89ff.js} +0 -0
- /package/dist/{810.bundle.536730c2c4702996ce35.js → 810.bundle.0806263ecf7902133c17.js} +0 -0
- /package/dist/{85.bundle.1848a6604cfd55f08b91.js → 85.bundle.de54be0dcfcc960c45a0.js} +0 -0
- /package/dist/{8815.bundle.c6b394394ee3e5dda949.js → 8815.bundle.4fe4069d6c0a8d9b95cb.js} +0 -0
- /package/dist/{934.bundle.3cbbd88355500a623dcb.js → 934.bundle.5aef917dada6d51ac96b.js} +0 -0
- /package/dist/{9862.bundle.30916d7d975475c609a1.js → 9862.bundle.dc627e5f01fc4698a00f.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[9892,
|
|
1
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[9892,5400],{
|
|
2
2
|
|
|
3
3
|
/***/ 5057:
|
|
4
4
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -6042,7 +6042,8 @@ function toWindowLevel(low, high) {
|
|
|
6042
6042
|
return { windowWidth, windowCenter };
|
|
6043
6043
|
}
|
|
6044
6044
|
function toLowHighRange(windowWidth, windowCenter, voiLUTFunction = _enums_VOILUTFunctionType__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.LINEAR) {
|
|
6045
|
-
if (voiLUTFunction === _enums_VOILUTFunctionType__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.LINEAR
|
|
6045
|
+
if (voiLUTFunction === _enums_VOILUTFunctionType__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.LINEAR ||
|
|
6046
|
+
voiLUTFunction === _enums_VOILUTFunctionType__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.SAMPLED_SIGMOID) {
|
|
6046
6047
|
return {
|
|
6047
6048
|
lower: windowCenter - 0.5 - (windowWidth - 1) / 2,
|
|
6048
6049
|
upper: windowCenter - 0.5 + (windowWidth - 1) / 2,
|
|
@@ -6054,14 +6055,6 @@ function toLowHighRange(windowWidth, windowCenter, voiLUTFunction = _enums_VOILU
|
|
|
6054
6055
|
upper: windowCenter + windowWidth / 2,
|
|
6055
6056
|
};
|
|
6056
6057
|
}
|
|
6057
|
-
else if (voiLUTFunction === _enums_VOILUTFunctionType__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.SAMPLED_SIGMOID) {
|
|
6058
|
-
const xLower = (0,_logit__WEBPACK_IMPORTED_MODULE_1__/* .logit */ .i)(0.01, windowCenter, windowWidth);
|
|
6059
|
-
const xUpper = (0,_logit__WEBPACK_IMPORTED_MODULE_1__/* .logit */ .i)(0.99, windowCenter, windowWidth);
|
|
6060
|
-
return {
|
|
6061
|
-
lower: xLower,
|
|
6062
|
-
upper: xUpper,
|
|
6063
|
-
};
|
|
6064
|
-
}
|
|
6065
6058
|
else {
|
|
6066
6059
|
throw new Error('Invalid VOI LUT function');
|
|
6067
6060
|
}
|
|
@@ -6925,7 +6918,7 @@ var COLOR_LUT = __webpack_require__(93952);
|
|
|
6925
6918
|
|
|
6926
6919
|
|
|
6927
6920
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/version.js
|
|
6928
|
-
const version = '4.5.
|
|
6921
|
+
const version = '4.5.19';
|
|
6929
6922
|
|
|
6930
6923
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/callbacks/cameraSyncCallback.js
|
|
6931
6924
|
|
|
@@ -9744,8 +9737,8 @@ var cursors = __webpack_require__(79475);
|
|
|
9744
9737
|
var types = __webpack_require__(13369);
|
|
9745
9738
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/index.js + 1 modules
|
|
9746
9739
|
var annotation = __webpack_require__(47807);
|
|
9747
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/index.js +
|
|
9748
|
-
var stateManagement_segmentation = __webpack_require__(
|
|
9740
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/index.js + 9 modules
|
|
9741
|
+
var stateManagement_segmentation = __webpack_require__(55126);
|
|
9749
9742
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/splines/Spline.js
|
|
9750
9743
|
|
|
9751
9744
|
class Spline_Spline {
|
|
@@ -13901,6 +13894,7 @@ var MatrixBuilder = __webpack_require__(89265);
|
|
|
13901
13894
|
|
|
13902
13895
|
|
|
13903
13896
|
|
|
13897
|
+
|
|
13904
13898
|
const { RENDERING_DEFAULTS: CrosshairsTool_RENDERING_DEFAULTS } = esm.CONSTANTS;
|
|
13905
13899
|
function CrosshairsTool_defaultReferenceLineColor() {
|
|
13906
13900
|
return 'rgb(0, 200, 0)';
|
|
@@ -15070,9 +15064,42 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
|
|
|
15070
15064
|
});
|
|
15071
15065
|
}
|
|
15072
15066
|
setToolCenter(toolCenter, suppressEvents = false) {
|
|
15073
|
-
this.toolCenter = toolCenter;
|
|
15074
15067
|
const viewportsInfo = this._getViewportsInfo();
|
|
15075
|
-
|
|
15068
|
+
viewportsInfo.map(({ renderingEngineId, viewportId }) => {
|
|
15069
|
+
const renderingEngine = (0,esm.getRenderingEngine)(renderingEngineId);
|
|
15070
|
+
const viewport = renderingEngine.getViewport(viewportId);
|
|
15071
|
+
const camera = viewport.getCamera();
|
|
15072
|
+
const { focalPoint, position, viewPlaneNormal } = camera;
|
|
15073
|
+
const delta = [
|
|
15074
|
+
toolCenter[0] - focalPoint[0],
|
|
15075
|
+
toolCenter[1] - focalPoint[1],
|
|
15076
|
+
toolCenter[2] - focalPoint[2],
|
|
15077
|
+
];
|
|
15078
|
+
const scroll = delta[0] * viewPlaneNormal[0] +
|
|
15079
|
+
delta[1] * viewPlaneNormal[1] +
|
|
15080
|
+
delta[2] * viewPlaneNormal[2];
|
|
15081
|
+
const scrollDelta = [
|
|
15082
|
+
scroll * viewPlaneNormal[0],
|
|
15083
|
+
scroll * viewPlaneNormal[1],
|
|
15084
|
+
scroll * viewPlaneNormal[2],
|
|
15085
|
+
];
|
|
15086
|
+
const newFocalPoint = [
|
|
15087
|
+
focalPoint[0] + scrollDelta[0],
|
|
15088
|
+
focalPoint[1] + scrollDelta[1],
|
|
15089
|
+
focalPoint[2] + scrollDelta[2],
|
|
15090
|
+
];
|
|
15091
|
+
const newPosition = [
|
|
15092
|
+
position[0] + scrollDelta[0],
|
|
15093
|
+
position[1] + scrollDelta[1],
|
|
15094
|
+
position[2] + scrollDelta[2],
|
|
15095
|
+
];
|
|
15096
|
+
viewport.setCamera({
|
|
15097
|
+
focalPoint: newFocalPoint,
|
|
15098
|
+
position: newPosition,
|
|
15099
|
+
});
|
|
15100
|
+
viewport.render();
|
|
15101
|
+
});
|
|
15102
|
+
this.toolCenter = toolCenter;
|
|
15076
15103
|
if (!suppressEvents) {
|
|
15077
15104
|
(0,esm.triggerEvent)(esm.eventTarget, enums.Events.CROSSHAIR_TOOL_CENTER_CHANGED, {
|
|
15078
15105
|
toolGroupId: this.toolGroupId,
|
|
@@ -15469,6 +15496,11 @@ class MagnifyTool extends base/* BaseTool */.oS {
|
|
|
15469
15496
|
magnifyToolElement.style.display = 'block';
|
|
15470
15497
|
(0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
|
|
15471
15498
|
};
|
|
15499
|
+
this._cancelCallback = (evt) => {
|
|
15500
|
+
evt.preventDefault();
|
|
15501
|
+
evt.stopPropagation();
|
|
15502
|
+
this._dragEndCallback(evt);
|
|
15503
|
+
};
|
|
15472
15504
|
this._dragCallback = (evt) => {
|
|
15473
15505
|
const eventDetail = evt.detail;
|
|
15474
15506
|
const { deltaPoints, element, currentPoints } = eventDetail;
|
|
@@ -15501,7 +15533,12 @@ class MagnifyTool extends base/* BaseTool */.oS {
|
|
|
15501
15533
|
magnifyViewport.render();
|
|
15502
15534
|
};
|
|
15503
15535
|
this._dragEndCallback = (evt) => {
|
|
15504
|
-
|
|
15536
|
+
let { element } = evt.detail;
|
|
15537
|
+
if (element === undefined) {
|
|
15538
|
+
const { enabledElement } = this.editData;
|
|
15539
|
+
const { viewport } = enabledElement;
|
|
15540
|
+
element = viewport.element;
|
|
15541
|
+
}
|
|
15505
15542
|
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
15506
15543
|
const { renderingEngine } = enabledElement;
|
|
15507
15544
|
renderingEngine.disableElement(MAGNIFY_VIEWPORT_ID);
|
|
@@ -15518,6 +15555,7 @@ class MagnifyTool extends base/* BaseTool */.oS {
|
|
|
15518
15555
|
element.addEventListener(enums.Events.MOUSE_UP, this._dragEndCallback);
|
|
15519
15556
|
element.addEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
|
|
15520
15557
|
element.addEventListener(enums.Events.MOUSE_CLICK, this._dragEndCallback);
|
|
15558
|
+
element.addEventListener('contextmenu', this._cancelCallback);
|
|
15521
15559
|
element.addEventListener(enums.Events.TOUCH_END, this._dragEndCallback);
|
|
15522
15560
|
element.addEventListener(enums.Events.TOUCH_DRAG, this._dragCallback);
|
|
15523
15561
|
};
|
|
@@ -15526,6 +15564,7 @@ class MagnifyTool extends base/* BaseTool */.oS {
|
|
|
15526
15564
|
element.removeEventListener(enums.Events.MOUSE_UP, this._dragEndCallback);
|
|
15527
15565
|
element.removeEventListener(enums.Events.MOUSE_DRAG, this._dragCallback);
|
|
15528
15566
|
element.removeEventListener(enums.Events.MOUSE_CLICK, this._dragEndCallback);
|
|
15567
|
+
element.removeEventListener('contextmenu', this._cancelCallback);
|
|
15529
15568
|
element.removeEventListener(enums.Events.TOUCH_END, this._dragEndCallback);
|
|
15530
15569
|
element.removeEventListener(enums.Events.TOUCH_DRAG, this._dragCallback);
|
|
15531
15570
|
};
|
|
@@ -23228,6 +23267,7 @@ class ArrowAnnotateTool extends base/* AnnotationTool */.EC {
|
|
|
23228
23267
|
}) {
|
|
23229
23268
|
super(toolProps, defaultToolProps);
|
|
23230
23269
|
this.addNewAnnotation = (evt) => {
|
|
23270
|
+
this.startGroupRecording();
|
|
23231
23271
|
const eventDetail = evt.detail;
|
|
23232
23272
|
const { currentPoints, element } = eventDetail;
|
|
23233
23273
|
const worldPos = currentPoints.world;
|
|
@@ -23326,6 +23366,8 @@ class ArrowAnnotateTool extends base/* AnnotationTool */.EC {
|
|
|
23326
23366
|
(0,helpers_state.triggerAnnotationCompleted)(annotation);
|
|
23327
23367
|
this.createMemo(element, annotation, { newAnnotation: !!this.memo });
|
|
23328
23368
|
setAnnotationLabel(annotation, element, label);
|
|
23369
|
+
this.endGroupRecording();
|
|
23370
|
+
this.doneEditMemo();
|
|
23329
23371
|
(0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIdsToRender);
|
|
23330
23372
|
});
|
|
23331
23373
|
}
|
|
@@ -33332,7 +33374,7 @@ async function computeVolumeLabelmapFromStack(args) {
|
|
|
33332
33374
|
|
|
33333
33375
|
/***/ }),
|
|
33334
33376
|
|
|
33335
|
-
/***/
|
|
33377
|
+
/***/ 55126:
|
|
33336
33378
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
33337
33379
|
|
|
33338
33380
|
"use strict";
|
|
@@ -33512,389 +33554,16 @@ function hasCustomStyle(specifier) {
|
|
|
33512
33554
|
|
|
33513
33555
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentIndex.js
|
|
33514
33556
|
var segmentIndex = __webpack_require__(70930);
|
|
33515
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/
|
|
33516
|
-
var
|
|
33517
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/getViewportAssociatedToSegmentation.js
|
|
33518
|
-
var getViewportAssociatedToSegmentation = __webpack_require__(16493);
|
|
33519
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/annotationState.js
|
|
33520
|
-
var annotationState = __webpack_require__(82056);
|
|
33521
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/getAnnotationMapFromSegmentation.js
|
|
33522
|
-
|
|
33523
|
-
function getAnnotationMapFromSegmentation_getAnnotationMapFromSegmentation(contourRepresentationData, options = {}) {
|
|
33524
|
-
const annotationMap = contourRepresentationData.annotationUIDsMap;
|
|
33525
|
-
const segmentIndices = options.segmentIndices?.length
|
|
33526
|
-
? options.segmentIndices
|
|
33527
|
-
: Array.from(annotationMap.keys());
|
|
33528
|
-
const annotationUIDsInSegmentMap = new Map();
|
|
33529
|
-
segmentIndices.forEach((index) => {
|
|
33530
|
-
const annotationUIDsInSegment = annotationMap.get(index);
|
|
33531
|
-
let uids = Array.from(annotationUIDsInSegment);
|
|
33532
|
-
uids = uids.filter((uid) => !getAnnotation(uid).parentAnnotationUID);
|
|
33533
|
-
const annotations = uids.map((uid) => {
|
|
33534
|
-
const annotation = getAnnotation(uid);
|
|
33535
|
-
const hasChildAnnotations = annotation.childAnnotationUIDs?.length;
|
|
33536
|
-
const childPolylinesInformation = hasChildAnnotations &&
|
|
33537
|
-
annotation.childAnnotationUIDs.map((childUID) => {
|
|
33538
|
-
const childAnnotation = getAnnotation(childUID);
|
|
33539
|
-
return {
|
|
33540
|
-
polyline: childAnnotation.data.contour.polyline,
|
|
33541
|
-
isClosed: childAnnotation.data.contour.closed,
|
|
33542
|
-
};
|
|
33543
|
-
});
|
|
33544
|
-
const holesClosed = hasChildAnnotations &&
|
|
33545
|
-
childPolylinesInformation.map((childInfo) => childInfo.isClosed);
|
|
33546
|
-
const childPolylines = hasChildAnnotations &&
|
|
33547
|
-
childPolylinesInformation.map((childInfo) => childInfo.polyline);
|
|
33548
|
-
return {
|
|
33549
|
-
polyline: annotation.data.contour.polyline,
|
|
33550
|
-
isClosed: annotation.data.contour.closed,
|
|
33551
|
-
annotationUID: annotation.annotationUID,
|
|
33552
|
-
referencedImageId: annotation.metadata.referencedImageId,
|
|
33553
|
-
holesPolyline: childPolylines,
|
|
33554
|
-
holesUIDs: annotation.childAnnotationUIDs,
|
|
33555
|
-
holesClosed,
|
|
33556
|
-
};
|
|
33557
|
-
});
|
|
33558
|
-
annotationUIDsInSegmentMap.set(index, annotations);
|
|
33559
|
-
});
|
|
33560
|
-
return { segmentIndices, annotationUIDsInSegmentMap };
|
|
33561
|
-
}
|
|
33562
|
-
|
|
33563
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentation.js
|
|
33564
|
-
var segmentation_getSegmentation = __webpack_require__(33283);
|
|
33565
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contourSegmentation/index.js + 1 modules
|
|
33566
|
-
var contourSegmentation = __webpack_require__(56534);
|
|
33567
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/getPolylineMap.js
|
|
33568
|
-
|
|
33569
|
-
function closePolyline(polyline, closed) {
|
|
33570
|
-
if (!polyline || polyline.length === 0) {
|
|
33571
|
-
return [];
|
|
33572
|
-
}
|
|
33573
|
-
if (!closed) {
|
|
33574
|
-
return [...polyline];
|
|
33575
|
-
}
|
|
33576
|
-
const firstPoint = polyline[0];
|
|
33577
|
-
const lastPoint = polyline[polyline.length - 1];
|
|
33578
|
-
const isAlreadyClosed = firstPoint[0] === lastPoint[0] &&
|
|
33579
|
-
firstPoint[1] === lastPoint[1] &&
|
|
33580
|
-
firstPoint[2] === lastPoint[2];
|
|
33581
|
-
if (isAlreadyClosed) {
|
|
33582
|
-
return [...polyline];
|
|
33583
|
-
}
|
|
33584
|
-
return [...polyline, firstPoint];
|
|
33585
|
-
}
|
|
33586
|
-
function getPolylineMap_getPolylinesMap(contourRepresentationData, segmentIndex) {
|
|
33587
|
-
const { annotationUIDsInSegmentMap } = getAnnotationMapFromSegmentation(contourRepresentationData);
|
|
33588
|
-
if (!annotationUIDsInSegmentMap.has(segmentIndex)) {
|
|
33589
|
-
console.warn(`No contour information found for segmentIndex ${segmentIndex}`);
|
|
33590
|
-
return;
|
|
33591
|
-
}
|
|
33592
|
-
const polylines = new Map();
|
|
33593
|
-
const annotationsInfo = annotationUIDsInSegmentMap.get(segmentIndex);
|
|
33594
|
-
for (const annotationInfo of annotationsInfo) {
|
|
33595
|
-
polylines.set(annotationInfo.annotationUID, closePolyline(annotationInfo.polyline, annotationInfo.isClosed));
|
|
33596
|
-
for (let i = 0; i < annotationInfo.holesUIDs?.length; i++) {
|
|
33597
|
-
polylines.set(annotationInfo.holesUIDs[i], closePolyline(annotationInfo.holesPolyline[i], annotationInfo.holesClosed[i]));
|
|
33598
|
-
}
|
|
33599
|
-
}
|
|
33600
|
-
return polylines;
|
|
33601
|
-
}
|
|
33602
|
-
|
|
33603
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/extractSegmentPolylines.js
|
|
33604
|
-
|
|
33605
|
-
|
|
33606
|
-
|
|
33607
|
-
|
|
33608
|
-
|
|
33609
|
-
function extractSegmentPolylines_extractSegmentPolylines(segmentationId, segmentIndex) {
|
|
33610
|
-
const viewports = getViewportsAssociatedToSegmentation(segmentationId);
|
|
33611
|
-
const segmentation = getSegmentation(segmentationId);
|
|
33612
|
-
if (!segmentation) {
|
|
33613
|
-
return;
|
|
33614
|
-
}
|
|
33615
|
-
if (!segmentation.representationData.Contour) {
|
|
33616
|
-
return;
|
|
33617
|
-
}
|
|
33618
|
-
const contourRepresentationData = segmentation.representationData
|
|
33619
|
-
.Contour;
|
|
33620
|
-
const { annotationUIDsMap } = contourRepresentationData;
|
|
33621
|
-
if (!annotationUIDsMap) {
|
|
33622
|
-
return;
|
|
33623
|
-
}
|
|
33624
|
-
if (!annotationUIDsMap.get(segmentIndex)) {
|
|
33625
|
-
return;
|
|
33626
|
-
}
|
|
33627
|
-
const polyLinesMap = getPolylinesMap(contourRepresentationData, segmentIndex);
|
|
33628
|
-
if (!polyLinesMap) {
|
|
33629
|
-
return;
|
|
33630
|
-
}
|
|
33631
|
-
const keys = Array.from(polyLinesMap?.keys());
|
|
33632
|
-
const polylinesCanvasMap = new Map();
|
|
33633
|
-
for (const key of keys) {
|
|
33634
|
-
const annotation = getAnnotation(key);
|
|
33635
|
-
const viewport = getViewportWithMatchingViewPlaneNormal(viewports, annotation);
|
|
33636
|
-
polylinesCanvasMap.set(key, convertContourPolylineToCanvasSpace(polyLinesMap.get(key), viewport));
|
|
33637
|
-
}
|
|
33638
|
-
return polylinesCanvasMap;
|
|
33639
|
-
}
|
|
33640
|
-
|
|
33641
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/decimate.js
|
|
33642
|
-
var polyline_decimate = __webpack_require__(99944);
|
|
33643
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/decimateContours.js
|
|
33644
|
-
|
|
33645
|
-
|
|
33646
|
-
|
|
33647
|
-
|
|
33648
|
-
|
|
33649
|
-
function decimateContours(segmentationId, segmentIndex, options = { epsilon: 0.1 }) {
|
|
33650
|
-
const segmentation = getSegmentation(segmentationId);
|
|
33651
|
-
if (!segmentation) {
|
|
33652
|
-
console.warn(`Invalid segmentation given ${segmentationId}`);
|
|
33653
|
-
return;
|
|
33654
|
-
}
|
|
33655
|
-
if (!segmentation.representationData.Contour) {
|
|
33656
|
-
console.warn(`No contour representation found for segmentation ${segmentationId}`);
|
|
33657
|
-
return;
|
|
33658
|
-
}
|
|
33659
|
-
const viewports = getViewportsAssociatedToSegmentation(segmentationId);
|
|
33660
|
-
if (!viewports) {
|
|
33661
|
-
console.warn('No viewport associated to the segmentation found');
|
|
33662
|
-
return;
|
|
33663
|
-
}
|
|
33664
|
-
const polylinesCanvasMap = extractSegmentPolylines(segmentationId, segmentIndex);
|
|
33665
|
-
if (!polylinesCanvasMap) {
|
|
33666
|
-
console.warn(`Error extracting contour data from segment ${segmentIndex} in segmentation ${segmentationId}`);
|
|
33667
|
-
return;
|
|
33668
|
-
}
|
|
33669
|
-
const keys = Array.from(polylinesCanvasMap?.keys());
|
|
33670
|
-
for (const annotationUID of keys) {
|
|
33671
|
-
const annotation = getAnnotation(annotationUID);
|
|
33672
|
-
if (!annotation) {
|
|
33673
|
-
continue;
|
|
33674
|
-
}
|
|
33675
|
-
const polylineCanvas = polylinesCanvasMap.get(annotationUID);
|
|
33676
|
-
const decimatedPolyline2D = decimate(polylineCanvas, options.epsilon);
|
|
33677
|
-
const viewport = getViewportWithMatchingViewPlaneNormal(viewports, annotation);
|
|
33678
|
-
if (viewport) {
|
|
33679
|
-
annotation.data.contour.polyline = decimatedPolyline2D.map((point2D) => viewport.canvasToWorld(point2D));
|
|
33680
|
-
invalidateAnnotation(annotation);
|
|
33681
|
-
}
|
|
33682
|
-
}
|
|
33683
|
-
}
|
|
33684
|
-
|
|
33685
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/removeCompleteContourAnnotation.js
|
|
33686
|
-
|
|
33687
|
-
|
|
33688
|
-
function removeCompleteContourAnnotation_removeCompleteContourAnnotation(annotation) {
|
|
33689
|
-
if (!annotation) {
|
|
33690
|
-
return;
|
|
33691
|
-
}
|
|
33692
|
-
if (annotation.parentAnnotationUID) {
|
|
33693
|
-
clearParentAnnotation(annotation);
|
|
33694
|
-
}
|
|
33695
|
-
removeAnnotation(annotation.annotationUID);
|
|
33696
|
-
removeContourSegmentationAnnotation(annotation);
|
|
33697
|
-
}
|
|
33698
|
-
|
|
33699
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/index.js + 6 modules
|
|
33700
|
-
var contours = __webpack_require__(6936);
|
|
33701
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/removeContourHoles.js
|
|
33702
|
-
|
|
33703
|
-
|
|
33704
|
-
|
|
33705
|
-
|
|
33706
|
-
|
|
33707
|
-
function removeContourHoles(segmentationId, segmentIndex) {
|
|
33708
|
-
const segmentation = getSegmentation(segmentationId);
|
|
33709
|
-
if (!segmentation) {
|
|
33710
|
-
console.warn(`Invalid segmentation given ${segmentationId}`);
|
|
33711
|
-
return;
|
|
33712
|
-
}
|
|
33713
|
-
if (!segmentation.representationData.Contour) {
|
|
33714
|
-
console.warn(`No contour representation found for segmentation ${segmentationId}`);
|
|
33715
|
-
return;
|
|
33716
|
-
}
|
|
33717
|
-
const polylinesCanvasMap = extractSegmentPolylines(segmentationId, segmentIndex);
|
|
33718
|
-
if (!polylinesCanvasMap) {
|
|
33719
|
-
console.warn(`Error extracting contour data from segment ${segmentIndex} in segmentation ${segmentationId}`);
|
|
33720
|
-
return;
|
|
33721
|
-
}
|
|
33722
|
-
const keys = Array.from(polylinesCanvasMap?.keys());
|
|
33723
|
-
const polylines = keys.map((key) => polylinesCanvasMap.get(key));
|
|
33724
|
-
const holeDetectionResults = findContourHoles(polylines);
|
|
33725
|
-
if (holeDetectionResults?.length > 0) {
|
|
33726
|
-
holeDetectionResults.forEach((hole) => {
|
|
33727
|
-
hole.holeIndexes.forEach((index) => {
|
|
33728
|
-
const annotation = getAnnotation(keys[index]);
|
|
33729
|
-
removeCompleteContourAnnotation(annotation);
|
|
33730
|
-
});
|
|
33731
|
-
});
|
|
33732
|
-
}
|
|
33733
|
-
}
|
|
33734
|
-
|
|
33735
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/findIslands.js
|
|
33736
|
-
var contours_findIslands = __webpack_require__(76617);
|
|
33737
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/removeContourIslands.js
|
|
33738
|
-
|
|
33739
|
-
|
|
33740
|
-
|
|
33741
|
-
|
|
33742
|
-
|
|
33743
|
-
function removeContourIslands(segmentationId, segmentIndex, options = { threshold: 3 }) {
|
|
33744
|
-
const segmentation = getSegmentation(segmentationId);
|
|
33745
|
-
if (!segmentation) {
|
|
33746
|
-
console.warn(`Invalid segmentation given ${segmentationId}`);
|
|
33747
|
-
return;
|
|
33748
|
-
}
|
|
33749
|
-
if (!segmentation.representationData.Contour) {
|
|
33750
|
-
console.warn(`No contour representation found for segmentation ${segmentationId}`);
|
|
33751
|
-
return;
|
|
33752
|
-
}
|
|
33753
|
-
const polylinesCanvasMap = extractSegmentPolylines(segmentationId, segmentIndex);
|
|
33754
|
-
if (!polylinesCanvasMap) {
|
|
33755
|
-
console.warn(`Error extracting contour data from segment ${segmentIndex} in segmentation ${segmentationId}`);
|
|
33756
|
-
return;
|
|
33757
|
-
}
|
|
33758
|
-
const keys = Array.from(polylinesCanvasMap?.keys());
|
|
33759
|
-
const polylines = keys.map((key) => polylinesCanvasMap.get(key));
|
|
33760
|
-
const islands = findIslands(polylines, options.threshold);
|
|
33761
|
-
if (islands?.length > 0) {
|
|
33762
|
-
islands.forEach((index) => {
|
|
33763
|
-
const annotation = getAnnotation(keys[index]);
|
|
33764
|
-
removeCompleteContourAnnotation(annotation);
|
|
33765
|
-
});
|
|
33766
|
-
}
|
|
33767
|
-
}
|
|
33768
|
-
|
|
33769
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/planarFreehandROITool/interpolation/interpolateSegmentPoints.js
|
|
33770
|
-
var interpolation_interpolateSegmentPoints = __webpack_require__(61768);
|
|
33771
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/smoothContours.js
|
|
33772
|
-
|
|
33773
|
-
|
|
33774
|
-
|
|
33775
|
-
function smoothContours(segmentationId, segmentIndex, options = { knotsRatioPercentage: 30 }) {
|
|
33776
|
-
const segmentation = getSegmentation(segmentationId);
|
|
33777
|
-
if (!segmentation) {
|
|
33778
|
-
console.warn(`Invalid segmentation given ${segmentationId}`);
|
|
33779
|
-
return;
|
|
33780
|
-
}
|
|
33781
|
-
if (!segmentation.representationData.Contour) {
|
|
33782
|
-
console.warn(`No contour representation found for segmentation ${segmentationId}`);
|
|
33783
|
-
return;
|
|
33784
|
-
}
|
|
33785
|
-
const contourRepresentationData = segmentation.representationData
|
|
33786
|
-
.Contour;
|
|
33787
|
-
const { annotationUIDsMap } = contourRepresentationData;
|
|
33788
|
-
if (!annotationUIDsMap) {
|
|
33789
|
-
console.warn(`No contours found for segmentation ${segmentationId}`);
|
|
33790
|
-
return;
|
|
33791
|
-
}
|
|
33792
|
-
if (!annotationUIDsMap.has(segmentIndex)) {
|
|
33793
|
-
console.warn(`Error extracting contour data from segment ${segmentIndex} in segmentation ${segmentationId}`);
|
|
33794
|
-
return;
|
|
33795
|
-
}
|
|
33796
|
-
const annotationList = annotationUIDsMap.get(segmentIndex);
|
|
33797
|
-
annotationList.forEach((annotationUID) => {
|
|
33798
|
-
const annotation = getAnnotation(annotationUID);
|
|
33799
|
-
if (!annotation) {
|
|
33800
|
-
return;
|
|
33801
|
-
}
|
|
33802
|
-
const polyline = annotation.data.contour.polyline;
|
|
33803
|
-
if (!polyline || polyline.length < 3) {
|
|
33804
|
-
return;
|
|
33805
|
-
}
|
|
33806
|
-
const smoothedPolyline = interpolateSegmentPoints(polyline, 0, polyline.length - 1, options.knotsRatioPercentage);
|
|
33807
|
-
annotation.data.contour.polyline = smoothedPolyline;
|
|
33808
|
-
});
|
|
33809
|
-
}
|
|
33810
|
-
|
|
33811
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/convertContourHoles.js
|
|
33812
|
-
|
|
33813
|
-
|
|
33814
|
-
|
|
33815
|
-
|
|
33816
|
-
function convertContourHoles(segmentationId, segmentIndex, targetSegmentationId, targetSegmentationIndex) {
|
|
33817
|
-
const segmentation = getSegmentation(segmentationId);
|
|
33818
|
-
if (!segmentation) {
|
|
33819
|
-
console.warn(`Invalid segmentation given ${segmentationId}`);
|
|
33820
|
-
return;
|
|
33821
|
-
}
|
|
33822
|
-
if (!segmentation.representationData.Contour) {
|
|
33823
|
-
console.warn(`No contour representation found for segmentation ${segmentationId}`);
|
|
33824
|
-
return;
|
|
33825
|
-
}
|
|
33826
|
-
const { annotationUIDsMap } = segmentation?.representationData.Contour || {};
|
|
33827
|
-
if (!annotationUIDsMap) {
|
|
33828
|
-
console.warn(`No annotation map found for segmentation ${segmentationId}`);
|
|
33829
|
-
return;
|
|
33830
|
-
}
|
|
33831
|
-
const annotationsUIDsSet = annotationUIDsMap?.get(segmentIndex);
|
|
33832
|
-
if (!annotationsUIDsSet) {
|
|
33833
|
-
console.warn(`Segmentation index ${segmentIndex} has no annotations in segmentation ${segmentationId}`);
|
|
33834
|
-
return;
|
|
33835
|
-
}
|
|
33836
|
-
let targetUIDsSet;
|
|
33837
|
-
if (targetSegmentationId && typeof targetSegmentationIndex === 'number') {
|
|
33838
|
-
const targetSegmentation = getSegmentation(targetSegmentationId);
|
|
33839
|
-
if (!targetSegmentation) {
|
|
33840
|
-
console.warn(`Target segmentation ${targetSegmentationId} does not exist.`);
|
|
33841
|
-
return;
|
|
33842
|
-
}
|
|
33843
|
-
if (!targetSegmentation.representationData.Contour) {
|
|
33844
|
-
console.warn(`No contour representation found for target segmentation ${targetSegmentationId}`);
|
|
33845
|
-
return;
|
|
33846
|
-
}
|
|
33847
|
-
targetUIDsSet =
|
|
33848
|
-
targetSegmentation.representationData.Contour.annotationUIDsMap.get(targetSegmentationIndex);
|
|
33849
|
-
if (!targetUIDsSet) {
|
|
33850
|
-
targetUIDsSet = new Set();
|
|
33851
|
-
targetSegmentation.representationData.Contour.annotationUIDsMap.set(targetSegmentationIndex, targetUIDsSet);
|
|
33852
|
-
}
|
|
33853
|
-
}
|
|
33854
|
-
const polylinesCanvasMap = extractSegmentPolylines(segmentationId, segmentIndex);
|
|
33855
|
-
if (!polylinesCanvasMap) {
|
|
33856
|
-
console.warn(`Error extracting contour data from segment ${segmentIndex} in segmentation ${segmentationId}`);
|
|
33857
|
-
return;
|
|
33858
|
-
}
|
|
33859
|
-
const keys = Array.from(polylinesCanvasMap?.keys());
|
|
33860
|
-
const polylines = keys.map((key) => polylinesCanvasMap.get(key));
|
|
33861
|
-
const holeDetectionResults = findContourHoles(polylines);
|
|
33862
|
-
if (holeDetectionResults?.length > 0) {
|
|
33863
|
-
holeDetectionResults.forEach((hole) => {
|
|
33864
|
-
hole.holeIndexes.forEach((index) => {
|
|
33865
|
-
const annotation = getAnnotation(keys[index]);
|
|
33866
|
-
clearParentAnnotation(annotation);
|
|
33867
|
-
if (targetSegmentationId &&
|
|
33868
|
-
typeof targetSegmentationIndex === 'number') {
|
|
33869
|
-
targetUIDsSet.add(annotation.annotationUID);
|
|
33870
|
-
}
|
|
33871
|
-
else {
|
|
33872
|
-
annotationsUIDsSet.add(annotation.annotationUID);
|
|
33873
|
-
}
|
|
33874
|
-
});
|
|
33875
|
-
});
|
|
33876
|
-
}
|
|
33877
|
-
}
|
|
33878
|
-
|
|
33879
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/index.js
|
|
33880
|
-
|
|
33881
|
-
|
|
33882
|
-
|
|
33883
|
-
|
|
33884
|
-
|
|
33885
|
-
|
|
33886
|
-
|
|
33887
|
-
|
|
33888
|
-
|
|
33889
|
-
|
|
33890
|
-
|
|
33891
|
-
|
|
33557
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/utilities/index.js
|
|
33558
|
+
var utilities = __webpack_require__(31994);
|
|
33892
33559
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/convertStackToVolumeLabelmap.js
|
|
33893
33560
|
var convertStackToVolumeLabelmap = __webpack_require__(6273);
|
|
33894
33561
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/computeVolumeLabelmapFromStack.js
|
|
33895
33562
|
var computeVolumeLabelmapFromStack = __webpack_require__(6994);
|
|
33896
33563
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
33897
33564
|
var esm = __webpack_require__(15327);
|
|
33565
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getSegmentation.js
|
|
33566
|
+
var segmentation_getSegmentation = __webpack_require__(33283);
|
|
33898
33567
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/clearSegmentValue.js
|
|
33899
33568
|
|
|
33900
33569
|
|
|
@@ -33933,6 +33602,10 @@ var computeStackLabelmapFromVolume = __webpack_require__(93690);
|
|
|
33933
33602
|
var segmentation_getActiveSegmentIndex = __webpack_require__(60740);
|
|
33934
33603
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/getViewportIdsWithSegmentation.js
|
|
33935
33604
|
var segmentation_getViewportIdsWithSegmentation = __webpack_require__(58859);
|
|
33605
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/annotationState.js
|
|
33606
|
+
var annotationState = __webpack_require__(82056);
|
|
33607
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contourSegmentation/index.js + 1 modules
|
|
33608
|
+
var contourSegmentation = __webpack_require__(56534);
|
|
33936
33609
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/removeSegmentAnnotations.js
|
|
33937
33610
|
|
|
33938
33611
|
|
|
@@ -34408,9 +34081,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
34408
34081
|
/* harmony export */ setSegmentIndexLocked: () => (/* binding */ setSegmentIndexLocked)
|
|
34409
34082
|
/* harmony export */ });
|
|
34410
34083
|
/* harmony import */ var _stateManagement_segmentation_getSegmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33283);
|
|
34411
|
-
/* harmony import */ var
|
|
34084
|
+
/* harmony import */ var _annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2076);
|
|
34085
|
+
/* harmony import */ var _triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49906);
|
|
34086
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31994);
|
|
34087
|
+
|
|
34412
34088
|
|
|
34413
34089
|
|
|
34090
|
+
|
|
34091
|
+
function _setContourSegmentationSegmentAnnotationsLocked(segmentation, segmentIndex, locked) {
|
|
34092
|
+
const annotationUIDsMap = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__.getAnnotationsUIDMapFromSegmentation)(segmentation.segmentationId);
|
|
34093
|
+
if (!annotationUIDsMap) {
|
|
34094
|
+
return;
|
|
34095
|
+
}
|
|
34096
|
+
const annotationUIDs = annotationUIDsMap.get(segmentIndex);
|
|
34097
|
+
if (!annotationUIDs) {
|
|
34098
|
+
return;
|
|
34099
|
+
}
|
|
34100
|
+
annotationUIDs.forEach((annotationUID) => {
|
|
34101
|
+
(0,_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_1__.setAnnotationLocked)(annotationUID, locked);
|
|
34102
|
+
});
|
|
34103
|
+
}
|
|
34414
34104
|
function isSegmentIndexLocked(segmentationId, segmentIndex) {
|
|
34415
34105
|
const segmentation = (0,_stateManagement_segmentation_getSegmentation__WEBPACK_IMPORTED_MODULE_0__/* .getSegmentation */ .T)(segmentationId);
|
|
34416
34106
|
if (!segmentation) {
|
|
@@ -34426,7 +34116,10 @@ function setSegmentIndexLocked(segmentationId, segmentIndex, locked = true) {
|
|
|
34426
34116
|
}
|
|
34427
34117
|
const { segments } = segmentation;
|
|
34428
34118
|
segments[segmentIndex].locked = locked;
|
|
34429
|
-
(
|
|
34119
|
+
if (segmentation?.representationData?.Contour) {
|
|
34120
|
+
_setContourSegmentationSegmentAnnotationsLocked(segmentation, segmentIndex, locked);
|
|
34121
|
+
}
|
|
34122
|
+
(0,_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__.triggerSegmentationModified)(segmentationId);
|
|
34430
34123
|
}
|
|
34431
34124
|
function getLockedSegmentIndices(segmentationId) {
|
|
34432
34125
|
const segmentation = (0,_stateManagement_segmentation_getSegmentation__WEBPACK_IMPORTED_MODULE_0__/* .getSegmentation */ .T)(segmentationId);
|
|
@@ -34560,6 +34253,67 @@ function updateLabelmapSegmentationImageReferences(viewportId, segmentationId) {
|
|
|
34560
34253
|
}
|
|
34561
34254
|
|
|
34562
34255
|
|
|
34256
|
+
/***/ }),
|
|
34257
|
+
|
|
34258
|
+
/***/ 98484:
|
|
34259
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
34260
|
+
|
|
34261
|
+
"use strict";
|
|
34262
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
34263
|
+
/* harmony export */ B: () => (/* binding */ getAnnotationsUIDMapFromSegmentation)
|
|
34264
|
+
/* harmony export */ });
|
|
34265
|
+
/* harmony import */ var _getSegmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33283);
|
|
34266
|
+
|
|
34267
|
+
function getAnnotationsUIDMapFromSegmentation(segmentationId) {
|
|
34268
|
+
const segmentation = (0,_getSegmentation__WEBPACK_IMPORTED_MODULE_0__/* .getSegmentation */ .T)(segmentationId);
|
|
34269
|
+
if (!segmentation) {
|
|
34270
|
+
return;
|
|
34271
|
+
}
|
|
34272
|
+
const contourRepresentationData = segmentation.representationData
|
|
34273
|
+
?.Contour;
|
|
34274
|
+
if (!contourRepresentationData) {
|
|
34275
|
+
return;
|
|
34276
|
+
}
|
|
34277
|
+
const { annotationUIDsMap } = contourRepresentationData;
|
|
34278
|
+
if (!annotationUIDsMap) {
|
|
34279
|
+
return;
|
|
34280
|
+
}
|
|
34281
|
+
return annotationUIDsMap;
|
|
34282
|
+
}
|
|
34283
|
+
|
|
34284
|
+
|
|
34285
|
+
/***/ }),
|
|
34286
|
+
|
|
34287
|
+
/***/ 31994:
|
|
34288
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
34289
|
+
|
|
34290
|
+
"use strict";
|
|
34291
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
34292
|
+
/* harmony export */ getAnnotationsUIDMapFromSegmentation: () => (/* reexport safe */ _getAnnotationsUIDMapFromSegmentation__WEBPACK_IMPORTED_MODULE_0__.B)
|
|
34293
|
+
/* harmony export */ });
|
|
34294
|
+
/* harmony import */ var _getAnnotationsUIDMapFromSegmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98484);
|
|
34295
|
+
/* harmony import */ var _getViewportAssociatedToSegmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16493);
|
|
34296
|
+
/* harmony import */ var _getAnnotationMapFromSegmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10407);
|
|
34297
|
+
/* harmony import */ var _decimateContours__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53097);
|
|
34298
|
+
/* harmony import */ var _extractSegmentPolylines__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96629);
|
|
34299
|
+
/* harmony import */ var _removeCompleteContourAnnotation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(38928);
|
|
34300
|
+
/* harmony import */ var _removeContourHoles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19741);
|
|
34301
|
+
/* harmony import */ var _removeContourIslands__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85512);
|
|
34302
|
+
/* harmony import */ var _smoothContours__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(68362);
|
|
34303
|
+
/* harmony import */ var _convertContourHoles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(64540);
|
|
34304
|
+
|
|
34305
|
+
|
|
34306
|
+
|
|
34307
|
+
|
|
34308
|
+
|
|
34309
|
+
|
|
34310
|
+
|
|
34311
|
+
|
|
34312
|
+
|
|
34313
|
+
|
|
34314
|
+
|
|
34315
|
+
|
|
34316
|
+
|
|
34563
34317
|
/***/ }),
|
|
34564
34318
|
|
|
34565
34319
|
/***/ 65136:
|
|
@@ -35663,13 +35417,11 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
|
|
|
35663
35417
|
else {
|
|
35664
35418
|
this.updateOpenCachedStats({
|
|
35665
35419
|
metadata,
|
|
35666
|
-
canvasCoordinates,
|
|
35667
35420
|
targetId,
|
|
35668
35421
|
cachedStats,
|
|
35669
35422
|
modalityUnit,
|
|
35670
35423
|
calibratedScale,
|
|
35671
|
-
|
|
35672
|
-
deltaInY,
|
|
35424
|
+
points,
|
|
35673
35425
|
});
|
|
35674
35426
|
}
|
|
35675
35427
|
}
|
|
@@ -35922,8 +35674,7 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
|
|
|
35922
35674
|
worldPosIndex2[2] = Math.floor(worldPosIndex2[2]);
|
|
35923
35675
|
let area = _utilities_math__WEBPACK_IMPORTED_MODULE_4__.polyline.getArea(canvasCoordinates) / scale / scale;
|
|
35924
35676
|
area *= deltaInX * deltaInY;
|
|
35925
|
-
|
|
35926
|
-
perimeter *= Math.sqrt(Math.pow(deltaInX, 2) + Math.pow(deltaInY, 2));
|
|
35677
|
+
const perimeter = (0,_utilities_contours_calculatePerimeter__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .A)(points, closed) / scale;
|
|
35927
35678
|
const iDelta = 0.01 * (iMax - iMin);
|
|
35928
35679
|
const jDelta = 0.01 * (jMax - jMin);
|
|
35929
35680
|
const kDelta = 0.01 * (kMax - kMin);
|
|
@@ -35993,10 +35744,9 @@ class PlanarFreehandROITool extends _base_ContourSegmentationBaseTool__WEBPACK_I
|
|
|
35993
35744
|
unit,
|
|
35994
35745
|
};
|
|
35995
35746
|
}
|
|
35996
|
-
updateOpenCachedStats({ targetId, metadata,
|
|
35747
|
+
updateOpenCachedStats({ targetId, metadata, cachedStats, modalityUnit, calibratedScale, points, }) {
|
|
35997
35748
|
const { scale, unit } = calibratedScale;
|
|
35998
|
-
|
|
35999
|
-
length *= Math.sqrt(Math.pow(deltaInX, 2) + Math.pow(deltaInY, 2));
|
|
35749
|
+
const length = (0,_utilities_contours_calculatePerimeter__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .A)(points, closed) / scale;
|
|
36000
35750
|
cachedStats[targetId] = {
|
|
36001
35751
|
Modality: metadata.Modality,
|
|
36002
35752
|
length,
|
|
@@ -38917,59 +38667,6 @@ function pointInSphere(sphere, pointLPS) {
|
|
|
38917
38667
|
|
|
38918
38668
|
|
|
38919
38669
|
|
|
38920
|
-
/***/ }),
|
|
38921
|
-
|
|
38922
|
-
/***/ 61768:
|
|
38923
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
38924
|
-
|
|
38925
|
-
"use strict";
|
|
38926
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38927
|
-
/* harmony export */ A: () => (/* binding */ interpolateSegmentPoints)
|
|
38928
|
-
/* harmony export */ });
|
|
38929
|
-
/* harmony import */ var _algorithms_bspline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30269);
|
|
38930
|
-
|
|
38931
|
-
function getContinuousUniformDistributionValues(minDistributionDistance, closedInterval) {
|
|
38932
|
-
const result = [];
|
|
38933
|
-
const [intervalIni, intervalEnd] = closedInterval;
|
|
38934
|
-
const intervalSize = intervalEnd - intervalIni + 1;
|
|
38935
|
-
const intensity = Math.floor(intervalSize / minDistributionDistance);
|
|
38936
|
-
let x = 0;
|
|
38937
|
-
let continuosDistributionValue = Math.round(((intervalSize - 1) / (intensity - 1)) * x) + intervalIni;
|
|
38938
|
-
while (continuosDistributionValue <= intervalEnd) {
|
|
38939
|
-
result.push(continuosDistributionValue);
|
|
38940
|
-
x++;
|
|
38941
|
-
continuosDistributionValue =
|
|
38942
|
-
Math.round(((intervalSize - 1) / (intensity - 1)) * x) + intervalIni;
|
|
38943
|
-
}
|
|
38944
|
-
return result;
|
|
38945
|
-
}
|
|
38946
|
-
function interpolateSegmentPoints(points, iniIndex, endIndex, knotsRatioPercentage) {
|
|
38947
|
-
const segmentSize = endIndex - iniIndex + 1;
|
|
38948
|
-
const amountOfKnots = Math.floor((knotsRatioPercentage / 100) * segmentSize) ?? 1;
|
|
38949
|
-
const minKnotDistance = Math.floor(segmentSize / amountOfKnots) ?? 1;
|
|
38950
|
-
if (isNaN(segmentSize) || !segmentSize || !minKnotDistance) {
|
|
38951
|
-
return points;
|
|
38952
|
-
}
|
|
38953
|
-
if (segmentSize / minKnotDistance < 2) {
|
|
38954
|
-
return points;
|
|
38955
|
-
}
|
|
38956
|
-
const interpolationIniIndex = Math.max(0, iniIndex);
|
|
38957
|
-
const interpolationEndIndex = Math.min(points.length - 1, endIndex);
|
|
38958
|
-
const segmentPointsUnchangedBeg = points.slice(0, interpolationIniIndex);
|
|
38959
|
-
const segmentPointsUnchangedEnd = points.slice(interpolationEndIndex + 1, points.length);
|
|
38960
|
-
const knotsIndexes = getContinuousUniformDistributionValues(minKnotDistance, [
|
|
38961
|
-
interpolationIniIndex,
|
|
38962
|
-
interpolationEndIndex,
|
|
38963
|
-
]);
|
|
38964
|
-
const interpolatedPoints = (0,_algorithms_bspline__WEBPACK_IMPORTED_MODULE_0__/* .interpolatePoints */ .H)(points, knotsIndexes);
|
|
38965
|
-
return [
|
|
38966
|
-
...segmentPointsUnchangedBeg,
|
|
38967
|
-
...interpolatedPoints,
|
|
38968
|
-
...segmentPointsUnchangedEnd,
|
|
38969
|
-
];
|
|
38970
|
-
}
|
|
38971
|
-
|
|
38972
|
-
|
|
38973
38670
|
/***/ }),
|
|
38974
38671
|
|
|
38975
38672
|
/***/ 13179:
|