@ohif/app 3.9.0-beta.3 → 3.9.0-beta.31
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.a80b1511ef4b302fb7cc.js → 117.bundle.ba41cf7978afb629dcff.js} +66 -18
- package/dist/{889.bundle.5611d644c8cb24f864ff.js → 121.bundle.378e95375a06144508ba.js} +40 -12
- package/dist/{998.bundle.b8ffa2bc390d5d4edf16.js → 129.bundle.1b625d18d376f42effc1.js} +22 -21
- package/dist/{574.bundle.72bd5061ccd504235419.js → 139.bundle.679c4baad7c7f65ebabd.js} +25 -37
- package/dist/{989.bundle.bf6bc62794b717824f7e.js → 14.bundle.ec550834dd50b923108d.js} +5 -5
- package/dist/{783.bundle.126cd640a5fd49804d8e.js → 140.bundle.38a0dfa4b46a70e33664.js} +2 -2
- package/dist/{164.bundle.1da1cadb56951caef1d6.js → 164.bundle.79cc35bc3e6b792636cd.js} +334 -44
- package/dist/{544.bundle.e8227e98860e39636a00.js → 172.bundle.e3e82e398b39958577e6.js} +16 -30
- package/dist/{487.bundle.b1a29dcf2b152693935d.js → 194.bundle.0c81e6f43d76f29392c0.js} +5 -5
- package/dist/{699.bundle.2adb0c0ad7f7cb9e338a.js → 211.bundle.86d88aa73d5352e82c97.js} +33 -4
- package/dist/{776.bundle.9680d347bafb63f8688a.js → 218.bundle.77c26ca8507b4765c981.js} +14 -9
- package/dist/{236.bundle.4ca7987e1d57f60ec13a.js → 236.bundle.343bcd0be60d0ae61901.js} +396 -56
- package/dist/{530.bundle.17b9a34fefff133e5379.js → 265.bundle.b32a0cc143efa80ee3cc.js} +8 -12
- package/dist/{862.bundle.55dde21bab4c841b6259.js → 323.bundle.8e5137bf61179c8704d6.js} +5 -9
- package/dist/{342.bundle.340982440de15f540a89.js → 342.bundle.67c49f2e52829a5696a4.js} +7 -0
- package/dist/{550.bundle.a2267752bc8874fedfd5.js → 363.bundle.0e87c4c9afa24a9a2843.js} +226 -150
- package/dist/{473.bundle.6cd4be953853f35b29c3.js → 367.bundle.6a0746aeca702ae6eba6.js} +279 -29
- package/dist/{806.bundle.50e039eb624382ee1fce.js → 370.bundle.02108fbb881fbe75b59c.js} +82 -11
- package/dist/{682.bundle.ec07ec1bc2f69f9d0d94.js → 382.bundle.67d162cdbb2a84192cae.js} +24 -4
- package/dist/{907.bundle.13dc5f4b5581d12562b8.js → 444.bundle.5bc9c6c628d3f12a78c7.js} +4 -4
- package/dist/{483.bundle.a353efc5a5dd563c903c.js → 483.bundle.016de3c3ec209d9fa42a.js} +16 -3
- package/dist/{35.bundle.0168d78bfad0cb784112.js → 501.bundle.3dcc63f03d9c252a9bee.js} +885 -312
- package/dist/{905.bundle.4105e428f61f925a310d.js → 552.bundle.4a503e6689070df070de.js} +3 -3
- package/dist/{981.bundle.a0fabcf9845c1a623990.js → 555.bundle.0f587ef1e590e457a5ed.js} +7 -6
- package/dist/{939.bundle.9d93b2e47c52338747a2.js → 612.bundle.297a033523539e0b47f9.js} +2 -2
- package/dist/{295.bundle.9926ff25c6dbf53845b1.js → 675.bundle.c9720f40fd7c7e9b7e54.js} +5 -9
- package/dist/{325.bundle.98612a2afacf5d63b25a.js → 717.bundle.133ee5f2065b3338498e.js} +32 -23
- package/dist/{722.bundle.2547630541b670f10d6e.js → 722.bundle.1242e0348afc63ca4f5e.js} +10 -4
- package/dist/{121.bundle.b582314ec0024fdf2d15.js → 792.bundle.485ad2f98823a4b3feb1.js} +6 -10
- package/dist/{721.bundle.a210baa38d34b9bcacfd.js → 799.bundle.55be56fa31b0f5c993c6.js} +12 -12
- package/dist/{448.bundle.70dc1363d8b2783dc51e.js → 806.bundle.f89c0302312b41de4227.js} +5 -5
- package/dist/{390.bundle.2751b81dbe439a40ba90.js → 827.bundle.05ca1cba07979c0e199f.js} +446 -53
- package/dist/{297.bundle.194d8985ab974839b5b6.js → 837.bundle.ff9fe44bf863a5bceabc.js} +2 -2
- package/dist/{961.bundle.2c81565fe334d6cd2f9c.js → 853.bundle.98f5e69f10cc359c364c.js} +4 -4
- package/dist/{94.bundle.9b92ece5801a7df7d08c.js → 920.bundle.8ddd71fdf3cf8152cc74.js} +39 -9
- package/dist/{243.bundle.96439f589bc338b977ea.js → 989.bundle.944239c4bf1fec35fee8.js} +4 -4
- package/dist/app-config.js +5 -1
- package/dist/{app.bundle.cbecae40543f47cc8c7e.js → app.bundle.1c724ee4d081d129ddd5.js} +162728 -46021
- package/dist/app.bundle.css +5 -4
- package/dist/assets/images/action-new-dialog.svg +14 -0
- package/dist/assets/images/arrow-down.svg +5 -0
- package/dist/assets/images/arrow-left-small.svg +6 -0
- package/dist/assets/images/arrow-left.svg +6 -0
- package/dist/assets/images/arrow-right-small.svg +6 -0
- package/dist/assets/images/arrow-right.svg +6 -0
- package/dist/assets/images/calendar.svg +5 -0
- package/dist/assets/images/cancel.svg +8 -0
- package/dist/assets/images/checkbox-active.svg +9 -0
- package/dist/assets/images/checkbox-checked.svg +9 -0
- package/dist/assets/images/checkbox-default.svg +3 -0
- package/dist/assets/images/checkbox-unchecked.svg +3 -0
- package/dist/assets/images/chevron-down.svg +3 -0
- package/dist/assets/images/chevron-left.svg +3 -0
- package/dist/assets/images/chevron-menu.svg +12 -0
- package/dist/assets/images/chevron-next.svg +6 -0
- package/dist/assets/images/chevron-prev.svg +6 -0
- package/dist/assets/images/chevron-right.svg +3 -0
- package/dist/assets/images/circled-checkmark.svg +6 -0
- package/dist/assets/images/clipboard.svg +1 -0
- package/dist/assets/images/closeIcon.svg +3 -0
- package/dist/assets/images/content-next.svg +9 -0
- package/dist/assets/images/content-prev.svg +9 -0
- package/dist/assets/images/dotted-circle.svg +3 -0
- package/dist/assets/images/edit-patient.svg +15 -0
- package/dist/assets/images/exclamation.svg +9 -0
- package/dist/assets/images/external-link.svg +5 -0
- package/dist/assets/images/eye-hidden.svg +8 -0
- package/dist/assets/images/eye-visible.svg +6 -0
- package/dist/assets/images/focus-frame-target.svg +13 -0
- package/dist/assets/images/group-layers.svg +6 -0
- package/dist/assets/images/icon-add.svg +15 -0
- package/dist/assets/images/icon-alert-small.svg +8 -0
- package/dist/assets/images/icon-chevron-patient.svg +12 -0
- package/dist/assets/images/icon-clear-field.svg +8 -0
- package/dist/assets/images/icon-close.svg +8 -0
- package/dist/assets/images/icon-color-lut.svg +23 -0
- package/dist/assets/images/icon-delete.svg +17 -0
- package/dist/assets/images/icon-disclosure-close.svg +12 -0
- package/dist/assets/images/icon-disclosure-open.svg +12 -0
- package/dist/assets/images/icon-display-settings.svg +21 -0
- package/dist/assets/images/icon-more-menu.svg +17 -0
- package/dist/assets/images/icon-mpr-alt.svg +9 -0
- package/dist/assets/images/icon-multiple-patients.svg +21 -0
- package/dist/assets/images/icon-next-inactive.svg +6 -0
- package/dist/assets/images/icon-next.svg +6 -0
- package/dist/assets/images/icon-patient.svg +13 -0
- package/dist/assets/images/icon-pause.svg +6 -0
- package/dist/assets/images/icon-play.svg +6 -0
- package/dist/assets/images/icon-prev-inactive.svg +6 -0
- package/dist/assets/images/icon-prev.svg +6 -0
- package/dist/assets/images/icon-rename.svg +15 -0
- package/dist/assets/images/icon-search.svg +9 -0
- package/dist/assets/images/icon-settings.svg +13 -0
- package/dist/assets/images/icon-status-alert.svg +8 -0
- package/dist/assets/images/icon-tool-scissor.svg +17 -0
- package/dist/assets/images/icon-toolbar-back.svg +12 -0
- package/dist/assets/images/icon-transferring.svg +6 -0
- package/dist/assets/images/icon-upload.svg +6 -0
- package/dist/assets/images/icons-alert-outline.svg +8 -0
- package/dist/assets/images/illustration-investigational-use.svg +20 -0
- package/dist/assets/images/info-action.svg +10 -0
- package/dist/assets/images/info-link.svg +7 -0
- package/dist/assets/images/info.svg +3 -0
- package/dist/assets/images/launch-arrow.svg +7 -0
- package/dist/assets/images/launch-info.svg +8 -0
- package/dist/assets/images/layout-advanced-3d-four-up.svg +13 -0
- package/dist/assets/images/layout-advanced-3d-main.svg +12 -0
- package/dist/assets/images/layout-advanced-3d-only.svg +9 -0
- package/dist/assets/images/layout-advanced-3d-primary.svg +12 -0
- package/dist/assets/images/layout-advanced-axial-primary.svg +11 -0
- package/dist/assets/images/layout-advanced-mpr.svg +11 -0
- package/dist/assets/images/layout-common-1x1.svg +9 -0
- package/dist/assets/images/layout-common-1x2.svg +10 -0
- package/dist/assets/images/layout-common-2x2.svg +11 -0
- package/dist/assets/images/layout-common-2x3.svg +12 -0
- package/dist/assets/images/list-bullets.svg +10 -0
- package/dist/assets/images/loading-ohif-mark.svg +5 -0
- package/dist/assets/images/lock.svg +1 -0
- package/dist/assets/images/logo-ohif-small.svg +5 -0
- package/dist/assets/images/magnifier.svg +7 -0
- package/dist/assets/images/navigation-panel-right-hide.svg +5 -0
- package/dist/assets/images/navigation-panel-right-reveal.svg +5 -0
- package/dist/assets/images/next-arrow.svg +12 -0
- package/dist/assets/images/notifications-error.svg +8 -0
- package/dist/assets/images/notifications-info.svg +8 -0
- package/dist/assets/images/notifications-success.svg +6 -0
- package/dist/assets/images/notifications-warning.svg +8 -0
- package/dist/assets/images/notificationwarning-diamond.svg +10 -0
- package/dist/assets/images/ohif-logo-color-darkbg.svg +20 -0
- package/dist/assets/images/ohif-logo.svg +18 -0
- package/dist/assets/images/old-play.svg +9 -0
- package/dist/assets/images/old-stop.svg +9 -0
- package/dist/assets/images/old-trash.svg +9 -0
- package/dist/assets/images/panel-group-more.svg +6 -0
- package/dist/assets/images/panel-group-open-close.svg +6 -0
- package/dist/assets/images/pencil.svg +4 -0
- package/dist/assets/images/power-off.svg +11 -0
- package/dist/assets/images/prev-arrow.svg +12 -0
- package/dist/assets/images/profile.svg +1 -0
- package/dist/assets/images/push-left.svg +5 -0
- package/dist/assets/images/push-right.svg +5 -0
- package/dist/assets/images/row-add.svg +8 -0
- package/dist/assets/images/row-edit.svg +9 -0
- package/dist/assets/images/row-hidden.svg +11 -0
- package/dist/assets/images/row-lock.svg +7 -0
- package/dist/assets/images/row-shown.svg +9 -0
- package/dist/assets/images/row-unlock.svg +7 -0
- package/dist/assets/images/settings.svg +6 -0
- package/dist/assets/images/side-panel-close-left.svg +14 -0
- package/dist/assets/images/side-panel-close-right.svg +14 -0
- package/dist/assets/images/sorting-active-down.svg +6 -0
- package/dist/assets/images/sorting-active-up.svg +6 -0
- package/dist/assets/images/sorting.svg +6 -0
- package/dist/assets/images/status-alert-warning.svg +9 -0
- package/dist/assets/images/status-alert.svg +7 -0
- package/dist/assets/images/status-locked.svg +7 -0
- package/dist/assets/images/status-tracked.svg +7 -0
- package/dist/assets/images/status-untracked.svg +6 -0
- package/dist/assets/images/tab-4d.svg +13 -0
- package/dist/assets/images/tab-linear.svg +8 -0
- package/dist/assets/images/tab-patient-info.svg +7 -0
- package/dist/assets/images/tab-roi-threshold.svg +10 -0
- package/dist/assets/images/tab-segmentation.svg +11 -0
- package/dist/assets/images/tab-studies.svg +13 -0
- package/dist/assets/images/tool-3d-rotate.svg +20 -0
- package/dist/assets/images/tool-angle.svg +12 -0
- package/dist/assets/images/tool-annotate.svg +11 -0
- package/dist/assets/images/tool-bidirectional.svg +21 -0
- package/dist/assets/images/tool-calibrate.svg +19 -0
- package/dist/assets/images/tool-capture.svg +10 -0
- package/dist/assets/images/tool-cine.svg +9 -0
- package/dist/assets/images/tool-circle.svg +8 -0
- package/dist/assets/images/tool-create-threshold.svg +9 -0
- package/dist/assets/images/tool-crosshair.svg +14 -0
- package/dist/assets/images/tool-dicom-tag-browser.svg +15 -0
- package/dist/assets/images/tool-flip-horizontal.svg +10 -0
- package/dist/assets/images/tool-freehand-polygon.svg +37 -0
- package/dist/assets/images/tool-freehand-roi.svg +12 -0
- package/dist/assets/images/tool-freehand.svg +34 -0
- package/dist/assets/images/tool-fusion-color.svg +13 -0
- package/dist/assets/images/tool-invert.svg +10 -0
- package/dist/assets/images/tool-layout-default.svg +22 -0
- package/dist/assets/images/tool-length.svg +16 -0
- package/dist/assets/images/tool-magnetic-roi.svg +17 -0
- package/dist/assets/images/tool-magnify.svg +7 -0
- package/dist/assets/images/tool-measure-elipse.svg +12 -0
- package/dist/assets/images/tool-more-menu.svg +6 -0
- package/dist/assets/images/tool-move.svg +13 -0
- package/dist/assets/images/tool-polygon.svg +3 -0
- package/dist/assets/images/tool-quick-magnify.svg +11 -0
- package/dist/assets/images/tool-rectangle.svg +12 -0
- package/dist/assets/images/tool-reference-lines.svg +13 -0
- package/dist/assets/images/tool-reset.svg +9 -0
- package/dist/assets/images/tool-rotate-right.svg +12 -0
- package/dist/assets/images/tool-seg-brush.svg +9 -0
- package/dist/assets/images/tool-seg-eraser.svg +10 -0
- package/dist/assets/images/tool-seg-shape.svg +9 -0
- package/dist/assets/images/tool-seg-threshold.svg +17 -0
- package/dist/assets/images/tool-spline-roi.svg +14 -0
- package/dist/assets/images/tool-stack-image-sync.svg +10 -0
- package/dist/assets/images/tool-stack-scroll.svg +10 -0
- package/dist/assets/images/tool-toggle-dicom-overlay.svg +9 -0
- package/dist/assets/images/tool-ultrasound-bidirectional.svg +15 -0
- package/dist/assets/images/tool-window-level.svg +9 -0
- package/dist/assets/images/tool-zoom.svg +9 -0
- package/dist/assets/images/tracked.svg +6 -0
- package/dist/assets/images/ui-arrow-down.svg +3 -0
- package/dist/assets/images/ui-arrow-left.svg +3 -0
- package/dist/assets/images/ui-arrow-right.svg +3 -0
- package/dist/assets/images/ui-arrow-up.svg +3 -0
- package/dist/assets/images/unlink.svg +9 -0
- package/dist/assets/images/viewport-status-tracked.svg +13 -0
- package/dist/assets/images/viewport-window-level.svg +17 -0
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/google.js +1 -0
- package/dist/{histogram-worker.bundle.829e14ec12c2b41a4323.js → histogram-worker.bundle.6b31e5ed4c4a7a6998f2.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.1799686b019040500219.js → polySeg.bundle.cc8400971fca41347b25.js} +3 -3
- package/dist/{suv-peak-worker.bundle.25f8b85eab9ec06da48d.js → suv-peak-worker.bundle.59ea76ac47db7a736234.js} +4 -4
- package/dist/sw.js +1 -1
- package/package.json +26 -23
- /package/dist/{998.css → 129.css} +0 -0
- /package/dist/{574.css → 139.css} +0 -0
- /package/dist/{544.css → 172.css} +0 -0
- /package/dist/{550.css → 363.css} +0 -0
- /package/dist/{325.css → 404.css} +0 -0
- /package/dist/{481.css → 717.css} +0 -0
- /package/dist/{726.bundle.c8de818cf1a3ff0cf7d2.js → 726.bundle.90d63d40a19b058034ee.js} +0 -0
- /package/dist/{835.bundle.4c0eaa2c1a427ee41817.js → 835.bundle.5d1951da8bbc6afdf3e0.js} +0 -0
- /package/dist/{931.bundle.d270a1fda9a2836c3cc5.js → 931.bundle.058f8de4606f27b31f4f.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
1
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[501],{
|
|
2
2
|
|
|
3
3
|
/***/ 6203:
|
|
4
4
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
/* harmony import */ var _eventTarget__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(51884);
|
|
19
19
|
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(71702);
|
|
20
20
|
/* harmony import */ var _loaders_volumeLoader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(82041);
|
|
21
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
21
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(20228);
|
|
22
22
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90601);
|
|
23
23
|
/* harmony import */ var _helpers_volumeNewImageEventDispatcher__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46820);
|
|
24
24
|
/* harmony import */ var _Viewport__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(11512);
|
|
@@ -260,13 +260,15 @@ class BaseVolumeViewport extends _Viewport__WEBPACK_IMPORTED_MODULE_14__/* ["def
|
|
|
260
260
|
static get useCustomRenderingPipeline() {
|
|
261
261
|
return false;
|
|
262
262
|
}
|
|
263
|
-
applyViewOrientation(orientation) {
|
|
263
|
+
applyViewOrientation(orientation, resetCamera = true) {
|
|
264
264
|
const { viewPlaneNormal, viewUp } = this._getOrientationVectors(orientation);
|
|
265
265
|
const camera = this.getVtkActiveCamera();
|
|
266
266
|
camera.setDirectionOfProjection(-viewPlaneNormal[0], -viewPlaneNormal[1], -viewPlaneNormal[2]);
|
|
267
267
|
camera.setViewUpFrom(viewUp);
|
|
268
268
|
this.initialViewUp = viewUp;
|
|
269
|
-
|
|
269
|
+
if (resetCamera) {
|
|
270
|
+
this.resetCamera();
|
|
271
|
+
}
|
|
270
272
|
}
|
|
271
273
|
initializeVolumeNewImageEventDispatcher() {
|
|
272
274
|
const volumeNewImageHandlerBound = volumeNewImageHandler.bind(this);
|
|
@@ -495,15 +497,26 @@ class BaseVolumeViewport extends _Viewport__WEBPACK_IMPORTED_MODULE_14__/* ["def
|
|
|
495
497
|
}
|
|
496
498
|
getViewReference(viewRefSpecifier = {}) {
|
|
497
499
|
const target = super.getViewReference(viewRefSpecifier);
|
|
500
|
+
const volumeId = this.getVolumeId(viewRefSpecifier);
|
|
498
501
|
if (viewRefSpecifier?.forFrameOfReference !== false) {
|
|
499
|
-
target.volumeId =
|
|
502
|
+
target.volumeId = volumeId;
|
|
500
503
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
};
|
|
504
|
+
if (typeof viewRefSpecifier?.sliceIndex !== 'number') {
|
|
505
|
+
return target;
|
|
506
|
+
}
|
|
507
|
+
const { viewPlaneNormal } = target;
|
|
508
|
+
const delta = viewRefSpecifier.sliceIndex - this.getCurrentImageIdIndex();
|
|
509
|
+
const { sliceRangeInfo } = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.getVolumeViewportScrollInfo)(this, volumeId, true);
|
|
510
|
+
const { sliceRange, spacingInNormalDirection, camera } = sliceRangeInfo;
|
|
511
|
+
const { focalPoint, position } = camera;
|
|
512
|
+
const { newFocalPoint } = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.snapFocalPointToSlice)(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, delta);
|
|
513
|
+
target.cameraFocalPoint = newFocalPoint;
|
|
514
|
+
return target;
|
|
505
515
|
}
|
|
506
516
|
isReferenceViewable(viewRef, options) {
|
|
517
|
+
if (!viewRef.FrameOfReferenceUID) {
|
|
518
|
+
return false;
|
|
519
|
+
}
|
|
507
520
|
if (!super.isReferenceViewable(viewRef, options)) {
|
|
508
521
|
return false;
|
|
509
522
|
}
|
|
@@ -517,6 +530,63 @@ class BaseVolumeViewport extends _Viewport__WEBPACK_IMPORTED_MODULE_14__/* ["def
|
|
|
517
530
|
}
|
|
518
531
|
return sliceIndex === undefined || sliceIndex === currentSliceIndex;
|
|
519
532
|
}
|
|
533
|
+
scroll(delta = 1) {
|
|
534
|
+
const volumeId = this.getVolumeId();
|
|
535
|
+
const { sliceRangeInfo } = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.getVolumeViewportScrollInfo)(this, volumeId, true);
|
|
536
|
+
if (!sliceRangeInfo) {
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
const { sliceRange, spacingInNormalDirection, camera } = sliceRangeInfo;
|
|
540
|
+
const { focalPoint, viewPlaneNormal, position } = camera;
|
|
541
|
+
const { newFocalPoint, newPosition } = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.snapFocalPointToSlice)(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, delta);
|
|
542
|
+
this.setCamera({
|
|
543
|
+
focalPoint: newFocalPoint,
|
|
544
|
+
position: newPosition,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
setViewReference(viewRef) {
|
|
548
|
+
if (!viewRef) {
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
const volumeId = this.getVolumeId();
|
|
552
|
+
const { viewPlaneNormal: refViewPlaneNormal, FrameOfReferenceUID: refFrameOfReference, cameraFocalPoint, viewUp, } = viewRef;
|
|
553
|
+
let { sliceIndex } = viewRef;
|
|
554
|
+
const { focalPoint, viewPlaneNormal, position } = this.getCamera();
|
|
555
|
+
const isNegativeNormal = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.isEqualNegative)(viewPlaneNormal, refViewPlaneNormal);
|
|
556
|
+
const isSameNormal = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.isEqual)(viewPlaneNormal, refViewPlaneNormal);
|
|
557
|
+
if (typeof sliceIndex === 'number' &&
|
|
558
|
+
viewRef.volumeId === volumeId &&
|
|
559
|
+
(isNegativeNormal || isSameNormal)) {
|
|
560
|
+
const { currentStepIndex, sliceRangeInfo, numScrollSteps } = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.getVolumeViewportScrollInfo)(this, volumeId, true);
|
|
561
|
+
const { sliceRange, spacingInNormalDirection } = sliceRangeInfo;
|
|
562
|
+
if (isNegativeNormal) {
|
|
563
|
+
sliceIndex = numScrollSteps - sliceIndex - 1;
|
|
564
|
+
}
|
|
565
|
+
const delta = sliceIndex - currentStepIndex;
|
|
566
|
+
const { newFocalPoint, newPosition } = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.snapFocalPointToSlice)(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, delta);
|
|
567
|
+
this.setCamera({ focalPoint: newFocalPoint, position: newPosition });
|
|
568
|
+
}
|
|
569
|
+
else if (refFrameOfReference === this.getFrameOfReferenceUID()) {
|
|
570
|
+
if (refViewPlaneNormal && !isNegativeNormal && !isSameNormal) {
|
|
571
|
+
this.setOrientation({ viewPlaneNormal: refViewPlaneNormal, viewUp });
|
|
572
|
+
return this.setViewReference(viewRef);
|
|
573
|
+
}
|
|
574
|
+
if (cameraFocalPoint) {
|
|
575
|
+
const focalDelta = gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec3.subtract */ .eR.subtract([0, 0, 0], cameraFocalPoint, focalPoint);
|
|
576
|
+
const useNormal = refViewPlaneNormal ?? viewPlaneNormal;
|
|
577
|
+
const normalDot = gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec3.dot */ .eR.dot(focalDelta, useNormal);
|
|
578
|
+
if (!(0,_utilities__WEBPACK_IMPORTED_MODULE_11__.isEqual)(normalDot, 0)) {
|
|
579
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec3.scale */ .eR.scale(focalDelta, useNormal, normalDot);
|
|
580
|
+
}
|
|
581
|
+
const newFocal = gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec3.add */ .eR.add([0, 0, 0], focalPoint, focalDelta);
|
|
582
|
+
const newPosition = gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec3.add */ .eR.add([0, 0, 0], position, focalDelta);
|
|
583
|
+
this.setCamera({ focalPoint: newFocal, position: newPosition });
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
throw new Error(`Incompatible view refs: ${refFrameOfReference}!==${this.getFrameOfReferenceUID()}`);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
520
590
|
setProperties({ voiRange, VOILUTFunction, invert, colormap, preset, interpolationType, slabThickness, rotation, } = {}, volumeId, suppressEvents = false) {
|
|
521
591
|
if (this.globalDefaultProperties == null) {
|
|
522
592
|
this.setDefaultProperties({
|
|
@@ -675,7 +745,7 @@ class BaseVolumeViewport extends _Viewport__WEBPACK_IMPORTED_MODULE_14__/* ["def
|
|
|
675
745
|
this.render();
|
|
676
746
|
}
|
|
677
747
|
}
|
|
678
|
-
setOrientation(
|
|
748
|
+
setOrientation(_orientation, _immediate = true) {
|
|
679
749
|
console.warn('Method "setOrientation" needs implementation');
|
|
680
750
|
}
|
|
681
751
|
initializeColorTransferFunction(volumeInputArray) {
|
|
@@ -811,14 +881,15 @@ class BaseVolumeViewport extends _Viewport__WEBPACK_IMPORTED_MODULE_14__/* ["def
|
|
|
811
881
|
return volume.getScalarData()[voxelIndex];
|
|
812
882
|
}
|
|
813
883
|
getVolumeId(specifier) {
|
|
884
|
+
const actorEntries = this.getActors();
|
|
885
|
+
if (!actorEntries) {
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
814
888
|
if (!specifier?.volumeId) {
|
|
815
|
-
const actorEntries = this.getActors();
|
|
816
|
-
if (!actorEntries) {
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
889
|
return actorEntries.find((actorEntry) => actorEntry.actor.getClassName() === 'vtkVolume')?.uid;
|
|
820
890
|
}
|
|
821
|
-
return
|
|
891
|
+
return actorEntries.find((actorEntry) => actorEntry.actor.getClassName() === 'vtkVolume' &&
|
|
892
|
+
actorEntry.uid === specifier.volumeId)?.uid;
|
|
822
893
|
}
|
|
823
894
|
getReferenceId(specifier = {}) {
|
|
824
895
|
let { volumeId, sliceIndex: sliceIndex } = specifier;
|
|
@@ -829,7 +900,8 @@ class BaseVolumeViewport extends _Viewport__WEBPACK_IMPORTED_MODULE_14__/* ["def
|
|
|
829
900
|
}
|
|
830
901
|
volumeId = actorEntries.find((actorEntry) => actorEntry.actor.getClassName() === 'vtkVolume')?.uid;
|
|
831
902
|
}
|
|
832
|
-
|
|
903
|
+
const currentIndex = this.getCurrentImageIdIndex();
|
|
904
|
+
sliceIndex ??= currentIndex;
|
|
833
905
|
const { viewPlaneNormal, focalPoint } = this.getCamera();
|
|
834
906
|
const querySeparator = volumeId.indexOf('?') > -1 ? '&' : '?';
|
|
835
907
|
return `volumeId:${volumeId}${querySeparator}sliceIndex=${sliceIndex}&viewPlaneNormal=${viewPlaneNormal.join(',')}&focalPoint=${focalPoint.join(',')}`;
|
|
@@ -1757,8 +1829,8 @@ var metaData = __webpack_require__(55692);
|
|
|
1757
1829
|
// EXTERNAL MODULE: ../../../node_modules/lodash.clonedeep/index.js
|
|
1758
1830
|
var lodash_clonedeep = __webpack_require__(48463);
|
|
1759
1831
|
var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);
|
|
1760
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
1761
|
-
var utilities = __webpack_require__(
|
|
1832
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
1833
|
+
var utilities = __webpack_require__(20228);
|
|
1762
1834
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/Viewport.js
|
|
1763
1835
|
var Viewport = __webpack_require__(11512);
|
|
1764
1836
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/cpuFallback/colors/index.js + 2 modules
|
|
@@ -1968,20 +2040,8 @@ class StackViewport extends Viewport/* default */.A {
|
|
|
1968
2040
|
resize(this._cpuFallbackEnabledElement);
|
|
1969
2041
|
}
|
|
1970
2042
|
};
|
|
1971
|
-
this.getFrameOfReferenceUID = () =>
|
|
1972
|
-
|
|
1973
|
-
if (!imageId) {
|
|
1974
|
-
return;
|
|
1975
|
-
}
|
|
1976
|
-
const imagePlaneModule = metaData.get('imagePlaneModule', imageId);
|
|
1977
|
-
if (!imagePlaneModule) {
|
|
1978
|
-
return;
|
|
1979
|
-
}
|
|
1980
|
-
return imagePlaneModule.frameOfReferenceUID;
|
|
1981
|
-
};
|
|
1982
|
-
this.getCornerstoneImage = () => {
|
|
1983
|
-
return this.csImage;
|
|
1984
|
-
};
|
|
2043
|
+
this.getFrameOfReferenceUID = (sliceIndex) => this.getImagePlaneReferenceData(sliceIndex)?.FrameOfReferenceUID;
|
|
2044
|
+
this.getCornerstoneImage = () => this.csImage;
|
|
1985
2045
|
this.createActorMapper = (imageData) => {
|
|
1986
2046
|
const mapper = vtkImageMapper$1.newInstance();
|
|
1987
2047
|
mapper.setInputData(imageData);
|
|
@@ -2144,9 +2204,6 @@ class StackViewport extends Viewport/* default */.A {
|
|
|
2144
2204
|
this.getCurrentImageIdIndex = () => {
|
|
2145
2205
|
return this.currentImageIdIndex;
|
|
2146
2206
|
};
|
|
2147
|
-
this.getSliceIndex = () => {
|
|
2148
|
-
return this.currentImageIdIndex;
|
|
2149
|
-
};
|
|
2150
2207
|
this.getTargetImageIdIndex = () => {
|
|
2151
2208
|
return this.targetImageIdIndex;
|
|
2152
2209
|
};
|
|
@@ -2957,6 +3014,25 @@ class StackViewport extends Viewport/* default */.A {
|
|
|
2957
3014
|
imagePixelModule,
|
|
2958
3015
|
};
|
|
2959
3016
|
}
|
|
3017
|
+
getImagePlaneReferenceData(sliceIndex = this.getCurrentImageIdIndex()) {
|
|
3018
|
+
const imageId = this.imageIds[sliceIndex];
|
|
3019
|
+
if (!imageId) {
|
|
3020
|
+
return;
|
|
3021
|
+
}
|
|
3022
|
+
const imagePlaneModule = metaData.get(enums.MetadataModules.IMAGE_PLANE, imageId);
|
|
3023
|
+
const { imagePositionPatient, frameOfReferenceUID: FrameOfReferenceUID } = imagePlaneModule;
|
|
3024
|
+
let { rowCosines, columnCosines } = imagePlaneModule;
|
|
3025
|
+
rowCosines ||= [1, 0, 0];
|
|
3026
|
+
columnCosines ||= [0, 1, 0];
|
|
3027
|
+
const viewPlaneNormal = (esm/* vec3.cross */.eR.cross([0, 0, 0], columnCosines, rowCosines));
|
|
3028
|
+
return {
|
|
3029
|
+
FrameOfReferenceUID,
|
|
3030
|
+
viewPlaneNormal,
|
|
3031
|
+
cameraFocalPoint: imagePositionPatient,
|
|
3032
|
+
referencedImageId: imageId,
|
|
3033
|
+
sliceIndex,
|
|
3034
|
+
};
|
|
3035
|
+
}
|
|
2960
3036
|
_getCameraOrientation(imageDataDirection) {
|
|
2961
3037
|
const viewPlaneNormal = imageDataDirection.slice(6, 9).map((x) => -x);
|
|
2962
3038
|
const viewUp = imageDataDirection.slice(3, 6).map((x) => -x);
|
|
@@ -3272,7 +3348,7 @@ class StackViewport extends Viewport/* default */.A {
|
|
|
3272
3348
|
this.cpuRenderingInvalidated = true;
|
|
3273
3349
|
this._cpuFallbackEnabledElement.transform = (0,calculateTransform/* default */.A)(this._cpuFallbackEnabledElement);
|
|
3274
3350
|
}
|
|
3275
|
-
|
|
3351
|
+
addImages(stackInputs) {
|
|
3276
3352
|
const actors = this.getActors();
|
|
3277
3353
|
stackInputs.forEach((stackInput) => {
|
|
3278
3354
|
const image = cache/* default */.Ay.getImage(stackInput.imageId);
|
|
@@ -3567,24 +3643,39 @@ class StackViewport extends Viewport/* default */.A {
|
|
|
3567
3643
|
return referencedImageId?.endsWith(imageURI);
|
|
3568
3644
|
}
|
|
3569
3645
|
getViewReference(viewRefSpecifier = {}) {
|
|
3570
|
-
const { sliceIndex
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
}
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
if (viewRef) {
|
|
3581
|
-
const { viewPlaneNormal, sliceIndex } = viewRef;
|
|
3582
|
-
if (viewPlaneNormal &&
|
|
3583
|
-
!(0,utilities.isEqual)(viewPlaneNormal, camera.viewPlaneNormal)) {
|
|
3646
|
+
const { sliceIndex = this.getCurrentImageIdIndex() } = viewRefSpecifier;
|
|
3647
|
+
const reference = super.getViewReference(viewRefSpecifier);
|
|
3648
|
+
const referencedImageId = this.imageIds[sliceIndex];
|
|
3649
|
+
if (!referencedImageId) {
|
|
3650
|
+
return;
|
|
3651
|
+
}
|
|
3652
|
+
reference.referencedImageId = referencedImageId;
|
|
3653
|
+
if (this.getCurrentImageIdIndex() !== sliceIndex) {
|
|
3654
|
+
const referenceData = this.getImagePlaneReferenceData(sliceIndex);
|
|
3655
|
+
if (!referenceData) {
|
|
3584
3656
|
return;
|
|
3585
3657
|
}
|
|
3586
|
-
|
|
3587
|
-
|
|
3658
|
+
Object.assign(reference, referenceData);
|
|
3659
|
+
}
|
|
3660
|
+
return reference;
|
|
3661
|
+
}
|
|
3662
|
+
setViewReference(viewRef) {
|
|
3663
|
+
if (!viewRef) {
|
|
3664
|
+
return;
|
|
3665
|
+
}
|
|
3666
|
+
const { referencedImageId, sliceIndex, volumeId } = viewRef;
|
|
3667
|
+
if (typeof sliceIndex === 'number' &&
|
|
3668
|
+
referencedImageId &&
|
|
3669
|
+
referencedImageId === this.imageIds[sliceIndex]) {
|
|
3670
|
+
this.setImageIdIndex(sliceIndex);
|
|
3671
|
+
}
|
|
3672
|
+
else {
|
|
3673
|
+
const foundIndex = this.imageIds.indexOf(referencedImageId);
|
|
3674
|
+
if (foundIndex !== -1) {
|
|
3675
|
+
this.setImageIdIndex(foundIndex);
|
|
3676
|
+
}
|
|
3677
|
+
else {
|
|
3678
|
+
throw new Error('Unsupported - referenced image id not found');
|
|
3588
3679
|
}
|
|
3589
3680
|
}
|
|
3590
3681
|
}
|
|
@@ -3708,8 +3799,8 @@ var enums = __webpack_require__(98362);
|
|
|
3708
3799
|
var metaData = __webpack_require__(55692);
|
|
3709
3800
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/transform.js
|
|
3710
3801
|
var rendering_transform = __webpack_require__(18714);
|
|
3711
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
3712
|
-
var utilities = __webpack_require__(
|
|
3802
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
3803
|
+
var utilities = __webpack_require__(20228);
|
|
3713
3804
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/Viewport.js
|
|
3714
3805
|
var Viewport = __webpack_require__(11512);
|
|
3715
3806
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/index.js + 5 modules
|
|
@@ -4620,7 +4711,7 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4620
4711
|
/* harmony import */ var _enums_ViewportStatus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(17702);
|
|
4621
4712
|
/* harmony import */ var _enums_ViewportType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21432);
|
|
4622
4713
|
/* harmony import */ var _renderingEngineCache__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(94070);
|
|
4623
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
4714
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(20228);
|
|
4624
4715
|
/* harmony import */ var _utilities_hasNaNValues__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(73139);
|
|
4625
4716
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(88903);
|
|
4626
4717
|
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(71702);
|
|
@@ -4920,7 +5011,7 @@ class Viewport {
|
|
|
4920
5011
|
this.setDisplayAreaScale(displayArea);
|
|
4921
5012
|
}
|
|
4922
5013
|
else {
|
|
4923
|
-
this.setInterpolationType(this.getProperties()
|
|
5014
|
+
this.setInterpolationType(this.getProperties()?.interpolationType || _enums__WEBPACK_IMPORTED_MODULE_13__.InterpolationType.LINEAR);
|
|
4924
5015
|
this.setDisplayAreaFit(displayArea);
|
|
4925
5016
|
}
|
|
4926
5017
|
if (storeAsInitialCamera) {
|
|
@@ -5149,6 +5240,9 @@ class Viewport {
|
|
|
5149
5240
|
}, storeAsInitialCamera);
|
|
5150
5241
|
}
|
|
5151
5242
|
getZoom(compareCamera = this.initialCamera) {
|
|
5243
|
+
if (!compareCamera) {
|
|
5244
|
+
return 1;
|
|
5245
|
+
}
|
|
5152
5246
|
const activeCamera = this.getVtkActiveCamera();
|
|
5153
5247
|
const { parallelScale: initialParallelScale } = compareCamera;
|
|
5154
5248
|
return initialParallelScale / activeCamera.getParallelScale();
|
|
@@ -5402,11 +5496,12 @@ class Viewport {
|
|
|
5402
5496
|
return { widthWorld: maxX - minX, heightWorld: maxY - minY };
|
|
5403
5497
|
}
|
|
5404
5498
|
getViewReference(viewRefSpecifier = {}) {
|
|
5405
|
-
const { focalPoint: cameraFocalPoint, viewPlaneNormal } = this.getCamera();
|
|
5499
|
+
const { focalPoint: cameraFocalPoint, viewPlaneNormal, viewUp, } = this.getCamera();
|
|
5406
5500
|
const target = {
|
|
5407
5501
|
FrameOfReferenceUID: this.getFrameOfReferenceUID(),
|
|
5408
5502
|
cameraFocalPoint,
|
|
5409
5503
|
viewPlaneNormal,
|
|
5504
|
+
viewUp,
|
|
5410
5505
|
sliceIndex: viewRefSpecifier.sliceIndex ?? this.getCurrentImageIdIndex(),
|
|
5411
5506
|
};
|
|
5412
5507
|
return target;
|
|
@@ -5421,7 +5516,7 @@ class Viewport {
|
|
|
5421
5516
|
if (viewPlaneNormal &&
|
|
5422
5517
|
!(0,_utilities__WEBPACK_IMPORTED_MODULE_9__.isEqual)(viewPlaneNormal, camera.viewPlaneNormal) &&
|
|
5423
5518
|
!(0,_utilities__WEBPACK_IMPORTED_MODULE_9__.isEqual)(gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec3.negate */ .eR.negate(camera.viewPlaneNormal, camera.viewPlaneNormal), viewPlaneNormal)) {
|
|
5424
|
-
return options?.
|
|
5519
|
+
return options?.withOrientation === true;
|
|
5425
5520
|
}
|
|
5426
5521
|
return true;
|
|
5427
5522
|
}
|
|
@@ -5449,19 +5544,22 @@ class Viewport {
|
|
|
5449
5544
|
}
|
|
5450
5545
|
return target;
|
|
5451
5546
|
}
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5547
|
+
setViewReference(viewRef) {
|
|
5548
|
+
}
|
|
5549
|
+
setViewPresentation(viewPres) {
|
|
5550
|
+
if (!viewPres) {
|
|
5551
|
+
return;
|
|
5552
|
+
}
|
|
5553
|
+
const { displayArea, zoom = this.getZoom(), pan, rotation } = viewPres;
|
|
5554
|
+
if (displayArea !== this.getDisplayArea()) {
|
|
5555
|
+
this.setDisplayArea(displayArea);
|
|
5556
|
+
}
|
|
5557
|
+
this.setZoom(zoom);
|
|
5558
|
+
if (pan) {
|
|
5559
|
+
this.setPan(gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec2.scale */ .Zc.scale([0, 0], pan, zoom));
|
|
5560
|
+
}
|
|
5561
|
+
if (rotation >= 0) {
|
|
5562
|
+
this.setRotation(rotation);
|
|
5465
5563
|
}
|
|
5466
5564
|
}
|
|
5467
5565
|
_shouldUseNativeDataType() {
|
|
@@ -5550,15 +5648,15 @@ class Viewport {
|
|
|
5550
5648
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5551
5649
|
/* harmony export */ });
|
|
5552
5650
|
/* harmony import */ var _kitware_vtk_js_Common_DataModel_Plane__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84441);
|
|
5553
|
-
/* harmony import */ var
|
|
5554
|
-
/* harmony import */ var
|
|
5555
|
-
/* harmony import */ var
|
|
5556
|
-
/* harmony import */ var
|
|
5557
|
-
/* harmony import */ var
|
|
5558
|
-
/* harmony import */ var
|
|
5559
|
-
/* harmony import */ var
|
|
5560
|
-
/* harmony import */ var
|
|
5561
|
-
/* harmony import */ var
|
|
5651
|
+
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13320);
|
|
5652
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88903);
|
|
5653
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98362);
|
|
5654
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20228);
|
|
5655
|
+
/* harmony import */ var _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6203);
|
|
5656
|
+
/* harmony import */ var _helpers_setDefaultVolumeVOI__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(83853);
|
|
5657
|
+
/* harmony import */ var _utilities_transferFunctionUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22350);
|
|
5658
|
+
/* harmony import */ var _utilities_getImageSliceDataForVolumeViewport__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(97508);
|
|
5659
|
+
/* harmony import */ var _utilities_getVolumeViewportScrollInfo__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(62255);
|
|
5562
5660
|
|
|
5563
5661
|
|
|
5564
5662
|
|
|
@@ -5569,43 +5667,34 @@ class Viewport {
|
|
|
5569
5667
|
|
|
5570
5668
|
|
|
5571
5669
|
|
|
5572
|
-
class VolumeViewport extends
|
|
5670
|
+
class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A {
|
|
5573
5671
|
constructor(props) {
|
|
5574
5672
|
super(props);
|
|
5575
5673
|
this._useAcquisitionPlaneForViewPlane = false;
|
|
5576
5674
|
this.getNumberOfSlices = () => {
|
|
5577
|
-
const { numberOfSlices } = (0,
|
|
5675
|
+
const { numberOfSlices } = (0,_utilities_getImageSliceDataForVolumeViewport__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(this);
|
|
5578
5676
|
return numberOfSlices;
|
|
5579
5677
|
};
|
|
5580
5678
|
this.getSliceIndex = () => {
|
|
5581
|
-
const { imageIndex } = (0,
|
|
5679
|
+
const { imageIndex } = (0,_utilities_getImageSliceDataForVolumeViewport__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(this);
|
|
5582
5680
|
return imageIndex;
|
|
5583
5681
|
};
|
|
5584
|
-
this.getCurrentImageIdIndex = (volumeId) => {
|
|
5585
|
-
const {
|
|
5586
|
-
|
|
5587
|
-
if (!imageData) {
|
|
5588
|
-
return;
|
|
5589
|
-
}
|
|
5590
|
-
const { origin, direction, spacing } = imageData;
|
|
5591
|
-
const spacingInNormal = (0,_utilities__WEBPACK_IMPORTED_MODULE_5__.getSpacingInNormalDirection)({ direction, spacing }, viewPlaneNormal);
|
|
5592
|
-
const sub = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .eR.create();
|
|
5593
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.sub */ .eR.sub(sub, focalPoint, origin);
|
|
5594
|
-
const distance = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(sub, viewPlaneNormal);
|
|
5595
|
-
return Math.round(Math.abs(distance) / spacingInNormal);
|
|
5682
|
+
this.getCurrentImageIdIndex = (volumeId, useSlabThickness = true) => {
|
|
5683
|
+
const { currentStepIndex } = (0,_utilities_getVolumeViewportScrollInfo__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(this, volumeId || this.getVolumeId(), useSlabThickness);
|
|
5684
|
+
return currentStepIndex;
|
|
5596
5685
|
};
|
|
5597
5686
|
this.getCurrentImageId = () => {
|
|
5598
5687
|
const actorEntry = this.getDefaultActor();
|
|
5599
|
-
if (!actorEntry || !(0,
|
|
5688
|
+
if (!actorEntry || !(0,_utilities__WEBPACK_IMPORTED_MODULE_4__.actorIsA)(actorEntry, 'vtkVolume')) {
|
|
5600
5689
|
return;
|
|
5601
5690
|
}
|
|
5602
5691
|
const { uid } = actorEntry;
|
|
5603
|
-
const volume =
|
|
5692
|
+
const volume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(uid);
|
|
5604
5693
|
if (!volume) {
|
|
5605
5694
|
return;
|
|
5606
5695
|
}
|
|
5607
5696
|
const { viewPlaneNormal, focalPoint } = this.getCamera();
|
|
5608
|
-
return (0,
|
|
5697
|
+
return (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getClosestImageId)(volume, focalPoint, viewPlaneNormal);
|
|
5609
5698
|
};
|
|
5610
5699
|
this.getSlicePlaneCoordinates = () => {
|
|
5611
5700
|
const actorEntry = this.getDefaultActor();
|
|
@@ -5614,30 +5703,30 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5614
5703
|
return [];
|
|
5615
5704
|
}
|
|
5616
5705
|
const volumeId = actorEntry.uid;
|
|
5617
|
-
const imageVolume =
|
|
5706
|
+
const imageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeId);
|
|
5618
5707
|
const camera = this.getCamera();
|
|
5619
5708
|
const { focalPoint, position, viewPlaneNormal } = camera;
|
|
5620
|
-
const spacingInNormalDirection = (0,
|
|
5621
|
-
const sliceRange = (0,
|
|
5709
|
+
const spacingInNormalDirection = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getSpacingInNormalDirection)(imageVolume, viewPlaneNormal);
|
|
5710
|
+
const sliceRange = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getSliceRange)(actorEntry.actor, viewPlaneNormal, focalPoint);
|
|
5622
5711
|
const numSlicesBackward = Math.round((sliceRange.current - sliceRange.min) / spacingInNormalDirection);
|
|
5623
5712
|
const numSlicesForward = Math.round((sliceRange.max - sliceRange.current) / spacingInNormalDirection);
|
|
5624
5713
|
const currentSliceIndex = this.getSliceIndex();
|
|
5625
5714
|
const focalPoints = [];
|
|
5626
5715
|
for (let i = -numSlicesBackward; i <= numSlicesForward; i++) {
|
|
5627
|
-
const { newFocalPoint: point } = (0,
|
|
5716
|
+
const { newFocalPoint: point } = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.snapFocalPointToSlice)(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, i);
|
|
5628
5717
|
focalPoints.push({ sliceIndex: currentSliceIndex + i, point });
|
|
5629
5718
|
}
|
|
5630
5719
|
return focalPoints;
|
|
5631
5720
|
};
|
|
5632
5721
|
const { orientation } = this.options;
|
|
5633
|
-
if (orientation && orientation !==
|
|
5722
|
+
if (orientation && orientation !== _enums__WEBPACK_IMPORTED_MODULE_3__.OrientationAxis.ACQUISITION) {
|
|
5634
5723
|
this.applyViewOrientation(orientation);
|
|
5635
5724
|
return;
|
|
5636
5725
|
}
|
|
5637
5726
|
this._useAcquisitionPlaneForViewPlane = true;
|
|
5638
5727
|
}
|
|
5639
5728
|
async setVolumes(volumeInputArray, immediate = false, suppressEvents = false) {
|
|
5640
|
-
const firstImageVolume =
|
|
5729
|
+
const firstImageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeInputArray[0].volumeId);
|
|
5641
5730
|
if (!firstImageVolume) {
|
|
5642
5731
|
throw new Error(`imageVolume with id: ${firstImageVolume.volumeId} does not exist`);
|
|
5643
5732
|
}
|
|
@@ -5648,7 +5737,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5648
5737
|
return super.setVolumes(volumeInputArray, immediate, suppressEvents);
|
|
5649
5738
|
}
|
|
5650
5739
|
async addVolumes(volumeInputArray, immediate = false, suppressEvents = false) {
|
|
5651
|
-
const firstImageVolume =
|
|
5740
|
+
const firstImageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeInputArray[0].volumeId);
|
|
5652
5741
|
if (!firstImageVolume) {
|
|
5653
5742
|
throw new Error(`imageVolume with id: ${firstImageVolume.volumeId} does not exist`);
|
|
5654
5743
|
}
|
|
@@ -5661,8 +5750,8 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5661
5750
|
setOrientation(orientation, immediate = true) {
|
|
5662
5751
|
let viewPlaneNormal, viewUp;
|
|
5663
5752
|
if (typeof orientation === 'string') {
|
|
5664
|
-
if (
|
|
5665
|
-
({ viewPlaneNormal, viewUp } =
|
|
5753
|
+
if (_constants__WEBPACK_IMPORTED_MODULE_2__.MPR_CAMERA_VALUES[orientation]) {
|
|
5754
|
+
({ viewPlaneNormal, viewUp } = _constants__WEBPACK_IMPORTED_MODULE_2__.MPR_CAMERA_VALUES[orientation]);
|
|
5666
5755
|
}
|
|
5667
5756
|
else if (orientation === 'acquisition') {
|
|
5668
5757
|
({ viewPlaneNormal, viewUp } = this._getAcquisitionPlaneOrientation());
|
|
@@ -5691,7 +5780,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5691
5780
|
return;
|
|
5692
5781
|
}
|
|
5693
5782
|
const volumeId = actorEntry.uid;
|
|
5694
|
-
const imageVolume =
|
|
5783
|
+
const imageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeId);
|
|
5695
5784
|
if (!imageVolume) {
|
|
5696
5785
|
throw new Error(`imageVolume with id: ${volumeId} does not exist in cache`);
|
|
5697
5786
|
}
|
|
@@ -5736,12 +5825,15 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5736
5825
|
this.render();
|
|
5737
5826
|
}
|
|
5738
5827
|
}
|
|
5739
|
-
resetCamera(resetPan = true, resetZoom = true, resetToCenter = true, resetRotation = false) {
|
|
5828
|
+
resetCamera(resetPan = true, resetZoom = true, resetToCenter = true, resetRotation = false, supressEvents = false) {
|
|
5829
|
+
const { orientation } = this.viewportProperties;
|
|
5830
|
+
if (orientation) {
|
|
5831
|
+
this.applyViewOrientation(orientation, false);
|
|
5832
|
+
}
|
|
5740
5833
|
super.resetCamera(resetPan, resetZoom, resetToCenter);
|
|
5741
5834
|
this.resetVolumeViewportClippingRange();
|
|
5742
5835
|
const activeCamera = this.getVtkActiveCamera();
|
|
5743
5836
|
const viewPlaneNormal = activeCamera.getViewPlaneNormal();
|
|
5744
|
-
const viewUp = activeCamera.getViewUp();
|
|
5745
5837
|
const focalPoint = activeCamera.getFocalPoint();
|
|
5746
5838
|
const actorEntries = this.getActors();
|
|
5747
5839
|
actorEntries.forEach((actorEntry) => {
|
|
@@ -5754,7 +5846,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5754
5846
|
const clipPlane1 = _kitware_vtk_js_Common_DataModel_Plane__WEBPACK_IMPORTED_MODULE_0__/* ["default"].newInstance */ .Ay.newInstance();
|
|
5755
5847
|
const clipPlane2 = _kitware_vtk_js_Common_DataModel_Plane__WEBPACK_IMPORTED_MODULE_0__/* ["default"].newInstance */ .Ay.newInstance();
|
|
5756
5848
|
const newVtkPlanes = [clipPlane1, clipPlane2];
|
|
5757
|
-
let slabThickness =
|
|
5849
|
+
let slabThickness = _constants__WEBPACK_IMPORTED_MODULE_2__.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
5758
5850
|
if (actorEntry.slabThickness) {
|
|
5759
5851
|
slabThickness = actorEntry.slabThickness;
|
|
5760
5852
|
}
|
|
@@ -5764,13 +5856,22 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5764
5856
|
}
|
|
5765
5857
|
});
|
|
5766
5858
|
if (resetRotation &&
|
|
5767
|
-
|
|
5768
|
-
const viewToReset =
|
|
5859
|
+
_constants__WEBPACK_IMPORTED_MODULE_2__.MPR_CAMERA_VALUES[this.viewportProperties.orientation] !== undefined) {
|
|
5860
|
+
const viewToReset = _constants__WEBPACK_IMPORTED_MODULE_2__.MPR_CAMERA_VALUES[this.viewportProperties.orientation];
|
|
5769
5861
|
this.setCameraNoEvent({
|
|
5770
5862
|
viewUp: viewToReset.viewUp,
|
|
5771
5863
|
viewPlaneNormal: viewToReset.viewPlaneNormal,
|
|
5772
5864
|
});
|
|
5773
5865
|
}
|
|
5866
|
+
if (!supressEvents) {
|
|
5867
|
+
const eventDetail = {
|
|
5868
|
+
viewportId: this.id,
|
|
5869
|
+
camera: this.getCamera(),
|
|
5870
|
+
renderingEngineId: this.renderingEngineId,
|
|
5871
|
+
element: this.element,
|
|
5872
|
+
};
|
|
5873
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_4__.triggerEvent)(this.element, _enums__WEBPACK_IMPORTED_MODULE_3__.Events.CAMERA_RESET, eventDetail);
|
|
5874
|
+
}
|
|
5774
5875
|
return true;
|
|
5775
5876
|
}
|
|
5776
5877
|
setSlabThickness(slabThickness, filterActorUIDs = []) {
|
|
@@ -5784,7 +5885,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5784
5885
|
});
|
|
5785
5886
|
}
|
|
5786
5887
|
actorEntries.forEach((actorEntry) => {
|
|
5787
|
-
if ((0,
|
|
5888
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_4__.actorIsA)(actorEntry, 'vtkVolume')) {
|
|
5788
5889
|
actorEntry.slabThickness = slabThickness;
|
|
5789
5890
|
}
|
|
5790
5891
|
});
|
|
@@ -5793,6 +5894,27 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5793
5894
|
this.triggerCameraModifiedEventIfNecessary(currentCamera, currentCamera);
|
|
5794
5895
|
this.viewportProperties.slabThickness = slabThickness;
|
|
5795
5896
|
}
|
|
5897
|
+
resetSlabThickness() {
|
|
5898
|
+
const actorEntries = this.getActors();
|
|
5899
|
+
actorEntries.forEach((actorEntry) => {
|
|
5900
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_4__.actorIsA)(actorEntry, 'vtkVolume')) {
|
|
5901
|
+
actorEntry.slabThickness = _constants__WEBPACK_IMPORTED_MODULE_2__.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
5902
|
+
}
|
|
5903
|
+
});
|
|
5904
|
+
const currentCamera = this.getCamera();
|
|
5905
|
+
this.updateClippingPlanesForActors(currentCamera);
|
|
5906
|
+
this.triggerCameraModifiedEventIfNecessary(currentCamera, currentCamera);
|
|
5907
|
+
this.viewportProperties.slabThickness = undefined;
|
|
5908
|
+
}
|
|
5909
|
+
getViewReference(viewRefSpecifier = {}) {
|
|
5910
|
+
const viewRef = super.getViewReference(viewRefSpecifier);
|
|
5911
|
+
if (!viewRef?.volumeId) {
|
|
5912
|
+
return;
|
|
5913
|
+
}
|
|
5914
|
+
const volume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(viewRef.volumeId);
|
|
5915
|
+
viewRef.referencedImageId = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getClosestImageId)(volume, viewRef.cameraFocalPoint, viewRef.viewPlaneNormal);
|
|
5916
|
+
return viewRef;
|
|
5917
|
+
}
|
|
5796
5918
|
resetProperties(volumeId) {
|
|
5797
5919
|
this._resetProperties(volumeId);
|
|
5798
5920
|
}
|
|
@@ -5804,20 +5926,20 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5804
5926
|
throw new Error(`No actor found for the given volumeId: ${volumeId}`);
|
|
5805
5927
|
}
|
|
5806
5928
|
if (volumeActor.slabThickness) {
|
|
5807
|
-
volumeActor.slabThickness =
|
|
5929
|
+
volumeActor.slabThickness = _constants__WEBPACK_IMPORTED_MODULE_2__.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
5808
5930
|
this.viewportProperties.slabThickness = undefined;
|
|
5809
5931
|
this.updateClippingPlanesForActors(this.getCamera());
|
|
5810
5932
|
}
|
|
5811
|
-
const imageVolume =
|
|
5933
|
+
const imageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeActor.uid);
|
|
5812
5934
|
if (!imageVolume) {
|
|
5813
5935
|
throw new Error(`imageVolume with id: ${volumeActor.uid} does not exist in cache`);
|
|
5814
5936
|
}
|
|
5815
|
-
(0,
|
|
5816
|
-
if ((0,
|
|
5937
|
+
(0,_helpers_setDefaultVolumeVOI__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)(volumeActor.actor, imageVolume, false);
|
|
5938
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_4__.isImageActor)(volumeActor)) {
|
|
5817
5939
|
const transferFunction = volumeActor.actor
|
|
5818
5940
|
.getProperty()
|
|
5819
5941
|
.getRGBTransferFunction(0);
|
|
5820
|
-
(0,
|
|
5942
|
+
(0,_utilities_transferFunctionUtils__WEBPACK_IMPORTED_MODULE_7__.setTransferFunctionNodes)(transferFunction, this.initialTransferFunctionNodes);
|
|
5821
5943
|
}
|
|
5822
5944
|
const eventDetails = {
|
|
5823
5945
|
...super.getVOIModifiedEventDetail(volumeId),
|
|
@@ -5827,12 +5949,12 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5827
5949
|
const resetToCenter = true;
|
|
5828
5950
|
const resetCameraRotation = true;
|
|
5829
5951
|
this.resetCamera(resetPan, resetZoom, resetToCenter, resetCameraRotation);
|
|
5830
|
-
(0,
|
|
5952
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_4__.triggerEvent)(this.element, _enums__WEBPACK_IMPORTED_MODULE_3__.Events.VOI_MODIFIED, eventDetails);
|
|
5831
5953
|
}
|
|
5832
5954
|
getSlicesClippingPlanes() {
|
|
5833
5955
|
const focalPoints = this.getSlicePlaneCoordinates();
|
|
5834
5956
|
const { viewPlaneNormal } = this.getCamera();
|
|
5835
|
-
const slabThickness =
|
|
5957
|
+
const slabThickness = _constants__WEBPACK_IMPORTED_MODULE_2__.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
5836
5958
|
return focalPoints.map(({ point, sliceIndex }) => {
|
|
5837
5959
|
const vtkPlanes = [_kitware_vtk_js_Common_DataModel_Plane__WEBPACK_IMPORTED_MODULE_0__/* ["default"].newInstance */ .Ay.newInstance(), _kitware_vtk_js_Common_DataModel_Plane__WEBPACK_IMPORTED_MODULE_0__/* ["default"].newInstance */ .Ay.newInstance()];
|
|
5838
5960
|
this.setOrientationOfClippingPlanes(vtkPlanes, slabThickness, viewPlaneNormal, point);
|
|
@@ -5895,6 +6017,9 @@ class VolumeViewport3D extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_1__/
|
|
|
5895
6017
|
resetProperties(volumeId) {
|
|
5896
6018
|
return null;
|
|
5897
6019
|
}
|
|
6020
|
+
resetSlabThickness() {
|
|
6021
|
+
return null;
|
|
6022
|
+
}
|
|
5898
6023
|
}
|
|
5899
6024
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (VolumeViewport3D);
|
|
5900
6025
|
|
|
@@ -7131,8 +7256,8 @@ function storedPixelDataToCanvasImageDataPseudocolorLUTPET(image, lutFunction, c
|
|
|
7131
7256
|
}
|
|
7132
7257
|
/* harmony default export */ const rendering_storedPixelDataToCanvasImageDataPseudocolorLUTPET = (storedPixelDataToCanvasImageDataPseudocolorLUTPET);
|
|
7133
7258
|
|
|
7134
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
7135
|
-
var utilities = __webpack_require__(
|
|
7259
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
7260
|
+
var utilities = __webpack_require__(20228);
|
|
7136
7261
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/renderPseudoColorImage.js
|
|
7137
7262
|
|
|
7138
7263
|
|
|
@@ -8187,8 +8312,8 @@ function createVolumeMapper(imageData, vtkOpenGLTexture) {
|
|
|
8187
8312
|
return volumeMapper;
|
|
8188
8313
|
}
|
|
8189
8314
|
|
|
8190
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
8191
|
-
var utilities = __webpack_require__(
|
|
8315
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
8316
|
+
var utilities = __webpack_require__(20228);
|
|
8192
8317
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
8193
8318
|
var enums = __webpack_require__(98362);
|
|
8194
8319
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/setDefaultVolumeVOI.js
|
|
@@ -8220,9 +8345,7 @@ async function createVolumeActor(props, element, viewportId, suppressEvents = fa
|
|
|
8220
8345
|
if (numberOfComponents === 3) {
|
|
8221
8346
|
volumeActor.getProperty().setIndependentComponents(false);
|
|
8222
8347
|
}
|
|
8223
|
-
|
|
8224
|
-
await (0,setDefaultVolumeVOI/* default */.A)(volumeActor, imageVolume, useNativeDataType);
|
|
8225
|
-
}
|
|
8348
|
+
await (0,setDefaultVolumeVOI/* default */.A)(volumeActor, imageVolume, useNativeDataType);
|
|
8226
8349
|
if (callback) {
|
|
8227
8350
|
callback({ volumeActor, volumeId });
|
|
8228
8351
|
}
|
|
@@ -8301,7 +8424,7 @@ var addImageSlicesToViewports = __webpack_require__(25271);
|
|
|
8301
8424
|
/* harmony export */ });
|
|
8302
8425
|
/* harmony import */ var _loaders_imageLoader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79220);
|
|
8303
8426
|
/* harmony import */ var _metaData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55692);
|
|
8304
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
8427
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20228);
|
|
8305
8428
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98362);
|
|
8306
8429
|
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13320);
|
|
8307
8430
|
|
|
@@ -8313,21 +8436,19 @@ const PRIORITY = 0;
|
|
|
8313
8436
|
const REQUEST_TYPE = _enums__WEBPACK_IMPORTED_MODULE_3__.RequestType.Prefetch;
|
|
8314
8437
|
async function setDefaultVolumeVOI(volumeActor, imageVolume, useNativeDataType) {
|
|
8315
8438
|
let voi = getVOIFromMetadata(imageVolume);
|
|
8316
|
-
if (!voi) {
|
|
8439
|
+
if (!voi && imageVolume?.imageIds?.length) {
|
|
8317
8440
|
voi = await getVOIFromMinMax(imageVolume, useNativeDataType);
|
|
8441
|
+
voi = handlePreScaledVolume(imageVolume, voi);
|
|
8318
8442
|
}
|
|
8319
|
-
if (
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
voi = handlePreScaledVolume(imageVolume, voi);
|
|
8323
|
-
const { lower, upper } = voi;
|
|
8324
|
-
if (lower === 0 && upper === 0) {
|
|
8443
|
+
if ((voi?.lower === 0 && voi?.upper === 0) ||
|
|
8444
|
+
voi?.lower === undefined ||
|
|
8445
|
+
voi?.upper === undefined) {
|
|
8325
8446
|
return;
|
|
8326
8447
|
}
|
|
8327
8448
|
volumeActor
|
|
8328
8449
|
.getProperty()
|
|
8329
8450
|
.getRGBTransferFunction(0)
|
|
8330
|
-
.setMappingRange(lower, upper);
|
|
8451
|
+
.setMappingRange(voi.lower, voi.upper);
|
|
8331
8452
|
}
|
|
8332
8453
|
function handlePreScaledVolume(imageVolume, voi) {
|
|
8333
8454
|
const imageIds = imageVolume.imageIds;
|
|
@@ -8343,18 +8464,26 @@ function handlePreScaledVolume(imageVolume, voi) {
|
|
|
8343
8464
|
return voi;
|
|
8344
8465
|
}
|
|
8345
8466
|
function getVOIFromMetadata(imageVolume) {
|
|
8346
|
-
const { imageIds } = imageVolume;
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
const
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
?
|
|
8356
|
-
: windowCenter
|
|
8357
|
-
|
|
8467
|
+
const { imageIds, metadata } = imageVolume;
|
|
8468
|
+
let voi;
|
|
8469
|
+
if (imageIds.length) {
|
|
8470
|
+
const imageIdIndex = Math.floor(imageIds.length / 2);
|
|
8471
|
+
const imageId = imageIds[imageIdIndex];
|
|
8472
|
+
const voiLutModule = _metaData__WEBPACK_IMPORTED_MODULE_1__.get('voiLutModule', imageId);
|
|
8473
|
+
if (voiLutModule && voiLutModule.windowWidth && voiLutModule.windowCenter) {
|
|
8474
|
+
const { windowWidth, windowCenter } = voiLutModule;
|
|
8475
|
+
voi = {
|
|
8476
|
+
windowWidth: Array.isArray(windowWidth) ? windowWidth[0] : windowWidth,
|
|
8477
|
+
windowCenter: Array.isArray(windowCenter)
|
|
8478
|
+
? windowCenter[0]
|
|
8479
|
+
: windowCenter,
|
|
8480
|
+
};
|
|
8481
|
+
}
|
|
8482
|
+
}
|
|
8483
|
+
else {
|
|
8484
|
+
voi = metadata?.voiLut?.[0];
|
|
8485
|
+
}
|
|
8486
|
+
if (voi) {
|
|
8358
8487
|
const { lower, upper } = _utilities__WEBPACK_IMPORTED_MODULE_2__.windowLevel.toLowHighRange(Number(voi.windowWidth), Number(voi.windowCenter));
|
|
8359
8488
|
return {
|
|
8360
8489
|
lower,
|
|
@@ -8417,13 +8546,13 @@ async function getVOIFromMinMax(imageVolume, useNativeDataType) {
|
|
|
8417
8546
|
}
|
|
8418
8547
|
function _getImageScalarDataFromImageVolume(imageVolume, byteOffset, bytePerPixel, voxelsPerImage) {
|
|
8419
8548
|
const { scalarData } = imageVolume;
|
|
8420
|
-
const {
|
|
8549
|
+
const { buffer } = scalarData;
|
|
8421
8550
|
if (scalarData.BYTES_PER_ELEMENT !== bytePerPixel) {
|
|
8422
8551
|
byteOffset *= scalarData.BYTES_PER_ELEMENT / bytePerPixel;
|
|
8423
8552
|
}
|
|
8424
8553
|
const TypedArray = scalarData.constructor;
|
|
8425
8554
|
const imageScalarData = new TypedArray(voxelsPerImage);
|
|
8426
|
-
const volumeBufferView = new TypedArray(
|
|
8555
|
+
const volumeBufferView = new TypedArray(buffer, byteOffset, voxelsPerImage);
|
|
8427
8556
|
imageScalarData.set(volumeBufferView);
|
|
8428
8557
|
return imageScalarData;
|
|
8429
8558
|
}
|
|
@@ -8449,7 +8578,7 @@ function _isCurrentImagePTPrescaled(modality, imageVolume) {
|
|
|
8449
8578
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
8450
8579
|
/* harmony export */ g: () => (/* binding */ resetVolumeNewImageState)
|
|
8451
8580
|
/* harmony export */ });
|
|
8452
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
8581
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20228);
|
|
8453
8582
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98362);
|
|
8454
8583
|
/* harmony import */ var _getRenderingEngine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49184);
|
|
8455
8584
|
/* harmony import */ var _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6203);
|
|
@@ -8516,8 +8645,8 @@ var Events = __webpack_require__(11731);
|
|
|
8516
8645
|
var renderingEngineCache = __webpack_require__(94070);
|
|
8517
8646
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/eventTarget.js
|
|
8518
8647
|
var eventTarget = __webpack_require__(51884);
|
|
8519
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
8520
|
-
var utilities = __webpack_require__(
|
|
8648
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
8649
|
+
var utilities = __webpack_require__(20228);
|
|
8521
8650
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/vtkClasses/index.js + 27 modules
|
|
8522
8651
|
var vtkClasses = __webpack_require__(69585);
|
|
8523
8652
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/ViewportType.js
|
|
@@ -8849,7 +8978,12 @@ class RenderingEngine {
|
|
|
8849
8978
|
const prevCamera = vp.getCamera();
|
|
8850
8979
|
const rotation = vp.getRotation();
|
|
8851
8980
|
const { flipHorizontal } = prevCamera;
|
|
8852
|
-
|
|
8981
|
+
const resetPan = true;
|
|
8982
|
+
const resetZoom = true;
|
|
8983
|
+
const resetToCenter = true;
|
|
8984
|
+
const resetRotation = false;
|
|
8985
|
+
const supressEvents = true;
|
|
8986
|
+
vp.resetCamera(resetPan, resetZoom, resetToCenter, resetRotation, supressEvents);
|
|
8853
8987
|
const displayArea = vp.getDisplayArea();
|
|
8854
8988
|
if (keepCamera) {
|
|
8855
8989
|
if (displayArea) {
|
|
@@ -15302,7 +15436,7 @@ function vtkSlabCamera(publicAPI, model) {
|
|
|
15302
15436
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15303
15437
|
/* harmony export */ });
|
|
15304
15438
|
/* unused harmony export Cache */
|
|
15305
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
15439
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20228);
|
|
15306
15440
|
/* harmony import */ var _eventTarget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51884);
|
|
15307
15441
|
/* harmony import */ var _enums_Events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11731);
|
|
15308
15442
|
/* harmony import */ var _classes_ImageVolume__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77076);
|
|
@@ -15318,7 +15452,7 @@ class Cache {
|
|
|
15318
15452
|
this._imageCacheSize = 0;
|
|
15319
15453
|
this._volumeCacheSize = 0;
|
|
15320
15454
|
this._maxCacheSize = 3 * ONE_GB;
|
|
15321
|
-
this._maxInstanceSize =
|
|
15455
|
+
this._maxInstanceSize = 4 * ONE_GB - 8;
|
|
15322
15456
|
this.setMaxCacheSize = (newMaxCacheSize) => {
|
|
15323
15457
|
if (!newMaxCacheSize || typeof newMaxCacheSize !== 'number') {
|
|
15324
15458
|
const errorMessage = `New max cacheSize ${this._maxCacheSize} should be defined and should be a number.`;
|
|
@@ -15784,8 +15918,8 @@ function isTypedArray(obj) {
|
|
|
15784
15918
|
obj instanceof Float64Array);
|
|
15785
15919
|
}
|
|
15786
15920
|
|
|
15787
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
15788
|
-
var utilities = __webpack_require__(
|
|
15921
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
15922
|
+
var utilities = __webpack_require__(20228);
|
|
15789
15923
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/vtkClasses/index.js + 27 modules
|
|
15790
15924
|
var vtkClasses = __webpack_require__(69585);
|
|
15791
15925
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/cache/cache.js
|
|
@@ -23569,8 +23703,8 @@ async function createAndCacheGeometry(geometryId, options) {
|
|
|
23569
23703
|
|
|
23570
23704
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/ProgressiveRetrieveImages.js + 4 modules
|
|
23571
23705
|
var ProgressiveRetrieveImages = __webpack_require__(71090);
|
|
23572
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
23573
|
-
var utilities = __webpack_require__(
|
|
23706
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
23707
|
+
var utilities = __webpack_require__(20228);
|
|
23574
23708
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/triggerEvent.js
|
|
23575
23709
|
var triggerEvent = __webpack_require__(13292);
|
|
23576
23710
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/index.js + 5 modules
|
|
@@ -23633,8 +23767,8 @@ function e(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{
|
|
|
23633
23767
|
var enums = __webpack_require__(98362);
|
|
23634
23768
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/getRenderingEngine.js
|
|
23635
23769
|
var getRenderingEngine = __webpack_require__(49184);
|
|
23636
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
23637
|
-
var utilities = __webpack_require__(
|
|
23770
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
23771
|
+
var utilities = __webpack_require__(20228);
|
|
23638
23772
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/webWorkerManager/webWorkerManager.js
|
|
23639
23773
|
var webWorkerManager = __webpack_require__(61874);
|
|
23640
23774
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/init.js
|
|
@@ -23955,8 +24089,8 @@ const interleavedRetrieveConfiguration = [
|
|
|
23955
24089
|
|
|
23956
24090
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/imageLoader.js
|
|
23957
24091
|
var imageLoader = __webpack_require__(79220);
|
|
23958
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
23959
|
-
var utilities = __webpack_require__(
|
|
24092
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 68 modules
|
|
24093
|
+
var utilities = __webpack_require__(20228);
|
|
23960
24094
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/requestPool/imageLoadPoolManager.js
|
|
23961
24095
|
var imageLoadPoolManager = __webpack_require__(775);
|
|
23962
24096
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/cache/index.js
|
|
@@ -24383,7 +24517,7 @@ function findMatchingColormap(rgbPoints, actor) {
|
|
|
24383
24517
|
return false;
|
|
24384
24518
|
}
|
|
24385
24519
|
for (let i = 0; i < presetRGBPoints.length; i += 4) {
|
|
24386
|
-
if (!(0,_isEqual__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
24520
|
+
if (!(0,_isEqual__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)(presetRGBPoints.slice(i + 1, i + 4), rgbPoints.slice(i + 1, i + 4))) {
|
|
24387
24521
|
return false;
|
|
24388
24522
|
}
|
|
24389
24523
|
}
|
|
@@ -24412,6 +24546,7 @@ function findMatchingColormap(rgbPoints, actor) {
|
|
|
24412
24546
|
}
|
|
24413
24547
|
return {
|
|
24414
24548
|
name: matchedColormap.Name,
|
|
24549
|
+
opacity,
|
|
24415
24550
|
};
|
|
24416
24551
|
}
|
|
24417
24552
|
|
|
@@ -24716,6 +24851,73 @@ const getVolumeId = (targetId) => {
|
|
|
24716
24851
|
};
|
|
24717
24852
|
|
|
24718
24853
|
|
|
24854
|
+
/***/ }),
|
|
24855
|
+
|
|
24856
|
+
/***/ 76399:
|
|
24857
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24858
|
+
|
|
24859
|
+
"use strict";
|
|
24860
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24861
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
24862
|
+
/* harmony export */ });
|
|
24863
|
+
/* harmony import */ var _getSliceRange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51849);
|
|
24864
|
+
/* harmony import */ var _getTargetVolumeAndSpacingInNormalDir__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94172);
|
|
24865
|
+
|
|
24866
|
+
|
|
24867
|
+
function getVolumeSliceRangeInfo(viewport, volumeId, useSlabThickness = false) {
|
|
24868
|
+
const camera = viewport.getCamera();
|
|
24869
|
+
const { focalPoint, viewPlaneNormal } = camera;
|
|
24870
|
+
const { spacingInNormalDirection, actorUID } = (0,_getTargetVolumeAndSpacingInNormalDir__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(viewport, camera, volumeId, useSlabThickness);
|
|
24871
|
+
if (!actorUID) {
|
|
24872
|
+
throw new Error(`Could not find image volume with id ${volumeId} in the viewport`);
|
|
24873
|
+
}
|
|
24874
|
+
const actorEntry = viewport.getActor(actorUID);
|
|
24875
|
+
if (!actorEntry) {
|
|
24876
|
+
console.warn('No actor found for with actorUID of', actorUID);
|
|
24877
|
+
return null;
|
|
24878
|
+
}
|
|
24879
|
+
const volumeActor = actorEntry.actor;
|
|
24880
|
+
const sliceRange = (0,_getSliceRange__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(volumeActor, viewPlaneNormal, focalPoint);
|
|
24881
|
+
return {
|
|
24882
|
+
sliceRange,
|
|
24883
|
+
spacingInNormalDirection,
|
|
24884
|
+
camera,
|
|
24885
|
+
};
|
|
24886
|
+
}
|
|
24887
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getVolumeSliceRangeInfo);
|
|
24888
|
+
|
|
24889
|
+
|
|
24890
|
+
/***/ }),
|
|
24891
|
+
|
|
24892
|
+
/***/ 62255:
|
|
24893
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24894
|
+
|
|
24895
|
+
"use strict";
|
|
24896
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24897
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
24898
|
+
/* harmony export */ });
|
|
24899
|
+
/* harmony import */ var _getVolumeSliceRangeInfo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76399);
|
|
24900
|
+
|
|
24901
|
+
function getVolumeViewportScrollInfo(viewport, volumeId, useSlabThickness = false) {
|
|
24902
|
+
const { sliceRange, spacingInNormalDirection, camera } = (0,_getVolumeSliceRangeInfo__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(viewport, volumeId, useSlabThickness);
|
|
24903
|
+
const { min, max, current } = sliceRange;
|
|
24904
|
+
const numScrollSteps = Math.round((max - min) / spacingInNormalDirection);
|
|
24905
|
+
const fraction = (current - min) / (max - min);
|
|
24906
|
+
const floatingStepNumber = fraction * numScrollSteps;
|
|
24907
|
+
const currentStepIndex = Math.round(floatingStepNumber);
|
|
24908
|
+
return {
|
|
24909
|
+
numScrollSteps,
|
|
24910
|
+
currentStepIndex,
|
|
24911
|
+
sliceRangeInfo: {
|
|
24912
|
+
sliceRange,
|
|
24913
|
+
spacingInNormalDirection,
|
|
24914
|
+
camera,
|
|
24915
|
+
},
|
|
24916
|
+
};
|
|
24917
|
+
}
|
|
24918
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getVolumeViewportScrollInfo);
|
|
24919
|
+
|
|
24920
|
+
|
|
24719
24921
|
/***/ }),
|
|
24720
24922
|
|
|
24721
24923
|
/***/ 73139:
|
|
@@ -24735,7 +24937,7 @@ function hasNaNValues(input) {
|
|
|
24735
24937
|
|
|
24736
24938
|
/***/ }),
|
|
24737
24939
|
|
|
24738
|
-
/***/
|
|
24940
|
+
/***/ 20228:
|
|
24739
24941
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24740
24942
|
|
|
24741
24943
|
"use strict";
|
|
@@ -24746,6 +24948,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24746
24948
|
__webpack_require__.d(__webpack_exports__, {
|
|
24747
24949
|
PointsManager: () => (/* reexport */ PointsManager),
|
|
24748
24950
|
ProgressiveIterator: () => (/* reexport */ ProgressiveIterator),
|
|
24951
|
+
RLEVoxelMap: () => (/* reexport */ RLEVoxelMap),
|
|
24749
24952
|
VoxelManager: () => (/* reexport */ VoxelManager),
|
|
24750
24953
|
actorIsA: () => (/* reexport */ actorCheck/* actorIsA */.N),
|
|
24751
24954
|
applyPreset: () => (/* reexport */ applyPreset),
|
|
@@ -24791,8 +24994,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24791
24994
|
getVoiFromSigmoidRGBTransferFunction: () => (/* reexport */ getVoiFromSigmoidRGBTransferFunction),
|
|
24792
24995
|
getVolumeActorCorners: () => (/* reexport */ getVolumeActorCorners/* default */.A),
|
|
24793
24996
|
getVolumeId: () => (/* reexport */ getVolumeId/* getVolumeId */.A),
|
|
24794
|
-
getVolumeSliceRangeInfo: () => (/* reexport */
|
|
24795
|
-
getVolumeViewportScrollInfo: () => (/* reexport */
|
|
24997
|
+
getVolumeSliceRangeInfo: () => (/* reexport */ getVolumeSliceRangeInfo/* default */.A),
|
|
24998
|
+
getVolumeViewportScrollInfo: () => (/* reexport */ getVolumeViewportScrollInfo/* default */.A),
|
|
24796
24999
|
getVolumeViewportsContainingSameVolumes: () => (/* reexport */ utilities_getVolumeViewportsContainingSameVolumes),
|
|
24797
25000
|
hasFloatScalingParameters: () => (/* reexport */ hasFloatScalingParameters),
|
|
24798
25001
|
hasNaNValues: () => (/* reexport */ hasNaNValues/* default */.A),
|
|
@@ -24801,7 +25004,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24801
25004
|
imageToWorldCoords: () => (/* reexport */ imageToWorldCoords),
|
|
24802
25005
|
indexWithinDimensions: () => (/* reexport */ indexWithinDimensions),
|
|
24803
25006
|
invertRgbTransferFunction: () => (/* reexport */ invertRgbTransferFunction),
|
|
24804
|
-
isEqual: () => (/* reexport */ isEqual/*
|
|
25007
|
+
isEqual: () => (/* reexport */ isEqual/* isEqual */.n4),
|
|
25008
|
+
isEqualAbs: () => (/* reexport */ isEqual/* isEqualAbs */.Ph),
|
|
25009
|
+
isEqualNegative: () => (/* reexport */ isEqual/* isEqualNegative */.WC),
|
|
24805
25010
|
isImageActor: () => (/* reexport */ actorCheck/* isImageActor */.e),
|
|
24806
25011
|
isOpposite: () => (/* reexport */ isOpposite),
|
|
24807
25012
|
isPTPrescaledWithSUV: () => (/* reexport */ utilities_isPTPrescaledWithSUV),
|
|
@@ -25232,6 +25437,9 @@ function createUint8SharedArray(length) {
|
|
|
25232
25437
|
|
|
25233
25438
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/createFloat32SharedArray.js
|
|
25234
25439
|
|
|
25440
|
+
const SMALL_MEMORY_LIMIT = 2 * 1024 * 1024 * 1024 - 2;
|
|
25441
|
+
const BIG_MEMORY_LIMIT = SMALL_MEMORY_LIMIT * 2;
|
|
25442
|
+
const PAGE_SIZE = 65536;
|
|
25235
25443
|
function createFloat32SharedArray(length) {
|
|
25236
25444
|
if (!(0,init/* getShouldUseSharedArrayBuffer */.TB)()) {
|
|
25237
25445
|
throw new Error('Your page is NOT cross-origin isolated, see https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated');
|
|
@@ -25239,8 +25447,20 @@ function createFloat32SharedArray(length) {
|
|
|
25239
25447
|
if (window.SharedArrayBuffer === undefined) {
|
|
25240
25448
|
throw new Error('SharedArrayBuffer is NOT supported in your browser see https://developer.chrome.com/blog/enabling-shared-array-buffer/');
|
|
25241
25449
|
}
|
|
25242
|
-
const
|
|
25243
|
-
|
|
25450
|
+
const byteLength = length * 4;
|
|
25451
|
+
if (byteLength < SMALL_MEMORY_LIMIT) {
|
|
25452
|
+
const sharedArrayBuffer = new SharedArrayBuffer(byteLength);
|
|
25453
|
+
return new Float32Array(sharedArrayBuffer);
|
|
25454
|
+
}
|
|
25455
|
+
else if (byteLength < BIG_MEMORY_LIMIT) {
|
|
25456
|
+
const pages = Math.ceil(byteLength / PAGE_SIZE);
|
|
25457
|
+
const memory = new WebAssembly.Memory({
|
|
25458
|
+
initial: pages,
|
|
25459
|
+
maximum: pages,
|
|
25460
|
+
shared: true,
|
|
25461
|
+
});
|
|
25462
|
+
return new Float32Array(memory.buffer, 0, length);
|
|
25463
|
+
}
|
|
25244
25464
|
}
|
|
25245
25465
|
/* harmony default export */ const utilities_createFloat32SharedArray = (createFloat32SharedArray);
|
|
25246
25466
|
|
|
@@ -25428,23 +25648,28 @@ const isPTPrescaledWithSUV = (image) => {
|
|
|
25428
25648
|
|
|
25429
25649
|
|
|
25430
25650
|
|
|
25431
|
-
function renderToCanvasGPU(canvas,
|
|
25651
|
+
function renderToCanvasGPU(canvas, imageOrVolume, modality = undefined, renderingEngineId = '_thumbnails', viewportOptions = {
|
|
25652
|
+
displayArea: { imageArea: [1, 1] },
|
|
25653
|
+
}) {
|
|
25432
25654
|
if (!canvas || !(canvas instanceof HTMLCanvasElement)) {
|
|
25433
25655
|
throw new Error('canvas element is required');
|
|
25434
25656
|
}
|
|
25435
|
-
const
|
|
25657
|
+
const isVolume = !imageOrVolume.imageId;
|
|
25658
|
+
const image = !isVolume && imageOrVolume;
|
|
25659
|
+
const volume = isVolume && imageOrVolume;
|
|
25660
|
+
const imageIdToPrint = image?.imageId || volume?.volumeId;
|
|
25436
25661
|
const viewportId = `renderGPUViewport-${imageIdToPrint}`;
|
|
25437
|
-
const imageId = image.imageId;
|
|
25438
25662
|
const element = document.createElement('div');
|
|
25439
25663
|
const devicePixelRatio = window.devicePixelRatio || 1;
|
|
25664
|
+
if (!viewportOptions.displayArea) {
|
|
25665
|
+
viewportOptions.displayArea = { imageArea: [1, 1] };
|
|
25666
|
+
}
|
|
25440
25667
|
const originalWidth = canvas.width;
|
|
25441
25668
|
const originalHeight = canvas.height;
|
|
25442
|
-
element.style.width = `${originalWidth + getOrCreateCanvas/* EPSILON */.p8}px`;
|
|
25443
|
-
element.style.height = `${originalHeight + getOrCreateCanvas/* EPSILON */.p8}px`;
|
|
25669
|
+
element.style.width = `${originalWidth / devicePixelRatio + getOrCreateCanvas/* EPSILON */.p8}px`;
|
|
25670
|
+
element.style.height = `${originalHeight / devicePixelRatio + getOrCreateCanvas/* EPSILON */.p8}px`;
|
|
25444
25671
|
element.style.visibility = 'hidden';
|
|
25445
25672
|
element.style.position = 'absolute';
|
|
25446
|
-
canvas.width = originalWidth * devicePixelRatio;
|
|
25447
|
-
canvas.height = originalHeight * devicePixelRatio;
|
|
25448
25673
|
document.body.appendChild(element);
|
|
25449
25674
|
const uniqueId = viewportId.split(':').join('-');
|
|
25450
25675
|
element.setAttribute('viewport-id-for-remove', uniqueId);
|
|
@@ -25453,26 +25678,44 @@ function renderToCanvasGPU(canvas, image, modality = undefined, renderingEngineI
|
|
|
25453
25678
|
new RenderingEngine/* default */.Ay(renderingEngineId);
|
|
25454
25679
|
let viewport = renderingEngine.getViewport(viewportId);
|
|
25455
25680
|
if (!viewport) {
|
|
25456
|
-
const
|
|
25681
|
+
const viewportInput = {
|
|
25457
25682
|
viewportId,
|
|
25458
|
-
type: enums.ViewportType.STACK,
|
|
25683
|
+
type: isVolume ? enums.ViewportType.ORTHOGRAPHIC : enums.ViewportType.STACK,
|
|
25459
25684
|
element,
|
|
25460
25685
|
defaultOptions: {
|
|
25461
25686
|
...viewportOptions,
|
|
25462
25687
|
suppressEvents: true,
|
|
25463
25688
|
},
|
|
25464
25689
|
};
|
|
25465
|
-
renderingEngine.enableElement(
|
|
25690
|
+
renderingEngine.enableElement(viewportInput);
|
|
25466
25691
|
viewport = renderingEngine.getViewport(viewportId);
|
|
25467
25692
|
}
|
|
25468
25693
|
return new Promise((resolve) => {
|
|
25469
25694
|
let elementRendered = false;
|
|
25695
|
+
let { viewReference } = viewportOptions;
|
|
25470
25696
|
const onImageRendered = (eventDetail) => {
|
|
25471
25697
|
if (elementRendered) {
|
|
25472
25698
|
return;
|
|
25473
25699
|
}
|
|
25700
|
+
if (viewReference) {
|
|
25701
|
+
const useViewRef = viewReference;
|
|
25702
|
+
viewReference = null;
|
|
25703
|
+
viewport.setViewReference(useViewRef);
|
|
25704
|
+
viewport.render();
|
|
25705
|
+
return;
|
|
25706
|
+
}
|
|
25474
25707
|
const context = canvas.getContext('2d');
|
|
25475
25708
|
context.drawImage(temporaryCanvas, 0, 0, temporaryCanvas.width, temporaryCanvas.height, 0, 0, canvas.width, canvas.height);
|
|
25709
|
+
const origin = viewport.canvasToWorld([0, 0]);
|
|
25710
|
+
const topRight = viewport.canvasToWorld([
|
|
25711
|
+
temporaryCanvas.width / devicePixelRatio,
|
|
25712
|
+
0,
|
|
25713
|
+
]);
|
|
25714
|
+
const bottomLeft = viewport.canvasToWorld([
|
|
25715
|
+
0,
|
|
25716
|
+
temporaryCanvas.height / devicePixelRatio,
|
|
25717
|
+
]);
|
|
25718
|
+
const thicknessMm = 1;
|
|
25476
25719
|
elementRendered = true;
|
|
25477
25720
|
element.removeEventListener(enums.Events.IMAGE_RENDERED, onImageRendered);
|
|
25478
25721
|
setTimeout(() => {
|
|
@@ -25482,10 +25725,20 @@ function renderToCanvasGPU(canvas, image, modality = undefined, renderingEngineI
|
|
|
25482
25725
|
element.remove();
|
|
25483
25726
|
});
|
|
25484
25727
|
}, 0);
|
|
25485
|
-
resolve(
|
|
25728
|
+
resolve({
|
|
25729
|
+
origin,
|
|
25730
|
+
bottomLeft,
|
|
25731
|
+
topRight,
|
|
25732
|
+
thicknessMm,
|
|
25733
|
+
});
|
|
25486
25734
|
};
|
|
25487
25735
|
element.addEventListener(enums.Events.IMAGE_RENDERED, onImageRendered);
|
|
25488
|
-
|
|
25736
|
+
if (isVolume) {
|
|
25737
|
+
viewport.setVolumes([volume], false, true);
|
|
25738
|
+
}
|
|
25739
|
+
else {
|
|
25740
|
+
viewport.renderImageObject(imageOrVolume);
|
|
25741
|
+
}
|
|
25489
25742
|
viewport.resetCamera();
|
|
25490
25743
|
if (modality === 'PT' && !utilities_isPTPrescaledWithSUV(image)) {
|
|
25491
25744
|
viewport.setProperties({
|
|
@@ -25509,7 +25762,12 @@ var drawImageSync = __webpack_require__(49892);
|
|
|
25509
25762
|
|
|
25510
25763
|
|
|
25511
25764
|
|
|
25512
|
-
function renderToCanvasCPU(canvas,
|
|
25765
|
+
function renderToCanvasCPU(canvas, imageOrVolume, modality, _renderingEngineId, _viewportOptions) {
|
|
25766
|
+
const volume = imageOrVolume;
|
|
25767
|
+
if (volume.volumeId) {
|
|
25768
|
+
throw new Error('Unsupported volume rendering for CPU');
|
|
25769
|
+
}
|
|
25770
|
+
const image = imageOrVolume;
|
|
25513
25771
|
const viewport = (0,getDefaultViewport/* default */.A)(canvas, image, modality);
|
|
25514
25772
|
const enabledElement = {
|
|
25515
25773
|
canvas,
|
|
@@ -25521,7 +25779,7 @@ function renderToCanvasCPU(canvas, image, modality, _renderingEngineId, _viewpor
|
|
|
25521
25779
|
const invalidated = true;
|
|
25522
25780
|
return new Promise((resolve, reject) => {
|
|
25523
25781
|
(0,drawImageSync/* default */.A)(enabledElement, invalidated);
|
|
25524
|
-
resolve(
|
|
25782
|
+
resolve(null);
|
|
25525
25783
|
});
|
|
25526
25784
|
}
|
|
25527
25785
|
|
|
@@ -25533,28 +25791,36 @@ function renderToCanvasCPU(canvas, image, modality, _renderingEngineId, _viewpor
|
|
|
25533
25791
|
|
|
25534
25792
|
|
|
25535
25793
|
|
|
25794
|
+
|
|
25536
25795
|
function loadImageToCanvas(options) {
|
|
25537
|
-
const { canvas, imageId, requestType = enums.RequestType.Thumbnail, priority = -5, renderingEngineId = '_thumbnails', useCPURendering = false, thumbnail = false, imageAspect = false,
|
|
25538
|
-
const
|
|
25796
|
+
const { canvas, imageId, viewReference, requestType = enums.RequestType.Thumbnail, priority = -5, renderingEngineId = '_thumbnails', useCPURendering = false, thumbnail = false, imageAspect = false, viewportOptions: baseViewportOptions, } = options;
|
|
25797
|
+
const volumeId = viewReference?.volumeId;
|
|
25798
|
+
const isVolume = volumeId && !imageId;
|
|
25799
|
+
const viewportOptions = viewReference && baseViewportOptions
|
|
25800
|
+
? { ...baseViewportOptions, viewReference }
|
|
25801
|
+
: baseViewportOptions;
|
|
25539
25802
|
const renderFn = useCPURendering ? renderToCanvasCPU : renderToCanvasGPU;
|
|
25540
25803
|
return new Promise((resolve, reject) => {
|
|
25541
|
-
function successCallback(
|
|
25804
|
+
function successCallback(imageOrVolume, imageId) {
|
|
25542
25805
|
const { modality } = metaData.get('generalSeriesModule', imageId) || {};
|
|
25543
|
-
image
|
|
25806
|
+
const image = !isVolume && imageOrVolume;
|
|
25807
|
+
const volume = isVolume && imageOrVolume;
|
|
25808
|
+
if (image) {
|
|
25809
|
+
image.isPreScaled = image.isPreScaled || image.preScale?.scaled;
|
|
25810
|
+
}
|
|
25544
25811
|
if (thumbnail) {
|
|
25545
25812
|
canvas.height = 256;
|
|
25546
25813
|
canvas.width = 256;
|
|
25547
25814
|
}
|
|
25548
|
-
if (
|
|
25549
|
-
canvas.width = canvas.
|
|
25550
|
-
canvas.height = canvas.offsetHeight * devicePixelRatio;
|
|
25815
|
+
if (imageAspect && image) {
|
|
25816
|
+
canvas.width = image && (canvas.height * image.width) / image.height;
|
|
25551
25817
|
}
|
|
25552
|
-
|
|
25553
|
-
|
|
25818
|
+
canvas.style.width = `${canvas.width / devicePixelRatio}px`;
|
|
25819
|
+
canvas.style.height = `${canvas.height / devicePixelRatio}px`;
|
|
25820
|
+
if (volume && useCPURendering) {
|
|
25821
|
+
reject(new Error('CPU rendering of volume not supported'));
|
|
25554
25822
|
}
|
|
25555
|
-
renderFn(canvas,
|
|
25556
|
-
resolve(imageId);
|
|
25557
|
-
});
|
|
25823
|
+
renderFn(canvas, imageOrVolume, modality, renderingEngineId, viewportOptions).then(resolve);
|
|
25558
25824
|
}
|
|
25559
25825
|
function errorCallback(error, imageId) {
|
|
25560
25826
|
console.error(error, imageId);
|
|
@@ -25567,20 +25833,28 @@ function loadImageToCanvas(options) {
|
|
|
25567
25833
|
errorCallback.call(this, error, imageId);
|
|
25568
25834
|
});
|
|
25569
25835
|
}
|
|
25570
|
-
const { useNorm16Texture
|
|
25571
|
-
const useNativeDataType = useNorm16Texture || preferSizeOverAccuracy;
|
|
25836
|
+
const { useNorm16Texture } = (0,init/* getConfiguration */.D0)().rendering;
|
|
25572
25837
|
const options = {
|
|
25573
25838
|
targetBuffer: {
|
|
25574
|
-
type:
|
|
25839
|
+
type: useNorm16Texture ? undefined : 'Float32Array',
|
|
25575
25840
|
},
|
|
25576
25841
|
preScale: {
|
|
25577
25842
|
enabled: true,
|
|
25578
25843
|
},
|
|
25579
|
-
useNativeDataType,
|
|
25580
25844
|
useRGBA: !!useCPURendering,
|
|
25581
25845
|
requestType,
|
|
25582
25846
|
};
|
|
25583
|
-
|
|
25847
|
+
if (volumeId) {
|
|
25848
|
+
const volume = cache/* default */.Ay.getVolume(volumeId);
|
|
25849
|
+
if (!volume) {
|
|
25850
|
+
reject(new Error(`Volume id ${volumeId} not found in cache`));
|
|
25851
|
+
}
|
|
25852
|
+
const useImageId = volume.imageIds[0];
|
|
25853
|
+
successCallback(volume, useImageId);
|
|
25854
|
+
}
|
|
25855
|
+
else {
|
|
25856
|
+
imageLoadPoolManager/* default */.A.addRequest(sendRequest.bind(null, imageId, null, options), requestType, { imageId }, priority);
|
|
25857
|
+
}
|
|
25584
25858
|
});
|
|
25585
25859
|
}
|
|
25586
25860
|
|
|
@@ -25631,54 +25905,12 @@ function imageToWorldCoords(imageId, imageCoords) {
|
|
|
25631
25905
|
return Array.from(imageCoordsInWorld);
|
|
25632
25906
|
}
|
|
25633
25907
|
|
|
25908
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeSliceRangeInfo.js
|
|
25909
|
+
var getVolumeSliceRangeInfo = __webpack_require__(76399);
|
|
25910
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeViewportScrollInfo.js
|
|
25911
|
+
var getVolumeViewportScrollInfo = __webpack_require__(62255);
|
|
25634
25912
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getSliceRange.js
|
|
25635
25913
|
var getSliceRange = __webpack_require__(51849);
|
|
25636
|
-
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeSliceRangeInfo.js
|
|
25637
|
-
|
|
25638
|
-
|
|
25639
|
-
function getVolumeSliceRangeInfo(viewport, volumeId, useSlabThickness = false) {
|
|
25640
|
-
const camera = viewport.getCamera();
|
|
25641
|
-
const { focalPoint, viewPlaneNormal } = camera;
|
|
25642
|
-
const { spacingInNormalDirection, actorUID } = (0,getTargetVolumeAndSpacingInNormalDir/* default */.A)(viewport, camera, volumeId, useSlabThickness);
|
|
25643
|
-
if (!actorUID) {
|
|
25644
|
-
throw new Error(`Could not find image volume with id ${volumeId} in the viewport`);
|
|
25645
|
-
}
|
|
25646
|
-
const actorEntry = viewport.getActor(actorUID);
|
|
25647
|
-
if (!actorEntry) {
|
|
25648
|
-
console.warn('No actor found for with actorUID of', actorUID);
|
|
25649
|
-
return null;
|
|
25650
|
-
}
|
|
25651
|
-
const volumeActor = actorEntry.actor;
|
|
25652
|
-
const sliceRange = (0,getSliceRange/* default */.A)(volumeActor, viewPlaneNormal, focalPoint);
|
|
25653
|
-
return {
|
|
25654
|
-
sliceRange,
|
|
25655
|
-
spacingInNormalDirection,
|
|
25656
|
-
camera,
|
|
25657
|
-
};
|
|
25658
|
-
}
|
|
25659
|
-
/* harmony default export */ const utilities_getVolumeSliceRangeInfo = (getVolumeSliceRangeInfo);
|
|
25660
|
-
|
|
25661
|
-
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/getVolumeViewportScrollInfo.js
|
|
25662
|
-
|
|
25663
|
-
function getVolumeViewportScrollInfo(viewport, volumeId, useSlabThickness = false) {
|
|
25664
|
-
const { sliceRange, spacingInNormalDirection, camera } = utilities_getVolumeSliceRangeInfo(viewport, volumeId, useSlabThickness);
|
|
25665
|
-
const { min, max, current } = sliceRange;
|
|
25666
|
-
const numScrollSteps = Math.round((max - min) / spacingInNormalDirection);
|
|
25667
|
-
const fraction = (current - min) / (max - min);
|
|
25668
|
-
const floatingStepNumber = fraction * numScrollSteps;
|
|
25669
|
-
const currentStepIndex = Math.round(floatingStepNumber);
|
|
25670
|
-
return {
|
|
25671
|
-
numScrollSteps,
|
|
25672
|
-
currentStepIndex,
|
|
25673
|
-
sliceRangeInfo: {
|
|
25674
|
-
sliceRange,
|
|
25675
|
-
spacingInNormalDirection,
|
|
25676
|
-
camera,
|
|
25677
|
-
},
|
|
25678
|
-
};
|
|
25679
|
-
}
|
|
25680
|
-
/* harmony default export */ const utilities_getVolumeViewportScrollInfo = (getVolumeViewportScrollInfo);
|
|
25681
|
-
|
|
25682
25914
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/snapFocalPointToSlice.js
|
|
25683
25915
|
|
|
25684
25916
|
function snapFocalPointToSlice(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, deltaFrames) {
|
|
@@ -26348,8 +26580,8 @@ function getScalingParameters(imageId) {
|
|
|
26348
26580
|
const generalSeriesModule = (0,metaData.get)('generalSeriesModule', imageId) || {};
|
|
26349
26581
|
const { modality } = generalSeriesModule;
|
|
26350
26582
|
const scalingParameters = {
|
|
26351
|
-
rescaleSlope: modalityLutModule.rescaleSlope,
|
|
26352
|
-
rescaleIntercept: modalityLutModule.rescaleIntercept,
|
|
26583
|
+
rescaleSlope: modalityLutModule.rescaleSlope || 1,
|
|
26584
|
+
rescaleIntercept: modalityLutModule.rescaleIntercept ?? 0,
|
|
26353
26585
|
modality,
|
|
26354
26586
|
};
|
|
26355
26587
|
const suvFactor = (0,metaData.get)('scalingModule', imageId) || {};
|
|
@@ -26462,11 +26694,15 @@ function sortImageIdsAndGetSpacing(imageIds, scanAxisNormal) {
|
|
|
26462
26694
|
Math.abs(distanceBetweenFirstAndMiddleImages) /
|
|
26463
26695
|
Math.floor(imageIds.length / 2);
|
|
26464
26696
|
}
|
|
26465
|
-
const { imagePositionPatient: origin, sliceThickness } = dist_esm.metaData.get('imagePlaneModule', sortedImageIds[0]);
|
|
26697
|
+
const { imagePositionPatient: origin, sliceThickness, spacingBetweenSlices, } = dist_esm.metaData.get('imagePlaneModule', sortedImageIds[0]);
|
|
26466
26698
|
const { strictZSpacingForVolumeViewport } = (0,dist_esm.getConfiguration)().rendering;
|
|
26467
26699
|
if (zSpacing === 0 && !strictZSpacingForVolumeViewport) {
|
|
26468
|
-
if (sliceThickness) {
|
|
26469
|
-
console.log('Could not calculate zSpacing. Using
|
|
26700
|
+
if (sliceThickness && spacingBetweenSlices) {
|
|
26701
|
+
console.log('Could not calculate zSpacing. Using spacingBetweenSlices');
|
|
26702
|
+
zSpacing = spacingBetweenSlices;
|
|
26703
|
+
}
|
|
26704
|
+
else if (sliceThickness) {
|
|
26705
|
+
console.log('Could not calculate zSpacing and no spacingBetweenSlices. Using sliceThickness');
|
|
26470
26706
|
zSpacing = sliceThickness;
|
|
26471
26707
|
}
|
|
26472
26708
|
else {
|
|
@@ -26579,8 +26815,8 @@ function isValidVolume(imageIds) {
|
|
|
26579
26815
|
modality === baseMetadata.modality &&
|
|
26580
26816
|
columns === baseMetadata.columns &&
|
|
26581
26817
|
rows === baseMetadata.rows &&
|
|
26582
|
-
(0,isEqual/* default */.
|
|
26583
|
-
(0,isEqual/* default */.
|
|
26818
|
+
(0,isEqual/* default */.Ay)(imageOrientationPatient, baseMetadata.imageOrientationPatient) &&
|
|
26819
|
+
(0,isEqual/* default */.Ay)(pixelSpacing, baseMetadata.pixelSpacing));
|
|
26584
26820
|
});
|
|
26585
26821
|
return validVolume;
|
|
26586
26822
|
}
|
|
@@ -27024,9 +27260,11 @@ async function convertStackToVolumeViewport({ viewport, options, }) {
|
|
|
27024
27260
|
},
|
|
27025
27261
|
], [viewportId]);
|
|
27026
27262
|
const volumeViewportNewVolumeHandler = () => {
|
|
27027
|
-
|
|
27028
|
-
|
|
27029
|
-
|
|
27263
|
+
if (!options.orientation) {
|
|
27264
|
+
volumeViewport.setCamera({
|
|
27265
|
+
...prevCamera,
|
|
27266
|
+
});
|
|
27267
|
+
}
|
|
27030
27268
|
volumeViewport.render();
|
|
27031
27269
|
element.removeEventListener(enums.Events.VOLUME_VIEWPORT_NEW_VOLUME, volumeViewportNewVolumeHandler);
|
|
27032
27270
|
};
|
|
@@ -27413,7 +27651,7 @@ class VoxelManager {
|
|
|
27413
27651
|
return [scalarData[index++], scalarData[index++], scalarData[index++]];
|
|
27414
27652
|
}, (index, v) => {
|
|
27415
27653
|
index *= 3;
|
|
27416
|
-
const isChanged = !(0,isEqual/* default */.
|
|
27654
|
+
const isChanged = !(0,isEqual/* default */.Ay)(scalarData[index], v);
|
|
27417
27655
|
scalarData[index++] = v[0];
|
|
27418
27656
|
scalarData[index++] = v[1];
|
|
27419
27657
|
scalarData[index++] = v[2];
|
|
@@ -27767,6 +28005,7 @@ function hexToRgb(hex) {
|
|
|
27767
28005
|
|
|
27768
28006
|
|
|
27769
28007
|
|
|
28008
|
+
|
|
27770
28009
|
|
|
27771
28010
|
|
|
27772
28011
|
/***/ }),
|
|
@@ -27776,7 +28015,10 @@ function hexToRgb(hex) {
|
|
|
27776
28015
|
|
|
27777
28016
|
"use strict";
|
|
27778
28017
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27779
|
-
/* harmony export */
|
|
28018
|
+
/* harmony export */ Ay: () => (/* binding */ isEqual),
|
|
28019
|
+
/* harmony export */ Ph: () => (/* binding */ isEqualAbs),
|
|
28020
|
+
/* harmony export */ WC: () => (/* binding */ isEqualNegative),
|
|
28021
|
+
/* harmony export */ n4: () => (/* binding */ isEqual)
|
|
27780
28022
|
/* harmony export */ });
|
|
27781
28023
|
function areNumbersEqualWithTolerance(num1, num2, tolerance) {
|
|
27782
28024
|
return Math.abs(num1 - num2) <= tolerance;
|
|
@@ -27810,6 +28052,11 @@ function isEqual(v1, v2, tolerance = 1e-5) {
|
|
|
27810
28052
|
}
|
|
27811
28053
|
return false;
|
|
27812
28054
|
}
|
|
28055
|
+
const negative = (v) => typeof v === 'number' ? -v : v?.map ? v.map(negative) : !v;
|
|
28056
|
+
const abs = (v) => typeof v === 'number' ? Math.abs(v) : v?.map ? v.map(abs) : v;
|
|
28057
|
+
const isEqualNegative = (v1, v2, tolerance = undefined) => isEqual(v1, negative(v2), tolerance);
|
|
28058
|
+
const isEqualAbs = (v1, v2, tolerance = undefined) => isEqual(abs(v1), abs(v2), tolerance);
|
|
28059
|
+
|
|
27813
28060
|
|
|
27814
28061
|
|
|
27815
28062
|
/***/ }),
|
|
@@ -28830,7 +29077,7 @@ const CursorNames = [...svgCursorNames, ...standardCursorNames];
|
|
|
28830
29077
|
|
|
28831
29078
|
/***/ }),
|
|
28832
29079
|
|
|
28833
|
-
/***/
|
|
29080
|
+
/***/ 49574:
|
|
28834
29081
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
28835
29082
|
|
|
28836
29083
|
"use strict";
|
|
@@ -28848,6 +29095,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28848
29095
|
drawPath: () => (/* reexport */ drawPath),
|
|
28849
29096
|
drawPolyline: () => (/* reexport */ drawPolyline),
|
|
28850
29097
|
drawRect: () => (/* reexport */ drawRect),
|
|
29098
|
+
drawRectByCoordinates: () => (/* reexport */ drawRectByCoordinates),
|
|
28851
29099
|
drawRedactionRect: () => (/* reexport */ drawRedactionRect),
|
|
28852
29100
|
drawTextBox: () => (/* reexport */ drawingSvg_drawTextBox)
|
|
28853
29101
|
});
|
|
@@ -29367,11 +29615,11 @@ function drawLinkedTextBox(svgDrawingHelper, annotationUID, textBoxUID, textLine
|
|
|
29367
29615
|
}
|
|
29368
29616
|
/* harmony default export */ const drawingSvg_drawLinkedTextBox = (drawLinkedTextBox);
|
|
29369
29617
|
|
|
29370
|
-
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/
|
|
29618
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawRectByCoordinates.js
|
|
29371
29619
|
|
|
29372
29620
|
|
|
29373
29621
|
|
|
29374
|
-
function
|
|
29622
|
+
function drawRectByCoordinates(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates, options = {}, dataId = '') {
|
|
29375
29623
|
const { color, width: _width, lineWidth, lineDash, } = Object.assign({
|
|
29376
29624
|
color: 'rgb(0, 255, 0)',
|
|
29377
29625
|
width: '2',
|
|
@@ -29382,16 +29630,28 @@ function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, opt
|
|
|
29382
29630
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
29383
29631
|
const svgNodeHash = drawingSvg_getHash(annotationUID, 'rect', rectangleUID);
|
|
29384
29632
|
const existingRect = svgDrawingHelper.getSvgNode(svgNodeHash);
|
|
29385
|
-
const
|
|
29386
|
-
const width = Math.
|
|
29387
|
-
const height = Math.
|
|
29633
|
+
const [topLeft, topRight, bottomLeft, bottomRight] = canvasCoordinates;
|
|
29634
|
+
const width = Math.hypot(topLeft[0] - topRight[0], topLeft[1] - topRight[1]);
|
|
29635
|
+
const height = Math.hypot(topLeft[0] - bottomLeft[0], topLeft[1] - bottomLeft[1]);
|
|
29636
|
+
const center = [
|
|
29637
|
+
(bottomRight[0] + topLeft[0]) / 2,
|
|
29638
|
+
(bottomRight[1] + topLeft[1]) / 2,
|
|
29639
|
+
];
|
|
29640
|
+
const leftEdgeCenter = [
|
|
29641
|
+
(bottomLeft[0] + topLeft[0]) / 2,
|
|
29642
|
+
(bottomLeft[1] + topLeft[1]) / 2,
|
|
29643
|
+
];
|
|
29644
|
+
const angle = (Math.atan2(center[1] - leftEdgeCenter[1], center[0] - leftEdgeCenter[0]) *
|
|
29645
|
+
180) /
|
|
29646
|
+
Math.PI;
|
|
29388
29647
|
const attributes = {
|
|
29389
|
-
x: `${
|
|
29390
|
-
y: `${
|
|
29648
|
+
x: `${center[0] - width / 2}`,
|
|
29649
|
+
y: `${center[1] - height / 2}`,
|
|
29391
29650
|
width: `${width}`,
|
|
29392
29651
|
height: `${height}`,
|
|
29393
29652
|
stroke: color,
|
|
29394
29653
|
fill: 'transparent',
|
|
29654
|
+
transform: `rotate(${angle} ${center[0]} ${center[1]})`,
|
|
29395
29655
|
'stroke-width': strokeWidth,
|
|
29396
29656
|
'stroke-dasharray': lineDash,
|
|
29397
29657
|
};
|
|
@@ -29409,6 +29669,16 @@ function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, opt
|
|
|
29409
29669
|
}
|
|
29410
29670
|
}
|
|
29411
29671
|
|
|
29672
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawRect.js
|
|
29673
|
+
|
|
29674
|
+
function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, options = {}, dataId = '') {
|
|
29675
|
+
const topLeft = [start[0], start[1]];
|
|
29676
|
+
const topRight = [end[0], start[1]];
|
|
29677
|
+
const bottomLeft = [start[0], end[1]];
|
|
29678
|
+
const bottomRight = [end[0], end[1]];
|
|
29679
|
+
drawRectByCoordinates(svgDrawingHelper, annotationUID, rectangleUID, [topLeft, topRight, bottomLeft, bottomRight], options, dataId);
|
|
29680
|
+
}
|
|
29681
|
+
|
|
29412
29682
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawArrow.js
|
|
29413
29683
|
|
|
29414
29684
|
function drawArrow(svgDrawingHelper, annotationUID, arrowUID, start, end, options = {}) {
|
|
@@ -29514,6 +29784,7 @@ function drawRedactionRect(svgDrawingHelper, annotationUID, rectangleUID, start,
|
|
|
29514
29784
|
|
|
29515
29785
|
|
|
29516
29786
|
|
|
29787
|
+
|
|
29517
29788
|
/***/ }),
|
|
29518
29789
|
|
|
29519
29790
|
/***/ 42111:
|
|
@@ -29749,12 +30020,12 @@ var WorkerTypes_ChangeTypes;
|
|
|
29749
30020
|
|
|
29750
30021
|
/***/ }),
|
|
29751
30022
|
|
|
29752
|
-
/***/
|
|
30023
|
+
/***/ 94101:
|
|
29753
30024
|
/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
|
29754
30025
|
|
|
29755
30026
|
"use strict";
|
|
29756
30027
|
|
|
29757
|
-
// UNUSED EXPORTS: annotationInterpolationEventDispatcher, cameraModifiedEventDispatcher, imageRenderedEventDispatcher, imageSpacingCalibratedEventDispatcher, keyboardToolEventDispatcher, mouseToolEventDispatcher, touchToolEventDispatcher
|
|
30028
|
+
// UNUSED EXPORTS: annotationInterpolationEventDispatcher, cameraModifiedEventDispatcher, cameraResetEventDispatcher, imageRenderedEventDispatcher, imageSpacingCalibratedEventDispatcher, keyboardToolEventDispatcher, mouseToolEventDispatcher, touchToolEventDispatcher
|
|
29758
30029
|
|
|
29759
30030
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
29760
30031
|
var esm = __webpack_require__(92136);
|
|
@@ -29936,6 +30207,34 @@ const annotationInterpolationEventDispatcher_disable = function () {
|
|
|
29936
30207
|
disable: annotationInterpolationEventDispatcher_disable,
|
|
29937
30208
|
});
|
|
29938
30209
|
|
|
30210
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/cameraResetEventDispatcher.js
|
|
30211
|
+
|
|
30212
|
+
|
|
30213
|
+
|
|
30214
|
+
const { Active: cameraResetEventDispatcher_Active, Passive: cameraResetEventDispatcher_Passive, Enabled: cameraResetEventDispatcher_Enabled } = enums.ToolModes;
|
|
30215
|
+
const onCameraReset = function (evt) {
|
|
30216
|
+
const enabledTools = (0,getToolsWithModesForMouseEvent/* default */.A)(evt, [
|
|
30217
|
+
cameraResetEventDispatcher_Active,
|
|
30218
|
+
cameraResetEventDispatcher_Passive,
|
|
30219
|
+
cameraResetEventDispatcher_Enabled,
|
|
30220
|
+
]);
|
|
30221
|
+
enabledTools.forEach((tool) => {
|
|
30222
|
+
if (tool.onResetCamera) {
|
|
30223
|
+
tool.onResetCamera(evt);
|
|
30224
|
+
}
|
|
30225
|
+
});
|
|
30226
|
+
};
|
|
30227
|
+
const cameraResetEventDispatcher_enable = function (element) {
|
|
30228
|
+
element.addEventListener(esm.Enums.Events.CAMERA_RESET, onCameraReset);
|
|
30229
|
+
};
|
|
30230
|
+
const cameraResetEventDispatcher_disable = function (element) {
|
|
30231
|
+
element.removeEventListener(esm.Enums.Events.CAMERA_RESET, onCameraReset);
|
|
30232
|
+
};
|
|
30233
|
+
/* harmony default export */ const cameraResetEventDispatcher = ({
|
|
30234
|
+
enable: cameraResetEventDispatcher_enable,
|
|
30235
|
+
disable: cameraResetEventDispatcher_disable,
|
|
30236
|
+
});
|
|
30237
|
+
|
|
29939
30238
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js
|
|
29940
30239
|
|
|
29941
30240
|
|
|
@@ -29947,6 +30246,7 @@ const annotationInterpolationEventDispatcher_disable = function () {
|
|
|
29947
30246
|
|
|
29948
30247
|
|
|
29949
30248
|
|
|
30249
|
+
|
|
29950
30250
|
/***/ }),
|
|
29951
30251
|
|
|
29952
30252
|
/***/ 90202:
|
|
@@ -30558,7 +30858,7 @@ function _imageChangeEventListener(evt) {
|
|
|
30558
30858
|
imageActor.getMapper().setInputData(imageData);
|
|
30559
30859
|
},
|
|
30560
30860
|
},
|
|
30561
|
-
]
|
|
30861
|
+
]);
|
|
30562
30862
|
(0,segmentation_triggerSegmentationRender/* default */.Ay)(toolGroup.id);
|
|
30563
30863
|
return;
|
|
30564
30864
|
}
|
|
@@ -30684,7 +30984,7 @@ function annotationRemovedListener(evt) {
|
|
|
30684
30984
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
|
|
30685
30985
|
/* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(55588);
|
|
30686
30986
|
/* harmony import */ var _eventListeners__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(60878);
|
|
30687
|
-
/* harmony import */ var _eventDispatchers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
30987
|
+
/* harmony import */ var _eventDispatchers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(94101);
|
|
30688
30988
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(52610);
|
|
30689
30989
|
|
|
30690
30990
|
|
|
@@ -30850,6 +31150,8 @@ class AnnotationGroup {
|
|
|
30850
31150
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
30851
31151
|
/* harmony import */ var _annotationLocking__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48428);
|
|
30852
31152
|
/* harmony import */ var _annotationVisibility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21009);
|
|
31153
|
+
/* harmony import */ var _utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99595);
|
|
31154
|
+
|
|
30853
31155
|
|
|
30854
31156
|
|
|
30855
31157
|
|
|
@@ -30946,6 +31248,8 @@ class FrameOfReferenceSpecificAnnotationManager {
|
|
|
30946
31248
|
toolSpecificAnnotations.push(annotation);
|
|
30947
31249
|
(0,_annotationLocking__WEBPACK_IMPORTED_MODULE_2__.checkAndDefineIsLockedProperty)(annotation);
|
|
30948
31250
|
(0,_annotationVisibility__WEBPACK_IMPORTED_MODULE_3__.checkAndDefineIsVisibleProperty)(annotation);
|
|
31251
|
+
(0,_utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__/* .checkAndDefineTextBoxProperty */ .Q)(annotation);
|
|
31252
|
+
(0,_utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__/* .checkAndDefineCachedStatsProperty */ .d)(annotation);
|
|
30949
31253
|
};
|
|
30950
31254
|
this.removeAnnotation = (annotationUID) => {
|
|
30951
31255
|
const { annotations } = this;
|
|
@@ -34678,8 +34982,8 @@ function removeTool(ToolClass) {
|
|
|
34678
34982
|
|
|
34679
34983
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 17 modules
|
|
34680
34984
|
var eventListeners = __webpack_require__(60878);
|
|
34681
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js +
|
|
34682
|
-
var eventDispatchers = __webpack_require__(
|
|
34985
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js + 8 modules
|
|
34986
|
+
var eventDispatchers = __webpack_require__(94101);
|
|
34683
34987
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/triggerAnnotationRender.js
|
|
34684
34988
|
var triggerAnnotationRender = __webpack_require__(6805);
|
|
34685
34989
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/addEnabledElement.js
|
|
@@ -34701,6 +35005,7 @@ function addEnabledElement(evt) {
|
|
|
34701
35005
|
imageRenderedEventDispatcher.enable(element);
|
|
34702
35006
|
cameraModifiedEventDispatcher.enable(element);
|
|
34703
35007
|
imageSpacingCalibratedEventDispatcher.enable(element);
|
|
35008
|
+
cameraResetEventDispatcher.enable(element);
|
|
34704
35009
|
mouseToolEventDispatcher.enable(element);
|
|
34705
35010
|
keyboardToolEventDispatcher.enable(element);
|
|
34706
35011
|
touchToolEventDispatcher.enable(element);
|
|
@@ -34791,6 +35096,7 @@ function removeEnabledElement(elementDisabledEvt) {
|
|
|
34791
35096
|
imageRenderedEventDispatcher.disable(element);
|
|
34792
35097
|
cameraModifiedEventDispatcher.disable(element);
|
|
34793
35098
|
imageSpacingCalibratedEventDispatcher.disable(element);
|
|
35099
|
+
cameraResetEventDispatcher.disable(element);
|
|
34794
35100
|
mouseToolEventDispatcher.disable(element);
|
|
34795
35101
|
keyboardToolEventDispatcher.disable(element);
|
|
34796
35102
|
touchToolEventDispatcher.disable(element);
|
|
@@ -34997,7 +35303,7 @@ function presentationViewSyncCallback_presentationViewSyncCallback(_synchronizer
|
|
|
34997
35303
|
const tViewport = renderingEngine.getViewport(targetViewport.viewportId);
|
|
34998
35304
|
const sViewport = renderingEngine.getViewport(sourceViewport.viewportId);
|
|
34999
35305
|
const presentationView = sViewport.getViewPresentation(options);
|
|
35000
|
-
tViewport.
|
|
35306
|
+
tViewport.setViewPresentation(presentationView);
|
|
35001
35307
|
tViewport.render();
|
|
35002
35308
|
}
|
|
35003
35309
|
|
|
@@ -35240,7 +35546,7 @@ const createStackImageSynchronizer = (/* unused pure expression or super */ null
|
|
|
35240
35546
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48428);
|
|
35241
35547
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21009);
|
|
35242
35548
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54177);
|
|
35243
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
35549
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
35244
35550
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
35245
35551
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84901);
|
|
35246
35552
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(90252);
|
|
@@ -35729,10 +36035,10 @@ class AnnotationEraserTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .BaseToo
|
|
|
35729
36035
|
continue;
|
|
35730
36036
|
}
|
|
35731
36037
|
const annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotations)(toolName, element);
|
|
35732
|
-
if (!annotations) {
|
|
36038
|
+
if (!annotations.length) {
|
|
35733
36039
|
continue;
|
|
35734
36040
|
}
|
|
35735
|
-
const interactableAnnotations = toolInstance.filterInteractableAnnotationsForElement(element, annotations);
|
|
36041
|
+
const interactableAnnotations = toolInstance.filterInteractableAnnotationsForElement(element, annotations) || [];
|
|
35736
36042
|
for (const annotation of interactableAnnotations) {
|
|
35737
36043
|
if (toolInstance.isPointNearTool(element, annotation, currentPoints.canvas, 10, interactionType)) {
|
|
35738
36044
|
annotationsToRemove.push(annotation.annotationUID);
|
|
@@ -35764,7 +36070,7 @@ AnnotationEraserTool.toolName = 'Eraser';
|
|
|
35764
36070
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92136);
|
|
35765
36071
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52610);
|
|
35766
36072
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38296);
|
|
35767
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
36073
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(49574);
|
|
35768
36074
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(61738);
|
|
35769
36075
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84901);
|
|
35770
36076
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(90252);
|
|
@@ -35815,6 +36121,11 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
35815
36121
|
configuration: {
|
|
35816
36122
|
shadow: true,
|
|
35817
36123
|
viewportIndicators: true,
|
|
36124
|
+
viewportIndicatorsConfig: {
|
|
36125
|
+
radius: 5,
|
|
36126
|
+
x: null,
|
|
36127
|
+
y: null,
|
|
36128
|
+
},
|
|
35818
36129
|
autoPan: {
|
|
35819
36130
|
enabled: false,
|
|
35820
36131
|
panSize: 10,
|
|
@@ -35878,12 +36189,20 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
35878
36189
|
viewportsInfo.forEach(({ viewportId, renderingEngineId }) => {
|
|
35879
36190
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__.getEnabledElementByIds)(viewportId, renderingEngineId);
|
|
35880
36191
|
const { viewport } = enabledElement;
|
|
36192
|
+
const resetPan = true;
|
|
36193
|
+
const resetZoom = true;
|
|
36194
|
+
const resetToCenter = true;
|
|
36195
|
+
const resetRotation = true;
|
|
36196
|
+
const supressEvents = true;
|
|
36197
|
+
viewport.resetCamera(resetPan, resetZoom, resetToCenter, resetRotation, supressEvents);
|
|
36198
|
+
viewport.resetSlabThickness();
|
|
35881
36199
|
const { element } = viewport;
|
|
35882
36200
|
let annotations = this._getAnnotations(enabledElement);
|
|
35883
36201
|
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
35884
36202
|
if (annotations.length) {
|
|
35885
36203
|
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__.removeAnnotation)(annotations[0].annotationUID);
|
|
35886
36204
|
}
|
|
36205
|
+
viewport.render();
|
|
35887
36206
|
});
|
|
35888
36207
|
this.computeToolCenter(viewportsInfo);
|
|
35889
36208
|
};
|
|
@@ -36021,6 +36340,9 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
36021
36340
|
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_10__.getViewportIdsWithToolToRender)(element, this.getToolName(), requireSameOrientation);
|
|
36022
36341
|
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
|
|
36023
36342
|
};
|
|
36343
|
+
this.onResetCamera = (evt) => {
|
|
36344
|
+
this.resetCrosshairs();
|
|
36345
|
+
};
|
|
36024
36346
|
this.mouseMoveCallback = (evt, filteredToolAnnotations) => {
|
|
36025
36347
|
const { element, currentPoints } = evt.detail;
|
|
36026
36348
|
const canvasCoords = currentPoints.canvas;
|
|
@@ -36403,11 +36725,14 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
36403
36725
|
data.handles.rotationPoints = newRtpoints;
|
|
36404
36726
|
data.handles.slabThicknessPoints = newStpoints;
|
|
36405
36727
|
if (this.configuration.viewportIndicators) {
|
|
36728
|
+
const { viewportIndicatorsConfig } = this.configuration;
|
|
36729
|
+
const xOffset = viewportIndicatorsConfig?.xOffset || 0.95;
|
|
36730
|
+
const yOffset = viewportIndicatorsConfig?.yOffset || 0.05;
|
|
36406
36731
|
const referenceColorCoordinates = [
|
|
36407
|
-
clientWidth *
|
|
36408
|
-
clientHeight *
|
|
36732
|
+
clientWidth * xOffset,
|
|
36733
|
+
clientHeight * yOffset,
|
|
36409
36734
|
];
|
|
36410
|
-
const circleRadius = canvasDiagonalLength * 0.01;
|
|
36735
|
+
const circleRadius = viewportIndicatorsConfig?.circleRadius || canvasDiagonalLength * 0.01;
|
|
36411
36736
|
const circleUID = '0';
|
|
36412
36737
|
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, referenceColorCoordinates, circleRadius, { color, fill: color });
|
|
36413
36738
|
}
|
|
@@ -37773,7 +38098,7 @@ OrientationMarkerTool.toolName = 'OrientationMarker';
|
|
|
37773
38098
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
37774
38099
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
|
|
37775
38100
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52610);
|
|
37776
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
38101
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
|
|
37777
38102
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
|
|
37778
38103
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(28062);
|
|
37779
38104
|
|
|
@@ -38062,7 +38387,7 @@ PlanarRotateTool.toolName = 'PlanarRotate';
|
|
|
38062
38387
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
38063
38388
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38296);
|
|
38064
38389
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21009);
|
|
38065
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
38390
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
38066
38391
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
|
|
38067
38392
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
|
|
38068
38393
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44753);
|
|
@@ -38390,7 +38715,7 @@ ReferenceCursors.toolName = 'ReferenceCursors';
|
|
|
38390
38715
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44753);
|
|
38391
38716
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
38392
38717
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
|
|
38393
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
38718
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
38394
38719
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
|
|
38395
38720
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
|
|
38396
38721
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(28062);
|
|
@@ -38629,7 +38954,7 @@ ReferenceLines.toolName = 'ReferenceLines';
|
|
|
38629
38954
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44753);
|
|
38630
38955
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92136);
|
|
38631
38956
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
38632
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
38957
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
|
|
38633
38958
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52610);
|
|
38634
38959
|
|
|
38635
38960
|
|
|
@@ -38931,8 +39256,8 @@ class ScaleOverlayTool extends _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MOD
|
|
|
38931
39256
|
viewportId: enabledElement.viewport.id,
|
|
38932
39257
|
};
|
|
38933
39258
|
const canvasSize = {
|
|
38934
|
-
width: canvas.width,
|
|
38935
|
-
height: canvas.height,
|
|
39259
|
+
width: canvas.width / window.devicePixelRatio || 1,
|
|
39260
|
+
height: canvas.height / window.devicePixelRatio || 1,
|
|
38936
39261
|
};
|
|
38937
39262
|
const topLeft = annotation.data.handles.points[0];
|
|
38938
39263
|
const topRight = annotation.data.handles.points[1];
|
|
@@ -39345,7 +39670,7 @@ SculptorTool.toolName = 'SculptorTool';
|
|
|
39345
39670
|
"use strict";
|
|
39346
39671
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
39347
39672
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38296);
|
|
39348
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
39673
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49574);
|
|
39349
39674
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52610);
|
|
39350
39675
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23072);
|
|
39351
39676
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28062);
|
|
@@ -39890,6 +40215,248 @@ VolumeRotateMouseWheelTool.toolName = 'VolumeRotateMouseWheel';
|
|
|
39890
40215
|
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (VolumeRotateMouseWheelTool)));
|
|
39891
40216
|
|
|
39892
40217
|
|
|
40218
|
+
/***/ }),
|
|
40219
|
+
|
|
40220
|
+
/***/ 60747:
|
|
40221
|
+
/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
|
40222
|
+
|
|
40223
|
+
"use strict";
|
|
40224
|
+
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96214);
|
|
40225
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
40226
|
+
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95778);
|
|
40227
|
+
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
|
|
40228
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
|
|
40229
|
+
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61738);
|
|
40230
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(84901);
|
|
40231
|
+
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(90252);
|
|
40232
|
+
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40233);
|
|
40233
|
+
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23072);
|
|
40234
|
+
/* harmony import */ var _utilities_voi__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14149);
|
|
40235
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(74119);
|
|
40236
|
+
|
|
40237
|
+
|
|
40238
|
+
|
|
40239
|
+
|
|
40240
|
+
|
|
40241
|
+
|
|
40242
|
+
|
|
40243
|
+
|
|
40244
|
+
|
|
40245
|
+
|
|
40246
|
+
|
|
40247
|
+
|
|
40248
|
+
class WindowLevelRegionTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationTool */ .EC {
|
|
40249
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
40250
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
40251
|
+
configuration: {
|
|
40252
|
+
minWindowWidth: 10,
|
|
40253
|
+
},
|
|
40254
|
+
}) {
|
|
40255
|
+
super(toolProps, defaultToolProps);
|
|
40256
|
+
this.addNewAnnotation = (evt) => {
|
|
40257
|
+
const eventDetail = evt.detail;
|
|
40258
|
+
const { currentPoints, element } = eventDetail;
|
|
40259
|
+
const worldPos = currentPoints.world;
|
|
40260
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
40261
|
+
const { viewport, renderingEngine } = enabledElement;
|
|
40262
|
+
this.isDrawing = true;
|
|
40263
|
+
const camera = viewport.getCamera();
|
|
40264
|
+
const { viewPlaneNormal, viewUp } = camera;
|
|
40265
|
+
const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
|
|
40266
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
40267
|
+
const annotation = {
|
|
40268
|
+
invalidated: true,
|
|
40269
|
+
highlighted: true,
|
|
40270
|
+
metadata: {
|
|
40271
|
+
toolName: this.getToolName(),
|
|
40272
|
+
viewPlaneNormal: [...viewPlaneNormal],
|
|
40273
|
+
viewUp: [...viewUp],
|
|
40274
|
+
FrameOfReferenceUID,
|
|
40275
|
+
referencedImageId,
|
|
40276
|
+
},
|
|
40277
|
+
data: {
|
|
40278
|
+
handles: {
|
|
40279
|
+
points: [
|
|
40280
|
+
[...worldPos],
|
|
40281
|
+
[...worldPos],
|
|
40282
|
+
[...worldPos],
|
|
40283
|
+
[...worldPos],
|
|
40284
|
+
],
|
|
40285
|
+
},
|
|
40286
|
+
cachedStats: {},
|
|
40287
|
+
},
|
|
40288
|
+
};
|
|
40289
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .addAnnotation */ .lC)(annotation, element);
|
|
40290
|
+
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
40291
|
+
this.editData = {
|
|
40292
|
+
annotation,
|
|
40293
|
+
viewportIdsToRender,
|
|
40294
|
+
};
|
|
40295
|
+
this._activateDraw(element);
|
|
40296
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.hideElementCursor)(element);
|
|
40297
|
+
evt.preventDefault();
|
|
40298
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
|
|
40299
|
+
return annotation;
|
|
40300
|
+
};
|
|
40301
|
+
this._endCallback = (evt) => {
|
|
40302
|
+
const eventDetail = evt.detail;
|
|
40303
|
+
const { element } = eventDetail;
|
|
40304
|
+
const { annotation, viewportIdsToRender } = this.editData;
|
|
40305
|
+
this._deactivateDraw(element);
|
|
40306
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.resetElementCursor)(element);
|
|
40307
|
+
const { renderingEngine } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
40308
|
+
this.editData = null;
|
|
40309
|
+
this.isDrawing = false;
|
|
40310
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .removeAnnotation */ .O8)(annotation.annotationUID);
|
|
40311
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
|
|
40312
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationCompleted */ .dZ)(annotation);
|
|
40313
|
+
this.applyWindowLevelRegion(annotation, element);
|
|
40314
|
+
};
|
|
40315
|
+
this._dragCallback = (evt) => {
|
|
40316
|
+
this.isDrawing = true;
|
|
40317
|
+
const eventDetail = evt.detail;
|
|
40318
|
+
const { element } = eventDetail;
|
|
40319
|
+
const { annotation, viewportIdsToRender } = this.editData;
|
|
40320
|
+
const { data } = annotation;
|
|
40321
|
+
const { currentPoints } = eventDetail;
|
|
40322
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
40323
|
+
const { worldToCanvas, canvasToWorld } = enabledElement.viewport;
|
|
40324
|
+
const worldPos = currentPoints.world;
|
|
40325
|
+
const { points } = data.handles;
|
|
40326
|
+
const DEFAULT_HANDLE_INDEX = 3;
|
|
40327
|
+
points[DEFAULT_HANDLE_INDEX] = [...worldPos];
|
|
40328
|
+
const bottomLeftCanvas = worldToCanvas(points[0]);
|
|
40329
|
+
const topRightCanvas = worldToCanvas(points[3]);
|
|
40330
|
+
const bottomRightCanvas = [
|
|
40331
|
+
topRightCanvas[0],
|
|
40332
|
+
bottomLeftCanvas[1],
|
|
40333
|
+
];
|
|
40334
|
+
const topLeftCanvas = [
|
|
40335
|
+
bottomLeftCanvas[0],
|
|
40336
|
+
topRightCanvas[1],
|
|
40337
|
+
];
|
|
40338
|
+
const bottomRightWorld = canvasToWorld(bottomRightCanvas);
|
|
40339
|
+
const topLeftWorld = canvasToWorld(topLeftCanvas);
|
|
40340
|
+
points[1] = bottomRightWorld;
|
|
40341
|
+
points[2] = topLeftWorld;
|
|
40342
|
+
annotation.invalidated = true;
|
|
40343
|
+
const { renderingEngine } = enabledElement;
|
|
40344
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
|
|
40345
|
+
};
|
|
40346
|
+
this._activateDraw = (element) => {
|
|
40347
|
+
_store__WEBPACK_IMPORTED_MODULE_5__/* .state */ .wk.isInteractingWithTool = true;
|
|
40348
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_UP, this._endCallback);
|
|
40349
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_DRAG, this._dragCallback);
|
|
40350
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_MOVE, this._dragCallback);
|
|
40351
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_CLICK, this._endCallback);
|
|
40352
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_END, this._endCallback);
|
|
40353
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_DRAG, this._dragCallback);
|
|
40354
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_TAP, this._endCallback);
|
|
40355
|
+
};
|
|
40356
|
+
this._deactivateDraw = (element) => {
|
|
40357
|
+
_store__WEBPACK_IMPORTED_MODULE_5__/* .state */ .wk.isInteractingWithTool = false;
|
|
40358
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_UP, this._endCallback);
|
|
40359
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_DRAG, this._dragCallback);
|
|
40360
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_MOVE, this._dragCallback);
|
|
40361
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_CLICK, this._endCallback);
|
|
40362
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_END, this._endCallback);
|
|
40363
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_DRAG, this._dragCallback);
|
|
40364
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_TAP, this._endCallback);
|
|
40365
|
+
};
|
|
40366
|
+
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
40367
|
+
let renderStatus = false;
|
|
40368
|
+
const { viewport } = enabledElement;
|
|
40369
|
+
const { element } = viewport;
|
|
40370
|
+
let annotations = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotations */ .Rh)(this.getToolName(), element);
|
|
40371
|
+
if (!annotations?.length) {
|
|
40372
|
+
return renderStatus;
|
|
40373
|
+
}
|
|
40374
|
+
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
40375
|
+
if (!annotations?.length) {
|
|
40376
|
+
return renderStatus;
|
|
40377
|
+
}
|
|
40378
|
+
const styleSpecifier = {
|
|
40379
|
+
toolGroupId: this.toolGroupId,
|
|
40380
|
+
toolName: this.getToolName(),
|
|
40381
|
+
viewportId: enabledElement.viewport.id,
|
|
40382
|
+
};
|
|
40383
|
+
for (let i = 0; i < annotations.length; i++) {
|
|
40384
|
+
const annotation = annotations[i];
|
|
40385
|
+
const { annotationUID, data } = annotation;
|
|
40386
|
+
const { points } = data.handles;
|
|
40387
|
+
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
40388
|
+
styleSpecifier.annotationUID = annotationUID;
|
|
40389
|
+
const { color, lineWidth, lineDash } = this.getAnnotationStyle({
|
|
40390
|
+
annotation,
|
|
40391
|
+
styleSpecifier,
|
|
40392
|
+
});
|
|
40393
|
+
if (!viewport.getRenderingEngine()) {
|
|
40394
|
+
console.warn('Rendering Engine has been destroyed');
|
|
40395
|
+
return renderStatus;
|
|
40396
|
+
}
|
|
40397
|
+
const dataId = `${annotationUID}-rect`;
|
|
40398
|
+
const rectangleUID = '0';
|
|
40399
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_4__.drawRect)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates[0], canvasCoordinates[3], {
|
|
40400
|
+
color,
|
|
40401
|
+
lineDash,
|
|
40402
|
+
lineWidth,
|
|
40403
|
+
}, dataId);
|
|
40404
|
+
renderStatus = true;
|
|
40405
|
+
}
|
|
40406
|
+
return renderStatus;
|
|
40407
|
+
};
|
|
40408
|
+
this.applyWindowLevelRegion = (annotation, element) => {
|
|
40409
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
40410
|
+
const { viewport } = enabledElement;
|
|
40411
|
+
const imageData = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.extractWindowLevelRegionToolData(viewport);
|
|
40412
|
+
const { data } = annotation;
|
|
40413
|
+
const { points } = data.handles;
|
|
40414
|
+
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
40415
|
+
const startCanvas = canvasCoordinates[0];
|
|
40416
|
+
const endCanvas = canvasCoordinates[3];
|
|
40417
|
+
let left = Math.min(startCanvas[0], endCanvas[0]);
|
|
40418
|
+
let top = Math.min(startCanvas[1], endCanvas[1]);
|
|
40419
|
+
let width = Math.abs(startCanvas[0] - endCanvas[0]);
|
|
40420
|
+
let height = Math.abs(startCanvas[1] - endCanvas[1]);
|
|
40421
|
+
left = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.clip)(left, 0, imageData.width);
|
|
40422
|
+
top = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.clip)(top, 0, imageData.height);
|
|
40423
|
+
width = Math.floor(Math.min(width, Math.abs(imageData.width - left)));
|
|
40424
|
+
height = Math.floor(Math.min(height, Math.abs(imageData.height - top)));
|
|
40425
|
+
const pixelLuminanceData = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.getLuminanceFromRegion(imageData, Math.round(left), Math.round(top), width, height);
|
|
40426
|
+
const minMaxMean = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.calculateMinMaxMean(pixelLuminanceData, imageData.minPixelValue, imageData.maxPixelValue);
|
|
40427
|
+
if (this.configuration.minWindowWidth === undefined) {
|
|
40428
|
+
this.configuration.minWindowWidth = 10;
|
|
40429
|
+
}
|
|
40430
|
+
const windowWidth = Math.max(Math.abs(minMaxMean.max - minMaxMean.min), this.configuration.minWindowWidth);
|
|
40431
|
+
const windowCenter = minMaxMean.mean;
|
|
40432
|
+
const voiRange = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.windowLevel.toLowHighRange(windowWidth, windowCenter);
|
|
40433
|
+
viewport.setProperties({ voiRange });
|
|
40434
|
+
viewport.render();
|
|
40435
|
+
};
|
|
40436
|
+
this.cancel = () => {
|
|
40437
|
+
return null;
|
|
40438
|
+
};
|
|
40439
|
+
this.isPointNearTool = () => {
|
|
40440
|
+
return null;
|
|
40441
|
+
};
|
|
40442
|
+
this.toolSelectedCallback = () => {
|
|
40443
|
+
return null;
|
|
40444
|
+
};
|
|
40445
|
+
this.handleSelectedCallback = () => {
|
|
40446
|
+
return null;
|
|
40447
|
+
};
|
|
40448
|
+
this._activateModify = () => {
|
|
40449
|
+
return null;
|
|
40450
|
+
};
|
|
40451
|
+
this._deactivateModify = () => {
|
|
40452
|
+
return null;
|
|
40453
|
+
};
|
|
40454
|
+
}
|
|
40455
|
+
}
|
|
40456
|
+
WindowLevelRegionTool.toolName = 'WindowLevelRegion';
|
|
40457
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (WindowLevelRegionTool)));
|
|
40458
|
+
|
|
40459
|
+
|
|
39893
40460
|
/***/ }),
|
|
39894
40461
|
|
|
39895
40462
|
/***/ 455:
|
|
@@ -40301,7 +40868,7 @@ ZoomTool.toolName = 'Zoom';
|
|
|
40301
40868
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(21954);
|
|
40302
40869
|
/* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(52475);
|
|
40303
40870
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(74119);
|
|
40304
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
40871
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
|
|
40305
40872
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
|
|
40306
40873
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(90252);
|
|
40307
40874
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(23072);
|
|
@@ -40357,6 +40924,7 @@ class AngleTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .AnnotationTool */
|
|
|
40357
40924
|
viewUp: [...viewUp],
|
|
40358
40925
|
FrameOfReferenceUID,
|
|
40359
40926
|
referencedImageId,
|
|
40927
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
40360
40928
|
},
|
|
40361
40929
|
data: {
|
|
40362
40930
|
handles: {
|
|
@@ -40770,7 +41338,7 @@ AngleTool.toolName = 'Angle';
|
|
|
40770
41338
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
40771
41339
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48428);
|
|
40772
41340
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21954);
|
|
40773
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
41341
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
40774
41342
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
40775
41343
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
|
|
40776
41344
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23072);
|
|
@@ -40822,6 +41390,7 @@ class ArrowAnnotateTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .Annotation
|
|
|
40822
41390
|
viewUp: [...viewUp],
|
|
40823
41391
|
FrameOfReferenceUID,
|
|
40824
41392
|
referencedImageId,
|
|
41393
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
40825
41394
|
},
|
|
40826
41395
|
data: {
|
|
40827
41396
|
text: '',
|
|
@@ -41219,7 +41788,7 @@ ArrowAnnotateTool.toolName = 'ArrowAnnotate';
|
|
|
41219
41788
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
|
|
41220
41789
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
|
|
41221
41790
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
|
|
41222
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
41791
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
|
|
41223
41792
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
|
|
41224
41793
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
|
|
41225
41794
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
|
|
@@ -41289,6 +41858,7 @@ class CircleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationTool
|
|
|
41289
41858
|
viewUp: [...viewUp],
|
|
41290
41859
|
FrameOfReferenceUID,
|
|
41291
41860
|
referencedImageId,
|
|
41861
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
41292
41862
|
},
|
|
41293
41863
|
data: {
|
|
41294
41864
|
label: '',
|
|
@@ -41838,7 +42408,7 @@ CircleROITool.toolName = 'CircleROI';
|
|
|
41838
42408
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21954);
|
|
41839
42409
|
/* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(52475);
|
|
41840
42410
|
/* harmony import */ var _utilities_math_midPoint__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(76727);
|
|
41841
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
42411
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(49574);
|
|
41842
42412
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(61738);
|
|
41843
42413
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(90252);
|
|
41844
42414
|
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(10910);
|
|
@@ -41897,6 +42467,7 @@ class CobbAngleTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationTool
|
|
|
41897
42467
|
viewUp: [...viewUp],
|
|
41898
42468
|
FrameOfReferenceUID,
|
|
41899
42469
|
referencedImageId,
|
|
42470
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
41900
42471
|
},
|
|
41901
42472
|
data: {
|
|
41902
42473
|
handles: {
|
|
@@ -42536,7 +43107,7 @@ CobbAngleTool.toolName = 'CobbAngle';
|
|
|
42536
43107
|
|
|
42537
43108
|
"use strict";
|
|
42538
43109
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
42539
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
43110
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49574);
|
|
42540
43111
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90252);
|
|
42541
43112
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(40233);
|
|
42542
43113
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23072);
|
|
@@ -42694,7 +43265,7 @@ DragProbeTool.toolName = 'DragProbe';
|
|
|
42694
43265
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
|
|
42695
43266
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
|
|
42696
43267
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
|
|
42697
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
43268
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
|
|
42698
43269
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
|
|
42699
43270
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
|
|
42700
43271
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
|
|
@@ -42763,6 +43334,7 @@ class EllipticalROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .Annotation
|
|
|
42763
43334
|
viewUp: [...viewUp],
|
|
42764
43335
|
FrameOfReferenceUID,
|
|
42765
43336
|
referencedImageId,
|
|
43337
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
42766
43338
|
},
|
|
42767
43339
|
data: {
|
|
42768
43340
|
label: '',
|
|
@@ -43398,7 +43970,7 @@ EllipticalROITool.toolName = 'EllipticalROI';
|
|
|
43398
43970
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96214);
|
|
43399
43971
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
43400
43972
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54177);
|
|
43401
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
43973
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
43402
43974
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61738);
|
|
43403
43975
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(90252);
|
|
43404
43976
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23072);
|
|
@@ -43597,7 +44169,7 @@ KeyImageTool.toolName = 'KeyImage';
|
|
|
43597
44169
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21009);
|
|
43598
44170
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54177);
|
|
43599
44171
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21954);
|
|
43600
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
44172
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(49574);
|
|
43601
44173
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(61738);
|
|
43602
44174
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(90252);
|
|
43603
44175
|
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(10910);
|
|
@@ -44043,7 +44615,7 @@ LengthTool.toolName = 'Length';
|
|
|
44043
44615
|
/* harmony import */ var _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1320);
|
|
44044
44616
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
|
|
44045
44617
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
|
|
44046
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
44618
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
44047
44619
|
|
|
44048
44620
|
|
|
44049
44621
|
|
|
@@ -44147,7 +44719,7 @@ LivewireContourSegmentationTool.toolName = 'LivewireContourSegmentationTool';
|
|
|
44147
44719
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44753);
|
|
44148
44720
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
44149
44721
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
|
|
44150
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
44722
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
44151
44723
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
|
|
44152
44724
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
|
|
44153
44725
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
|
|
@@ -44726,7 +45298,7 @@ PlanarFreehandContourSegmentationTool.toolName =
|
|
|
44726
45298
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
44727
45299
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54177);
|
|
44728
45300
|
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24592);
|
|
44729
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
45301
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
44730
45302
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
44731
45303
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84901);
|
|
44732
45304
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(90252);
|
|
@@ -45106,7 +45678,7 @@ ProbeTool.toolName = 'Probe';
|
|
|
45106
45678
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
|
|
45107
45679
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
|
|
45108
45680
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
|
|
45109
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
45681
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
|
|
45110
45682
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
|
|
45111
45683
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
|
|
45112
45684
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
|
|
@@ -45172,6 +45744,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
|
|
|
45172
45744
|
viewUp: [...viewUp],
|
|
45173
45745
|
FrameOfReferenceUID,
|
|
45174
45746
|
referencedImageId,
|
|
45747
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
45175
45748
|
},
|
|
45176
45749
|
data: {
|
|
45177
45750
|
label: '',
|
|
@@ -45519,7 +46092,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
|
|
|
45519
46092
|
}
|
|
45520
46093
|
const dataId = `${annotationUID}-rect`;
|
|
45521
46094
|
const rectangleUID = '0';
|
|
45522
|
-
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.
|
|
46095
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.drawRectByCoordinates)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates, {
|
|
45523
46096
|
color,
|
|
45524
46097
|
lineDash,
|
|
45525
46098
|
lineWidth,
|
|
@@ -45703,7 +46276,7 @@ SplineContourSegmentationTool.toolName = 'SplineContourSegmentationTool';
|
|
|
45703
46276
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
45704
46277
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44753);
|
|
45705
46278
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
|
|
45706
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
46279
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
45707
46280
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
|
|
45708
46281
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
|
|
45709
46282
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
|
|
@@ -46457,7 +47030,7 @@ SplineROITool.toolName = 'SplineROI';
|
|
|
46457
47030
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21090);
|
|
46458
47031
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38296);
|
|
46459
47032
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54177);
|
|
46460
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
47033
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
46461
47034
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
46462
47035
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
|
|
46463
47036
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(74119);
|
|
@@ -46942,7 +47515,7 @@ UltrasoundDirectionalTool.toolName = 'UltrasoundDirectionalTool';
|
|
|
46942
47515
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96214);
|
|
46943
47516
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21090);
|
|
46944
47517
|
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95778);
|
|
46945
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
47518
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
46946
47519
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61738);
|
|
46947
47520
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(84901);
|
|
46948
47521
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
|
|
@@ -47967,7 +48540,7 @@ async function _addLabelmapToViewport(viewport, labelmapData, segmentationRepres
|
|
|
47967
48540
|
/* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4069);
|
|
47968
48541
|
/* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11852);
|
|
47969
48542
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(84901);
|
|
47970
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
48543
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(49574);
|
|
47971
48544
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(40233);
|
|
47972
48545
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23072);
|
|
47973
48546
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(63421);
|
|
@@ -48439,7 +49012,7 @@ BrushTool.toolName = 'Brush';
|
|
|
48439
49012
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84901);
|
|
48440
49013
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
48441
49014
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48428);
|
|
48442
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
49015
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
48443
49016
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(90252);
|
|
48444
49017
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21090);
|
|
48445
49018
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21009);
|
|
@@ -48803,7 +49376,7 @@ CircleROIStartEndThresholdTool.toolName = 'CircleROIStartEndThreshold';
|
|
|
48803
49376
|
/* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4069);
|
|
48804
49377
|
/* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11852);
|
|
48805
49378
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
|
|
48806
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
49379
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
48807
49380
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
|
|
48808
49381
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23072);
|
|
48809
49382
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(63421);
|
|
@@ -49300,7 +49873,7 @@ PaintFillTool.toolName = 'PaintFill';
|
|
|
49300
49873
|
/* harmony import */ var _strategies_eraseRectangle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66211);
|
|
49301
49874
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
|
|
49302
49875
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
|
|
49303
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
49876
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
49304
49877
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(40233);
|
|
49305
49878
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23072);
|
|
49306
49879
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63421);
|
|
@@ -49670,7 +50243,7 @@ SegmentSelectTool.toolName = 'SegmentSelectTool';
|
|
|
49670
50243
|
/* harmony import */ var _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61604);
|
|
49671
50244
|
/* harmony import */ var _strategies_eraseSphere__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4373);
|
|
49672
50245
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
|
|
49673
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
50246
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
49674
50247
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
|
|
49675
50248
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23072);
|
|
49676
50249
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(63421);
|
|
@@ -50271,7 +50844,7 @@ function triggerSegmentationRender(toolGroupId) {
|
|
|
50271
50844
|
/* unused harmony exports annotationRenderingEngine, triggerAnnotationRender */
|
|
50272
50845
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
50273
50846
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
|
|
50274
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
50847
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49574);
|
|
50275
50848
|
/* harmony import */ var _getToolsWithModesForElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42360);
|
|
50276
50849
|
|
|
50277
50850
|
|