@ohif/app 3.9.1 → 3.9.2
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.d328aabb2b43e9ea1f96.js} +62 -14
- package/dist/{1266.bundle.e9abd5c45b5236544151.js → 1266.bundle.46de27eda2ef1fce1243.js} +5 -0
- package/dist/{1436.bundle.773756cd51b69e887bac.js → 1436.bundle.27ae9c87e9fc7f52cad3.js} +234 -63
- package/dist/{1927.bundle.49539e3ab5b0aad1399c.js → 1927.bundle.2b2fa0b539d6ac5b0dc3.js} +1 -1
- package/dist/{3200.bundle.a12825fb5aec200d33e2.js → 3200.bundle.ccb809fb554332d9a0f5.js} +15 -7
- package/dist/{149.bundle.ce5596fc563276036744.js → 3900.bundle.3937999d1ee1f391647a.js} +35 -1
- package/dist/{4571.bundle.3b1691730b3c57bf4d35.js → 4571.bundle.a37be49663df2f4a2c8a.js} +99 -89
- package/dist/{5247.bundle.6dc2a50f21821b2ffdf5.js → 5247.bundle.1a1d7c27de482e4a73f3.js} +2 -2
- package/dist/{5252.bundle.5ec502c53a9cc877ed8d.js → 5252.bundle.f2675336275573a288d5.js} +13 -1
- package/dist/{1520.bundle.97dbd9bfa83148e5334d.js → 5630.bundle.1bd2402f37597078c1a1.js} +70 -59
- package/dist/{5717.bundle.848e13f256818475f57f.js → 5717.bundle.32836c212103dbbe8e4a.js} +247 -64
- package/dist/{7197.bundle.c28453cdb392072d8bf8.js → 7197.bundle.42a975bb7ae4a8df2d00.js} +2 -2
- package/dist/{7955.bundle.6a255705b1ef5906f4a8.js → 7955.bundle.f6c5edb284bdf8b80f2a.js} +1 -1
- package/dist/{8228.bundle.55ac03d7165248f47d4e.js → 8228.bundle.0a7997d04c82dd8c11c5.js} +2 -2
- package/dist/{8523.bundle.648334132159465cdc41.js → 8523.bundle.c0ec85de98ba380ebeb4.js} +55 -13
- package/dist/{9551.bundle.6c260a9869e14dcc3543.js → 9551.bundle.63b2679dd7beee6396d8.js} +1 -1
- package/dist/{app.bundle.d02143bec2df7fec9964.js → app.bundle.632bc6188462e1c95a41.js} +143 -80
- 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.1f483dc7131d7c26b517.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +19 -19
- /package/dist/{1374.bundle.019bbc010eeb66109e8b.js → 1374.bundle.1ee8326c0748c7b1a7c0.js} +0 -0
- /package/dist/{213.bundle.e663335fb0884edde6d8.js → 213.bundle.8c04fecea2e3796e4d73.js} +0 -0
- /package/dist/{2424.bundle.b7da298db43541d3a7c0.js → 2424.bundle.38b19314ebd984c9d393.js} +0 -0
- /package/dist/{2825.bundle.b04c941a87fd580deb6d.js → 2825.bundle.0307cae794e8b057c674.js} +0 -0
- /package/dist/{3198.bundle.c82b7424070ffd02faf1.js → 3198.bundle.ab612063af0d67397377.js} +0 -0
- /package/dist/{4834.bundle.aad44c2628cdefb7a4dd.js → 4834.bundle.c25348524be5214e90d6.js} +0 -0
- /package/dist/{5139.bundle.367a6827071448e2923d.js → 5139.bundle.db30dc02cf41e91c8985.js} +0 -0
- /package/dist/{5687.bundle.5731ec23dd9eb43a083e.js → 5687.bundle.05de4787676bf79f9906.js} +0 -0
- /package/dist/{717.bundle.0f32b7b57347b5141248.js → 717.bundle.3a4b8835adf03e4554c7.js} +0 -0
- /package/dist/{8008.bundle.5bf7b274246be10e2f05.js → 8008.bundle.d4187a30e8f656a21316.js} +0 -0
- /package/dist/{8259.bundle.623c29b26b170a8a085b.js → 8259.bundle.990db2fa9ce0800319e9.js} +0 -0
- /package/dist/{8558.bundle.01d05fd73da5db8e60f9.js → 8558.bundle.63714e2329c22c9cb9da.js} +0 -0
- /package/dist/{9611.bundle.767595c93877e5166c03.js → 9611.bundle.78a4ffb439f65cfd0379.js} +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];
|
|
@@ -9322,6 +9334,9 @@ class Synchronizer_Synchronizer {
|
|
|
9322
9334
|
};
|
|
9323
9335
|
viewports.forEach((vp) => {
|
|
9324
9336
|
const eventSource = this.getEventSource(vp);
|
|
9337
|
+
if (!eventSource) {
|
|
9338
|
+
return;
|
|
9339
|
+
}
|
|
9325
9340
|
eventSource.removeEventListener(Enums.Events.ELEMENT_DISABLED, disableHandler);
|
|
9326
9341
|
eventSource.addEventListener(Enums.Events.ELEMENT_DISABLED, disableHandler);
|
|
9327
9342
|
});
|
|
@@ -9335,9 +9350,13 @@ class Synchronizer_Synchronizer {
|
|
|
9335
9350
|
const { renderingEngineId, viewportId } = viewportInfo;
|
|
9336
9351
|
const renderingEngine = getRenderingEngine(renderingEngineId);
|
|
9337
9352
|
if (!renderingEngine) {
|
|
9338
|
-
|
|
9353
|
+
return null;
|
|
9354
|
+
}
|
|
9355
|
+
const viewport = renderingEngine.getViewport(viewportId);
|
|
9356
|
+
if (!viewport) {
|
|
9357
|
+
return null;
|
|
9339
9358
|
}
|
|
9340
|
-
return
|
|
9359
|
+
return viewport.element;
|
|
9341
9360
|
}
|
|
9342
9361
|
}
|
|
9343
9362
|
function _getUniqueViewports(vp1, vp2) {
|
|
@@ -11710,16 +11729,10 @@ class CrosshairsTool extends base/* AnnotationTool */.EC {
|
|
|
11710
11729
|
return otherViewportsAnnotationsWithUniqueCameras;
|
|
11711
11730
|
};
|
|
11712
11731
|
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;
|
|
11732
|
+
const volumeIds = viewport.getAllVolumeIds();
|
|
11733
|
+
const otherVolumeIds = otherViewport.getAllVolumeIds();
|
|
11734
|
+
return (volumeIds.length === otherVolumeIds.length &&
|
|
11735
|
+
volumeIds.every((id) => otherVolumeIds.includes(id)));
|
|
11723
11736
|
};
|
|
11724
11737
|
this._jump = (enabledElement, jumpWorld) => {
|
|
11725
11738
|
store_state/* state */.wk.isInteractingWithTool = true;
|
|
@@ -14368,7 +14381,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
|
|
|
14368
14381
|
}
|
|
14369
14382
|
const { viewUp, viewPlaneNormal } = viewport.getCamera();
|
|
14370
14383
|
const viewportCanvasCornersInWorld = esm.utilities.getViewportImageCornersInWorld(viewport);
|
|
14371
|
-
let annotation = this.editData
|
|
14384
|
+
let annotation = this.editData?.annotation;
|
|
14372
14385
|
const annotations = (0,annotationState.getAnnotations)(this.getToolName(), viewport.element);
|
|
14373
14386
|
if (annotations.length) {
|
|
14374
14387
|
annotation = annotations.filter((thisAnnotation) => thisAnnotation.data.viewportId == viewport.id)[0];
|
|
@@ -14396,7 +14409,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
|
|
|
14396
14409
|
annotation = newAnnotation;
|
|
14397
14410
|
}
|
|
14398
14411
|
});
|
|
14399
|
-
if (this.editData
|
|
14412
|
+
if (this.editData?.annotation &&
|
|
14400
14413
|
this.editData.annotation.data.viewportId == viewport.id) {
|
|
14401
14414
|
this.editData.annotation.data.handles.points =
|
|
14402
14415
|
viewportCanvasCornersInWorld;
|
|
@@ -14611,7 +14624,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool/* default */.A {
|
|
|
14611
14624
|
};
|
|
14612
14625
|
}
|
|
14613
14626
|
renderAnnotation(enabledElement, svgDrawingHelper) {
|
|
14614
|
-
if (!this.editData.viewport) {
|
|
14627
|
+
if (!this.editData || !this.editData.viewport) {
|
|
14615
14628
|
return;
|
|
14616
14629
|
}
|
|
14617
14630
|
const location = this.configuration.scaleLocation;
|
|
@@ -15117,7 +15130,7 @@ class LengthTool extends base/* AnnotationTool */.EC {
|
|
|
15117
15130
|
const { currentPoints, element } = eventDetail;
|
|
15118
15131
|
const worldPos = currentPoints.world;
|
|
15119
15132
|
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
15120
|
-
const { viewport
|
|
15133
|
+
const { viewport } = enabledElement;
|
|
15121
15134
|
(0,elementCursor.hideElementCursor)(element);
|
|
15122
15135
|
this.isDrawing = true;
|
|
15123
15136
|
const { viewPlaneNormal, viewUp, position: cameraPosition, } = viewport.getCamera();
|
|
@@ -15432,6 +15445,39 @@ class LengthTool extends base/* AnnotationTool */.EC {
|
|
|
15432
15445
|
};
|
|
15433
15446
|
this._throttledCalculateCachedStats = (0,throttle/* default */.A)(this._calculateCachedStats, 100, { trailing: true });
|
|
15434
15447
|
}
|
|
15448
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
15449
|
+
const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
15450
|
+
if (!enabledElement) {
|
|
15451
|
+
return;
|
|
15452
|
+
}
|
|
15453
|
+
const { viewport } = enabledElement;
|
|
15454
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
15455
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
15456
|
+
const instance = new this();
|
|
15457
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
15458
|
+
const annotation = {
|
|
15459
|
+
annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
|
|
15460
|
+
data: {
|
|
15461
|
+
handles: {
|
|
15462
|
+
points,
|
|
15463
|
+
},
|
|
15464
|
+
},
|
|
15465
|
+
highlighted: false,
|
|
15466
|
+
autoGenerated: false,
|
|
15467
|
+
invalidated: false,
|
|
15468
|
+
isLocked: false,
|
|
15469
|
+
isVisible: true,
|
|
15470
|
+
metadata: {
|
|
15471
|
+
toolName: instance.getToolName(),
|
|
15472
|
+
viewPlaneNormal,
|
|
15473
|
+
FrameOfReferenceUID,
|
|
15474
|
+
referencedImageId,
|
|
15475
|
+
...options,
|
|
15476
|
+
},
|
|
15477
|
+
};
|
|
15478
|
+
(0,annotationState.addAnnotation)(annotation, viewport.element);
|
|
15479
|
+
(0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
|
|
15480
|
+
}; }
|
|
15435
15481
|
handleSelectedCallback(evt, annotation, handle) {
|
|
15436
15482
|
const eventDetail = evt.detail;
|
|
15437
15483
|
const { element } = eventDetail;
|
|
@@ -16176,6 +16222,39 @@ class ProbeTool extends base/* AnnotationTool */.EC {
|
|
|
16176
16222
|
return false;
|
|
16177
16223
|
}
|
|
16178
16224
|
toolSelectedCallback() { }
|
|
16225
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
16226
|
+
const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
16227
|
+
if (!enabledElement) {
|
|
16228
|
+
return;
|
|
16229
|
+
}
|
|
16230
|
+
const { viewport } = enabledElement;
|
|
16231
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
16232
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
16233
|
+
const instance = new this();
|
|
16234
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
16235
|
+
const annotation = {
|
|
16236
|
+
annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
|
|
16237
|
+
data: {
|
|
16238
|
+
handles: {
|
|
16239
|
+
points,
|
|
16240
|
+
},
|
|
16241
|
+
},
|
|
16242
|
+
highlighted: false,
|
|
16243
|
+
autoGenerated: false,
|
|
16244
|
+
invalidated: false,
|
|
16245
|
+
isLocked: false,
|
|
16246
|
+
isVisible: true,
|
|
16247
|
+
metadata: {
|
|
16248
|
+
toolName: instance.getToolName(),
|
|
16249
|
+
viewPlaneNormal,
|
|
16250
|
+
FrameOfReferenceUID,
|
|
16251
|
+
referencedImageId,
|
|
16252
|
+
...options,
|
|
16253
|
+
},
|
|
16254
|
+
};
|
|
16255
|
+
(0,annotationState.addAnnotation)(annotation, viewport.element);
|
|
16256
|
+
(0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
|
|
16257
|
+
}; }
|
|
16179
16258
|
getHandleNearImagePoint(element, annotation, canvasCoords, proximity) {
|
|
16180
16259
|
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
16181
16260
|
const { viewport } = enabledElement;
|
|
@@ -17665,6 +17744,52 @@ class CircleROITool extends base/* AnnotationTool */.EC {
|
|
|
17665
17744
|
};
|
|
17666
17745
|
this._throttledCalculateCachedStats = (0,throttle/* default */.A)(this._calculateCachedStats, 100, { trailing: true });
|
|
17667
17746
|
}
|
|
17747
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
17748
|
+
const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
17749
|
+
if (!enabledElement) {
|
|
17750
|
+
return;
|
|
17751
|
+
}
|
|
17752
|
+
const { viewport } = enabledElement;
|
|
17753
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
17754
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
17755
|
+
const instance = new this();
|
|
17756
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
17757
|
+
const annotation = {
|
|
17758
|
+
annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
|
|
17759
|
+
data: {
|
|
17760
|
+
handles: {
|
|
17761
|
+
points,
|
|
17762
|
+
textBox: {
|
|
17763
|
+
hasMoved: false,
|
|
17764
|
+
worldPosition: [0, 0, 0],
|
|
17765
|
+
worldBoundingBox: {
|
|
17766
|
+
topLeft: [0, 0, 0],
|
|
17767
|
+
topRight: [0, 0, 0],
|
|
17768
|
+
bottomLeft: [0, 0, 0],
|
|
17769
|
+
bottomRight: [0, 0, 0],
|
|
17770
|
+
},
|
|
17771
|
+
},
|
|
17772
|
+
activeHandleIndex: null,
|
|
17773
|
+
},
|
|
17774
|
+
label: '',
|
|
17775
|
+
cachedStats: {},
|
|
17776
|
+
},
|
|
17777
|
+
highlighted: false,
|
|
17778
|
+
autoGenerated: false,
|
|
17779
|
+
invalidated: false,
|
|
17780
|
+
isLocked: false,
|
|
17781
|
+
isVisible: true,
|
|
17782
|
+
metadata: {
|
|
17783
|
+
toolName: instance.getToolName(),
|
|
17784
|
+
viewPlaneNormal,
|
|
17785
|
+
FrameOfReferenceUID,
|
|
17786
|
+
referencedImageId,
|
|
17787
|
+
...options,
|
|
17788
|
+
},
|
|
17789
|
+
};
|
|
17790
|
+
(0,annotationState.addAnnotation)(annotation, viewport.element);
|
|
17791
|
+
(0,triggerAnnotationRenderForViewportIds/* default */.A)([viewport.id]);
|
|
17792
|
+
}; }
|
|
17668
17793
|
}
|
|
17669
17794
|
function CircleROITool_defaultGetTextLines(data, targetId) {
|
|
17670
17795
|
const cachedVolumeStats = data.cachedStats[targetId];
|
|
@@ -18185,8 +18310,6 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
|
|
|
18185
18310
|
viewportIdsToRender,
|
|
18186
18311
|
movingTextBox: false,
|
|
18187
18312
|
};
|
|
18188
|
-
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
18189
|
-
const { renderingEngine } = enabledElement;
|
|
18190
18313
|
this._activateModify(element);
|
|
18191
18314
|
(0,esm_utilities.triggerAnnotationRenderForViewportIds)(viewportIdsToRender);
|
|
18192
18315
|
evt.preventDefault();
|
|
@@ -18780,6 +18903,61 @@ class SplineROITool extends ContourSegmentationBaseTool/* default */.A {
|
|
|
18780
18903
|
}
|
|
18781
18904
|
return spline;
|
|
18782
18905
|
}
|
|
18906
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
18907
|
+
const enabledElement = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
18908
|
+
if (!enabledElement) {
|
|
18909
|
+
return;
|
|
18910
|
+
}
|
|
18911
|
+
if (points.length < SPLINE_MIN_POINTS) {
|
|
18912
|
+
console.warn('Spline requires at least 3 control points');
|
|
18913
|
+
return;
|
|
18914
|
+
}
|
|
18915
|
+
const { viewport } = enabledElement;
|
|
18916
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
18917
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
18918
|
+
const instance = new this();
|
|
18919
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
18920
|
+
const splineType = options?.splineType || SplineTypesEnum.CatmullRom;
|
|
18921
|
+
const splineConfig = instance._getSplineConfig(splineType);
|
|
18922
|
+
const SplineClass = splineConfig.Class;
|
|
18923
|
+
const splineInstance = new SplineClass();
|
|
18924
|
+
const canvasPoints = points.map((point) => viewport.worldToCanvas(point));
|
|
18925
|
+
splineInstance.setControlPoints(canvasPoints);
|
|
18926
|
+
const splinePolylineCanvas = splineInstance.getPolylinePoints();
|
|
18927
|
+
const splinePolylineWorld = splinePolylineCanvas.map((point) => viewport.canvasToWorld(point));
|
|
18928
|
+
const annotation = {
|
|
18929
|
+
annotationUID: options?.annotationUID || esm.utilities.uuidv4(),
|
|
18930
|
+
data: {
|
|
18931
|
+
handles: {
|
|
18932
|
+
points,
|
|
18933
|
+
},
|
|
18934
|
+
label: '',
|
|
18935
|
+
cachedStats: {},
|
|
18936
|
+
spline: {
|
|
18937
|
+
type: splineType,
|
|
18938
|
+
instance: splineInstance,
|
|
18939
|
+
},
|
|
18940
|
+
contour: {
|
|
18941
|
+
closed: true,
|
|
18942
|
+
polyline: splinePolylineWorld,
|
|
18943
|
+
},
|
|
18944
|
+
},
|
|
18945
|
+
highlighted: false,
|
|
18946
|
+
autoGenerated: false,
|
|
18947
|
+
invalidated: true,
|
|
18948
|
+
isLocked: false,
|
|
18949
|
+
isVisible: true,
|
|
18950
|
+
metadata: {
|
|
18951
|
+
toolName: instance.getToolName(),
|
|
18952
|
+
viewPlaneNormal,
|
|
18953
|
+
FrameOfReferenceUID,
|
|
18954
|
+
referencedImageId,
|
|
18955
|
+
...options,
|
|
18956
|
+
},
|
|
18957
|
+
};
|
|
18958
|
+
(0,annotationState.addAnnotation)(annotation, viewport.element);
|
|
18959
|
+
(0,esm_utilities.triggerAnnotationRenderForViewportIds)([viewport.id]);
|
|
18960
|
+
}; }
|
|
18783
18961
|
}
|
|
18784
18962
|
function SplineROITool_defaultGetTextLines(data, targetId) {
|
|
18785
18963
|
const cachedVolumeStats = data.cachedStats[targetId];
|
|
@@ -25768,7 +25946,7 @@ class SegmentationStateManager {
|
|
|
25768
25946
|
type,
|
|
25769
25947
|
active: true,
|
|
25770
25948
|
visible: true,
|
|
25771
|
-
colorLUTIndex: 0,
|
|
25949
|
+
colorLUTIndex: renderingConfig?.colorLUTIndex || 0,
|
|
25772
25950
|
segments: segmentReps,
|
|
25773
25951
|
config: {
|
|
25774
25952
|
...getDefaultRenderingConfig(type),
|
|
@@ -26491,17 +26669,20 @@ function internalAddSegmentationRepresentation(viewportId, representationInput)
|
|
|
26491
26669
|
}
|
|
26492
26670
|
function getColorLUTIndex(config) {
|
|
26493
26671
|
const { colorLUTOrIndex } = config || {};
|
|
26494
|
-
|
|
26495
|
-
|
|
26496
|
-
|
|
26497
|
-
|
|
26498
|
-
|
|
26499
|
-
|
|
26500
|
-
: (0,getNextColorLUTIndex/* getNextColorLUTIndex */.u)();
|
|
26501
|
-
if (!isIndexProvided) {
|
|
26502
|
-
(0,addColorLUT/* addColorLUT */.u)(selectedColorLUT, colorLUTIndex);
|
|
26672
|
+
if (colorLUTOrIndex === undefined) {
|
|
26673
|
+
const index = (0,addColorLUT/* addColorLUT */.u)(JSON.parse(JSON.stringify(COLOR_LUT/* default */.A)));
|
|
26674
|
+
return index;
|
|
26675
|
+
}
|
|
26676
|
+
if (typeof colorLUTOrIndex === 'number') {
|
|
26677
|
+
return colorLUTOrIndex;
|
|
26503
26678
|
}
|
|
26504
|
-
|
|
26679
|
+
if (Array.isArray(colorLUTOrIndex) &&
|
|
26680
|
+
colorLUTOrIndex.every((item) => Array.isArray(item) && item.length === 4)) {
|
|
26681
|
+
const index = (0,addColorLUT/* addColorLUT */.u)(colorLUTOrIndex);
|
|
26682
|
+
return index;
|
|
26683
|
+
}
|
|
26684
|
+
const index = (0,addColorLUT/* addColorLUT */.u)(JSON.parse(JSON.stringify(COLOR_LUT/* default */.A)));
|
|
26685
|
+
return index;
|
|
26505
26686
|
}
|
|
26506
26687
|
|
|
26507
26688
|
|
|
@@ -26796,23 +26977,6 @@ function getActiveSegmentation(viewportId) {
|
|
|
26796
26977
|
}
|
|
26797
26978
|
|
|
26798
26979
|
|
|
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
26980
|
/***/ }),
|
|
26817
26981
|
|
|
26818
26982
|
/***/ 97577:
|
|
@@ -26830,23 +26994,6 @@ function getCurrentLabelmapImageIdForViewport(viewportId, segmentationId) {
|
|
|
26830
26994
|
}
|
|
26831
26995
|
|
|
26832
26996
|
|
|
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
26997
|
/***/ }),
|
|
26851
26998
|
|
|
26852
26999
|
/***/ 93210:
|
|
@@ -30844,6 +30991,42 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
|
|
|
30844
30991
|
};
|
|
30845
30992
|
this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(this._calculateCachedStats, 100, { trailing: true });
|
|
30846
30993
|
}
|
|
30994
|
+
static { this.hydrate = (viewportId, points, options) => {
|
|
30995
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElementByViewportId)(viewportId);
|
|
30996
|
+
if (!enabledElement) {
|
|
30997
|
+
return;
|
|
30998
|
+
}
|
|
30999
|
+
const { viewport } = enabledElement;
|
|
31000
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
31001
|
+
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
31002
|
+
const instance = new this();
|
|
31003
|
+
const referencedImageId = instance.getReferencedImageId(viewport, points[0], viewPlaneNormal, viewUp);
|
|
31004
|
+
const annotation = {
|
|
31005
|
+
annotationUID: options?.annotationUID || _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.uuidv4(),
|
|
31006
|
+
data: {
|
|
31007
|
+
handles: {
|
|
31008
|
+
points,
|
|
31009
|
+
activeHandleIndex: null,
|
|
31010
|
+
},
|
|
31011
|
+
label: '',
|
|
31012
|
+
cachedStats: {},
|
|
31013
|
+
},
|
|
31014
|
+
highlighted: false,
|
|
31015
|
+
autoGenerated: false,
|
|
31016
|
+
invalidated: false,
|
|
31017
|
+
isLocked: false,
|
|
31018
|
+
isVisible: true,
|
|
31019
|
+
metadata: {
|
|
31020
|
+
toolName: instance.getToolName(),
|
|
31021
|
+
viewPlaneNormal,
|
|
31022
|
+
FrameOfReferenceUID,
|
|
31023
|
+
referencedImageId,
|
|
31024
|
+
...options,
|
|
31025
|
+
},
|
|
31026
|
+
};
|
|
31027
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .addAnnotation */ .lC)(annotation, viewport.element);
|
|
31028
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A)([viewport.id]);
|
|
31029
|
+
}; }
|
|
30847
31030
|
}
|
|
30848
31031
|
function defaultGetTextLines(data, targetId) {
|
|
30849
31032
|
const cachedVolumeStats = data.cachedStats[targetId];
|
|
@@ -345,8 +345,8 @@ function getHangingProtocolModule() {
|
|
|
345
345
|
}
|
|
346
346
|
/* harmony default export */ const src_getHangingProtocolModule = (getHangingProtocolModule);
|
|
347
347
|
|
|
348
|
-
// EXTERNAL MODULE: ../../../extensions/default/src/index.ts +
|
|
349
|
-
var default_src = __webpack_require__(
|
|
348
|
+
// EXTERNAL MODULE: ../../../extensions/default/src/index.ts + 115 modules
|
|
349
|
+
var default_src = __webpack_require__(55630);
|
|
350
350
|
// EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Filters/General/ImageMarchingSquares.js + 2 modules
|
|
351
351
|
var ImageMarchingSquares = __webpack_require__(38993);
|
|
352
352
|
// EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Common/Core/DataArray.js
|
|
@@ -694,7 +694,7 @@ function modeFactory({
|
|
|
694
694
|
lesionStats: 'Lesion Statistics',
|
|
695
695
|
minValue: 'Minimum Value',
|
|
696
696
|
maxValue: 'Maximum Value',
|
|
697
|
-
meanValue: 'Mean Value',
|
|
697
|
+
meanValue: 'Mean Value (ml)',
|
|
698
698
|
volume: 'Volume',
|
|
699
699
|
suvPeak: 'SUV Peak',
|
|
700
700
|
suvMax: 'Maximum SUV',
|
|
@@ -19,8 +19,8 @@ var prop_types = __webpack_require__(97598);
|
|
|
19
19
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
20
20
|
// EXTERNAL MODULE: ../../ui/src/index.js + 690 modules
|
|
21
21
|
var src = __webpack_require__(35647);
|
|
22
|
-
// EXTERNAL MODULE: ../../../extensions/default/src/index.ts +
|
|
23
|
-
var default_src = __webpack_require__(
|
|
22
|
+
// EXTERNAL MODULE: ../../../extensions/default/src/index.ts + 115 modules
|
|
23
|
+
var default_src = __webpack_require__(55630);
|
|
24
24
|
;// CONCATENATED MODULE: ../../../extensions/dicom-microscopy/src/DicomMicroscopyViewport.css
|
|
25
25
|
// extracted by mini-css-extract-plugin
|
|
26
26
|
|
|
@@ -933,7 +933,7 @@ class BaseVolumeViewport extends _Viewport__WEBPACK_IMPORTED_MODULE_18__/* ["def
|
|
|
933
933
|
sliceIndex ??= currentIndex;
|
|
934
934
|
const { viewPlaneNormal, focalPoint } = this.getCamera();
|
|
935
935
|
const querySeparator = volumeId.includes('?') ? '&' : '?';
|
|
936
|
-
return `volumeId:${volumeId}${querySeparator}sliceIndex=${sliceIndex}&viewPlaneNormal=${viewPlaneNormal.join(',')}
|
|
936
|
+
return `volumeId:${volumeId}${querySeparator}sliceIndex=${sliceIndex}&viewPlaneNormal=${viewPlaneNormal.join(',')}`;
|
|
937
937
|
}
|
|
938
938
|
_addVolumeId(volumeId) {
|
|
939
939
|
this.volumeIds.add(volumeId);
|
|
@@ -16552,6 +16552,12 @@ var cache = __webpack_require__(49038);
|
|
|
16552
16552
|
|
|
16553
16553
|
|
|
16554
16554
|
|
|
16555
|
+
function convertDataType(data, targetDataType) {
|
|
16556
|
+
const Constructor = (0,getBufferConfiguration/* getConstructorFromType */.j)(targetDataType);
|
|
16557
|
+
const convertedData = new Constructor(data.length);
|
|
16558
|
+
convertedData.set(data);
|
|
16559
|
+
return convertedData;
|
|
16560
|
+
}
|
|
16555
16561
|
function vtkStreamingOpenGLTexture(publicAPI, model) {
|
|
16556
16562
|
model.classHierarchy.push('vtkStreamingOpenGLTexture');
|
|
16557
16563
|
model.updatedFrames = [];
|
|
@@ -16602,10 +16608,14 @@ function vtkStreamingOpenGLTexture(publicAPI, model) {
|
|
|
16602
16608
|
if (!image) {
|
|
16603
16609
|
continue;
|
|
16604
16610
|
}
|
|
16605
|
-
|
|
16611
|
+
let data = image.voxelManager.getScalarData();
|
|
16606
16612
|
const gl = model.context;
|
|
16607
|
-
|
|
16608
|
-
|
|
16613
|
+
if (volume.dataType !== data.constructor.name) {
|
|
16614
|
+
data = convertDataType(data, volume.dataType);
|
|
16615
|
+
}
|
|
16616
|
+
const [pixData] = publicAPI.updateArrayDataTypeForGL(volume.dataType, [
|
|
16617
|
+
data,
|
|
16618
|
+
]);
|
|
16609
16619
|
publicAPI.bind();
|
|
16610
16620
|
const zOffset = i;
|
|
16611
16621
|
gl.texSubImage3D(model.target, 0, 0, 0, zOffset, model.width, model.height, 1, model.format, model.openGLDataType, pixData);
|
|
@@ -16639,8 +16649,12 @@ function vtkStreamingOpenGLTexture(publicAPI, model) {
|
|
|
16639
16649
|
constructor = data.constructor;
|
|
16640
16650
|
}
|
|
16641
16651
|
const gl = model.context;
|
|
16642
|
-
|
|
16643
|
-
|
|
16652
|
+
if (volume.dataType !== data.constructor.name) {
|
|
16653
|
+
data = convertDataType(data, volume.dataType);
|
|
16654
|
+
}
|
|
16655
|
+
const [pixData] = publicAPI.updateArrayDataTypeForGL(volume.dataType, [
|
|
16656
|
+
data,
|
|
16657
|
+
]);
|
|
16644
16658
|
publicAPI.bind();
|
|
16645
16659
|
let zOffset = i;
|
|
16646
16660
|
gl.texSubImage3D(model.target, 0, 0, 0, zOffset, model.width, model.height, 1, model.format, model.openGLDataType, pixData);
|
|
@@ -22061,12 +22075,20 @@ const deepMerge = (target = {}, source = {}, optionsArgument = undefined) => {
|
|
|
22061
22075
|
/* harmony import */ var _getScalingParameters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32173);
|
|
22062
22076
|
/* harmony import */ var _hasFloatScalingParameters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30169);
|
|
22063
22077
|
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59693);
|
|
22078
|
+
/* harmony import */ var _cache_cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49038);
|
|
22079
|
+
|
|
22064
22080
|
|
|
22065
22081
|
|
|
22066
22082
|
|
|
22067
22083
|
|
|
22068
22084
|
|
|
22069
22085
|
|
|
22086
|
+
const constructorToTypedArray = {
|
|
22087
|
+
Uint8Array: 'Uint8Array',
|
|
22088
|
+
Int16Array: 'Int16Array',
|
|
22089
|
+
Uint16Array: 'Uint16Array',
|
|
22090
|
+
Float32Array: 'Float32Array',
|
|
22091
|
+
};
|
|
22070
22092
|
function generateVolumePropsFromImageIds(imageIds, volumeId) {
|
|
22071
22093
|
const volumeMetadata = (0,_makeVolumeMetadata__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(imageIds);
|
|
22072
22094
|
const { ImageOrientationPatient, PixelSpacing, Columns, Rows } = volumeMetadata;
|
|
@@ -22099,6 +22121,10 @@ function generateVolumePropsFromImageIds(imageIds, volumeId) {
|
|
|
22099
22121
|
function _determineDataType(imageIds, volumeMetadata) {
|
|
22100
22122
|
const { BitsAllocated, PixelRepresentation } = volumeMetadata;
|
|
22101
22123
|
const signed = PixelRepresentation === 1;
|
|
22124
|
+
const cachedDataType = _getDataTypeFromCache(imageIds);
|
|
22125
|
+
if (cachedDataType) {
|
|
22126
|
+
return cachedDataType;
|
|
22127
|
+
}
|
|
22102
22128
|
const [firstIndex, middleIndex, lastIndex] = [
|
|
22103
22129
|
0,
|
|
22104
22130
|
Math.floor(imageIds.length / 2),
|
|
@@ -22133,6 +22159,19 @@ function _determineDataType(imageIds, volumeMetadata) {
|
|
|
22133
22159
|
throw new Error(`Bits allocated of ${BitsAllocated} is not defined to generate scalarData for the volume.`);
|
|
22134
22160
|
}
|
|
22135
22161
|
}
|
|
22162
|
+
function _getDataTypeFromCache(imageIds) {
|
|
22163
|
+
const indices = [0, Math.floor(imageIds.length / 2), imageIds.length - 1];
|
|
22164
|
+
const images = indices.map((i) => _cache_cache__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.getImage(imageIds[i]));
|
|
22165
|
+
if (!images.every(Boolean)) {
|
|
22166
|
+
return null;
|
|
22167
|
+
}
|
|
22168
|
+
const constructorName = images[0].getPixelData().constructor.name;
|
|
22169
|
+
if (images.every((img) => img.getPixelData().constructor.name === constructorName) &&
|
|
22170
|
+
constructorName in constructorToTypedArray) {
|
|
22171
|
+
return constructorToTypedArray[constructorName];
|
|
22172
|
+
}
|
|
22173
|
+
return null;
|
|
22174
|
+
}
|
|
22136
22175
|
|
|
22137
22176
|
|
|
22138
22177
|
|
|
@@ -54877,7 +54916,7 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
54877
54916
|
}
|
|
54878
54917
|
return result;
|
|
54879
54918
|
};
|
|
54880
|
-
publicAPI.useHalfFloat = () => model.
|
|
54919
|
+
publicAPI.useHalfFloat = () => model.enableUseHalfFloat && model.canUseHalfFloat;
|
|
54881
54920
|
|
|
54882
54921
|
//----------------------------------------------------------------------------
|
|
54883
54922
|
publicAPI.setInternalFormat = iFormat => {
|
|
@@ -55511,18 +55550,21 @@ function vtkOpenGLTexture(publicAPI, model) {
|
|
|
55511
55550
|
}
|
|
55512
55551
|
function setCanUseHalfFloat(dataType, offset, scale, preferSizeOverAccuracy) {
|
|
55513
55552
|
publicAPI.getOpenGLDataType(dataType);
|
|
55553
|
+
|
|
55554
|
+
// Don't consider halfFloat and convert back to Float when the range of data does not generate an accurate halfFloat
|
|
55555
|
+
// AND it is not preferable to have a smaller texture than an exact texture.
|
|
55556
|
+
const isExactHalfFloat = hasExactHalfFloat(offset, scale) || preferSizeOverAccuracy;
|
|
55514
55557
|
let useHalfFloat = false;
|
|
55515
55558
|
if (model._openGLRenderWindow.getWebgl2()) {
|
|
55516
|
-
|
|
55559
|
+
// If OES_texture_float_linear is not available, and using a half float would still be exact, force half floats
|
|
55560
|
+
// This is because half floats are always texture filterable in webgl2, while full *32F floats are not (unless the extension is present)
|
|
55561
|
+
const forceHalfFloat = model.openGLDataType === model.context.FLOAT && model.context.getExtension('OES_texture_float_linear') === null && isExactHalfFloat;
|
|
55562
|
+
useHalfFloat = forceHalfFloat || model.openGLDataType === model.context.HALF_FLOAT;
|
|
55517
55563
|
} else {
|
|
55518
55564
|
const halfFloatExt = model.context.getExtension('OES_texture_half_float');
|
|
55519
55565
|
useHalfFloat = halfFloatExt && model.openGLDataType === halfFloatExt.HALF_FLOAT_OES;
|
|
55520
55566
|
}
|
|
55521
|
-
|
|
55522
|
-
// Don't consider halfFloat and convert back to Float when the range of data does not generate an accurate halfFloat
|
|
55523
|
-
// AND it is not preferable to have a smaller texture than an exact texture.
|
|
55524
|
-
const isHalfFloat = useHalfFloat && (hasExactHalfFloat(offset, scale) || preferSizeOverAccuracy);
|
|
55525
|
-
model.canUseHalfFloat = isHalfFloat;
|
|
55567
|
+
model.canUseHalfFloat = useHalfFloat && isExactHalfFloat;
|
|
55526
55568
|
}
|
|
55527
55569
|
function processDataArray(dataArray, preferSizeOverAccuracy) {
|
|
55528
55570
|
const numComps = dataArray.getNumberOfComponents();
|