@ohif/app 3.8.0-beta.80 → 3.8.0-beta.81
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/{121.bundle.787f5a848ed632a4d5fc.js → 121.bundle.47f05840a5b3cdf75543.js} +4 -1
- package/dist/{183.bundle.72bf18ad23ee6624986d.js → 183.bundle.a3e238998be71c4b2af8.js} +64 -48
- package/dist/{206.bundle.f957e0d1cdff66dbac69.js → 206.bundle.fcaa081a0d1f68095c31.js} +45 -20
- package/dist/{217.bundle.be1cc412f8e26be87d21.js → 217.bundle.d44bbaa50b6fa563fe15.js} +116 -69
- package/dist/{295.bundle.6f734abf8fa85b1a310d.js → 295.bundle.5ace95771ced62bdcab8.js} +4 -1
- package/dist/{325.bundle.84909a08305556e9f924.js → 325.bundle.fd8e0c18db4708d03a91.js} +4 -8
- package/dist/{335.bundle.c39d4aefe33aecab958f.js → 335.bundle.8400aa5a88697a6b9d53.js} +2 -2
- package/dist/{41.bundle.7c943bb857ed37831905.js → 41.bundle.0905b258a90a7c6437bb.js} +174 -104
- package/dist/{422.bundle.bd6529c536f59807fbee.js → 422.bundle.c6fd037b075dd54f1ba7.js} +9 -25
- package/dist/{433.bundle.4c77c1fe8fc90ac14218.js → 433.bundle.e0018820758f5a86fa7f.js} +61 -7
- package/dist/{448.bundle.deedeff5744e77510734.js → 448.bundle.5e6da31477887bf53016.js} +6 -12
- package/dist/{487.bundle.7890ca42826941ebcd60.js → 487.bundle.89d973049defb3ba6cb7.js} +3 -2
- package/dist/{530.bundle.7c94543955552475c56a.js → 530.bundle.207b38c15c4c01e4db0e.js} +14 -2
- package/dist/{574.bundle.be075ac52fb52b442a8b.js → 574.bundle.d648fea691d6709bf2b4.js} +14 -3
- package/dist/{633.bundle.c1658e76f104cbd14cab.js → 633.bundle.acab89baaa06a299d679.js} +48 -33
- package/dist/{540.bundle.079d43a6717e95c24392.js → 669.bundle.b17e8a621e38d92c653f.js} +95 -87
- package/dist/{699.bundle.4f01772e7ce6637de339.js → 699.bundle.9367d7ef9f7615b2e733.js} +41 -37
- package/dist/{724.bundle.e5794460c391ee9cba2c.js → 724.bundle.55f9f49816de931af91a.js} +1 -1
- package/dist/{862.bundle.c0ee6e1d4d97e1353213.js → 862.bundle.d32ab08e64806b2e964d.js} +4 -1
- package/dist/{94.bundle.c452d9b0645277c2cf4e.js → 94.bundle.f5f2479c214180d05d42.js} +7 -13
- package/dist/app.bundle.css +1 -1
- package/dist/{app.bundle.6c090a2d6d3ccc97a81d.js → app.bundle.ed937512f7d19d61c411.js} +188 -64
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.63011312c3c79e717ea9.js → polySeg.bundle.f1a6ece1396dc1385155.js} +1 -1
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- /package/dist/{164.bundle.d4598e491783753a8b6b.js → 164.bundle.fadc7c5d634402c73b5f.js} +0 -0
- /package/dist/{188.bundle.b80554ec7df7dcd435a5.js → 188.bundle.51dc4b37920f45594393.js} +0 -0
- /package/dist/{594.bundle.0b1165661dd638820082.js → 594.bundle.84076375b127b9c7f673.js} +0 -0
- /package/dist/{889.bundle.7858e4b7ca1a2b12b64f.js → 889.bundle.8ef8b723d0163d5d135c.js} +0 -0
- /package/dist/{905.bundle.170908fe660fc6b40649.js → 905.bundle.8a96e1a75b7cfe5ec093.js} +0 -0
- /package/dist/{907.bundle.dee4e30420caf07caea6.js → 907.bundle.5c88ed911bed18582da4.js} +0 -0
- /package/dist/{961.bundle.aaaaaba0ec015a3b85d8.js → 961.bundle.f4e52bc76d3044d05372.js} +0 -0
|
@@ -257,7 +257,10 @@ function OHIFCornerstoneRTViewport(props) {
|
|
|
257
257
|
orientation: viewportOptions.orientation,
|
|
258
258
|
viewportId: viewportOptions.viewportId
|
|
259
259
|
},
|
|
260
|
-
onElementEnabled:
|
|
260
|
+
onElementEnabled: evt => {
|
|
261
|
+
props.onElementEnabled?.(evt);
|
|
262
|
+
onElementEnabled(evt);
|
|
263
|
+
},
|
|
261
264
|
onElementDisabled: onElementDisabled
|
|
262
265
|
}));
|
|
263
266
|
}, [viewportId, rtDisplaySet, toolGroupId]);
|
|
@@ -9019,6 +9019,7 @@ class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__
|
|
|
9019
9019
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
9020
9020
|
const { viewport } = enabledElement;
|
|
9021
9021
|
const { data } = annotation;
|
|
9022
|
+
const { isCanvasAnnotation } = data;
|
|
9022
9023
|
const { points, textBox } = data.handles;
|
|
9023
9024
|
if (textBox) {
|
|
9024
9025
|
const { worldBoundingBox } = textBox;
|
|
@@ -9040,7 +9041,9 @@ class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__
|
|
|
9040
9041
|
}
|
|
9041
9042
|
for (let i = 0; i < points?.length; i++) {
|
|
9042
9043
|
const point = points[i];
|
|
9043
|
-
const annotationCanvasCoordinate =
|
|
9044
|
+
const annotationCanvasCoordinate = isCanvasAnnotation
|
|
9045
|
+
? point.slice(0, 2)
|
|
9046
|
+
: viewport.worldToCanvas(point);
|
|
9044
9047
|
const near = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.distance */ .Zc.distance(canvasCoords, annotationCanvasCoordinate) < proximity;
|
|
9045
9048
|
if (near === true) {
|
|
9046
9049
|
data.handles.activeHandleIndex = i;
|
|
@@ -9490,6 +9493,11 @@ function _setLabelmapColorAndOpacity(viewportId, actorEntry, cfun, ofun, colorLU
|
|
|
9490
9493
|
const { activeSegmentIndex } = _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_4__.getSegmentation(segmentationRepresentation.segmentationId);
|
|
9491
9494
|
const outlineWidths = new Array(numColors - 1);
|
|
9492
9495
|
for (let i = 1; i < numColors; i++) {
|
|
9496
|
+
const isHidden = segmentsHidden.has(i);
|
|
9497
|
+
if (isHidden) {
|
|
9498
|
+
outlineWidths[i - 1] = 0;
|
|
9499
|
+
continue;
|
|
9500
|
+
}
|
|
9493
9501
|
outlineWidths[i - 1] =
|
|
9494
9502
|
i === activeSegmentIndex
|
|
9495
9503
|
? outlineWidth + toolGroupLabelmapConfig.activeSegmentOutlineWidthDelta
|
|
@@ -12138,8 +12146,8 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12138
12146
|
shadow: true,
|
|
12139
12147
|
magnifyingGlass: {
|
|
12140
12148
|
radius: 125,
|
|
12141
|
-
zoomFactor:
|
|
12142
|
-
zoomFactorList: [2.5, 3, 3.5, 4, 4.5, 5],
|
|
12149
|
+
zoomFactor: 3,
|
|
12150
|
+
zoomFactorList: [1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5],
|
|
12143
12151
|
autoPan: {
|
|
12144
12152
|
enabled: true,
|
|
12145
12153
|
padding: 10,
|
|
@@ -12168,7 +12176,7 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12168
12176
|
const canvasPos = currentPoints.canvas;
|
|
12169
12177
|
const { magnifyingGlass: config } = this.configuration;
|
|
12170
12178
|
const { radius, zoomFactor, autoPan } = config;
|
|
12171
|
-
const
|
|
12179
|
+
const canvasHandlePoints = this._getCanvasHandlePoints(canvasPos, radius);
|
|
12172
12180
|
const camera = viewport.getCamera();
|
|
12173
12181
|
const { viewPlaneNormal, viewUp } = camera;
|
|
12174
12182
|
const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
|
|
@@ -12190,8 +12198,9 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12190
12198
|
sourceViewportId: viewport.id,
|
|
12191
12199
|
magnifyViewportId,
|
|
12192
12200
|
zoomFactor,
|
|
12201
|
+
isCanvasAnnotation: true,
|
|
12193
12202
|
handles: {
|
|
12194
|
-
points:
|
|
12203
|
+
points: canvasHandlePoints,
|
|
12195
12204
|
activeHandleIndex: null,
|
|
12196
12205
|
},
|
|
12197
12206
|
},
|
|
@@ -12207,11 +12216,12 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12207
12216
|
padding: autoPan.padding,
|
|
12208
12217
|
callback: (data) => {
|
|
12209
12218
|
const annotationPoints = annotation.data.handles.points;
|
|
12210
|
-
const {
|
|
12219
|
+
const { canvas: canvasDelta } = data.delta;
|
|
12211
12220
|
for (let i = 0, len = annotationPoints.length; i < len; i++) {
|
|
12212
|
-
annotationPoints[i]
|
|
12213
|
-
|
|
12214
|
-
|
|
12221
|
+
const point = annotationPoints[i];
|
|
12222
|
+
point[0] += canvasDelta[0];
|
|
12223
|
+
point[1] += canvasDelta[1];
|
|
12224
|
+
annotation.invalidated = true;
|
|
12215
12225
|
}
|
|
12216
12226
|
},
|
|
12217
12227
|
},
|
|
@@ -12232,11 +12242,9 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12232
12242
|
});
|
|
12233
12243
|
};
|
|
12234
12244
|
this.isPointNearTool = (element, annotation, canvasCoords, proximity) => {
|
|
12235
|
-
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
12236
|
-
const { viewport } = enabledElement;
|
|
12237
12245
|
const { data } = annotation;
|
|
12238
12246
|
const { points } = data.handles;
|
|
12239
|
-
const canvasCoordinates = points
|
|
12247
|
+
const canvasCoordinates = points;
|
|
12240
12248
|
const canvasTop = canvasCoordinates[0];
|
|
12241
12249
|
const canvasBottom = canvasCoordinates[2];
|
|
12242
12250
|
const canvasLeft = canvasCoordinates[3];
|
|
@@ -12246,7 +12254,7 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12246
12254
|
canvasTop[1] + radius,
|
|
12247
12255
|
];
|
|
12248
12256
|
const radiusPoint = (0,circle/* getCanvasCircleRadius */.r)([center, canvasCoords]);
|
|
12249
|
-
if (Math.abs(radiusPoint - radius) < proximity *
|
|
12257
|
+
if (Math.abs(radiusPoint - radius) < proximity * 2) {
|
|
12250
12258
|
return true;
|
|
12251
12259
|
}
|
|
12252
12260
|
return false;
|
|
@@ -12308,15 +12316,14 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12308
12316
|
this.isDrawing = true;
|
|
12309
12317
|
const eventDetail = evt.detail;
|
|
12310
12318
|
const { element, deltaPoints } = eventDetail;
|
|
12311
|
-
const
|
|
12319
|
+
const canvasDelta = deltaPoints?.canvas ?? [0, 0, 0];
|
|
12312
12320
|
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
12313
12321
|
const { renderingEngine } = enabledElement;
|
|
12314
12322
|
const { annotation, viewportIdsToRender } = this.editData;
|
|
12315
12323
|
const { points } = annotation.data.handles;
|
|
12316
12324
|
points.forEach((point) => {
|
|
12317
|
-
point[0] +=
|
|
12318
|
-
point[1] +=
|
|
12319
|
-
point[2] += worldPosDelta[2];
|
|
12325
|
+
point[0] += canvasDelta[0];
|
|
12326
|
+
point[1] += canvasDelta[1];
|
|
12320
12327
|
});
|
|
12321
12328
|
annotation.invalidated = true;
|
|
12322
12329
|
this.editData.hasMoved = true;
|
|
@@ -12330,12 +12337,11 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12330
12337
|
const { data } = annotation;
|
|
12331
12338
|
if (handleIndex === undefined) {
|
|
12332
12339
|
const { deltaPoints } = eventDetail;
|
|
12333
|
-
const
|
|
12340
|
+
const canvasDelta = deltaPoints.canvas;
|
|
12334
12341
|
const points = data.handles.points;
|
|
12335
12342
|
points.forEach((point) => {
|
|
12336
|
-
point[0] +=
|
|
12337
|
-
point[1] +=
|
|
12338
|
-
point[2] += worldPosDelta[2];
|
|
12343
|
+
point[0] += canvasDelta[0];
|
|
12344
|
+
point[1] += canvasDelta[1];
|
|
12339
12345
|
});
|
|
12340
12346
|
annotation.invalidated = true;
|
|
12341
12347
|
}
|
|
@@ -12349,14 +12355,10 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12349
12355
|
};
|
|
12350
12356
|
this._dragHandle = (evt) => {
|
|
12351
12357
|
const eventDetail = evt.detail;
|
|
12352
|
-
const { element } = eventDetail;
|
|
12353
|
-
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
12354
|
-
const { viewport } = enabledElement;
|
|
12355
|
-
const { worldToCanvas } = viewport;
|
|
12356
12358
|
const { annotation } = this.editData;
|
|
12357
12359
|
const { data } = annotation;
|
|
12358
12360
|
const { points } = data.handles;
|
|
12359
|
-
const canvasCoordinates = points
|
|
12361
|
+
const canvasCoordinates = points;
|
|
12360
12362
|
const canvasTop = canvasCoordinates[0];
|
|
12361
12363
|
const canvasBottom = canvasCoordinates[2];
|
|
12362
12364
|
const canvasLeft = canvasCoordinates[3];
|
|
@@ -12371,11 +12373,11 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12371
12373
|
canvasCenter,
|
|
12372
12374
|
currentCanvasPoints,
|
|
12373
12375
|
]);
|
|
12374
|
-
const
|
|
12375
|
-
points[0] =
|
|
12376
|
-
points[1] =
|
|
12377
|
-
points[2] =
|
|
12378
|
-
points[3] =
|
|
12376
|
+
const newCanvasHandlePoints = this._getCanvasHandlePoints(canvasCenter, newRadius);
|
|
12377
|
+
points[0] = newCanvasHandlePoints[0];
|
|
12378
|
+
points[1] = newCanvasHandlePoints[1];
|
|
12379
|
+
points[2] = newCanvasHandlePoints[2];
|
|
12380
|
+
points[3] = newCanvasHandlePoints[3];
|
|
12379
12381
|
};
|
|
12380
12382
|
this.cancel = (element) => {
|
|
12381
12383
|
if (!this.isDrawing) {
|
|
@@ -12423,10 +12425,10 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12423
12425
|
if (!annotations?.length) {
|
|
12424
12426
|
return renderStatus;
|
|
12425
12427
|
}
|
|
12426
|
-
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
12427
12428
|
annotations = annotations?.filter((annotation) => annotation.data.sourceViewportId ===
|
|
12428
12429
|
viewport.id);
|
|
12429
|
-
|
|
12430
|
+
const filteredAnnotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
12431
|
+
if (!filteredAnnotations?.length) {
|
|
12430
12432
|
return renderStatus;
|
|
12431
12433
|
}
|
|
12432
12434
|
const styleSpecifier = {
|
|
@@ -12434,8 +12436,8 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12434
12436
|
toolName: this.getToolName(),
|
|
12435
12437
|
viewportId: enabledElement.viewport.id,
|
|
12436
12438
|
};
|
|
12437
|
-
for (let i = 0; i <
|
|
12438
|
-
const annotation =
|
|
12439
|
+
for (let i = 0; i < filteredAnnotations.length; i++) {
|
|
12440
|
+
const annotation = filteredAnnotations[i];
|
|
12439
12441
|
const { annotationUID, data } = annotation;
|
|
12440
12442
|
const { magnifyViewportId, zoomFactor, handles } = data;
|
|
12441
12443
|
const { points, activeHandleIndex } = handles;
|
|
@@ -12443,7 +12445,7 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12443
12445
|
const lineWidth = this.getStyle('lineWidth', styleSpecifier, annotation);
|
|
12444
12446
|
const lineDash = this.getStyle('lineDash', styleSpecifier, annotation);
|
|
12445
12447
|
const color = this.getStyle('color', styleSpecifier, annotation);
|
|
12446
|
-
const canvasCoordinates = points
|
|
12448
|
+
const canvasCoordinates = points;
|
|
12447
12449
|
const canvasTop = canvasCoordinates[0];
|
|
12448
12450
|
const canvasBottom = canvasCoordinates[2];
|
|
12449
12451
|
const canvasLeft = canvasCoordinates[3];
|
|
@@ -12486,15 +12488,13 @@ class AdvancedMagnifyTool extends base/* AnnotationTool */.EC {
|
|
|
12486
12488
|
}
|
|
12487
12489
|
return renderStatus;
|
|
12488
12490
|
};
|
|
12489
|
-
this.
|
|
12490
|
-
|
|
12491
|
-
[canvasCenterPos[0], canvasCenterPos[1] - canvasRadius],
|
|
12492
|
-
[canvasCenterPos[0] + canvasRadius, canvasCenterPos[1]],
|
|
12493
|
-
[canvasCenterPos[0], canvasCenterPos[1] + canvasRadius],
|
|
12494
|
-
[canvasCenterPos[0] - canvasRadius, canvasCenterPos[1]],
|
|
12491
|
+
this._getCanvasHandlePoints = (canvasCenterPos, canvasRadius) => {
|
|
12492
|
+
return [
|
|
12493
|
+
[canvasCenterPos[0], canvasCenterPos[1] - canvasRadius, 0],
|
|
12494
|
+
[canvasCenterPos[0] + canvasRadius, canvasCenterPos[1], 0],
|
|
12495
|
+
[canvasCenterPos[0], canvasCenterPos[1] + canvasRadius, 0],
|
|
12496
|
+
[canvasCenterPos[0] - canvasRadius, canvasCenterPos[1], 0],
|
|
12495
12497
|
];
|
|
12496
|
-
const worldHandlesPoints = canvasHandlesPoints.map((p) => viewport.canvasToWorld(p));
|
|
12497
|
-
return worldHandlesPoints;
|
|
12498
12498
|
};
|
|
12499
12499
|
this.magnifyViewportManager = AdvancedMagnifyViewportManager/* default */.A.getInstance();
|
|
12500
12500
|
}
|
|
@@ -22131,7 +22131,11 @@ class OrientationMarkerTool extends base/* BaseTool */.oS {
|
|
|
22131
22131
|
}
|
|
22132
22132
|
let viewports = renderingEngine.getViewports();
|
|
22133
22133
|
viewports = (0,viewportFilters.filterViewportsWithToolEnabled)(viewports, this.getToolName());
|
|
22134
|
-
viewports.forEach((viewport) =>
|
|
22134
|
+
viewports.forEach((viewport) => {
|
|
22135
|
+
if (!viewport.getWidget(this.getToolName())) {
|
|
22136
|
+
this.addAxisActorInViewport(viewport);
|
|
22137
|
+
}
|
|
22138
|
+
});
|
|
22135
22139
|
}
|
|
22136
22140
|
async addAxisActorInViewport(viewport) {
|
|
22137
22141
|
const viewportId = viewport.id;
|
|
@@ -22172,6 +22176,7 @@ class OrientationMarkerTool extends base/* BaseTool */.oS {
|
|
|
22172
22176
|
orientationWidget,
|
|
22173
22177
|
actor,
|
|
22174
22178
|
};
|
|
22179
|
+
viewport.addWidget(this.getToolName(), orientationWidget);
|
|
22175
22180
|
renderWindow.render();
|
|
22176
22181
|
viewport.getRenderingEngine().render();
|
|
22177
22182
|
this.configuration_invalidated = false;
|
|
@@ -22453,7 +22458,6 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
|
|
|
22453
22458
|
strategySpecificConfiguration: {
|
|
22454
22459
|
THRESHOLD: {
|
|
22455
22460
|
threshold: [-150, -70],
|
|
22456
|
-
dynamicRadius: 0,
|
|
22457
22461
|
},
|
|
22458
22462
|
},
|
|
22459
22463
|
defaultStrategy: 'FILL_INSIDE_CIRCLE',
|
|
@@ -22634,6 +22638,18 @@ class BrushTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .BaseTool */ .oS {
|
|
|
22634
22638
|
if ((0,_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_12__/* .isVolumeSegmentation */ .r)(labelmapData, viewport)) {
|
|
22635
22639
|
const { volumeId } = representationData[type];
|
|
22636
22640
|
const actors = viewport.getActors();
|
|
22641
|
+
const isStackViewport = viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.StackViewport;
|
|
22642
|
+
if (isStackViewport) {
|
|
22643
|
+
const event = new CustomEvent(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.Enums.Events.ERROR_EVENT, {
|
|
22644
|
+
detail: {
|
|
22645
|
+
type: 'Segmentation',
|
|
22646
|
+
message: 'Cannot perform brush operation on the selected viewport',
|
|
22647
|
+
},
|
|
22648
|
+
cancelable: true,
|
|
22649
|
+
});
|
|
22650
|
+
_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget.dispatchEvent(event);
|
|
22651
|
+
return null;
|
|
22652
|
+
}
|
|
22637
22653
|
const volumes = actors.map((actorEntry) => _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(actorEntry.referenceId));
|
|
22638
22654
|
const segmentationVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
|
|
22639
22655
|
const referencedVolumeIdToThreshold = volumes.find((volume) => _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.isEqual(volume.dimensions, segmentationVolume.dimensions))?.volumeId || volumes[0]?.volumeId;
|
|
@@ -24735,10 +24751,10 @@ function playClip(element, playClipOptions) {
|
|
|
24735
24751
|
};
|
|
24736
24752
|
triggerEvent(element, events.CLIP_STARTED, eventDetail);
|
|
24737
24753
|
}
|
|
24738
|
-
function stopClip(element,
|
|
24754
|
+
function stopClip(element, options = {}) {
|
|
24739
24755
|
_stopClip(element, {
|
|
24740
24756
|
stopDynamicCine: true,
|
|
24741
|
-
|
|
24757
|
+
...options,
|
|
24742
24758
|
});
|
|
24743
24759
|
}
|
|
24744
24760
|
function _stopClip(element, options = { stopDynamicCine: true, viewportId: undefined }) {
|
|
@@ -2750,8 +2750,8 @@ function ViewerHeader({
|
|
|
2750
2750
|
hotkeyDefinitions,
|
|
2751
2751
|
hotkeyDefaults
|
|
2752
2752
|
} = hotkeysManager;
|
|
2753
|
-
const versionNumber = "3.8.0-beta.
|
|
2754
|
-
const commitHash = "
|
|
2753
|
+
const versionNumber = "3.8.0-beta.81";
|
|
2754
|
+
const commitHash = "f99a0bfb31434aa137bbb3ed1f9eef1dfcc09025";
|
|
2755
2755
|
const menuOptions = [{
|
|
2756
2756
|
title: t('Header:About'),
|
|
2757
2757
|
icon: 'info',
|
|
@@ -3419,14 +3419,10 @@ function _createStudyBrowserTabs(primaryStudyInstanceUIDs, studyDisplayList, dis
|
|
|
3419
3419
|
function getImageSrcFromImageId(cornerstone, imageId) {
|
|
3420
3420
|
return new Promise((resolve, reject) => {
|
|
3421
3421
|
const canvas = document.createElement('canvas');
|
|
3422
|
-
// Note: the default width and height of the canvas is 300x150
|
|
3423
|
-
// but we need to set the width and height to the same number since
|
|
3424
|
-
// the thumbnails are usually square and we want to maintain the aspect ratio
|
|
3425
|
-
canvas.width = 128 / window.devicePixelRatio;
|
|
3426
|
-
canvas.height = 128 / window.devicePixelRatio;
|
|
3427
3422
|
cornerstone.utilities.loadImageToCanvas({
|
|
3428
3423
|
canvas,
|
|
3429
|
-
imageId
|
|
3424
|
+
imageId,
|
|
3425
|
+
thumbnail: true
|
|
3430
3426
|
}).then(imageId => {
|
|
3431
3427
|
resolve(canvas.toDataURL());
|
|
3432
3428
|
}).catch(reject);
|
|
@@ -4003,7 +3999,7 @@ function PanelMeasurementTable({
|
|
|
4003
3999
|
})), /*#__PURE__*/react.createElement("div", {
|
|
4004
4000
|
className: "flex justify-center p-4"
|
|
4005
4001
|
}, /*#__PURE__*/react.createElement(ui_src/* ActionButtons */.wr, {
|
|
4006
|
-
t: t
|
|
4002
|
+
t: t,
|
|
4007
4003
|
actions: [{
|
|
4008
4004
|
label: 'Export',
|
|
4009
4005
|
onClick: exportReport
|
|
@@ -4503,7 +4499,6 @@ function getSopClassUids(instances) {
|
|
|
4503
4499
|
return sopClassUids;
|
|
4504
4500
|
}
|
|
4505
4501
|
function _getDisplaySetsFromSeries(instances) {
|
|
4506
|
-
debugger;
|
|
4507
4502
|
// If the series has no instances, stop here
|
|
4508
4503
|
if (!instances || !instances.length) {
|
|
4509
4504
|
throw new Error('No instances were provided');
|
|
@@ -4770,18 +4765,39 @@ const defaultCommonPresets = [{
|
|
|
4770
4765
|
numCols: 3
|
|
4771
4766
|
}
|
|
4772
4767
|
}];
|
|
4773
|
-
const
|
|
4768
|
+
const _areSelectorsValid = (hp, displaySets, hangingProtocolService) => {
|
|
4769
|
+
if (!hp.displaySetSelectors || Object.values(hp.displaySetSelectors).length === 0) {
|
|
4770
|
+
return true;
|
|
4771
|
+
}
|
|
4772
|
+
return hangingProtocolService.areRequiredSelectorsValid(Object.values(hp.displaySetSelectors), displaySets[0]);
|
|
4773
|
+
};
|
|
4774
|
+
const generateAdvancedPresets = ({
|
|
4775
|
+
servicesManager
|
|
4776
|
+
}) => {
|
|
4777
|
+
const {
|
|
4778
|
+
hangingProtocolService,
|
|
4779
|
+
viewportGridService,
|
|
4780
|
+
displaySetService
|
|
4781
|
+
} = servicesManager.services;
|
|
4774
4782
|
const hangingProtocols = Array.from(hangingProtocolService.protocols.values());
|
|
4783
|
+
const viewportId = viewportGridService.getActiveViewportId();
|
|
4784
|
+
if (!viewportId) {
|
|
4785
|
+
return [];
|
|
4786
|
+
}
|
|
4787
|
+
const displaySetInsaneUIDs = viewportGridService.getDisplaySetsUIDsForViewport(viewportId);
|
|
4788
|
+
const displaySets = displaySetInsaneUIDs.map(uid => displaySetService.getDisplaySetByUID(uid));
|
|
4775
4789
|
return hangingProtocols.map(hp => {
|
|
4776
4790
|
if (!hp.isPreset) {
|
|
4777
4791
|
return null;
|
|
4778
4792
|
}
|
|
4793
|
+
const areValid = _areSelectorsValid(hp, displaySets, hangingProtocolService);
|
|
4779
4794
|
return {
|
|
4780
4795
|
icon: hp.icon,
|
|
4781
4796
|
title: hp.name,
|
|
4782
4797
|
commandOptions: {
|
|
4783
4798
|
protocolId: hp.id
|
|
4784
|
-
}
|
|
4799
|
+
},
|
|
4800
|
+
disabled: !areValid
|
|
4785
4801
|
};
|
|
4786
4802
|
}).filter(preset => preset !== null);
|
|
4787
4803
|
};
|
|
@@ -4833,11 +4849,12 @@ function LayoutSelector({
|
|
|
4833
4849
|
}) {
|
|
4834
4850
|
const [isOpen, setIsOpen] = (0,react.useState)(false);
|
|
4835
4851
|
const {
|
|
4836
|
-
customizationService
|
|
4837
|
-
hangingProtocolService
|
|
4852
|
+
customizationService
|
|
4838
4853
|
} = servicesManager.services;
|
|
4839
4854
|
const commonPresets = customizationService.get('commonPresets') || defaultCommonPresets;
|
|
4840
|
-
const advancedPresets = customizationService.get('advancedPresets') || generateAdvancedPresets(
|
|
4855
|
+
const advancedPresets = customizationService.get('advancedPresets') || generateAdvancedPresets({
|
|
4856
|
+
servicesManager
|
|
4857
|
+
});
|
|
4841
4858
|
const closeOnOutsideClick = () => {
|
|
4842
4859
|
if (isOpen) {
|
|
4843
4860
|
setIsOpen(false);
|
|
@@ -4886,6 +4903,7 @@ function LayoutSelector({
|
|
|
4886
4903
|
classNames: "hover:bg-primary-dark group flex gap-2 p-1 cursor-pointer",
|
|
4887
4904
|
icon: preset.icon,
|
|
4888
4905
|
title: preset.title,
|
|
4906
|
+
disabled: preset.disabled,
|
|
4889
4907
|
commandOptions: preset.commandOptions,
|
|
4890
4908
|
onSelection: onSelectionPreset
|
|
4891
4909
|
})))), /*#__PURE__*/react.createElement("div", {
|
|
@@ -5547,7 +5565,10 @@ const defaultContextMenu = {
|
|
|
5547
5565
|
items: [{
|
|
5548
5566
|
label: 'Delete measurement',
|
|
5549
5567
|
commands: [{
|
|
5550
|
-
commandName: 'deleteMeasurement'
|
|
5568
|
+
commandName: 'deleteMeasurement',
|
|
5569
|
+
// we only have support for cornerstoneTools context menu since
|
|
5570
|
+
// they are svg based
|
|
5571
|
+
context: 'CORNERSTONE'
|
|
5551
5572
|
}]
|
|
5552
5573
|
}, {
|
|
5553
5574
|
label: 'Add Label',
|
|
@@ -6490,7 +6511,8 @@ const commandsModule = ({
|
|
|
6490
6511
|
*/
|
|
6491
6512
|
setViewportGridLayout: ({
|
|
6492
6513
|
numRows,
|
|
6493
|
-
numCols
|
|
6514
|
+
numCols,
|
|
6515
|
+
isHangingProtocolLayout = false
|
|
6494
6516
|
}) => {
|
|
6495
6517
|
const {
|
|
6496
6518
|
protocol
|
|
@@ -6514,7 +6536,8 @@ const commandsModule = ({
|
|
|
6514
6536
|
viewportGridService.setLayout({
|
|
6515
6537
|
numRows,
|
|
6516
6538
|
numCols,
|
|
6517
|
-
findOrCreateViewport
|
|
6539
|
+
findOrCreateViewport,
|
|
6540
|
+
isHangingProtocolLayout
|
|
6518
6541
|
});
|
|
6519
6542
|
stateSyncService.store(stateReduce);
|
|
6520
6543
|
};
|
|
@@ -6579,7 +6602,8 @@ const commandsModule = ({
|
|
|
6579
6602
|
numCols: toggleOneUpViewportGridStore.layout.numCols,
|
|
6580
6603
|
activeViewportId: viewportIdToUpdate,
|
|
6581
6604
|
layoutOptions,
|
|
6582
|
-
findOrCreateViewport
|
|
6605
|
+
findOrCreateViewport,
|
|
6606
|
+
isHangingProtocolLayout: true
|
|
6583
6607
|
});
|
|
6584
6608
|
} else {
|
|
6585
6609
|
// We are not in one-up, so toggle to one up.
|
|
@@ -6603,7 +6627,8 @@ const commandsModule = ({
|
|
|
6603
6627
|
viewportGridService.setLayout({
|
|
6604
6628
|
numRows: 1,
|
|
6605
6629
|
numCols: 1,
|
|
6606
|
-
findOrCreateViewport
|
|
6630
|
+
findOrCreateViewport,
|
|
6631
|
+
isHangingProtocolLayout: true
|
|
6607
6632
|
});
|
|
6608
6633
|
|
|
6609
6634
|
// Subscribe to ANY (i.e. manual and hanging protocol) layout changes so that
|