@ohif/app 3.9.0-beta.15 → 3.9.0-beta.17
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/{117.bundle.58f96ac1d52fd08db5c2.js → 117.bundle.772ce244eee25d9b7316.js} +1 -0
- package/dist/{164.bundle.db5eee347be4e24f6fdd.js → 164.bundle.3221590f5e6855086889.js} +8 -5
- package/dist/{236.bundle.d93b7e3b3edcae50a4e6.js → 236.bundle.d3a631d79ee8952e3c60.js} +12 -3
- package/dist/{367.bundle.da5db5b510b537e43888.js → 367.bundle.6a0746aeca702ae6eba6.js} +2 -1
- package/dist/{370.bundle.d6c1741f388bb129bcd3.js → 370.bundle.baa389d217c390b0e92b.js} +4 -1
- package/dist/{390.bundle.19dc1ebc9a6cfc3fbfc9.js → 390.bundle.8f12eb01e3aca2e5e1a7.js} +14 -6
- package/dist/{501.bundle.d5262ba2d61a134e80f9.js → 501.bundle.7d5003758fa3ffbb344b.js} +11 -3
- package/dist/{682.bundle.7c011d50d7288912a1c4.js → 682.bundle.a790945450764c120a60.js} +6 -1
- package/dist/{699.bundle.e1cd2e58926dcf5dabb4.js → 699.bundle.fed4662fb1e2b7993e2f.js} +30 -1
- package/dist/{776.bundle.73c4061d25da8a38f094.js → 776.bundle.2a001f4a814223e38f6c.js} +10 -5
- package/dist/{94.bundle.db1489df1601db91673a.js → 94.bundle.3bdd767681a55c11efff.js} +35 -5
- package/dist/app-config.js +4 -1
- package/dist/{app.bundle.63fd6d9477b55c654ce1.js → app.bundle.4d4abbda6a626a1b3ad2.js} +5 -5
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.2925f79e406ec5679295.js → polySeg.bundle.b0392069f29e128b4efa.js} +1 -1
- package/dist/{suv-peak-worker.bundle.3c25dca2297e395980e0.js → suv-peak-worker.bundle.f823d84fae4ce6865f9a.js} +1 -1
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- /package/dist/{243.bundle.fcba1c532402aafe0484.js → 243.bundle.dca79db9b6802ce2281d.js} +0 -0
- /package/dist/{325.bundle.e4a699159ffe0d32247c.js → 325.bundle.72b47732adfc420f9f5e.js} +0 -0
- /package/dist/{342.bundle.2409ae0f84411b7636b4.js → 342.bundle.67c49f2e52829a5696a4.js} +0 -0
- /package/dist/{448.bundle.be36390fd1bb7cce3cb0.js → 448.bundle.0998691e276ac921f554.js} +0 -0
- /package/dist/{483.bundle.67e9abdcf23262c94606.js → 483.bundle.016de3c3ec209d9fa42a.js} +0 -0
- /package/dist/{487.bundle.e73e1d501291b355528a.js → 487.bundle.037b3a09ab81f0c558af.js} +0 -0
- /package/dist/{550.bundle.6c1cc0fc8f93aa6c921a.js → 550.bundle.7604b9c084c9c6a817aa.js} +0 -0
- /package/dist/{574.bundle.99b6357e6e4d26b7fb93.js → 574.bundle.0bcd9d70f4b1eea48082.js} +0 -0
- /package/dist/{721.bundle.5c31c68e64a057099963.js → 721.bundle.014dba698072bc1a3ba6.js} +0 -0
- /package/dist/{783.bundle.1b71d24dcdf76efbc852.js → 783.bundle.397e9c74be3a8eb09547.js} +0 -0
- /package/dist/{862.bundle.c31fa820e70e82c2a293.js → 862.bundle.7a102f04ef4d12686894.js} +0 -0
- /package/dist/{889.bundle.0116bb74f3e13909d411.js → 889.bundle.e6686e891afef264a113.js} +0 -0
- /package/dist/{905.bundle.50575cbfba2213c7a950.js → 905.bundle.b5a9050c541b5ae26f91.js} +0 -0
- /package/dist/{907.bundle.41fbcd52f0a1970f0282.js → 907.bundle.a0664f8484cf5c4b5428.js} +0 -0
- /package/dist/{961.bundle.aedf07f7c494ad7b9f95.js → 961.bundle.47fb30477fbca7a68b73.js} +0 -0
- /package/dist/{981.bundle.5edbbd02e3ac8a231781.js → 981.bundle.6748c2bd4e1bdc5de10f.js} +0 -0
- /package/dist/{989.bundle.56bc19b2b0f319bda434.js → 989.bundle.2cc6433910b85e83822a.js} +0 -0
- /package/dist/{998.bundle.8aafd79b5461b838068b.js → 998.bundle.63072cf5648da0935497.js} +0 -0
|
@@ -4526,6 +4526,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
4526
4526
|
getCalibratedAspect: () => (/* reexport */ getCalibratedUnits/* getCalibratedAspect */.CQ),
|
|
4527
4527
|
getCalibratedLengthUnitsAndScale: () => (/* reexport */ getCalibratedUnits/* getCalibratedLengthUnitsAndScale */.Op),
|
|
4528
4528
|
getCalibratedProbeUnitsAndValue: () => (/* reexport */ getCalibratedUnits/* getCalibratedProbeUnitsAndValue */.Xw),
|
|
4529
|
+
getClosestImageIdForStackViewport: () => (/* reexport */ annotationHydration/* getClosestImageIdForStackViewport */.x),
|
|
4529
4530
|
getSphereBoundsInfo: () => (/* reexport */ getSphereBoundsInfo/* getSphereBoundsInfo */.R),
|
|
4530
4531
|
getViewportForAnnotation: () => (/* reexport */ getViewportForAnnotation/* default */.A),
|
|
4531
4532
|
isObject: () => (/* reexport */ isObject/* default */.A),
|
|
@@ -3335,6 +3335,9 @@ class AnnotationFrameRange {
|
|
|
3335
3335
|
/***/ 25781:
|
|
3336
3336
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3337
3337
|
|
|
3338
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3339
|
+
/* harmony export */ x: () => (/* binding */ getClosestImageIdForStackViewport)
|
|
3340
|
+
/* harmony export */ });
|
|
3338
3341
|
/* unused harmony export annotationHydration */
|
|
3339
3342
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
3340
3343
|
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95778);
|
|
@@ -3407,7 +3410,7 @@ function getClosestImageIdForStackViewport(viewport, worldPos, viewPlaneNormal)
|
|
|
3407
3410
|
return;
|
|
3408
3411
|
}
|
|
3409
3412
|
const distanceImagePairs = imageIds.map((imageId) => {
|
|
3410
|
-
const { imagePositionPatient } = metaData.get('imagePlaneModule', imageId);
|
|
3413
|
+
const { imagePositionPatient } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.metaData.get('imagePlaneModule', imageId);
|
|
3411
3414
|
const distance = calculateDistanceToImage(worldPos, imagePositionPatient, viewPlaneNormal);
|
|
3412
3415
|
return { imageId, distance };
|
|
3413
3416
|
});
|
|
@@ -3415,9 +3418,9 @@ function getClosestImageIdForStackViewport(viewport, worldPos, viewPlaneNormal)
|
|
|
3415
3418
|
return distanceImagePairs[0].imageId;
|
|
3416
3419
|
}
|
|
3417
3420
|
function calculateDistanceToImage(worldPos, ImagePositionPatient, viewPlaneNormal) {
|
|
3418
|
-
const dir = vec3.create();
|
|
3419
|
-
vec3.sub(dir, worldPos, ImagePositionPatient);
|
|
3420
|
-
const dot = vec3.dot(dir, viewPlaneNormal);
|
|
3421
|
+
const dir = gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.create */ .eR.create();
|
|
3422
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.sub */ .eR.sub(dir, worldPos, ImagePositionPatient);
|
|
3423
|
+
const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.dot */ .eR.dot(dir, viewPlaneNormal);
|
|
3421
3424
|
return Math.abs(dot);
|
|
3422
3425
|
}
|
|
3423
3426
|
|
|
@@ -5286,7 +5289,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
5286
5289
|
triggerAnnotationRenderForViewportIds: () => (/* reexport */ triggerAnnotationRenderForViewportIds/* default */.A)
|
|
5287
5290
|
});
|
|
5288
5291
|
|
|
5289
|
-
// UNUSED EXPORTS: annotationFrameRange, annotationHydration, boundingBox, calibrateImageSpacing, cine, contourSegmentation, contours, drawing, dynamicVolume, getAnnotationNearPoint, getAnnotationNearPointOnEnabledElement, getCalibratedAspect, getCalibratedProbeUnitsAndValue, getSphereBoundsInfo, getViewportForAnnotation, isObject, jumpToSlice, orientation, planar, planarFreehandROITool, pointInSurroundingSphereCallback, rectangleROITool, segmentation, stackContextPrefetch, stackPrefetch, touch, triggerAnnotationRender, triggerEvent, viewport, viewportFilters, voi
|
|
5292
|
+
// UNUSED EXPORTS: annotationFrameRange, annotationHydration, boundingBox, calibrateImageSpacing, cine, contourSegmentation, contours, drawing, dynamicVolume, getAnnotationNearPoint, getAnnotationNearPointOnEnabledElement, getCalibratedAspect, getCalibratedProbeUnitsAndValue, getClosestImageIdForStackViewport, getSphereBoundsInfo, getViewportForAnnotation, isObject, jumpToSlice, orientation, planar, planarFreehandROITool, pointInSurroundingSphereCallback, rectangleROITool, segmentation, stackContextPrefetch, stackPrefetch, touch, triggerAnnotationRender, triggerEvent, viewport, viewportFilters, voi
|
|
5290
5293
|
|
|
5291
5294
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
5292
5295
|
var esm = __webpack_require__(92136);
|
|
@@ -8220,6 +8220,11 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
8220
8220
|
configuration: {
|
|
8221
8221
|
shadow: true,
|
|
8222
8222
|
viewportIndicators: true,
|
|
8223
|
+
viewportIndicatorsConfig: {
|
|
8224
|
+
radius: 5,
|
|
8225
|
+
x: null,
|
|
8226
|
+
y: null,
|
|
8227
|
+
},
|
|
8223
8228
|
autoPan: {
|
|
8224
8229
|
enabled: false,
|
|
8225
8230
|
panSize: 10,
|
|
@@ -8819,11 +8824,14 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
8819
8824
|
data.handles.rotationPoints = newRtpoints;
|
|
8820
8825
|
data.handles.slabThicknessPoints = newStpoints;
|
|
8821
8826
|
if (this.configuration.viewportIndicators) {
|
|
8827
|
+
const { viewportIndicatorsConfig } = this.configuration;
|
|
8828
|
+
const xOffset = viewportIndicatorsConfig?.xOffset || 0.95;
|
|
8829
|
+
const yOffset = viewportIndicatorsConfig?.yOffset || 0.05;
|
|
8822
8830
|
const referenceColorCoordinates = [
|
|
8823
|
-
clientWidth *
|
|
8824
|
-
clientHeight *
|
|
8831
|
+
clientWidth * xOffset,
|
|
8832
|
+
clientHeight * yOffset,
|
|
8825
8833
|
];
|
|
8826
|
-
const circleRadius = canvasDiagonalLength * 0.01;
|
|
8834
|
+
const circleRadius = viewportIndicatorsConfig?.circleRadius || canvasDiagonalLength * 0.01;
|
|
8827
8835
|
const circleUID = '0';
|
|
8828
8836
|
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, referenceColorCoordinates, circleRadius, { color, fill: color });
|
|
8829
8837
|
}
|
|
@@ -24250,6 +24258,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24250
24258
|
getCalibratedAspect: () => (/* reexport */ getCalibratedUnits/* getCalibratedAspect */.CQ),
|
|
24251
24259
|
getCalibratedLengthUnitsAndScale: () => (/* reexport */ getCalibratedUnits/* getCalibratedLengthUnitsAndScale */.Op),
|
|
24252
24260
|
getCalibratedProbeUnitsAndValue: () => (/* reexport */ getCalibratedUnits/* getCalibratedProbeUnitsAndValue */.Xw),
|
|
24261
|
+
getClosestImageIdForStackViewport: () => (/* reexport */ annotationHydration/* getClosestImageIdForStackViewport */.x),
|
|
24253
24262
|
getSphereBoundsInfo: () => (/* reexport */ getSphereBoundsInfo/* getSphereBoundsInfo */.R),
|
|
24254
24263
|
getViewportForAnnotation: () => (/* reexport */ getViewportForAnnotation/* default */.A),
|
|
24255
24264
|
isObject: () => (/* reexport */ isObject/* default */.A),
|
|
@@ -299,7 +299,8 @@ class AnnotationFrameRange {
|
|
|
299
299
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
300
300
|
|
|
301
301
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
302
|
-
/* harmony export */ i: () => (/* binding */ annotationHydration)
|
|
302
|
+
/* harmony export */ i: () => (/* binding */ annotationHydration),
|
|
303
|
+
/* harmony export */ x: () => (/* binding */ getClosestImageIdForStackViewport)
|
|
303
304
|
/* harmony export */ });
|
|
304
305
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
305
306
|
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95778);
|
|
@@ -5215,6 +5215,8 @@ function deleteConfigCache(segmentationRepresentationUID) {
|
|
|
5215
5215
|
|
|
5216
5216
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/index.js + 31 modules
|
|
5217
5217
|
var stateManagement_segmentation = __webpack_require__(63421);
|
|
5218
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/annotationHydration.js
|
|
5219
|
+
var annotationHydration = __webpack_require__(25781);
|
|
5218
5220
|
// EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Common/Core/CellArray.js
|
|
5219
5221
|
var CellArray = __webpack_require__(24768);
|
|
5220
5222
|
// EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Common/Core/Points.js
|
|
@@ -5284,6 +5286,7 @@ var contourSegmentation = __webpack_require__(7259);
|
|
|
5284
5286
|
|
|
5285
5287
|
|
|
5286
5288
|
|
|
5289
|
+
|
|
5287
5290
|
function handleContourSegmentation(viewport, geometryIds, annotationUIDsMap, contourRepresentation, contourRepresentationConfig) {
|
|
5288
5291
|
const addOrUpdateFn = annotationUIDsMap.size
|
|
5289
5292
|
? updateContourSets
|
|
@@ -5372,7 +5375,7 @@ function addContourSetsToElement(viewport, geometryIds, contourRepresentation, c
|
|
|
5372
5375
|
isLocked: true,
|
|
5373
5376
|
isVisible: true,
|
|
5374
5377
|
metadata: {
|
|
5375
|
-
referencedImageId: viewport.
|
|
5378
|
+
referencedImageId: (0,annotationHydration/* getClosestImageIdForStackViewport */.x)(viewport, points[0], viewport.getCamera().viewPlaneNormal),
|
|
5376
5379
|
toolName: 'PlanarFreehandContourSegmentationTool',
|
|
5377
5380
|
FrameOfReferenceUID: viewport.getFrameOfReferenceUID(),
|
|
5378
5381
|
viewPlaneNormal: viewport.getCamera().viewPlaneNormal,
|
|
@@ -2757,8 +2757,8 @@ function ViewerHeader({
|
|
|
2757
2757
|
hotkeyDefinitions,
|
|
2758
2758
|
hotkeyDefaults
|
|
2759
2759
|
} = hotkeysManager;
|
|
2760
|
-
const versionNumber = "3.9.0-beta.
|
|
2761
|
-
const commitHash = "
|
|
2760
|
+
const versionNumber = "3.9.0-beta.17";
|
|
2761
|
+
const commitHash = "73d9e99d5d6f38ab6c36f4471d54f18798feacb4";
|
|
2762
2762
|
const menuOptions = [{
|
|
2763
2763
|
title: t('Header:About'),
|
|
2764
2764
|
icon: 'info',
|
|
@@ -4863,6 +4863,7 @@ function LayoutSelector({
|
|
|
4863
4863
|
...rest
|
|
4864
4864
|
}) {
|
|
4865
4865
|
const [isOpen, setIsOpen] = (0,react.useState)(false);
|
|
4866
|
+
const dropdownRef = (0,react.useRef)(null);
|
|
4866
4867
|
const {
|
|
4867
4868
|
customizationService
|
|
4868
4869
|
} = servicesManager.services;
|
|
@@ -4870,15 +4871,21 @@ function LayoutSelector({
|
|
|
4870
4871
|
const advancedPresets = customizationService.get('advancedPresets') || generateAdvancedPresets({
|
|
4871
4872
|
servicesManager
|
|
4872
4873
|
});
|
|
4873
|
-
const closeOnOutsideClick =
|
|
4874
|
-
if (isOpen) {
|
|
4874
|
+
const closeOnOutsideClick = event => {
|
|
4875
|
+
if (isOpen && dropdownRef.current) {
|
|
4875
4876
|
setIsOpen(false);
|
|
4876
4877
|
}
|
|
4877
4878
|
};
|
|
4878
4879
|
(0,react.useEffect)(() => {
|
|
4879
|
-
|
|
4880
|
+
if (!isOpen) {
|
|
4881
|
+
return;
|
|
4882
|
+
}
|
|
4883
|
+
setTimeout(() => {
|
|
4884
|
+
window.addEventListener('click', closeOnOutsideClick);
|
|
4885
|
+
}, 0);
|
|
4880
4886
|
return () => {
|
|
4881
4887
|
window.removeEventListener('click', closeOnOutsideClick);
|
|
4888
|
+
dropdownRef.current = null;
|
|
4882
4889
|
};
|
|
4883
4890
|
}, [isOpen]);
|
|
4884
4891
|
const onInteractionHandler = () => {
|
|
@@ -4894,7 +4901,8 @@ function LayoutSelector({
|
|
|
4894
4901
|
rounded: rest.rounded,
|
|
4895
4902
|
disableToolTip: tooltipDisabled,
|
|
4896
4903
|
dropdownContent: DropdownContent !== null && /*#__PURE__*/react.createElement("div", {
|
|
4897
|
-
className: "flex
|
|
4904
|
+
className: "flex",
|
|
4905
|
+
ref: dropdownRef
|
|
4898
4906
|
}, /*#__PURE__*/react.createElement("div", {
|
|
4899
4907
|
className: "bg-secondary-dark flex flex-col gap-2.5 p-2"
|
|
4900
4908
|
}, /*#__PURE__*/react.createElement("div", {
|
|
@@ -36057,6 +36057,11 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
36057
36057
|
configuration: {
|
|
36058
36058
|
shadow: true,
|
|
36059
36059
|
viewportIndicators: true,
|
|
36060
|
+
viewportIndicatorsConfig: {
|
|
36061
|
+
radius: 5,
|
|
36062
|
+
x: null,
|
|
36063
|
+
y: null,
|
|
36064
|
+
},
|
|
36060
36065
|
autoPan: {
|
|
36061
36066
|
enabled: false,
|
|
36062
36067
|
panSize: 10,
|
|
@@ -36656,11 +36661,14 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
36656
36661
|
data.handles.rotationPoints = newRtpoints;
|
|
36657
36662
|
data.handles.slabThicknessPoints = newStpoints;
|
|
36658
36663
|
if (this.configuration.viewportIndicators) {
|
|
36664
|
+
const { viewportIndicatorsConfig } = this.configuration;
|
|
36665
|
+
const xOffset = viewportIndicatorsConfig?.xOffset || 0.95;
|
|
36666
|
+
const yOffset = viewportIndicatorsConfig?.yOffset || 0.05;
|
|
36659
36667
|
const referenceColorCoordinates = [
|
|
36660
|
-
clientWidth *
|
|
36661
|
-
clientHeight *
|
|
36668
|
+
clientWidth * xOffset,
|
|
36669
|
+
clientHeight * yOffset,
|
|
36662
36670
|
];
|
|
36663
|
-
const circleRadius = canvasDiagonalLength * 0.01;
|
|
36671
|
+
const circleRadius = viewportIndicatorsConfig?.circleRadius || canvasDiagonalLength * 0.01;
|
|
36664
36672
|
const circleUID = '0';
|
|
36665
36673
|
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, referenceColorCoordinates, circleRadius, { color, fill: color });
|
|
36666
36674
|
}
|
|
@@ -284,7 +284,12 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager, m
|
|
|
284
284
|
disabled: [{
|
|
285
285
|
toolName: toolNames.Crosshairs,
|
|
286
286
|
configuration: {
|
|
287
|
-
viewportIndicators:
|
|
287
|
+
viewportIndicators: true,
|
|
288
|
+
viewportIndicatorsConfig: {
|
|
289
|
+
circleRadius: 5,
|
|
290
|
+
xOffset: 0.95,
|
|
291
|
+
yOffset: 0.05
|
|
292
|
+
},
|
|
288
293
|
disableOnPassive: true,
|
|
289
294
|
autoPan: {
|
|
290
295
|
enabled: false,
|
|
@@ -446,6 +446,16 @@ const segmentationButtons_toolbarButtons = [{
|
|
|
446
446
|
}];
|
|
447
447
|
/* harmony default export */ const segmentationButtons = (segmentationButtons_toolbarButtons);
|
|
448
448
|
;// CONCATENATED MODULE: ../../../modes/segmentation/src/initToolGroups.ts
|
|
449
|
+
const colours = {
|
|
450
|
+
'viewport-0': 'rgb(200, 0, 0)',
|
|
451
|
+
'viewport-1': 'rgb(200, 200, 0)',
|
|
452
|
+
'viewport-2': 'rgb(0, 200, 0)'
|
|
453
|
+
};
|
|
454
|
+
const colorsByOrientation = {
|
|
455
|
+
axial: 'rgb(200, 0, 0)',
|
|
456
|
+
sagittal: 'rgb(200, 200, 0)',
|
|
457
|
+
coronal: 'rgb(0, 200, 0)'
|
|
458
|
+
};
|
|
449
459
|
function createTools(utilityModule) {
|
|
450
460
|
const {
|
|
451
461
|
toolNames,
|
|
@@ -554,15 +564,34 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
|
|
|
554
564
|
}
|
|
555
565
|
function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
|
556
566
|
const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
|
|
567
|
+
const servicesManager = extensionManager._servicesManager;
|
|
568
|
+
const {
|
|
569
|
+
cornerstoneViewportService
|
|
570
|
+
} = servicesManager.services;
|
|
557
571
|
const tools = createTools(utilityModule);
|
|
558
572
|
tools.disabled.push({
|
|
559
573
|
toolName: utilityModule.exports.toolNames.Crosshairs,
|
|
560
574
|
configuration: {
|
|
561
|
-
viewportIndicators:
|
|
575
|
+
viewportIndicators: true,
|
|
576
|
+
viewportIndicatorsConfig: {
|
|
577
|
+
circleRadius: 5,
|
|
578
|
+
xOffset: 0.95,
|
|
579
|
+
yOffset: 0.05
|
|
580
|
+
},
|
|
562
581
|
disableOnPassive: true,
|
|
563
582
|
autoPan: {
|
|
564
583
|
enabled: false,
|
|
565
584
|
panSize: 10
|
|
585
|
+
},
|
|
586
|
+
getReferenceLineColor: viewportId => {
|
|
587
|
+
const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);
|
|
588
|
+
const viewportOptions = viewportInfo?.viewportOptions;
|
|
589
|
+
if (viewportOptions) {
|
|
590
|
+
return colours[viewportOptions.id] || colorsByOrientation[viewportOptions.orientation] || '#0c0';
|
|
591
|
+
} else {
|
|
592
|
+
console.warn('missing viewport?', viewportId);
|
|
593
|
+
return '#0c0';
|
|
594
|
+
}
|
|
566
595
|
}
|
|
567
596
|
}
|
|
568
597
|
}, {
|
|
@@ -22,7 +22,7 @@ const toolGroupIds = {
|
|
|
22
22
|
MIP: 'mipToolGroup',
|
|
23
23
|
default: 'default'
|
|
24
24
|
};
|
|
25
|
-
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
|
|
25
|
+
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig, servicesManager) {
|
|
26
26
|
const tools = {
|
|
27
27
|
active: [{
|
|
28
28
|
toolName: toolNames.WindowLevel,
|
|
@@ -147,7 +147,12 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, mo
|
|
|
147
147
|
disabled: [{
|
|
148
148
|
toolName: toolNames.Crosshairs,
|
|
149
149
|
configuration: {
|
|
150
|
-
viewportIndicators:
|
|
150
|
+
viewportIndicators: true,
|
|
151
|
+
viewportIndicatorsConfig: {
|
|
152
|
+
circleRadius: 5,
|
|
153
|
+
xOffset: 0.95,
|
|
154
|
+
yOffset: 0.05
|
|
155
|
+
},
|
|
151
156
|
disableOnPassive: true,
|
|
152
157
|
autoPan: {
|
|
153
158
|
enabled: false,
|
|
@@ -195,8 +200,8 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, mo
|
|
|
195
200
|
};
|
|
196
201
|
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
|
|
197
202
|
}
|
|
198
|
-
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
|
|
199
|
-
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig);
|
|
203
|
+
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig, servicesManager) {
|
|
204
|
+
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig, servicesManager);
|
|
200
205
|
}
|
|
201
206
|
/* harmony default export */ const src_initToolGroups = (initToolGroups);
|
|
202
207
|
;// CONCATENATED MODULE: ../../../modes/tmtv/src/toolbarButtons.js
|
|
@@ -595,7 +600,7 @@ function modeFactory({
|
|
|
595
600
|
} = utilityModule.exports;
|
|
596
601
|
|
|
597
602
|
// Init Default and SR ToolGroups
|
|
598
|
-
src_initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
|
|
603
|
+
src_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, null, servicesManager);
|
|
599
604
|
const {
|
|
600
605
|
unsubscribe
|
|
601
606
|
} = toolGroupService.subscribe(toolGroupService.EVENTS.VIEWPORT_ADDED, () => {
|
|
@@ -133,7 +133,20 @@ const toolGroupIds = {
|
|
|
133
133
|
Fusion: 'dynamic4D-fusion',
|
|
134
134
|
CT: 'dynamic4D-ct'
|
|
135
135
|
};
|
|
136
|
-
|
|
136
|
+
const colours = {
|
|
137
|
+
'viewport-0': 'rgb(200, 0, 0)',
|
|
138
|
+
'viewport-1': 'rgb(200, 200, 0)',
|
|
139
|
+
'viewport-2': 'rgb(0, 200, 0)'
|
|
140
|
+
};
|
|
141
|
+
const colorsByOrientation = {
|
|
142
|
+
axial: 'rgb(200, 0, 0)',
|
|
143
|
+
sagittal: 'rgb(200, 200, 0)',
|
|
144
|
+
coronal: 'rgb(0, 200, 0)'
|
|
145
|
+
};
|
|
146
|
+
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, servicesManager) {
|
|
147
|
+
const {
|
|
148
|
+
cornerstoneViewportService
|
|
149
|
+
} = servicesManager.services;
|
|
137
150
|
const tools = {
|
|
138
151
|
active: [{
|
|
139
152
|
toolName: toolNames.WindowLevel,
|
|
@@ -237,11 +250,26 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
|
|
|
237
250
|
disabled: [{
|
|
238
251
|
toolName: toolNames.Crosshairs,
|
|
239
252
|
configuration: {
|
|
240
|
-
viewportIndicators:
|
|
253
|
+
viewportIndicators: true,
|
|
254
|
+
viewportIndicatorsConfig: {
|
|
255
|
+
circleRadius: 5,
|
|
256
|
+
xOffset: 0.95,
|
|
257
|
+
yOffset: 0.05
|
|
258
|
+
},
|
|
241
259
|
disableOnPassive: true,
|
|
242
260
|
autoPan: {
|
|
243
261
|
enabled: false,
|
|
244
262
|
panSize: 10
|
|
263
|
+
},
|
|
264
|
+
getReferenceLineColor: viewportId => {
|
|
265
|
+
const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);
|
|
266
|
+
const viewportOptions = viewportInfo?.viewportOptions;
|
|
267
|
+
if (viewportOptions) {
|
|
268
|
+
return colours[viewportOptions.id] || colorsByOrientation[viewportOptions.orientation] || '#0c0';
|
|
269
|
+
} else {
|
|
270
|
+
console.warn('missing viewport?', viewportId);
|
|
271
|
+
return '#0c0';
|
|
272
|
+
}
|
|
245
273
|
}
|
|
246
274
|
}
|
|
247
275
|
}]
|
|
@@ -270,9 +298,10 @@ function initToolGroups({
|
|
|
270
298
|
toolNames,
|
|
271
299
|
Enums,
|
|
272
300
|
toolGroupService,
|
|
273
|
-
commandsManager
|
|
301
|
+
commandsManager,
|
|
302
|
+
servicesManager
|
|
274
303
|
}) {
|
|
275
|
-
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
|
|
304
|
+
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, servicesManager);
|
|
276
305
|
}
|
|
277
306
|
|
|
278
307
|
;// CONCATENATED MODULE: ../../../modes/preclinical-4d/src/toolbarButtons.tsx
|
|
@@ -639,7 +668,8 @@ function modeFactory({
|
|
|
639
668
|
toolNames,
|
|
640
669
|
Enums,
|
|
641
670
|
toolGroupService,
|
|
642
|
-
commandsManager
|
|
671
|
+
commandsManager,
|
|
672
|
+
servicesManager
|
|
643
673
|
});
|
|
644
674
|
toolbarService.addButtons([...src_toolbarButtons, ...segmentationButtons]);
|
|
645
675
|
toolbarService.createButtonSection('secondary', ['ProgressDropdown']);
|
package/dist/app-config.js
CHANGED