@ohif/app 3.12.0-beta.86 → 3.12.0-beta.87
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/{1037.bundle.c5b7e110bee6ca994e4a.js → 1037.bundle.87a5adb8c92bd5bf53f5.js} +165 -51
- package/dist/{1214.bundle.01574d45655d4aed6d97.js → 1214.bundle.82dc18225ebf452da664.js} +166 -17
- package/dist/{1927.bundle.da6db325e08bacb0bca0.js → 1927.bundle.019331c266d306772371.js} +1 -1
- package/dist/{2518.bundle.4fd28150fb5a21d423e6.js → 2518.bundle.644302643ac0790e7374.js} +9 -1
- package/dist/{306.bundle.c671a09e1eacf6bcfc84.js → 306.bundle.f9faa2b3cdd7e86b5869.js} +114 -5
- package/dist/{3613.bundle.0231451edf6a513eb34a.js → 3613.bundle.6157004e0592003c0800.js} +41 -12
- package/dist/{4019.bundle.210bc6108a0656fc35ec.js → 4019.bundle.1be1cdd0805ad2c59d65.js} +16 -43
- package/dist/{5400.bundle.3ebba479fc068cd8c700.js → 5400.bundle.c3a3fe8867efa2edfa94.js} +7 -9
- package/dist/{5858.bundle.99a6b9de04c621694ffd.js → 5858.bundle.d5f4bf849aaeebf5025c.js} +1 -1
- package/dist/{7412.bundle.9c3066742e534aaabb61.js → 7412.bundle.34fe5e72833e857edc0a.js} +202 -52
- package/dist/{9548.bundle.b91ebbc3a8ad7206b3aa.js → 9548.bundle.591b8e5a1953f3c40500.js} +2 -2
- package/dist/{app.bundle.5d10f23b4da5b116a61b.js → app.bundle.d57cd60de54593fc0edc.js} +45 -23
- package/dist/{compute.bundle.ce909c29a2b66706341f.js → compute.bundle.f3ca9fb0e7ce9e885b9c.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.ed1926b3f492983b8ced.js → polySeg.bundle.7b8d1bb21d442a48da1d.js} +1 -1
- package/dist/sw.js +1 -1
- package/package.json +21 -21
- /package/dist/{1459.bundle.d44f5e52da6fb19aecc6.js → 1459.bundle.462daea3a2c1f0dca759.js} +0 -0
- /package/dist/{147.bundle.b1edd4ebd4f25f286183.js → 147.bundle.6fc65a239d1ae1c6a918.js} +0 -0
- /package/dist/{1604.bundle.c31a11dc0ff99454545e.js → 1604.bundle.bce0af2ccee3ab380bb1.js} +0 -0
- /package/dist/{1919.bundle.4ca5fe01d2f7c5a62792.js → 1919.bundle.31349210489b93bcc35c.js} +0 -0
- /package/dist/{2018.bundle.8c8676df1bfcdb0e7c7c.js → 2018.bundle.7df9cb6c57005b9db237.js} +0 -0
- /package/dist/{213.bundle.d8bc7e6e70680f236847.js → 213.bundle.51bea1cb336c73934e96.js} +0 -0
- /package/dist/{2243.bundle.1e9358b9d772507c02be.js → 2243.bundle.bf7662965efeb8b44a66.js} +0 -0
- /package/dist/{2424.bundle.42ad0c57d8a5120b8ed5.js → 2424.bundle.a694e15598f198c603ef.js} +0 -0
- /package/dist/{319.bundle.f5adcbbef5767dedc45d.js → 319.bundle.4ea0dbcfeb553c900206.js} +0 -0
- /package/dist/{4092.bundle.ca6b0bb4d15e5e45d891.js → 4092.bundle.3ed6e7b6a1d9e4bb268d.js} +0 -0
- /package/dist/{4113.bundle.e5f1621632eca8b1aa53.js → 4113.bundle.d8327081e2f6f9b04923.js} +0 -0
- /package/dist/{414.bundle.f669e66c20b7ea2b7530.js → 414.bundle.2cc1b68e9f2c67c98c7b.js} +0 -0
- /package/dist/{5457.bundle.12df550c4148fda9fd19.js → 5457.bundle.b16413f24116d2e46209.js} +0 -0
- /package/dist/{5485.bundle.f5dd3dd6313f57cf9053.js → 5485.bundle.53d1c9a66dabf2a7706e.js} +0 -0
- /package/dist/{6027.bundle.6db4480e70d0f23b1dec.js → 6027.bundle.06f9e5bcee12740d39b3.js} +0 -0
- /package/dist/{6201.bundle.60af9e41cfe5d1397946.js → 6201.bundle.81b7ff3af7126daedcdf.js} +0 -0
- /package/dist/{6991.bundle.e989d70e0872071c671c.js → 6991.bundle.5a781db0023a394ad0e6.js} +0 -0
- /package/dist/{7431.bundle.cb629cddc7beedb366c8.js → 7431.bundle.55dd86000e66bee467e2.js} +0 -0
- /package/dist/{7639.bundle.57c8bea585ffef6ffcc0.js → 7639.bundle.628b74ec869bf3883217.js} +0 -0
- /package/dist/{810.bundle.d18a4893fd961ed12dd4.js → 810.bundle.c0403ba10f598d873382.js} +0 -0
- /package/dist/{85.bundle.a4d3f7930554511f9392.js → 85.bundle.6cb9ea0c464f37f8d3f8.js} +0 -0
- /package/dist/{8558.bundle.1e748fff1c13f0d6e6e1.js → 8558.bundle.fa6050d1ec65ec5f03d4.js} +0 -0
- /package/dist/{934.bundle.9ae41e2c3feaffdf108c.js → 934.bundle.fdb3bbaca7f62002f22f.js} +0 -0
- /package/dist/{9862.bundle.9f27703ec23c9c8f4cea.js → 9862.bundle.fa2e1ca195f94ef376de.js} +0 -0
- /package/dist/{9927.bundle.f6b0fde3f41ba52254fc.js → 9927.bundle.cd69182c3b0b1a1c3a12.js} +0 -0
|
@@ -34469,7 +34469,7 @@ function uuidv4() {
|
|
|
34469
34469
|
|
|
34470
34470
|
"use strict";
|
|
34471
34471
|
/* unused harmony export version */
|
|
34472
|
-
const version = '4.
|
|
34472
|
+
const version = '4.11.2';
|
|
34473
34473
|
|
|
34474
34474
|
|
|
34475
34475
|
/***/ }),
|
|
@@ -35368,7 +35368,7 @@ function drawLine(svgDrawingHelper, annotationUID, lineUID, start, end, options
|
|
|
35368
35368
|
if (isNaN(start[0]) || isNaN(start[1]) || isNaN(end[0]) || isNaN(end[1])) {
|
|
35369
35369
|
return;
|
|
35370
35370
|
}
|
|
35371
|
-
const { color = 'rgb(0, 255, 0)', width = 10, lineWidth, lineDash, markerStartId = null, markerEndId = null, shadow = false, strokeOpacity = 1, } = options;
|
|
35371
|
+
const { color = 'rgb(0, 255, 0)', width = 10, lineWidth, lineDash, markerStartId = null, markerEndId = null, shadow = false, strokeOpacity = 1, textBoxLinkLineColor, } = options;
|
|
35372
35372
|
const strokeWidth = lineWidth || width;
|
|
35373
35373
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
35374
35374
|
const svgNodeHash = (0,_getHash__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(annotationUID, 'line', lineUID);
|
|
@@ -35380,7 +35380,7 @@ function drawLine(svgDrawingHelper, annotationUID, lineUID, start, end, options
|
|
|
35380
35380
|
y1: `${start[1]}`,
|
|
35381
35381
|
x2: `${end[0]}`,
|
|
35382
35382
|
y2: `${end[1]}`,
|
|
35383
|
-
stroke: color,
|
|
35383
|
+
stroke: textBoxLinkLineColor || color,
|
|
35384
35384
|
style: dropShadowStyle,
|
|
35385
35385
|
'stroke-width': strokeWidth,
|
|
35386
35386
|
'stroke-dasharray': lineDash,
|
|
@@ -35612,9 +35612,14 @@ function drawTextBox(svgDrawingHelper, annotationUID, textUID, textLines, positi
|
|
|
35612
35612
|
return textGroupBoundingBox;
|
|
35613
35613
|
}
|
|
35614
35614
|
function _drawTextGroup(svgDrawingHelper, annotationUID, textUID, textLines = [''], position, options) {
|
|
35615
|
-
const { padding, color, fontFamily, fontSize, background } = options;
|
|
35615
|
+
const { padding, color, fontFamily, fontSize, background, textBoxBorderRadius, textBoxMargin, } = options;
|
|
35616
35616
|
let textGroupBoundingBox;
|
|
35617
35617
|
const [x, y] = [position[0] + padding, position[1] + padding];
|
|
35618
|
+
const backgroundStyles = {
|
|
35619
|
+
color: background,
|
|
35620
|
+
textBoxBorderRadius,
|
|
35621
|
+
textBoxMargin,
|
|
35622
|
+
};
|
|
35618
35623
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
35619
35624
|
const svgNodeHash = (0,_getHash__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(annotationUID, 'text', textUID);
|
|
35620
35625
|
const existingTextGroup = svgDrawingHelper.getSvgNode(svgNodeHash);
|
|
@@ -35646,7 +35651,7 @@ function _drawTextGroup(svgDrawingHelper, annotationUID, textUID, textLines = ['
|
|
|
35646
35651
|
(0,_setAttributesIfNecessary__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(textAttributes, textElement);
|
|
35647
35652
|
(0,_setAttributesIfNecessary__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(textGroupAttributes, existingTextGroup);
|
|
35648
35653
|
existingTextGroup.setAttribute('data-annotation-uid', annotationUID);
|
|
35649
|
-
textGroupBoundingBox = _drawTextBackground(existingTextGroup,
|
|
35654
|
+
textGroupBoundingBox = _drawTextBackground(existingTextGroup, backgroundStyles);
|
|
35650
35655
|
svgDrawingHelper.setNodeTouched(svgNodeHash);
|
|
35651
35656
|
}
|
|
35652
35657
|
else {
|
|
@@ -35694,8 +35699,10 @@ function _createTextSpan(text) {
|
|
|
35694
35699
|
textSpanElement.textContent = text;
|
|
35695
35700
|
return textSpanElement;
|
|
35696
35701
|
}
|
|
35697
|
-
function _drawTextBackground(group,
|
|
35702
|
+
function _drawTextBackground(group, backgroundStyles) {
|
|
35703
|
+
const { color, textBoxBorderRadius = 0, textBoxMargin = 0, } = backgroundStyles;
|
|
35698
35704
|
let element = group.querySelector('rect.background');
|
|
35705
|
+
const textElement = group.querySelector('text').getBBox();
|
|
35699
35706
|
if (!color) {
|
|
35700
35707
|
if (element) {
|
|
35701
35708
|
group.removeChild(element);
|
|
@@ -35711,10 +35718,19 @@ function _drawTextBackground(group, color) {
|
|
|
35711
35718
|
const attributes = {
|
|
35712
35719
|
x: `${bBox.x}`,
|
|
35713
35720
|
y: `${bBox.y}`,
|
|
35714
|
-
width: `${
|
|
35715
|
-
height: `${
|
|
35721
|
+
width: `${textElement.width + Number(textBoxMargin) * 2}`,
|
|
35722
|
+
height: `${textElement.height + Number(textBoxMargin) * 2}`,
|
|
35716
35723
|
fill: color,
|
|
35724
|
+
rx: textBoxBorderRadius,
|
|
35725
|
+
ry: textBoxBorderRadius,
|
|
35717
35726
|
};
|
|
35727
|
+
if (textBoxMargin) {
|
|
35728
|
+
const tSpans = Array.from(group.querySelector('text').querySelectorAll('tspan'));
|
|
35729
|
+
tSpans.forEach((tspan, i) => {
|
|
35730
|
+
i === 0 && tspan.setAttribute('y', textBoxMargin);
|
|
35731
|
+
tspan.setAttribute('x', textBoxMargin);
|
|
35732
|
+
});
|
|
35733
|
+
}
|
|
35718
35734
|
(0,_setAttributesIfNecessary__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(attributes, element);
|
|
35719
35735
|
return bBox;
|
|
35720
35736
|
}
|
|
@@ -38936,7 +38952,7 @@ async function render(viewport, contourRepresentation) {
|
|
|
38936
38952
|
(0,_config__WEBPACK_IMPORTED_MODULE_5__/* .getPolySeg */ .Qy)()?.canComputeRequestedRepresentation(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Contour) &&
|
|
38937
38953
|
!polySegConversionInProgressForViewportId.get(viewport.id)) {
|
|
38938
38954
|
polySegConversionInProgressForViewportId.set(viewport.id, true);
|
|
38939
|
-
contourData = await (0,_utilities_segmentation_computeAndAddRepresentation__WEBPACK_IMPORTED_MODULE_6__/* .computeAndAddRepresentation */ .d)(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Contour, () => polySeg.computeContourData(segmentationId, { viewport })
|
|
38955
|
+
contourData = await (0,_utilities_segmentation_computeAndAddRepresentation__WEBPACK_IMPORTED_MODULE_6__/* .computeAndAddRepresentation */ .d)(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Contour, () => polySeg.computeContourData(segmentationId, { viewport }));
|
|
38940
38956
|
polySegConversionInProgressForViewportId.set(viewport.id, false);
|
|
38941
38957
|
}
|
|
38942
38958
|
else if (!contourData && !(0,_config__WEBPACK_IMPORTED_MODULE_5__/* .getPolySeg */ .Qy)()) {
|
|
@@ -39043,7 +39059,11 @@ function _checkContourNormalsMatchViewport(annotationUIDsMap, viewportNormal) {
|
|
|
39043
39059
|
}
|
|
39044
39060
|
return true;
|
|
39045
39061
|
}
|
|
39062
|
+
function getUpdateFunction(viewport) {
|
|
39063
|
+
return null;
|
|
39064
|
+
}
|
|
39046
39065
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
39066
|
+
getUpdateFunction,
|
|
39047
39067
|
render,
|
|
39048
39068
|
removeRepresentation,
|
|
39049
39069
|
});
|
|
@@ -39125,7 +39145,7 @@ async function render(viewport, representation) {
|
|
|
39125
39145
|
!polySegConversionInProgress) {
|
|
39126
39146
|
polySegConversionInProgress = true;
|
|
39127
39147
|
const polySeg = (0,_config__WEBPACK_IMPORTED_MODULE_12__/* .getPolySeg */ .Qy)();
|
|
39128
|
-
labelmapData = await (0,_utilities_segmentation_computeAndAddRepresentation__WEBPACK_IMPORTED_MODULE_13__/* .computeAndAddRepresentation */ .d)(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Labelmap, () => polySeg.computeLabelmapData(segmentationId, { viewport }), () =>
|
|
39148
|
+
labelmapData = await (0,_utilities_segmentation_computeAndAddRepresentation__WEBPACK_IMPORTED_MODULE_13__/* .computeAndAddRepresentation */ .d)(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A.Labelmap, () => polySeg.computeLabelmapData(segmentationId, { viewport }), () => {
|
|
39129
39149
|
_stateManagement_segmentation_SegmentationStateManager__WEBPACK_IMPORTED_MODULE_15__/* .defaultSegmentationStateManager */ ._6.processLabelmapRepresentationAddition(viewport.id, segmentationId);
|
|
39130
39150
|
setTimeout(() => {
|
|
39131
39151
|
(0,_stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_14__.triggerSegmentationDataModified)(segmentationId);
|
|
@@ -39342,7 +39362,11 @@ async function _addLabelmapToViewport(viewport, labelmapData, segmentationId, co
|
|
|
39342
39362
|
const result = await (0,_addLabelmapToElement__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(viewport.element, labelmapData, segmentationId, config);
|
|
39343
39363
|
return result || undefined;
|
|
39344
39364
|
}
|
|
39365
|
+
function getUpdateFunction(viewport) {
|
|
39366
|
+
return;
|
|
39367
|
+
}
|
|
39345
39368
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
39369
|
+
getUpdateFunction,
|
|
39346
39370
|
render,
|
|
39347
39371
|
removeRepresentation,
|
|
39348
39372
|
});
|
|
@@ -39358,7 +39382,7 @@ async function _addLabelmapToViewport(viewport, labelmapData, segmentationId, co
|
|
|
39358
39382
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39359
39383
|
/* harmony export */ Ay: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
39360
39384
|
/* harmony export */ });
|
|
39361
|
-
/* unused harmony exports render, removeRepresentation */
|
|
39385
|
+
/* unused harmony exports getUpdateFunction, render, removeRepresentation */
|
|
39362
39386
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
39363
39387
|
/* harmony import */ var _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18682);
|
|
39364
39388
|
/* harmony import */ var _removeSurfaceFromElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20552);
|
|
@@ -39399,7 +39423,7 @@ async function render(viewport, representation) {
|
|
|
39399
39423
|
if (!SurfaceData &&
|
|
39400
39424
|
(0,_config__WEBPACK_IMPORTED_MODULE_6__/* .getPolySeg */ .Qy)()?.canComputeRequestedRepresentation(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Surface)) {
|
|
39401
39425
|
const polySeg = (0,_config__WEBPACK_IMPORTED_MODULE_6__/* .getPolySeg */ .Qy)();
|
|
39402
|
-
SurfaceData = await (0,_utilities_segmentation_computeAndAddRepresentation__WEBPACK_IMPORTED_MODULE_7__/* .computeAndAddRepresentation */ .d)(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Surface, () => polySeg.computeSurfaceData(segmentationId, { viewport })
|
|
39426
|
+
SurfaceData = await (0,_utilities_segmentation_computeAndAddRepresentation__WEBPACK_IMPORTED_MODULE_7__/* .computeAndAddRepresentation */ .d)(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Surface, () => polySeg.computeSurfaceData(segmentationId, { viewport }));
|
|
39403
39427
|
if (!SurfaceData) {
|
|
39404
39428
|
throw new Error(`No Surface data found for segmentationId ${segmentationId} even we tried to compute it`);
|
|
39405
39429
|
}
|
|
@@ -39439,7 +39463,12 @@ async function render(viewport, representation) {
|
|
|
39439
39463
|
});
|
|
39440
39464
|
viewport.render();
|
|
39441
39465
|
}
|
|
39466
|
+
function getUpdateFunction(viewport) {
|
|
39467
|
+
const polySeg = (0,_config__WEBPACK_IMPORTED_MODULE_6__/* .getPolySeg */ .Qy)();
|
|
39468
|
+
return (segmentationId) => polySeg.updateSurfaceData(segmentationId, { viewport });
|
|
39469
|
+
}
|
|
39442
39470
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
39471
|
+
getUpdateFunction,
|
|
39443
39472
|
render,
|
|
39444
39473
|
removeRepresentation,
|
|
39445
39474
|
});
|
|
@@ -1906,6 +1906,9 @@ class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__
|
|
|
1906
1906
|
background: this.getStyle('textBoxBackground', specifications, annotation),
|
|
1907
1907
|
lineWidth: this.getStyle('textBoxLinkLineWidth', specifications, annotation),
|
|
1908
1908
|
lineDash: this.getStyle('textBoxLinkLineDash', specifications, annotation),
|
|
1909
|
+
textBoxBorderRadius: this.getStyle('textBoxBorderRadius', specifications, annotation),
|
|
1910
|
+
textBoxMargin: this.getStyle('textBoxMargin', specifications, annotation),
|
|
1911
|
+
textBoxLinkLineColor: this.getStyle('textBoxLinkLineColor', specifications, annotation),
|
|
1909
1912
|
};
|
|
1910
1913
|
}
|
|
1911
1914
|
static isSuvScaled(viewport, targetId, imageId) {
|
|
@@ -5571,55 +5574,18 @@ function deleteRelatedAnnotations(viewportData) {
|
|
|
5571
5574
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5572
5575
|
/* harmony export */ d: () => (/* binding */ computeAndAddRepresentation)
|
|
5573
5576
|
/* harmony export */ });
|
|
5574
|
-
/* harmony import */ var
|
|
5575
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99737);
|
|
5576
|
-
/* harmony import */ var _stateManagement_segmentation_internalAddRepresentationData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44188);
|
|
5577
|
-
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49906);
|
|
5578
|
-
/* harmony import */ var _debounce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(52905);
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5577
|
+
/* harmony import */ var _stateManagement_segmentation_internalAddRepresentationData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44188);
|
|
5583
5578
|
|
|
5584
|
-
|
|
5585
|
-
async function computeAndAddRepresentation(segmentationId, type, computeFunction, updateFunction, onComputationComplete) {
|
|
5579
|
+
async function computeAndAddRepresentation(segmentationId, type, computeFunction, onComputationComplete) {
|
|
5586
5580
|
const data = await computeFunction();
|
|
5587
|
-
(0,
|
|
5581
|
+
(0,_stateManagement_segmentation_internalAddRepresentationData__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)({
|
|
5588
5582
|
segmentationId,
|
|
5589
5583
|
type,
|
|
5590
5584
|
data,
|
|
5591
5585
|
});
|
|
5592
5586
|
onComputationComplete?.();
|
|
5593
|
-
if (!computedRepresentations.has(segmentationId)) {
|
|
5594
|
-
computedRepresentations.set(segmentationId, []);
|
|
5595
|
-
}
|
|
5596
|
-
const representations = computedRepresentations.get(segmentationId);
|
|
5597
|
-
if (!representations.includes(type)) {
|
|
5598
|
-
representations.push(type);
|
|
5599
|
-
}
|
|
5600
|
-
subscribeToSegmentationChanges(updateFunction);
|
|
5601
|
-
(0,_stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_3__.triggerSegmentationModified)(segmentationId);
|
|
5602
5587
|
return data;
|
|
5603
5588
|
}
|
|
5604
|
-
function subscribeToSegmentationChanges(updateFunction) {
|
|
5605
|
-
const debouncedUpdateFunction = (event) => {
|
|
5606
|
-
_debouncedSegmentationModified(event, updateFunction);
|
|
5607
|
-
};
|
|
5608
|
-
updateFunction._debouncedUpdateFunction = debouncedUpdateFunction;
|
|
5609
|
-
_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_1__.Events.SEGMENTATION_DATA_MODIFIED, updateFunction._debouncedUpdateFunction);
|
|
5610
|
-
_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_1__.Events.SEGMENTATION_DATA_MODIFIED, updateFunction._debouncedUpdateFunction);
|
|
5611
|
-
}
|
|
5612
|
-
const _debouncedSegmentationModified = (0,_debounce__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)((event, updateFunction) => {
|
|
5613
|
-
const segmentationId = event.detail.segmentationId;
|
|
5614
|
-
const representations = computedRepresentations.get(segmentationId);
|
|
5615
|
-
if (!representations || !representations.length) {
|
|
5616
|
-
return;
|
|
5617
|
-
}
|
|
5618
|
-
updateFunction(segmentationId);
|
|
5619
|
-
if (representations.length) {
|
|
5620
|
-
(0,_stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_3__.triggerSegmentationModified)(segmentationId);
|
|
5621
|
-
}
|
|
5622
|
-
}, 300);
|
|
5623
5589
|
|
|
5624
5590
|
|
|
5625
5591
|
|
|
@@ -5653,6 +5619,7 @@ function getSVGStyleForSegment({ segmentationId, segmentIndex, viewportId, autoG
|
|
|
5653
5619
|
});
|
|
5654
5620
|
const activeSegmentation = (0,_stateManagement_segmentation_getActiveSegmentation__WEBPACK_IMPORTED_MODULE_2__/* .getActiveSegmentation */ .T)(viewportId);
|
|
5655
5621
|
const isActive = activeSegmentation?.segmentationId === segmentationId;
|
|
5622
|
+
const inactiveSegmentationVisibility = _stateManagement_segmentation_SegmentationStyle__WEBPACK_IMPORTED_MODULE_6__/* .segmentationStyle */ .Y.getRenderInactiveSegmentations(viewportId);
|
|
5656
5623
|
const style = _stateManagement_segmentation_SegmentationStyle__WEBPACK_IMPORTED_MODULE_6__/* .segmentationStyle */ .Y.getStyle({
|
|
5657
5624
|
viewportId,
|
|
5658
5625
|
segmentationId,
|
|
@@ -5664,6 +5631,8 @@ function getSVGStyleForSegment({ segmentationId, segmentIndex, viewportId, autoG
|
|
|
5664
5631
|
let lineDash = undefined;
|
|
5665
5632
|
let lineOpacity = 1;
|
|
5666
5633
|
let fillOpacity = 0;
|
|
5634
|
+
let renderFill = mergedConfig.renderFill ?? true;
|
|
5635
|
+
let renderOutline = mergedConfig.renderOutline ?? true;
|
|
5667
5636
|
if (autoGenerated) {
|
|
5668
5637
|
lineWidth = mergedConfig.outlineWidthAutoGenerated ?? lineWidth;
|
|
5669
5638
|
lineDash = mergedConfig.outlineDashAutoGenerated ?? lineDash;
|
|
@@ -5681,12 +5650,14 @@ function getSVGStyleForSegment({ segmentationId, segmentIndex, viewportId, autoG
|
|
|
5681
5650
|
lineDash = mergedConfig.outlineDashInactive ?? lineDash;
|
|
5682
5651
|
lineOpacity = mergedConfig.outlineOpacityInactive ?? lineOpacity;
|
|
5683
5652
|
fillOpacity = mergedConfig.fillAlphaInactive ?? fillOpacity;
|
|
5653
|
+
renderFill = mergedConfig.renderFillInactive ?? renderFill;
|
|
5654
|
+
renderOutline = mergedConfig.renderOutlineInactive ?? renderOutline;
|
|
5684
5655
|
}
|
|
5685
5656
|
if ((0,_stateManagement_segmentation_getActiveSegmentIndex__WEBPACK_IMPORTED_MODULE_3__/* .getActiveSegmentIndex */ .Q)(segmentationId) === segmentIndex) {
|
|
5686
5657
|
lineWidth += mergedConfig.activeSegmentOutlineWidthDelta;
|
|
5687
5658
|
}
|
|
5688
|
-
lineWidth =
|
|
5689
|
-
fillOpacity =
|
|
5659
|
+
lineWidth = renderOutline ? lineWidth : 0;
|
|
5660
|
+
fillOpacity = renderFill ? fillOpacity : 0;
|
|
5690
5661
|
const color = `rgba(${segmentColor[0]}, ${segmentColor[1]}, ${segmentColor[2]}, ${lineOpacity})`;
|
|
5691
5662
|
const fillColor = `rgb(${segmentColor[0]}, ${segmentColor[1]}, ${segmentColor[2]})`;
|
|
5692
5663
|
const hiddenSegments = (0,_stateManagement_segmentation_helpers_internalGetHiddenSegmentIndices__WEBPACK_IMPORTED_MODULE_5__/* .internalGetHiddenSegmentIndices */ .s)(viewportId, {
|
|
@@ -5703,7 +5674,9 @@ function getSVGStyleForSegment({ segmentationId, segmentIndex, viewportId, autoG
|
|
|
5703
5674
|
textbox: {
|
|
5704
5675
|
color,
|
|
5705
5676
|
},
|
|
5706
|
-
visibility:
|
|
5677
|
+
visibility: isActive
|
|
5678
|
+
? segmentationVisible && isVisible
|
|
5679
|
+
: inactiveSegmentationVisibility,
|
|
5707
5680
|
};
|
|
5708
5681
|
}
|
|
5709
5682
|
|
|
@@ -272,21 +272,19 @@ class SegmentationStyle {
|
|
|
272
272
|
viewportsStyle: {},
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
setStyle(specifier, styles) {
|
|
275
|
+
setStyle(specifier, styles, merge = true) {
|
|
276
276
|
const { viewportId, segmentationId, type, segmentIndex } = specifier;
|
|
277
277
|
const currentStyles = this.getStyle(specifier);
|
|
278
|
+
const mergedStyles = merge ? { ...currentStyles, ...styles } : styles;
|
|
278
279
|
let updatedStyles;
|
|
279
280
|
if (!viewportId && !segmentationId) {
|
|
280
|
-
updatedStyles =
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
updatedStyles = mergedStyles;
|
|
282
|
+
}
|
|
283
|
+
else if (merge) {
|
|
284
|
+
updatedStyles = this.copyActiveToInactiveIfNotProvided(mergedStyles, type);
|
|
284
285
|
}
|
|
285
286
|
else {
|
|
286
|
-
updatedStyles =
|
|
287
|
-
...currentStyles,
|
|
288
|
-
...styles,
|
|
289
|
-
}, type);
|
|
287
|
+
updatedStyles = mergedStyles;
|
|
290
288
|
}
|
|
291
289
|
if (!type) {
|
|
292
290
|
throw new Error('Type is required to set a style');
|
|
@@ -3686,7 +3686,7 @@ else {}
|
|
|
3686
3686
|
|
|
3687
3687
|
"use strict";
|
|
3688
3688
|
|
|
3689
|
-
// UNUSED EXPORTS: decodeImageFrame
|
|
3689
|
+
// UNUSED EXPORTS: decodeImageFrame, postProcessDecodedPixels
|
|
3690
3690
|
|
|
3691
3691
|
;// ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/shared/scaling/bilinear.js
|
|
3692
3692
|
function bilinear(src, dest) {
|