@ohif/app 3.9.1 → 3.9.3
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/{1185.bundle.023fe7179faaa50019d3.js → 1185.bundle.9f4c770baf52abcf3c6d.js} +120 -53
- package/dist/{1266.bundle.e9abd5c45b5236544151.js → 1266.bundle.0097d9c4ba974905a833.js} +8 -3
- package/dist/{1374.bundle.019bbc010eeb66109e8b.js → 1374.bundle.2e1fa65e28731d98969a.js} +2 -2
- package/dist/{1436.bundle.773756cd51b69e887bac.js → 1436.bundle.be39664239aa2bbca527.js} +234 -274
- package/dist/{1927.bundle.49539e3ab5b0aad1399c.js → 1927.bundle.2b2fa0b539d6ac5b0dc3.js} +1 -1
- package/dist/{213.bundle.e663335fb0884edde6d8.js → 213.bundle.c0c23f7fd4b66d78d0fe.js} +2 -2
- package/dist/{5807.bundle.dac5ce36534a71c77723.js → 2343.bundle.f096450c21417279d4cc.js} +270 -1
- package/dist/{2424.bundle.b7da298db43541d3a7c0.js → 2424.bundle.d73e8d67dc2aace299d2.js} +2 -2
- package/dist/{2701.bundle.8c1ff2e0faaa7d2f4716.js → 2701.bundle.c8271fa4986a45fea350.js} +17 -24
- package/dist/{2825.bundle.b04c941a87fd580deb6d.js → 2825.bundle.0612b1b8ab3e8ee01b93.js} +1 -1
- package/dist/{3198.bundle.c82b7424070ffd02faf1.js → 3198.bundle.7a18515cfe4113417251.js} +10 -6
- package/dist/{3200.bundle.a12825fb5aec200d33e2.js → 3200.bundle.e46dca03aa824998973a.js} +18 -10
- package/dist/3326.bundle.d01046d6c2c31654c125.js +265 -0
- package/dist/{149.bundle.ce5596fc563276036744.js → 3900.bundle.0e4e29374e221b260ed1.js} +35 -59
- package/dist/{8295.bundle.4ecb27f9e58526f12bcb.js → 3902.bundle.8ae7b2e27f760af997dd.js} +20 -1
- package/dist/3902.css +2 -0
- package/dist/{4202.bundle.5c8120ed4841da0af211.js → 4202.bundle.497702023d73202f4f39.js} +2 -1
- package/dist/{3121.bundle.d3e7092e305cf6cecdb5.js → 4438.bundle.a945f803d0eeb11d081f.js} +24 -4
- package/dist/{4571.bundle.3b1691730b3c57bf4d35.js → 4571.bundle.a37be49663df2f4a2c8a.js} +99 -89
- package/dist/4759.bundle.1e982897292fc19ecd7c.js +265 -0
- package/dist/{4834.bundle.aad44c2628cdefb7a4dd.js → 4834.bundle.92ba088cc62a6b791000.js} +2 -2
- package/dist/{5139.bundle.367a6827071448e2923d.js → 5139.bundle.70d3be7dd1896f245d7b.js} +3 -3
- package/dist/{5247.bundle.6dc2a50f21821b2ffdf5.js → 5247.bundle.4e8669e41fd28813e643.js} +5 -5
- package/dist/{5252.bundle.5ec502c53a9cc877ed8d.js → 5252.bundle.f2675336275573a288d5.js} +13 -1
- package/dist/{1520.bundle.97dbd9bfa83148e5334d.js → 5630.bundle.44d0ca81d77b7ae5193b.js} +63 -58
- package/dist/{5687.bundle.5731ec23dd9eb43a083e.js → 5687.bundle.50b800a714486557b243.js} +5 -5
- package/dist/{5717.bundle.848e13f256818475f57f.js → 5717.bundle.9218cb67ad1994cd1a99.js} +305 -64
- package/dist/{3970.bundle.31942cc0c12a008e7ba0.js → 5758.bundle.cd1599b81bdb1f735f9d.js} +270 -1
- package/dist/{717.bundle.0f32b7b57347b5141248.js → 7013.bundle.979d3a29f6142e8c1290.js} +264 -4
- package/dist/7013.css +4 -0
- package/dist/{7197.bundle.c28453cdb392072d8bf8.js → 7197.bundle.30f8969751309ab5235c.js} +6 -6
- package/dist/{7955.bundle.6a255705b1ef5906f4a8.js → 7955.bundle.9264a10437f0a67e6057.js} +3 -3
- package/dist/{8008.bundle.5bf7b274246be10e2f05.js → 8008.bundle.6772a210a995b568f8d0.js} +2 -2
- package/dist/{8228.bundle.55ac03d7165248f47d4e.js → 8228.bundle.2c1e61eec1f9f4b3b613.js} +8 -26
- package/dist/{8259.bundle.623c29b26b170a8a085b.js → 8259.bundle.9cf9ef151893ede068bb.js} +2 -2
- package/dist/{8523.bundle.648334132159465cdc41.js → 8523.bundle.c0ec85de98ba380ebeb4.js} +55 -13
- package/dist/{8558.bundle.01d05fd73da5db8e60f9.js → 8558.bundle.9c22f000a404f1006a41.js} +10 -5
- package/dist/{9551.bundle.6c260a9869e14dcc3543.js → 9551.bundle.3507bb1d4353df13bf3a.js} +3 -3
- package/dist/{9611.bundle.767595c93877e5166c03.js → 9611.bundle.9f1aa9041196d77f2b7e.js} +2 -2
- package/dist/{app.bundle.d02143bec2df7fec9964.js → app.bundle.9af5a6d7ff3a778d05b7.js} +278 -150
- package/dist/app.bundle.css +2 -2
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.b79ae514989e86301c71.js → polySeg.bundle.6e85073e3abf2e6e6078.js} +1 -1
- package/dist/serve.json +1 -10
- package/dist/{suv-peak-worker.bundle.31c3b3b957204af93b7e.js → suv-peak-worker.bundle.e2e8e46de3e958a1a3db.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +19 -19
- /package/dist/{1801.css → 3326.css} +0 -0
- /package/dist/{717.css → 4438.css} +0 -0
- /package/dist/{2591.css → 4759.css} +0 -0
- /package/dist/{9862.bundle.7146682e56aa66130ae6.js → 9862.bundle.aa2f8e0010f1be1bc87d.js} +0 -0
|
@@ -3489,6 +3489,15 @@ const imageRetrieveMetadataProvider = {
|
|
|
3489
3489
|
add: (key, payload) => {
|
|
3490
3490
|
retrieveConfigurationState.set(key, payload);
|
|
3491
3491
|
},
|
|
3492
|
+
clone: () => {
|
|
3493
|
+
return new Map(retrieveConfigurationState);
|
|
3494
|
+
},
|
|
3495
|
+
restore: (state) => {
|
|
3496
|
+
retrieveConfigurationState.clear();
|
|
3497
|
+
state.forEach((value, key) => {
|
|
3498
|
+
retrieveConfigurationState.set(key, value);
|
|
3499
|
+
});
|
|
3500
|
+
},
|
|
3492
3501
|
get: (type, ...queries) => {
|
|
3493
3502
|
if (type === IMAGE_RETRIEVE_CONFIGURATION) {
|
|
3494
3503
|
return queries
|
|
@@ -4414,7 +4423,10 @@ function calculateViewportsSpatialRegistration(viewport1, viewport2) {
|
|
|
4414
4423
|
|
|
4415
4424
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getViewportImageCornersInWorld.js
|
|
4416
4425
|
function getViewportImageCornersInWorld(viewport) {
|
|
4417
|
-
const { imageData, dimensions } = viewport.getImageData();
|
|
4426
|
+
const { imageData, dimensions } = viewport.getImageData() || {};
|
|
4427
|
+
if (!imageData || !dimensions) {
|
|
4428
|
+
return [];
|
|
4429
|
+
}
|
|
4418
4430
|
const { canvas } = viewport;
|
|
4419
4431
|
const ratio = window.devicePixelRatio;
|
|
4420
4432
|
const topLeftCanvas = [0, 0];
|
|
@@ -7891,6 +7903,24 @@ var Events;
|
|
|
7891
7903
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Events);
|
|
7892
7904
|
|
|
7893
7905
|
|
|
7906
|
+
/***/ }),
|
|
7907
|
+
|
|
7908
|
+
/***/ 18682:
|
|
7909
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7910
|
+
|
|
7911
|
+
"use strict";
|
|
7912
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7913
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
7914
|
+
/* harmony export */ });
|
|
7915
|
+
var SegmentationRepresentations;
|
|
7916
|
+
(function (SegmentationRepresentations) {
|
|
7917
|
+
SegmentationRepresentations["Labelmap"] = "Labelmap";
|
|
7918
|
+
SegmentationRepresentations["Contour"] = "Contour";
|
|
7919
|
+
SegmentationRepresentations["Surface"] = "Surface";
|
|
7920
|
+
})(SegmentationRepresentations || (SegmentationRepresentations = {}));
|
|
7921
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SegmentationRepresentations);
|
|
7922
|
+
|
|
7923
|
+
|
|
7894
7924
|
/***/ }),
|
|
7895
7925
|
|
|
7896
7926
|
/***/ 84093:
|
|
@@ -7917,6 +7947,46 @@ var StrategyCallbacks;
|
|
|
7917
7947
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StrategyCallbacks);
|
|
7918
7948
|
|
|
7919
7949
|
|
|
7950
|
+
/***/ }),
|
|
7951
|
+
|
|
7952
|
+
/***/ 66452:
|
|
7953
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7954
|
+
|
|
7955
|
+
"use strict";
|
|
7956
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7957
|
+
/* harmony export */ i: () => (/* binding */ MouseBindings),
|
|
7958
|
+
/* harmony export */ q: () => (/* binding */ KeyboardBindings)
|
|
7959
|
+
/* harmony export */ });
|
|
7960
|
+
var MouseBindings;
|
|
7961
|
+
(function (MouseBindings) {
|
|
7962
|
+
MouseBindings[MouseBindings["Primary"] = 1] = "Primary";
|
|
7963
|
+
MouseBindings[MouseBindings["Secondary"] = 2] = "Secondary";
|
|
7964
|
+
MouseBindings[MouseBindings["Primary_And_Secondary"] = 3] = "Primary_And_Secondary";
|
|
7965
|
+
MouseBindings[MouseBindings["Auxiliary"] = 4] = "Auxiliary";
|
|
7966
|
+
MouseBindings[MouseBindings["Primary_And_Auxiliary"] = 5] = "Primary_And_Auxiliary";
|
|
7967
|
+
MouseBindings[MouseBindings["Secondary_And_Auxiliary"] = 6] = "Secondary_And_Auxiliary";
|
|
7968
|
+
MouseBindings[MouseBindings["Primary_And_Secondary_And_Auxiliary"] = 7] = "Primary_And_Secondary_And_Auxiliary";
|
|
7969
|
+
MouseBindings[MouseBindings["Fourth_Button"] = 8] = "Fourth_Button";
|
|
7970
|
+
MouseBindings[MouseBindings["Fifth_Button"] = 16] = "Fifth_Button";
|
|
7971
|
+
MouseBindings[MouseBindings["Wheel"] = 524288] = "Wheel";
|
|
7972
|
+
MouseBindings[MouseBindings["Wheel_Primary"] = 524289] = "Wheel_Primary";
|
|
7973
|
+
})(MouseBindings || (MouseBindings = {}));
|
|
7974
|
+
var KeyboardBindings;
|
|
7975
|
+
(function (KeyboardBindings) {
|
|
7976
|
+
KeyboardBindings[KeyboardBindings["Shift"] = 16] = "Shift";
|
|
7977
|
+
KeyboardBindings[KeyboardBindings["Ctrl"] = 17] = "Ctrl";
|
|
7978
|
+
KeyboardBindings[KeyboardBindings["Alt"] = 18] = "Alt";
|
|
7979
|
+
KeyboardBindings[KeyboardBindings["Meta"] = 91] = "Meta";
|
|
7980
|
+
KeyboardBindings[KeyboardBindings["ShiftCtrl"] = 1617] = "ShiftCtrl";
|
|
7981
|
+
KeyboardBindings[KeyboardBindings["ShiftAlt"] = 1618] = "ShiftAlt";
|
|
7982
|
+
KeyboardBindings[KeyboardBindings["ShiftMeta"] = 1691] = "ShiftMeta";
|
|
7983
|
+
KeyboardBindings[KeyboardBindings["CtrlAlt"] = 1718] = "CtrlAlt";
|
|
7984
|
+
KeyboardBindings[KeyboardBindings["CtrlMeta"] = 1791] = "CtrlMeta";
|
|
7985
|
+
KeyboardBindings[KeyboardBindings["AltMeta"] = 1891] = "AltMeta";
|
|
7986
|
+
})(KeyboardBindings || (KeyboardBindings = {}));
|
|
7987
|
+
|
|
7988
|
+
|
|
7989
|
+
|
|
7920
7990
|
/***/ }),
|
|
7921
7991
|
|
|
7922
7992
|
/***/ 49892:
|
|
@@ -9322,6 +9392,9 @@ class Synchronizer_Synchronizer {
|
|
|
9322
9392
|
};
|
|
9323
9393
|
viewports.forEach((vp) => {
|
|
9324
9394
|
const eventSource = this.getEventSource(vp);
|
|
9395
|
+
if (!eventSource) {
|
|
9396
|
+
return;
|
|
9397
|
+
}
|
|
9325
9398
|
eventSource.removeEventListener(Enums.Events.ELEMENT_DISABLED, disableHandler);
|
|
9326
9399
|
eventSource.addEventListener(Enums.Events.ELEMENT_DISABLED, disableHandler);
|
|
9327
9400
|
});
|
|
@@ -9335,9 +9408,13 @@ class Synchronizer_Synchronizer {
|
|
|
9335
9408
|
const { renderingEngineId, viewportId } = viewportInfo;
|
|
9336
9409
|
const renderingEngine = getRenderingEngine(renderingEngineId);
|
|
9337
9410
|
if (!renderingEngine) {
|
|
9338
|
-
|
|
9411
|
+
return null;
|
|
9412
|
+
}
|
|
9413
|
+
const viewport = renderingEngine.getViewport(viewportId);
|
|
9414
|
+
if (!viewport) {
|
|
9415
|
+
return null;
|
|
9339
9416
|
}
|
|
9340
|
-
return
|
|
9417
|
+
return viewport.element;
|
|
9341
9418
|
}
|
|
9342
9419
|
}
|
|
9343
9420
|
function _getUniqueViewports(vp1, vp2) {
|
|
@@ -11710,16 +11787,10 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
|
|
|
11710
11787
|
return otherViewportsAnnotationsWithUniqueCameras;
|
|
11711
11788
|
};
|
|
11712
11789
|
this._checkIfViewportsRenderingSameScene = (viewport, otherViewport) => {
|
|
11713
|
-
const
|
|
11714
|
-
const
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
if (actors.length !== otherViewportActors.length ||
|
|
11718
|
-
otherViewportActors.find(({ uid }) => uid === actor.uid) === undefined) {
|
|
11719
|
-
sameScene = false;
|
|
11720
|
-
}
|
|
11721
|
-
});
|
|
11722
|
-
return sameScene;
|
|
11790
|
+
const volumeIds = viewport.getAllVolumeIds();
|
|
11791
|
+
const otherVolumeIds = otherViewport.getAllVolumeIds();
|
|
11792
|
+
return (volumeIds.length === otherVolumeIds.length &&
|
|
11793
|
+
volumeIds.every((id) => otherVolumeIds.includes(id)));
|
|
11723
11794
|
};
|
|
11724
11795
|
this._jump = (enabledElement, jumpWorld) => {
|
|
11725
11796
|
store_state/* state */.wk.isInteractingWithTool = true;
|
|
@@ -14368,7 +14439,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
|
|
|
14368
14439
|
}
|
|
14369
14440
|
const { viewUp, viewPlaneNormal } = viewport.getCamera();
|
|
14370
14441
|
const viewportCanvasCornersInWorld = esm.utilities.getViewportImageCornersInWorld(viewport);
|
|
14371
|
-
let annotation = this.editData
|
|
14442
|
+
let annotation = this.editData?.annotation;
|
|
14372
14443
|
const annotations = (0,annotationState.getAnnotations)(this.getToolName(), viewport.element);
|
|
14373
14444
|
if (annotations.length) {
|
|
14374
14445
|
annotation = annotations.filter((thisAnnotation) => thisAnnotation.data.viewportId == viewport.id)[0];
|
|
@@ -14396,7 +14467,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
|
|
|
14396
14467
|
annotation = newAnnotation;
|
|
14397
14468
|
}
|
|
14398
14469
|
});
|
|
14399
|
-
if (this.editData
|
|
14470
|
+
if (this.editData?.annotation &&
|
|
14400
14471
|
this.editData.annotation.data.viewportId == viewport.id) {
|
|
14401
14472
|
this.editData.annotation.data.handles.points =
|
|
14402
14473
|
viewportCanvasCornersInWorld;
|
|
@@ -14611,7 +14682,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
|
|
|
14611
14682
|
};
|
|
14612
14683
|
}
|
|
14613
14684
|
renderAnnotation(enabledElement, svgDrawingHelper) {
|
|
14614
|
-
if (!this.editData.viewport) {
|
|
14685
|
+
if (!this.editData || !this.editData.viewport) {
|
|
14615
14686
|
return;
|
|
14616
14687
|
}
|
|
14617
14688
|
const location = this.configuration.scaleLocation;
|
|
@@ -15117,7 +15188,7 @@ class LengthTool extends base/* AnnotationTool */.EC {
|
|
|
15117
15188
|
const { currentPoints, element } = eventDetail;
|
|
15118
15189
|
const worldPos = currentPoints.world;
|
|
15119
15190
|
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
15120
|
-
const { viewport
|
|
15191
|
+
const { viewport } = enabledElement;
|
|
15121
15192
|
(0,elementCursor.hideElementCursor)(element);
|
|
15122
15193
|
this.isDrawing = true;
|
|
15123
15194
|
const { viewPlaneNormal, viewUp, position: cameraPosition, } = viewport.getCamera();
|
|
@@ -15432,6 +15503,39 @@ class LengthTool extends base/* AnnotationTool */.EC {
|
|
|
15432
15503
|
};
|
|
15433
15504
|
this._throttledCalculateCachedStats = (0,throttle/* default */.A)(this._calculateCachedStats, 100, { trailing: true });
|
|
15434
15505
|
}
|
|
15506
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
15507
|
+
const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
15508
|
+
if (!enabledElement) {
|
|
15509
|
+
return;
|
|
15510
|
+
}
|
|
15511
|
+
const { viewport } = enabledElement;
|
|
15512
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
15513
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
15514
|
+
const instance = new this();
|
|
15515
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
15516
|
+
const annotation = {
|
|
15517
|
+
annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
|
|
15518
|
+
data: {
|
|
15519
|
+
handles: {
|
|
15520
|
+
points,
|
|
15521
|
+
},
|
|
15522
|
+
},
|
|
15523
|
+
highlighted: false,
|
|
15524
|
+
autoGenerated: false,
|
|
15525
|
+
invalidated: false,
|
|
15526
|
+
isLocked: false,
|
|
15527
|
+
isVisible: true,
|
|
15528
|
+
metadata: {
|
|
15529
|
+
toolName: instance.getToolName(),
|
|
15530
|
+
viewPlaneNormal,
|
|
15531
|
+
FrameOfReferenceUID,
|
|
15532
|
+
referencedImageId,
|
|
15533
|
+
...options,
|
|
15534
|
+
},
|
|
15535
|
+
};
|
|
15536
|
+
(0,annotationState.addAnnotation)(annotation, viewport.element);
|
|
15537
|
+
(0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
|
|
15538
|
+
}; }
|
|
15435
15539
|
handleSelectedCallback(evt, annotation, handle) {
|
|
15436
15540
|
const eventDetail = evt.detail;
|
|
15437
15541
|
const { element } = eventDetail;
|
|
@@ -16176,6 +16280,39 @@ class ProbeTool extends base/* AnnotationTool */.EC {
|
|
|
16176
16280
|
return false;
|
|
16177
16281
|
}
|
|
16178
16282
|
toolSelectedCallback() { }
|
|
16283
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
16284
|
+
const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
16285
|
+
if (!enabledElement) {
|
|
16286
|
+
return;
|
|
16287
|
+
}
|
|
16288
|
+
const { viewport } = enabledElement;
|
|
16289
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
16290
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
16291
|
+
const instance = new this();
|
|
16292
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
16293
|
+
const annotation = {
|
|
16294
|
+
annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
|
|
16295
|
+
data: {
|
|
16296
|
+
handles: {
|
|
16297
|
+
points,
|
|
16298
|
+
},
|
|
16299
|
+
},
|
|
16300
|
+
highlighted: false,
|
|
16301
|
+
autoGenerated: false,
|
|
16302
|
+
invalidated: false,
|
|
16303
|
+
isLocked: false,
|
|
16304
|
+
isVisible: true,
|
|
16305
|
+
metadata: {
|
|
16306
|
+
toolName: instance.getToolName(),
|
|
16307
|
+
viewPlaneNormal,
|
|
16308
|
+
FrameOfReferenceUID,
|
|
16309
|
+
referencedImageId,
|
|
16310
|
+
...options,
|
|
16311
|
+
},
|
|
16312
|
+
};
|
|
16313
|
+
(0,annotationState.addAnnotation)(annotation, viewport.element);
|
|
16314
|
+
(0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
|
|
16315
|
+
}; }
|
|
16179
16316
|
getHandleNearImagePoint(element, annotation, canvasCoords, proximity) {
|
|
16180
16317
|
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
16181
16318
|
const { viewport } = enabledElement;
|
|
@@ -17665,6 +17802,52 @@ class CircleROITool extends base/* AnnotationTool */.EC {
|
|
|
17665
17802
|
};
|
|
17666
17803
|
this._throttledCalculateCachedStats = (0,throttle/* default */.A)(this._calculateCachedStats, 100, { trailing: true });
|
|
17667
17804
|
}
|
|
17805
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
17806
|
+
const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
17807
|
+
if (!enabledElement) {
|
|
17808
|
+
return;
|
|
17809
|
+
}
|
|
17810
|
+
const { viewport } = enabledElement;
|
|
17811
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
17812
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
17813
|
+
const instance = new this();
|
|
17814
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
17815
|
+
const annotation = {
|
|
17816
|
+
annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
|
|
17817
|
+
data: {
|
|
17818
|
+
handles: {
|
|
17819
|
+
points,
|
|
17820
|
+
textBox: {
|
|
17821
|
+
hasMoved: false,
|
|
17822
|
+
worldPosition: [0, 0, 0],
|
|
17823
|
+
worldBoundingBox: {
|
|
17824
|
+
topLeft: [0, 0, 0],
|
|
17825
|
+
topRight: [0, 0, 0],
|
|
17826
|
+
bottomLeft: [0, 0, 0],
|
|
17827
|
+
bottomRight: [0, 0, 0],
|
|
17828
|
+
},
|
|
17829
|
+
},
|
|
17830
|
+
activeHandleIndex: null,
|
|
17831
|
+
},
|
|
17832
|
+
label: '',
|
|
17833
|
+
cachedStats: {},
|
|
17834
|
+
},
|
|
17835
|
+
highlighted: false,
|
|
17836
|
+
autoGenerated: false,
|
|
17837
|
+
invalidated: false,
|
|
17838
|
+
isLocked: false,
|
|
17839
|
+
isVisible: true,
|
|
17840
|
+
metadata: {
|
|
17841
|
+
toolName: instance.getToolName(),
|
|
17842
|
+
viewPlaneNormal,
|
|
17843
|
+
FrameOfReferenceUID,
|
|
17844
|
+
referencedImageId,
|
|
17845
|
+
...options,
|
|
17846
|
+
},
|
|
17847
|
+
};
|
|
17848
|
+
(0,annotationState.addAnnotation)(annotation, viewport.element);
|
|
17849
|
+
(0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
|
|
17850
|
+
}; }
|
|
17668
17851
|
}
|
|
17669
17852
|
function CircleROITool_defaultGetTextLines(data, targetId) {
|
|
17670
17853
|
const cachedVolumeStats = data.cachedStats[targetId];
|
|
@@ -18185,8 +18368,6 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
|
|
|
18185
18368
|
viewportIdsToRender,
|
|
18186
18369
|
movingTextBox: false,
|
|
18187
18370
|
};
|
|
18188
|
-
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
18189
|
-
const { renderingEngine } = enabledElement;
|
|
18190
18371
|
this._activateModify(element);
|
|
18191
18372
|
(0,esm_utilities.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
|
|
18192
18373
|
evt.preventDefault();
|
|
@@ -18780,6 +18961,61 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
|
|
|
18780
18961
|
}
|
|
18781
18962
|
return spline;
|
|
18782
18963
|
}
|
|
18964
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
18965
|
+
const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
18966
|
+
if (!enabledElement) {
|
|
18967
|
+
return;
|
|
18968
|
+
}
|
|
18969
|
+
if (points.length < SPLINE_MIN_POINTS) {
|
|
18970
|
+
console.warn('Spline requires at least 3 control points');
|
|
18971
|
+
return;
|
|
18972
|
+
}
|
|
18973
|
+
const { viewport } = enabledElement;
|
|
18974
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
18975
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
18976
|
+
const instance = new this();
|
|
18977
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
18978
|
+
const splineType = options?.splineType || SplineTypesEnum.CatmullRom;
|
|
18979
|
+
const splineConfig = instance._getSplineConfig(splineType);
|
|
18980
|
+
const SplineClass = splineConfig.Class;
|
|
18981
|
+
const splineInstance = new SplineClass();
|
|
18982
|
+
const canvasPoints = points.map((point) => viewport.worldToCanvas(point));
|
|
18983
|
+
splineInstance.setControlPoints(canvasPoints);
|
|
18984
|
+
const splinePolylineCanvas = splineInstance.getPolylinePoints();
|
|
18985
|
+
const splinePolylineWorld = splinePolylineCanvas.map((point) => viewport.canvasToWorld(point));
|
|
18986
|
+
const annotation = {
|
|
18987
|
+
annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
|
|
18988
|
+
data: {
|
|
18989
|
+
handles: {
|
|
18990
|
+
points,
|
|
18991
|
+
},
|
|
18992
|
+
label: '',
|
|
18993
|
+
cachedStats: {},
|
|
18994
|
+
spline: {
|
|
18995
|
+
type: splineType,
|
|
18996
|
+
instance: splineInstance,
|
|
18997
|
+
},
|
|
18998
|
+
contour: {
|
|
18999
|
+
closed: true,
|
|
19000
|
+
polyline: splinePolylineWorld,
|
|
19001
|
+
},
|
|
19002
|
+
},
|
|
19003
|
+
highlighted: false,
|
|
19004
|
+
autoGenerated: false,
|
|
19005
|
+
invalidated: true,
|
|
19006
|
+
isLocked: false,
|
|
19007
|
+
isVisible: true,
|
|
19008
|
+
metadata: {
|
|
19009
|
+
toolName: instance.getToolName(),
|
|
19010
|
+
viewPlaneNormal,
|
|
19011
|
+
FrameOfReferenceUID,
|
|
19012
|
+
referencedImageId,
|
|
19013
|
+
...options,
|
|
19014
|
+
},
|
|
19015
|
+
};
|
|
19016
|
+
(0,annotationState.addAnnotation)(annotation, viewport.element);
|
|
19017
|
+
(0,esm_utilities.triggerAnnotationRenderForViewportIds)([viewport.id]);
|
|
19018
|
+
}; }
|
|
18783
19019
|
}
|
|
18784
19020
|
function SplineROITool_defaultGetTextLines(data, targetId) {
|
|
18785
19021
|
const cachedVolumeStats = data.cachedStats[targetId];
|
|
@@ -25768,7 +26004,7 @@ class SegmentationStateManager {
|
|
|
25768
26004
|
type,
|
|
25769
26005
|
active: true,
|
|
25770
26006
|
visible: true,
|
|
25771
|
-
colorLUTIndex: 0,
|
|
26007
|
+
colorLUTIndex: renderingConfig?.colorLUTIndex || 0,
|
|
25772
26008
|
segments: segmentReps,
|
|
25773
26009
|
config: {
|
|
25774
26010
|
...getDefaultRenderingConfig(type),
|
|
@@ -26491,17 +26727,20 @@ function internalAddSegmentationRepresentation(viewportId, representationInput)
|
|
|
26491
26727
|
}
|
|
26492
26728
|
function getColorLUTIndex(config) {
|
|
26493
26729
|
const { colorLUTOrIndex } = config || {};
|
|
26494
|
-
|
|
26495
|
-
|
|
26496
|
-
|
|
26497
|
-
|
|
26498
|
-
|
|
26499
|
-
|
|
26500
|
-
: (0,getNextColorLUTIndex/* getNextColorLUTIndex */.u)();
|
|
26501
|
-
if (!isIndexProvided) {
|
|
26502
|
-
(0,addColorLUT/* addColorLUT */.u)(selectedColorLUT, colorLUTIndex);
|
|
26730
|
+
if (colorLUTOrIndex === undefined) {
|
|
26731
|
+
const index = (0,addColorLUT/* addColorLUT */.u)(JSON.parse(JSON.stringify(COLOR_LUT/* default */.A)));
|
|
26732
|
+
return index;
|
|
26733
|
+
}
|
|
26734
|
+
if (typeof colorLUTOrIndex === 'number') {
|
|
26735
|
+
return colorLUTOrIndex;
|
|
26503
26736
|
}
|
|
26504
|
-
|
|
26737
|
+
if (Array.isArray(colorLUTOrIndex) &&
|
|
26738
|
+
colorLUTOrIndex.every((item) => Array.isArray(item) && item.length === 4)) {
|
|
26739
|
+
const index = (0,addColorLUT/* addColorLUT */.u)(colorLUTOrIndex);
|
|
26740
|
+
return index;
|
|
26741
|
+
}
|
|
26742
|
+
const index = (0,addColorLUT/* addColorLUT */.u)(JSON.parse(JSON.stringify(COLOR_LUT/* default */.A)));
|
|
26743
|
+
return index;
|
|
26505
26744
|
}
|
|
26506
26745
|
|
|
26507
26746
|
|
|
@@ -26796,23 +27035,6 @@ function getActiveSegmentation(viewportId) {
|
|
|
26796
27035
|
}
|
|
26797
27036
|
|
|
26798
27037
|
|
|
26799
|
-
/***/ }),
|
|
26800
|
-
|
|
26801
|
-
/***/ 50409:
|
|
26802
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
26803
|
-
|
|
26804
|
-
"use strict";
|
|
26805
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26806
|
-
/* harmony export */ B: () => (/* binding */ getColorLUT)
|
|
26807
|
-
/* harmony export */ });
|
|
26808
|
-
/* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
|
|
26809
|
-
|
|
26810
|
-
function getColorLUT(index) {
|
|
26811
|
-
const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
|
|
26812
|
-
return segmentationStateManager.getColorLUT(index);
|
|
26813
|
-
}
|
|
26814
|
-
|
|
26815
|
-
|
|
26816
27038
|
/***/ }),
|
|
26817
27039
|
|
|
26818
27040
|
/***/ 97577:
|
|
@@ -26830,23 +27052,6 @@ function getCurrentLabelmapImageIdForViewport(viewportId, segmentationId) {
|
|
|
26830
27052
|
}
|
|
26831
27053
|
|
|
26832
27054
|
|
|
26833
|
-
/***/ }),
|
|
26834
|
-
|
|
26835
|
-
/***/ 70906:
|
|
26836
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
26837
|
-
|
|
26838
|
-
"use strict";
|
|
26839
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26840
|
-
/* harmony export */ u: () => (/* binding */ getNextColorLUTIndex)
|
|
26841
|
-
/* harmony export */ });
|
|
26842
|
-
/* harmony import */ var _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59475);
|
|
26843
|
-
|
|
26844
|
-
function getNextColorLUTIndex() {
|
|
26845
|
-
const segmentationStateManager = _SegmentationStateManager__WEBPACK_IMPORTED_MODULE_0__/* .defaultSegmentationStateManager */ ._6;
|
|
26846
|
-
return segmentationStateManager.getNextColorLUTIndex();
|
|
26847
|
-
}
|
|
26848
|
-
|
|
26849
|
-
|
|
26850
27055
|
/***/ }),
|
|
26851
27056
|
|
|
26852
27057
|
/***/ 93210:
|
|
@@ -30844,6 +31049,42 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
|
|
|
30844
31049
|
};
|
|
30845
31050
|
this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(this._calculateCachedStats, 100, { trailing: true });
|
|
30846
31051
|
}
|
|
31052
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
31053
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElementByViewportId)(viewportId);
|
|
31054
|
+
if (!enabledElement) {
|
|
31055
|
+
return;
|
|
31056
|
+
}
|
|
31057
|
+
const { viewport } = enabledElement;
|
|
31058
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
31059
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
31060
|
+
const instance = new this();
|
|
31061
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
31062
|
+
const annotation = {
|
|
31063
|
+
annotationUID: options?.annotationUID || _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.uuidv4(),
|
|
31064
|
+
data: {
|
|
31065
|
+
handles: {
|
|
31066
|
+
points,
|
|
31067
|
+
activeHandleIndex: null,
|
|
31068
|
+
},
|
|
31069
|
+
label: '',
|
|
31070
|
+
cachedStats: {},
|
|
31071
|
+
},
|
|
31072
|
+
highlighted: false,
|
|
31073
|
+
autoGenerated: false,
|
|
31074
|
+
invalidated: false,
|
|
31075
|
+
isLocked: false,
|
|
31076
|
+
isVisible: true,
|
|
31077
|
+
metadata: {
|
|
31078
|
+
toolName: instance.getToolName(),
|
|
31079
|
+
viewPlaneNormal,
|
|
31080
|
+
FrameOfReferenceUID,
|
|
31081
|
+
referencedImageId,
|
|
31082
|
+
...options,
|
|
31083
|
+
},
|
|
31084
|
+
};
|
|
31085
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .addAnnotation */ .lC)(annotation, viewport.element);
|
|
31086
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A)([viewport.id]);
|
|
31087
|
+
}; }
|
|
30847
31088
|
}
|
|
30848
31089
|
function defaultGetTextLines(data, targetId) {
|
|
30849
31090
|
const cachedVolumeStats = data.cachedStats[targetId];
|