@ohif/app 3.8.0 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{117.bundle.77cc4e62d0de5d843e2e.js → 117.bundle.17ae130d2bb21ef9d31f.js} +75 -80
- package/dist/{121.bundle.47f05840a5b3cdf75543.js → 121.bundle.27d181784f24551bc546.js} +2 -1
- package/dist/{164.bundle.b101cb64d04a22453984.js → 164.bundle.e30009bee13acb6967da.js} +554 -311
- package/dist/{236.bundle.f774cdc955890e6cdac9.js → 236.bundle.79a374f5fdf7fde431f4.js} +753 -140
- package/dist/{188.bundle.f2b81ec70ae344f57183.js → 243.bundle.7891b41d969264043783.js} +8 -8
- package/dist/{325.bundle.5012b0285b6baadd1884.js → 325.bundle.bfb7de5a397beae16d24.js} +11 -11
- package/dist/{342.bundle.36ee082163b01284eeba.js → 342.bundle.17f0c50a27c0ba1f3846.js} +7 -0
- package/dist/{203.bundle.3581da3a32a0b720d3a7.js → 370.bundle.e4cd6c20d3496c949374.js} +614 -455
- package/dist/{448.bundle.35b8f8e262fa954026df.js → 448.bundle.375bbf6d00a23e35f229.js} +2 -2
- package/dist/{483.bundle.581b242d7b90866fdfb9.js → 483.bundle.016de3c3ec209d9fa42a.js} +16 -3
- package/dist/{487.bundle.79aff4db7df5f383b423.js → 487.bundle.205821cf073b4d0d2e71.js} +2 -2
- package/dist/{416.bundle.9b0d7559344fd02c9e08.js → 501.bundle.de519580f8ba42802378.js} +1206 -305
- package/dist/{530.bundle.207b38c15c4c01e4db0e.js → 530.bundle.17b9a34fefff133e5379.js} +3 -3
- package/dist/{544.bundle.3542927ec15c3f688c8d.js → 544.bundle.170c67e76a6900a9a644.js} +4 -4
- package/dist/{206.bundle.e1ea316389b21006d3df.js → 545.bundle.c9cc3bd30adc9904cf64.js} +28 -24
- package/dist/{321.bundle.39a76114e54cd9833c43.js → 550.bundle.53604ec87839bd9b4a49.js} +82 -49
- package/dist/{574.bundle.4b059c95cd34efdc9cb3.js → 574.bundle.b369b11b04c3e080f0b3.js} +40 -37
- package/dist/{41.bundle.64e0da470e235cfac4bb.js → 682.bundle.fdd752d2920107f695fb.js} +26 -6
- package/dist/{699.bundle.b9666b1d4ddf7e8577ee.js → 699.bundle.fee3d1c6609ecc557a9a.js} +32 -3
- package/dist/{669.bundle.64309c677c5ca188348c.js → 721.bundle.d01a6829ac9b0abef67d.js} +73 -73
- package/dist/{722.bundle.52eb61926d08a08793fe.js → 722.bundle.1242e0348afc63ca4f5e.js} +10 -4
- package/dist/{724.bundle.72aef9dfca69ae057d37.js → 776.bundle.bb8a64b917ff1e559734.js} +13 -15
- package/dist/{862.bundle.9897a9b748078d53f9ab.js → 862.bundle.59bb164ca7e871a33e44.js} +1 -1
- package/dist/{889.bundle.b6231f995fd098f7e3f9.js → 889.bundle.5b10c495e1442d648ffc.js} +8 -8
- package/dist/{905.bundle.cd3e2b347340dd47a1b0.js → 905.bundle.1ba21a0406473fc92696.js} +2 -2
- package/dist/{907.bundle.723a425dedf8147243d2.js → 907.bundle.b199f25916a94c4ebb97.js} +2 -2
- package/dist/{473.bundle.11f707c8170ade2eb56a.js → 914.bundle.2b3a856b7d41ac8298e6.js} +510 -272
- package/dist/{94.bundle.33ca3bc10aa42716dbbb.js → 94.bundle.ae3ca435b134c95aea2e.js} +38 -8
- package/dist/{961.bundle.2c4663737c970764a41e.js → 961.bundle.d1b25d8f354bde3be17c.js} +2 -2
- package/dist/{7.bundle.94692aed50fe4ba2e2f5.js → 981.bundle.808058a6555d322675e1.js} +15 -15
- package/dist/{594.bundle.c292423defd9581bfbe3.js → 989.bundle.b929ddc23c16980560de.js} +5 -5
- package/dist/{633.bundle.e258ba4843985e67336a.js → 998.bundle.df083f740270855652bd.js} +21 -20
- package/dist/app-config.js +5 -1
- package/dist/{app.bundle.a05edb830ad2ecd67aac.js → app.bundle.7fa3782f7fa236cc53a8.js} +791 -568
- package/dist/app.bundle.css +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/google.js +1 -0
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.4442dd3318266fddf4d0.js → polySeg.bundle.36ddebc98d8b109edf33.js} +3 -3
- package/dist/{suv-peak-worker.bundle.348c016f7f973d05f2d2.js → suv-peak-worker.bundle.f4df597fab47d977d7f3.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- /package/dist/{321.css → 550.css} +0 -0
- /package/dist/{783.bundle.11d774eb13ffc74cdca5.js → 783.bundle.f4f09b94ebe4d1a466b1.js} +0 -0
- /package/dist/{633.css → 998.css} +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__) => {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44753);
|
|
14
14
|
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13320);
|
|
15
15
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(88903);
|
|
16
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
16
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98362);
|
|
17
17
|
/* harmony import */ var _enums_ViewportType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21432);
|
|
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);
|
|
@@ -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,28 +497,96 @@ 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.getSliceIndex();
|
|
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
|
}
|
|
510
523
|
if (options?.withNavigation) {
|
|
511
524
|
return true;
|
|
512
525
|
}
|
|
513
|
-
const currentSliceIndex = this.
|
|
526
|
+
const currentSliceIndex = this.getSliceIndex();
|
|
514
527
|
const { sliceIndex } = viewRef;
|
|
515
528
|
if (Array.isArray(sliceIndex)) {
|
|
516
529
|
return (sliceIndex[0] <= currentSliceIndex && currentSliceIndex <= sliceIndex[1]);
|
|
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.getSliceIndex();
|
|
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(',')}`;
|
|
@@ -1765,8 +1837,8 @@ var Viewport = __webpack_require__(11512);
|
|
|
1765
1837
|
var colors = __webpack_require__(59693);
|
|
1766
1838
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/cpuFallback/drawImageSync.js + 22 modules
|
|
1767
1839
|
var drawImageSync = __webpack_require__(49892);
|
|
1768
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js +
|
|
1769
|
-
var enums = __webpack_require__(
|
|
1840
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
1841
|
+
var enums = __webpack_require__(98362);
|
|
1770
1842
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/imageLoader.js
|
|
1771
1843
|
var imageLoader = __webpack_require__(79220);
|
|
1772
1844
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/requestPool/imageLoadPoolManager.js
|
|
@@ -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);
|
|
@@ -2957,6 +3017,25 @@ class StackViewport extends Viewport/* default */.A {
|
|
|
2957
3017
|
imagePixelModule,
|
|
2958
3018
|
};
|
|
2959
3019
|
}
|
|
3020
|
+
getImagePlaneReferenceData(sliceIndex = this.getCurrentImageIdIndex()) {
|
|
3021
|
+
const imageId = this.imageIds[sliceIndex];
|
|
3022
|
+
if (!imageId) {
|
|
3023
|
+
return;
|
|
3024
|
+
}
|
|
3025
|
+
const imagePlaneModule = metaData.get(enums.MetadataModules.IMAGE_PLANE, imageId);
|
|
3026
|
+
const { imagePositionPatient, frameOfReferenceUID: FrameOfReferenceUID } = imagePlaneModule;
|
|
3027
|
+
let { rowCosines, columnCosines } = imagePlaneModule;
|
|
3028
|
+
rowCosines ||= [1, 0, 0];
|
|
3029
|
+
columnCosines ||= [0, 1, 0];
|
|
3030
|
+
const viewPlaneNormal = (esm/* vec3.cross */.eR.cross([0, 0, 0], columnCosines, rowCosines));
|
|
3031
|
+
return {
|
|
3032
|
+
FrameOfReferenceUID,
|
|
3033
|
+
viewPlaneNormal,
|
|
3034
|
+
cameraFocalPoint: imagePositionPatient,
|
|
3035
|
+
referencedImageId: imageId,
|
|
3036
|
+
sliceIndex,
|
|
3037
|
+
};
|
|
3038
|
+
}
|
|
2960
3039
|
_getCameraOrientation(imageDataDirection) {
|
|
2961
3040
|
const viewPlaneNormal = imageDataDirection.slice(6, 9).map((x) => -x);
|
|
2962
3041
|
const viewUp = imageDataDirection.slice(3, 6).map((x) => -x);
|
|
@@ -3272,7 +3351,7 @@ class StackViewport extends Viewport/* default */.A {
|
|
|
3272
3351
|
this.cpuRenderingInvalidated = true;
|
|
3273
3352
|
this._cpuFallbackEnabledElement.transform = (0,calculateTransform/* default */.A)(this._cpuFallbackEnabledElement);
|
|
3274
3353
|
}
|
|
3275
|
-
|
|
3354
|
+
addImages(stackInputs) {
|
|
3276
3355
|
const actors = this.getActors();
|
|
3277
3356
|
stackInputs.forEach((stackInput) => {
|
|
3278
3357
|
const image = cache/* default */.Ay.getImage(stackInput.imageId);
|
|
@@ -3567,24 +3646,39 @@ class StackViewport extends Viewport/* default */.A {
|
|
|
3567
3646
|
return referencedImageId?.endsWith(imageURI);
|
|
3568
3647
|
}
|
|
3569
3648
|
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)) {
|
|
3649
|
+
const { sliceIndex = this.getCurrentImageIdIndex() } = viewRefSpecifier;
|
|
3650
|
+
const reference = super.getViewReference(viewRefSpecifier);
|
|
3651
|
+
const referencedImageId = this.imageIds[sliceIndex];
|
|
3652
|
+
if (!referencedImageId) {
|
|
3653
|
+
return;
|
|
3654
|
+
}
|
|
3655
|
+
reference.referencedImageId = referencedImageId;
|
|
3656
|
+
if (this.getCurrentImageIdIndex() !== sliceIndex) {
|
|
3657
|
+
const referenceData = this.getImagePlaneReferenceData(sliceIndex);
|
|
3658
|
+
if (!referenceData) {
|
|
3584
3659
|
return;
|
|
3585
3660
|
}
|
|
3586
|
-
|
|
3587
|
-
|
|
3661
|
+
Object.assign(reference, referenceData);
|
|
3662
|
+
}
|
|
3663
|
+
return reference;
|
|
3664
|
+
}
|
|
3665
|
+
setViewReference(viewRef) {
|
|
3666
|
+
if (!viewRef) {
|
|
3667
|
+
return;
|
|
3668
|
+
}
|
|
3669
|
+
const { referencedImageId, sliceIndex, volumeId } = viewRef;
|
|
3670
|
+
if (typeof sliceIndex === 'number' &&
|
|
3671
|
+
referencedImageId &&
|
|
3672
|
+
referencedImageId === this.imageIds[sliceIndex]) {
|
|
3673
|
+
this.setImageIdIndex(sliceIndex);
|
|
3674
|
+
}
|
|
3675
|
+
else {
|
|
3676
|
+
const foundIndex = this.imageIds.indexOf(referencedImageId);
|
|
3677
|
+
if (foundIndex !== -1) {
|
|
3678
|
+
this.setImageIdIndex(foundIndex);
|
|
3679
|
+
}
|
|
3680
|
+
else {
|
|
3681
|
+
throw new Error('Unsupported - referenced image id not found');
|
|
3588
3682
|
}
|
|
3589
3683
|
}
|
|
3590
3684
|
}
|
|
@@ -3702,8 +3796,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3702
3796
|
|
|
3703
3797
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
3704
3798
|
var esm = __webpack_require__(44753);
|
|
3705
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js +
|
|
3706
|
-
var enums = __webpack_require__(
|
|
3799
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
3800
|
+
var enums = __webpack_require__(98362);
|
|
3707
3801
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/metaData.js
|
|
3708
3802
|
var metaData = __webpack_require__(55692);
|
|
3709
3803
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/cpuFallback/rendering/transform.js
|
|
@@ -4001,22 +4095,21 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4001
4095
|
this.worldToCanvas = (worldPos) => {
|
|
4002
4096
|
const pan = this.videoCamera.panWorld;
|
|
4003
4097
|
const worldToCanvasRatio = this.getWorldToCanvasRatio();
|
|
4004
|
-
const
|
|
4098
|
+
const canvasPos = [
|
|
4005
4099
|
(worldPos[0] + pan[0]) * worldToCanvasRatio,
|
|
4006
4100
|
(worldPos[1] + pan[1]) * worldToCanvasRatio,
|
|
4007
4101
|
];
|
|
4008
|
-
const canvasPos = [subCanvasPos[0], subCanvasPos[1]];
|
|
4009
4102
|
return canvasPos;
|
|
4010
4103
|
};
|
|
4011
4104
|
this.getRotation = () => 0;
|
|
4012
4105
|
this.canvasToIndex = (canvasPos) => {
|
|
4013
4106
|
const transform = this.getTransform();
|
|
4014
4107
|
transform.invert();
|
|
4015
|
-
return transform.transformPoint(canvasPos);
|
|
4108
|
+
return transform.transformPoint(canvasPos.map((it) => it * devicePixelRatio));
|
|
4016
4109
|
};
|
|
4017
4110
|
this.indexToCanvas = (indexPos) => {
|
|
4018
4111
|
const transform = this.getTransform();
|
|
4019
|
-
return transform.transformPoint(indexPos);
|
|
4112
|
+
return (transform.transformPoint(indexPos).map((it) => it / devicePixelRatio));
|
|
4020
4113
|
};
|
|
4021
4114
|
this.customRenderViewportToCanvas = () => {
|
|
4022
4115
|
this.renderFrame();
|
|
@@ -4024,8 +4117,10 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4024
4117
|
this.renderFrame = () => {
|
|
4025
4118
|
const transform = this.getTransform();
|
|
4026
4119
|
const transformationMatrix = transform.getMatrix();
|
|
4027
|
-
this.canvasContext
|
|
4028
|
-
|
|
4120
|
+
const ctx = this.canvasContext;
|
|
4121
|
+
ctx.resetTransform();
|
|
4122
|
+
ctx.transform(transformationMatrix[0], transformationMatrix[1], transformationMatrix[2], transformationMatrix[3], transformationMatrix[4], transformationMatrix[5]);
|
|
4123
|
+
ctx.drawImage(this.videoElement, 0, 0, this.videoWidth, this.videoHeight);
|
|
4029
4124
|
for (const actor of this.getActors()) {
|
|
4030
4125
|
actor.actor.render(this, this.canvasContext);
|
|
4031
4126
|
}
|
|
@@ -4421,7 +4516,7 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4421
4516
|
}
|
|
4422
4517
|
setCamera(camera) {
|
|
4423
4518
|
const { parallelScale, focalPoint } = camera;
|
|
4424
|
-
if (
|
|
4519
|
+
if (parallelScale) {
|
|
4425
4520
|
this.videoCamera.parallelScale =
|
|
4426
4521
|
this.element.clientHeight / 2 / parallelScale;
|
|
4427
4522
|
}
|
|
@@ -4479,7 +4574,7 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4479
4574
|
if (options.withNavigation) {
|
|
4480
4575
|
return true;
|
|
4481
4576
|
}
|
|
4482
|
-
const currentIndex = this.
|
|
4577
|
+
const currentIndex = this.getSliceIndex();
|
|
4483
4578
|
if (Array.isArray(sliceIndex)) {
|
|
4484
4579
|
return currentIndex >= sliceIndex[0] && currentIndex <= sliceIndex[1];
|
|
4485
4580
|
}
|
|
@@ -4516,6 +4611,9 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4516
4611
|
getCurrentImageIdIndex() {
|
|
4517
4612
|
return Math.round(this.videoElement.currentTime * this.fps);
|
|
4518
4613
|
}
|
|
4614
|
+
getSliceIndex() {
|
|
4615
|
+
return this.getCurrentImageIdIndex();
|
|
4616
|
+
}
|
|
4519
4617
|
getCamera() {
|
|
4520
4618
|
const { parallelScale } = this.videoCamera;
|
|
4521
4619
|
const canvasCenter = [
|
|
@@ -4533,19 +4631,18 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4533
4631
|
};
|
|
4534
4632
|
}
|
|
4535
4633
|
getPan() {
|
|
4536
|
-
const
|
|
4537
|
-
return [
|
|
4634
|
+
const panWorld = this.videoCamera.panWorld;
|
|
4635
|
+
return [panWorld[0], panWorld[1]];
|
|
4538
4636
|
}
|
|
4539
4637
|
refreshRenderValues() {
|
|
4540
|
-
let worldToCanvasRatio = this.canvas.
|
|
4638
|
+
let worldToCanvasRatio = this.canvas.offsetWidth / this.videoWidth;
|
|
4541
4639
|
if (this.videoHeight * worldToCanvasRatio > this.canvas.height) {
|
|
4542
|
-
|
|
4543
|
-
worldToCanvasRatio *= secondWorldToCanvasRatio;
|
|
4640
|
+
worldToCanvasRatio = this.canvas.offsetHeight / this.videoHeight;
|
|
4544
4641
|
}
|
|
4545
4642
|
const drawWidth = Math.floor(this.videoWidth * worldToCanvasRatio);
|
|
4546
4643
|
const drawHeight = Math.floor(this.videoHeight * worldToCanvasRatio);
|
|
4547
|
-
const xOffsetCanvas = this.canvas.
|
|
4548
|
-
const yOffsetCanvas = this.canvas.
|
|
4644
|
+
const xOffsetCanvas = (this.canvas.offsetWidth - drawWidth) / 2;
|
|
4645
|
+
const yOffsetCanvas = (this.canvas.offsetHeight - drawHeight) / 2;
|
|
4549
4646
|
const xOffsetWorld = xOffsetCanvas / worldToCanvasRatio;
|
|
4550
4647
|
const yOffsetWorld = yOffsetCanvas / worldToCanvasRatio;
|
|
4551
4648
|
this.videoCamera.panWorld = [xOffsetWorld, yOffsetWorld];
|
|
@@ -4559,14 +4656,19 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4559
4656
|
}
|
|
4560
4657
|
getTransform() {
|
|
4561
4658
|
const panWorld = this.videoCamera.panWorld;
|
|
4659
|
+
const devicePixelRatio = window.devicePixelRatio || 1;
|
|
4562
4660
|
const worldToCanvasRatio = this.getWorldToCanvasRatio();
|
|
4563
4661
|
const canvasToWorldRatio = this.getCanvasToWorldRatio();
|
|
4564
|
-
const halfCanvas = [
|
|
4662
|
+
const halfCanvas = [
|
|
4663
|
+
this.canvas.offsetWidth / 2,
|
|
4664
|
+
this.canvas.offsetHeight / 2,
|
|
4665
|
+
];
|
|
4565
4666
|
const halfCanvasWorldCoordinates = [
|
|
4566
4667
|
halfCanvas[0] * canvasToWorldRatio,
|
|
4567
4668
|
halfCanvas[1] * canvasToWorldRatio,
|
|
4568
4669
|
];
|
|
4569
4670
|
const transform = new rendering_transform/* Transform */.d();
|
|
4671
|
+
transform.scale(devicePixelRatio, devicePixelRatio);
|
|
4570
4672
|
transform.translate(halfCanvas[0], halfCanvas[1]);
|
|
4571
4673
|
transform.scale(worldToCanvasRatio, worldToCanvasRatio);
|
|
4572
4674
|
transform.translate(panWorld[0], panWorld[1]);
|
|
@@ -4619,7 +4721,7 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
4619
4721
|
/* harmony import */ var _utilities_hasNaNValues__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(73139);
|
|
4620
4722
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(88903);
|
|
4621
4723
|
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(71702);
|
|
4622
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
|
|
4724
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(98362);
|
|
4623
4725
|
|
|
4624
4726
|
|
|
4625
4727
|
|
|
@@ -4915,7 +5017,7 @@ class Viewport {
|
|
|
4915
5017
|
this.setDisplayAreaScale(displayArea);
|
|
4916
5018
|
}
|
|
4917
5019
|
else {
|
|
4918
|
-
this.setInterpolationType(this.getProperties()
|
|
5020
|
+
this.setInterpolationType(this.getProperties()?.interpolationType || _enums__WEBPACK_IMPORTED_MODULE_13__.InterpolationType.LINEAR);
|
|
4919
5021
|
this.setDisplayAreaFit(displayArea);
|
|
4920
5022
|
}
|
|
4921
5023
|
if (storeAsInitialCamera) {
|
|
@@ -5121,6 +5223,9 @@ class Viewport {
|
|
|
5121
5223
|
getCurrentImageIdIndex() {
|
|
5122
5224
|
throw new Error('Not implemented');
|
|
5123
5225
|
}
|
|
5226
|
+
getSliceIndex() {
|
|
5227
|
+
throw new Error('Not implemented');
|
|
5228
|
+
}
|
|
5124
5229
|
getReferenceId(_specifier) {
|
|
5125
5230
|
return null;
|
|
5126
5231
|
}
|
|
@@ -5144,6 +5249,9 @@ class Viewport {
|
|
|
5144
5249
|
}, storeAsInitialCamera);
|
|
5145
5250
|
}
|
|
5146
5251
|
getZoom(compareCamera = this.initialCamera) {
|
|
5252
|
+
if (!compareCamera) {
|
|
5253
|
+
return 1;
|
|
5254
|
+
}
|
|
5147
5255
|
const activeCamera = this.getVtkActiveCamera();
|
|
5148
5256
|
const { parallelScale: initialParallelScale } = compareCamera;
|
|
5149
5257
|
return initialParallelScale / activeCamera.getParallelScale();
|
|
@@ -5397,12 +5505,13 @@ class Viewport {
|
|
|
5397
5505
|
return { widthWorld: maxX - minX, heightWorld: maxY - minY };
|
|
5398
5506
|
}
|
|
5399
5507
|
getViewReference(viewRefSpecifier = {}) {
|
|
5400
|
-
const { focalPoint: cameraFocalPoint, viewPlaneNormal } = this.getCamera();
|
|
5508
|
+
const { focalPoint: cameraFocalPoint, viewPlaneNormal, viewUp, } = this.getCamera();
|
|
5401
5509
|
const target = {
|
|
5402
5510
|
FrameOfReferenceUID: this.getFrameOfReferenceUID(),
|
|
5403
5511
|
cameraFocalPoint,
|
|
5404
5512
|
viewPlaneNormal,
|
|
5405
|
-
|
|
5513
|
+
viewUp,
|
|
5514
|
+
sliceIndex: viewRefSpecifier.sliceIndex ?? this.getSliceIndex(),
|
|
5406
5515
|
};
|
|
5407
5516
|
return target;
|
|
5408
5517
|
}
|
|
@@ -5416,7 +5525,7 @@ class Viewport {
|
|
|
5416
5525
|
if (viewPlaneNormal &&
|
|
5417
5526
|
!(0,_utilities__WEBPACK_IMPORTED_MODULE_9__.isEqual)(viewPlaneNormal, camera.viewPlaneNormal) &&
|
|
5418
5527
|
!(0,_utilities__WEBPACK_IMPORTED_MODULE_9__.isEqual)(gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec3.negate */ .eR.negate(camera.viewPlaneNormal, camera.viewPlaneNormal), viewPlaneNormal)) {
|
|
5419
|
-
return options?.
|
|
5528
|
+
return options?.withOrientation === true;
|
|
5420
5529
|
}
|
|
5421
5530
|
return true;
|
|
5422
5531
|
}
|
|
@@ -5444,19 +5553,22 @@ class Viewport {
|
|
|
5444
5553
|
}
|
|
5445
5554
|
return target;
|
|
5446
5555
|
}
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5556
|
+
setViewReference(viewRef) {
|
|
5557
|
+
}
|
|
5558
|
+
setViewPresentation(viewPres) {
|
|
5559
|
+
if (!viewPres) {
|
|
5560
|
+
return;
|
|
5561
|
+
}
|
|
5562
|
+
const { displayArea, zoom = this.getZoom(), pan, rotation } = viewPres;
|
|
5563
|
+
if (displayArea !== this.getDisplayArea()) {
|
|
5564
|
+
this.setDisplayArea(displayArea);
|
|
5565
|
+
}
|
|
5566
|
+
this.setZoom(zoom);
|
|
5567
|
+
if (pan) {
|
|
5568
|
+
this.setPan(gl_matrix__WEBPACK_IMPORTED_MODULE_3__/* .vec2.scale */ .Zc.scale([0, 0], pan, zoom));
|
|
5569
|
+
}
|
|
5570
|
+
if (rotation >= 0) {
|
|
5571
|
+
this.setRotation(rotation);
|
|
5460
5572
|
}
|
|
5461
5573
|
}
|
|
5462
5574
|
_shouldUseNativeDataType() {
|
|
@@ -5545,15 +5657,15 @@ class Viewport {
|
|
|
5545
5657
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5546
5658
|
/* harmony export */ });
|
|
5547
5659
|
/* harmony import */ var _kitware_vtk_js_Common_DataModel_Plane__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84441);
|
|
5548
|
-
/* harmony import */ var
|
|
5549
|
-
/* harmony import */ var
|
|
5550
|
-
/* harmony import */ var
|
|
5551
|
-
/* harmony import */ var
|
|
5552
|
-
/* harmony import */ var
|
|
5553
|
-
/* harmony import */ var
|
|
5554
|
-
/* harmony import */ var
|
|
5555
|
-
/* harmony import */ var
|
|
5556
|
-
/* harmony import */ var
|
|
5660
|
+
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13320);
|
|
5661
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88903);
|
|
5662
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98362);
|
|
5663
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35678);
|
|
5664
|
+
/* harmony import */ var _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6203);
|
|
5665
|
+
/* harmony import */ var _helpers_setDefaultVolumeVOI__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(83853);
|
|
5666
|
+
/* harmony import */ var _utilities_transferFunctionUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22350);
|
|
5667
|
+
/* harmony import */ var _utilities_getImageSliceDataForVolumeViewport__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(97508);
|
|
5668
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(44753);
|
|
5557
5669
|
|
|
5558
5670
|
|
|
5559
5671
|
|
|
@@ -5564,18 +5676,14 @@ class Viewport {
|
|
|
5564
5676
|
|
|
5565
5677
|
|
|
5566
5678
|
|
|
5567
|
-
class VolumeViewport extends
|
|
5679
|
+
class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A {
|
|
5568
5680
|
constructor(props) {
|
|
5569
5681
|
super(props);
|
|
5570
5682
|
this._useAcquisitionPlaneForViewPlane = false;
|
|
5571
5683
|
this.getNumberOfSlices = () => {
|
|
5572
|
-
const { numberOfSlices } = (0,
|
|
5684
|
+
const { numberOfSlices } = (0,_utilities_getImageSliceDataForVolumeViewport__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(this);
|
|
5573
5685
|
return numberOfSlices;
|
|
5574
5686
|
};
|
|
5575
|
-
this.getSliceIndex = () => {
|
|
5576
|
-
const { imageIndex } = (0,_utilities_getImageSliceDataForVolumeViewport__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(this);
|
|
5577
|
-
return imageIndex;
|
|
5578
|
-
};
|
|
5579
5687
|
this.getCurrentImageIdIndex = (volumeId) => {
|
|
5580
5688
|
const { viewPlaneNormal, focalPoint } = this.getCamera();
|
|
5581
5689
|
const imageData = this.getImageData(volumeId);
|
|
@@ -5583,24 +5691,28 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5583
5691
|
return;
|
|
5584
5692
|
}
|
|
5585
5693
|
const { origin, direction, spacing } = imageData;
|
|
5586
|
-
const spacingInNormal = (0,
|
|
5587
|
-
const sub =
|
|
5588
|
-
|
|
5589
|
-
const distance =
|
|
5694
|
+
const spacingInNormal = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getSpacingInNormalDirection)({ direction, spacing }, viewPlaneNormal);
|
|
5695
|
+
const sub = gl_matrix__WEBPACK_IMPORTED_MODULE_9__/* .vec3.create */ .eR.create();
|
|
5696
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_9__/* .vec3.sub */ .eR.sub(sub, focalPoint, origin);
|
|
5697
|
+
const distance = gl_matrix__WEBPACK_IMPORTED_MODULE_9__/* .vec3.dot */ .eR.dot(sub, viewPlaneNormal);
|
|
5590
5698
|
return Math.round(Math.abs(distance) / spacingInNormal);
|
|
5591
5699
|
};
|
|
5700
|
+
this.getSliceIndex = () => {
|
|
5701
|
+
const { imageIndex } = (0,_utilities_getImageSliceDataForVolumeViewport__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(this);
|
|
5702
|
+
return imageIndex;
|
|
5703
|
+
};
|
|
5592
5704
|
this.getCurrentImageId = () => {
|
|
5593
5705
|
const actorEntry = this.getDefaultActor();
|
|
5594
|
-
if (!actorEntry || !(0,
|
|
5706
|
+
if (!actorEntry || !(0,_utilities__WEBPACK_IMPORTED_MODULE_4__.actorIsA)(actorEntry, 'vtkVolume')) {
|
|
5595
5707
|
return;
|
|
5596
5708
|
}
|
|
5597
5709
|
const { uid } = actorEntry;
|
|
5598
|
-
const volume =
|
|
5710
|
+
const volume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(uid);
|
|
5599
5711
|
if (!volume) {
|
|
5600
5712
|
return;
|
|
5601
5713
|
}
|
|
5602
5714
|
const { viewPlaneNormal, focalPoint } = this.getCamera();
|
|
5603
|
-
return (0,
|
|
5715
|
+
return (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getClosestImageId)(volume, focalPoint, viewPlaneNormal);
|
|
5604
5716
|
};
|
|
5605
5717
|
this.getSlicePlaneCoordinates = () => {
|
|
5606
5718
|
const actorEntry = this.getDefaultActor();
|
|
@@ -5609,30 +5721,30 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5609
5721
|
return [];
|
|
5610
5722
|
}
|
|
5611
5723
|
const volumeId = actorEntry.uid;
|
|
5612
|
-
const imageVolume =
|
|
5724
|
+
const imageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeId);
|
|
5613
5725
|
const camera = this.getCamera();
|
|
5614
5726
|
const { focalPoint, position, viewPlaneNormal } = camera;
|
|
5615
|
-
const spacingInNormalDirection = (0,
|
|
5616
|
-
const sliceRange = (0,
|
|
5727
|
+
const spacingInNormalDirection = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getSpacingInNormalDirection)(imageVolume, viewPlaneNormal);
|
|
5728
|
+
const sliceRange = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getSliceRange)(actorEntry.actor, viewPlaneNormal, focalPoint);
|
|
5617
5729
|
const numSlicesBackward = Math.round((sliceRange.current - sliceRange.min) / spacingInNormalDirection);
|
|
5618
5730
|
const numSlicesForward = Math.round((sliceRange.max - sliceRange.current) / spacingInNormalDirection);
|
|
5619
5731
|
const currentSliceIndex = this.getSliceIndex();
|
|
5620
5732
|
const focalPoints = [];
|
|
5621
5733
|
for (let i = -numSlicesBackward; i <= numSlicesForward; i++) {
|
|
5622
|
-
const { newFocalPoint: point } = (0,
|
|
5734
|
+
const { newFocalPoint: point } = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.snapFocalPointToSlice)(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, i);
|
|
5623
5735
|
focalPoints.push({ sliceIndex: currentSliceIndex + i, point });
|
|
5624
5736
|
}
|
|
5625
5737
|
return focalPoints;
|
|
5626
5738
|
};
|
|
5627
5739
|
const { orientation } = this.options;
|
|
5628
|
-
if (orientation && orientation !==
|
|
5740
|
+
if (orientation && orientation !== _enums__WEBPACK_IMPORTED_MODULE_3__.OrientationAxis.ACQUISITION) {
|
|
5629
5741
|
this.applyViewOrientation(orientation);
|
|
5630
5742
|
return;
|
|
5631
5743
|
}
|
|
5632
5744
|
this._useAcquisitionPlaneForViewPlane = true;
|
|
5633
5745
|
}
|
|
5634
5746
|
async setVolumes(volumeInputArray, immediate = false, suppressEvents = false) {
|
|
5635
|
-
const firstImageVolume =
|
|
5747
|
+
const firstImageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeInputArray[0].volumeId);
|
|
5636
5748
|
if (!firstImageVolume) {
|
|
5637
5749
|
throw new Error(`imageVolume with id: ${firstImageVolume.volumeId} does not exist`);
|
|
5638
5750
|
}
|
|
@@ -5643,7 +5755,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5643
5755
|
return super.setVolumes(volumeInputArray, immediate, suppressEvents);
|
|
5644
5756
|
}
|
|
5645
5757
|
async addVolumes(volumeInputArray, immediate = false, suppressEvents = false) {
|
|
5646
|
-
const firstImageVolume =
|
|
5758
|
+
const firstImageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeInputArray[0].volumeId);
|
|
5647
5759
|
if (!firstImageVolume) {
|
|
5648
5760
|
throw new Error(`imageVolume with id: ${firstImageVolume.volumeId} does not exist`);
|
|
5649
5761
|
}
|
|
@@ -5656,8 +5768,8 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5656
5768
|
setOrientation(orientation, immediate = true) {
|
|
5657
5769
|
let viewPlaneNormal, viewUp;
|
|
5658
5770
|
if (typeof orientation === 'string') {
|
|
5659
|
-
if (
|
|
5660
|
-
({ viewPlaneNormal, viewUp } =
|
|
5771
|
+
if (_constants__WEBPACK_IMPORTED_MODULE_2__.MPR_CAMERA_VALUES[orientation]) {
|
|
5772
|
+
({ viewPlaneNormal, viewUp } = _constants__WEBPACK_IMPORTED_MODULE_2__.MPR_CAMERA_VALUES[orientation]);
|
|
5661
5773
|
}
|
|
5662
5774
|
else if (orientation === 'acquisition') {
|
|
5663
5775
|
({ viewPlaneNormal, viewUp } = this._getAcquisitionPlaneOrientation());
|
|
@@ -5686,7 +5798,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5686
5798
|
return;
|
|
5687
5799
|
}
|
|
5688
5800
|
const volumeId = actorEntry.uid;
|
|
5689
|
-
const imageVolume =
|
|
5801
|
+
const imageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeId);
|
|
5690
5802
|
if (!imageVolume) {
|
|
5691
5803
|
throw new Error(`imageVolume with id: ${volumeId} does not exist in cache`);
|
|
5692
5804
|
}
|
|
@@ -5731,12 +5843,15 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5731
5843
|
this.render();
|
|
5732
5844
|
}
|
|
5733
5845
|
}
|
|
5734
|
-
resetCamera(resetPan = true, resetZoom = true, resetToCenter = true, resetRotation = false) {
|
|
5846
|
+
resetCamera(resetPan = true, resetZoom = true, resetToCenter = true, resetRotation = false, supressEvents = false) {
|
|
5847
|
+
const { orientation } = this.viewportProperties;
|
|
5848
|
+
if (orientation) {
|
|
5849
|
+
this.applyViewOrientation(orientation, false);
|
|
5850
|
+
}
|
|
5735
5851
|
super.resetCamera(resetPan, resetZoom, resetToCenter);
|
|
5736
5852
|
this.resetVolumeViewportClippingRange();
|
|
5737
5853
|
const activeCamera = this.getVtkActiveCamera();
|
|
5738
5854
|
const viewPlaneNormal = activeCamera.getViewPlaneNormal();
|
|
5739
|
-
const viewUp = activeCamera.getViewUp();
|
|
5740
5855
|
const focalPoint = activeCamera.getFocalPoint();
|
|
5741
5856
|
const actorEntries = this.getActors();
|
|
5742
5857
|
actorEntries.forEach((actorEntry) => {
|
|
@@ -5749,7 +5864,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5749
5864
|
const clipPlane1 = _kitware_vtk_js_Common_DataModel_Plane__WEBPACK_IMPORTED_MODULE_0__/* ["default"].newInstance */ .Ay.newInstance();
|
|
5750
5865
|
const clipPlane2 = _kitware_vtk_js_Common_DataModel_Plane__WEBPACK_IMPORTED_MODULE_0__/* ["default"].newInstance */ .Ay.newInstance();
|
|
5751
5866
|
const newVtkPlanes = [clipPlane1, clipPlane2];
|
|
5752
|
-
let slabThickness =
|
|
5867
|
+
let slabThickness = _constants__WEBPACK_IMPORTED_MODULE_2__.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
5753
5868
|
if (actorEntry.slabThickness) {
|
|
5754
5869
|
slabThickness = actorEntry.slabThickness;
|
|
5755
5870
|
}
|
|
@@ -5759,13 +5874,22 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5759
5874
|
}
|
|
5760
5875
|
});
|
|
5761
5876
|
if (resetRotation &&
|
|
5762
|
-
|
|
5763
|
-
const viewToReset =
|
|
5877
|
+
_constants__WEBPACK_IMPORTED_MODULE_2__.MPR_CAMERA_VALUES[this.viewportProperties.orientation] !== undefined) {
|
|
5878
|
+
const viewToReset = _constants__WEBPACK_IMPORTED_MODULE_2__.MPR_CAMERA_VALUES[this.viewportProperties.orientation];
|
|
5764
5879
|
this.setCameraNoEvent({
|
|
5765
5880
|
viewUp: viewToReset.viewUp,
|
|
5766
5881
|
viewPlaneNormal: viewToReset.viewPlaneNormal,
|
|
5767
5882
|
});
|
|
5768
5883
|
}
|
|
5884
|
+
if (!supressEvents) {
|
|
5885
|
+
const eventDetail = {
|
|
5886
|
+
viewportId: this.id,
|
|
5887
|
+
camera: this.getCamera(),
|
|
5888
|
+
renderingEngineId: this.renderingEngineId,
|
|
5889
|
+
element: this.element,
|
|
5890
|
+
};
|
|
5891
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_4__.triggerEvent)(this.element, _enums__WEBPACK_IMPORTED_MODULE_3__.Events.CAMERA_RESET, eventDetail);
|
|
5892
|
+
}
|
|
5769
5893
|
return true;
|
|
5770
5894
|
}
|
|
5771
5895
|
setSlabThickness(slabThickness, filterActorUIDs = []) {
|
|
@@ -5779,7 +5903,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5779
5903
|
});
|
|
5780
5904
|
}
|
|
5781
5905
|
actorEntries.forEach((actorEntry) => {
|
|
5782
|
-
if ((0,
|
|
5906
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_4__.actorIsA)(actorEntry, 'vtkVolume')) {
|
|
5783
5907
|
actorEntry.slabThickness = slabThickness;
|
|
5784
5908
|
}
|
|
5785
5909
|
});
|
|
@@ -5788,6 +5912,27 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5788
5912
|
this.triggerCameraModifiedEventIfNecessary(currentCamera, currentCamera);
|
|
5789
5913
|
this.viewportProperties.slabThickness = slabThickness;
|
|
5790
5914
|
}
|
|
5915
|
+
resetSlabThickness() {
|
|
5916
|
+
const actorEntries = this.getActors();
|
|
5917
|
+
actorEntries.forEach((actorEntry) => {
|
|
5918
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_4__.actorIsA)(actorEntry, 'vtkVolume')) {
|
|
5919
|
+
actorEntry.slabThickness = _constants__WEBPACK_IMPORTED_MODULE_2__.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
5920
|
+
}
|
|
5921
|
+
});
|
|
5922
|
+
const currentCamera = this.getCamera();
|
|
5923
|
+
this.updateClippingPlanesForActors(currentCamera);
|
|
5924
|
+
this.triggerCameraModifiedEventIfNecessary(currentCamera, currentCamera);
|
|
5925
|
+
this.viewportProperties.slabThickness = undefined;
|
|
5926
|
+
}
|
|
5927
|
+
getViewReference(viewRefSpecifier = {}) {
|
|
5928
|
+
const viewRef = super.getViewReference(viewRefSpecifier);
|
|
5929
|
+
if (!viewRef?.volumeId) {
|
|
5930
|
+
return;
|
|
5931
|
+
}
|
|
5932
|
+
const volume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(viewRef.volumeId);
|
|
5933
|
+
viewRef.referencedImageId = (0,_utilities__WEBPACK_IMPORTED_MODULE_4__.getClosestImageId)(volume, viewRef.cameraFocalPoint, viewRef.viewPlaneNormal);
|
|
5934
|
+
return viewRef;
|
|
5935
|
+
}
|
|
5791
5936
|
resetProperties(volumeId) {
|
|
5792
5937
|
this._resetProperties(volumeId);
|
|
5793
5938
|
}
|
|
@@ -5799,20 +5944,20 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5799
5944
|
throw new Error(`No actor found for the given volumeId: ${volumeId}`);
|
|
5800
5945
|
}
|
|
5801
5946
|
if (volumeActor.slabThickness) {
|
|
5802
|
-
volumeActor.slabThickness =
|
|
5947
|
+
volumeActor.slabThickness = _constants__WEBPACK_IMPORTED_MODULE_2__.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
5803
5948
|
this.viewportProperties.slabThickness = undefined;
|
|
5804
5949
|
this.updateClippingPlanesForActors(this.getCamera());
|
|
5805
5950
|
}
|
|
5806
|
-
const imageVolume =
|
|
5951
|
+
const imageVolume = _cache__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay.getVolume(volumeActor.uid);
|
|
5807
5952
|
if (!imageVolume) {
|
|
5808
5953
|
throw new Error(`imageVolume with id: ${volumeActor.uid} does not exist in cache`);
|
|
5809
5954
|
}
|
|
5810
|
-
(0,
|
|
5811
|
-
if ((0,
|
|
5955
|
+
(0,_helpers_setDefaultVolumeVOI__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)(volumeActor.actor, imageVolume, false);
|
|
5956
|
+
if ((0,_utilities__WEBPACK_IMPORTED_MODULE_4__.isImageActor)(volumeActor)) {
|
|
5812
5957
|
const transferFunction = volumeActor.actor
|
|
5813
5958
|
.getProperty()
|
|
5814
5959
|
.getRGBTransferFunction(0);
|
|
5815
|
-
(0,
|
|
5960
|
+
(0,_utilities_transferFunctionUtils__WEBPACK_IMPORTED_MODULE_7__.setTransferFunctionNodes)(transferFunction, this.initialTransferFunctionNodes);
|
|
5816
5961
|
}
|
|
5817
5962
|
const eventDetails = {
|
|
5818
5963
|
...super.getVOIModifiedEventDetail(volumeId),
|
|
@@ -5822,12 +5967,12 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5822
5967
|
const resetToCenter = true;
|
|
5823
5968
|
const resetCameraRotation = true;
|
|
5824
5969
|
this.resetCamera(resetPan, resetZoom, resetToCenter, resetCameraRotation);
|
|
5825
|
-
(0,
|
|
5970
|
+
(0,_utilities__WEBPACK_IMPORTED_MODULE_4__.triggerEvent)(this.element, _enums__WEBPACK_IMPORTED_MODULE_3__.Events.VOI_MODIFIED, eventDetails);
|
|
5826
5971
|
}
|
|
5827
5972
|
getSlicesClippingPlanes() {
|
|
5828
5973
|
const focalPoints = this.getSlicePlaneCoordinates();
|
|
5829
5974
|
const { viewPlaneNormal } = this.getCamera();
|
|
5830
|
-
const slabThickness =
|
|
5975
|
+
const slabThickness = _constants__WEBPACK_IMPORTED_MODULE_2__.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS;
|
|
5831
5976
|
return focalPoints.map(({ point, sliceIndex }) => {
|
|
5832
5977
|
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()];
|
|
5833
5978
|
this.setOrientationOfClippingPlanes(vtkPlanes, slabThickness, viewPlaneNormal, point);
|
|
@@ -5853,7 +5998,7 @@ class VolumeViewport extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_6__/*
|
|
|
5853
5998
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5854
5999
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5855
6000
|
/* harmony export */ });
|
|
5856
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6001
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98362);
|
|
5857
6002
|
/* harmony import */ var _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6203);
|
|
5858
6003
|
|
|
5859
6004
|
|
|
@@ -5890,6 +6035,9 @@ class VolumeViewport3D extends _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_1__/
|
|
|
5890
6035
|
resetProperties(volumeId) {
|
|
5891
6036
|
return null;
|
|
5892
6037
|
}
|
|
6038
|
+
resetSlabThickness() {
|
|
6039
|
+
return null;
|
|
6040
|
+
}
|
|
5893
6041
|
}
|
|
5894
6042
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (VolumeViewport3D);
|
|
5895
6043
|
|
|
@@ -8184,8 +8332,8 @@ function createVolumeMapper(imageData, vtkOpenGLTexture) {
|
|
|
8184
8332
|
|
|
8185
8333
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 70 modules
|
|
8186
8334
|
var utilities = __webpack_require__(35678);
|
|
8187
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js +
|
|
8188
|
-
var enums = __webpack_require__(
|
|
8335
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
8336
|
+
var enums = __webpack_require__(98362);
|
|
8189
8337
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/setDefaultVolumeVOI.js
|
|
8190
8338
|
var setDefaultVolumeVOI = __webpack_require__(83853);
|
|
8191
8339
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/createVolumeActor.js
|
|
@@ -8215,9 +8363,7 @@ async function createVolumeActor(props, element, viewportId, suppressEvents = fa
|
|
|
8215
8363
|
if (numberOfComponents === 3) {
|
|
8216
8364
|
volumeActor.getProperty().setIndependentComponents(false);
|
|
8217
8365
|
}
|
|
8218
|
-
|
|
8219
|
-
await (0,setDefaultVolumeVOI/* default */.A)(volumeActor, imageVolume, useNativeDataType);
|
|
8220
|
-
}
|
|
8366
|
+
await (0,setDefaultVolumeVOI/* default */.A)(volumeActor, imageVolume, useNativeDataType);
|
|
8221
8367
|
if (callback) {
|
|
8222
8368
|
callback({ volumeActor, volumeId });
|
|
8223
8369
|
}
|
|
@@ -8297,7 +8443,7 @@ var addImageSlicesToViewports = __webpack_require__(25271);
|
|
|
8297
8443
|
/* harmony import */ var _loaders_imageLoader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79220);
|
|
8298
8444
|
/* harmony import */ var _metaData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55692);
|
|
8299
8445
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35678);
|
|
8300
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
8446
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98362);
|
|
8301
8447
|
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13320);
|
|
8302
8448
|
|
|
8303
8449
|
|
|
@@ -8308,21 +8454,19 @@ const PRIORITY = 0;
|
|
|
8308
8454
|
const REQUEST_TYPE = _enums__WEBPACK_IMPORTED_MODULE_3__.RequestType.Prefetch;
|
|
8309
8455
|
async function setDefaultVolumeVOI(volumeActor, imageVolume, useNativeDataType) {
|
|
8310
8456
|
let voi = getVOIFromMetadata(imageVolume);
|
|
8311
|
-
if (!voi) {
|
|
8457
|
+
if (!voi && imageVolume?.imageIds?.length) {
|
|
8312
8458
|
voi = await getVOIFromMinMax(imageVolume, useNativeDataType);
|
|
8459
|
+
voi = handlePreScaledVolume(imageVolume, voi);
|
|
8313
8460
|
}
|
|
8314
|
-
if (
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
voi = handlePreScaledVolume(imageVolume, voi);
|
|
8318
|
-
const { lower, upper } = voi;
|
|
8319
|
-
if (lower === 0 && upper === 0) {
|
|
8461
|
+
if ((voi?.lower === 0 && voi?.upper === 0) ||
|
|
8462
|
+
voi?.lower === undefined ||
|
|
8463
|
+
voi?.upper === undefined) {
|
|
8320
8464
|
return;
|
|
8321
8465
|
}
|
|
8322
8466
|
volumeActor
|
|
8323
8467
|
.getProperty()
|
|
8324
8468
|
.getRGBTransferFunction(0)
|
|
8325
|
-
.setMappingRange(lower, upper);
|
|
8469
|
+
.setMappingRange(voi.lower, voi.upper);
|
|
8326
8470
|
}
|
|
8327
8471
|
function handlePreScaledVolume(imageVolume, voi) {
|
|
8328
8472
|
const imageIds = imageVolume.imageIds;
|
|
@@ -8338,18 +8482,26 @@ function handlePreScaledVolume(imageVolume, voi) {
|
|
|
8338
8482
|
return voi;
|
|
8339
8483
|
}
|
|
8340
8484
|
function getVOIFromMetadata(imageVolume) {
|
|
8341
|
-
const { imageIds } = imageVolume;
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
const
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
?
|
|
8351
|
-
: windowCenter
|
|
8352
|
-
|
|
8485
|
+
const { imageIds, metadata } = imageVolume;
|
|
8486
|
+
let voi;
|
|
8487
|
+
if (imageIds.length) {
|
|
8488
|
+
const imageIdIndex = Math.floor(imageIds.length / 2);
|
|
8489
|
+
const imageId = imageIds[imageIdIndex];
|
|
8490
|
+
const voiLutModule = _metaData__WEBPACK_IMPORTED_MODULE_1__.get('voiLutModule', imageId);
|
|
8491
|
+
if (voiLutModule && voiLutModule.windowWidth && voiLutModule.windowCenter) {
|
|
8492
|
+
const { windowWidth, windowCenter } = voiLutModule;
|
|
8493
|
+
voi = {
|
|
8494
|
+
windowWidth: Array.isArray(windowWidth) ? windowWidth[0] : windowWidth,
|
|
8495
|
+
windowCenter: Array.isArray(windowCenter)
|
|
8496
|
+
? windowCenter[0]
|
|
8497
|
+
: windowCenter,
|
|
8498
|
+
};
|
|
8499
|
+
}
|
|
8500
|
+
}
|
|
8501
|
+
else {
|
|
8502
|
+
voi = metadata?.voiLut?.[0];
|
|
8503
|
+
}
|
|
8504
|
+
if (voi) {
|
|
8353
8505
|
const { lower, upper } = _utilities__WEBPACK_IMPORTED_MODULE_2__.windowLevel.toLowHighRange(Number(voi.windowWidth), Number(voi.windowCenter));
|
|
8354
8506
|
return {
|
|
8355
8507
|
lower,
|
|
@@ -8412,13 +8564,13 @@ async function getVOIFromMinMax(imageVolume, useNativeDataType) {
|
|
|
8412
8564
|
}
|
|
8413
8565
|
function _getImageScalarDataFromImageVolume(imageVolume, byteOffset, bytePerPixel, voxelsPerImage) {
|
|
8414
8566
|
const { scalarData } = imageVolume;
|
|
8415
|
-
const {
|
|
8567
|
+
const { buffer } = scalarData;
|
|
8416
8568
|
if (scalarData.BYTES_PER_ELEMENT !== bytePerPixel) {
|
|
8417
8569
|
byteOffset *= scalarData.BYTES_PER_ELEMENT / bytePerPixel;
|
|
8418
8570
|
}
|
|
8419
8571
|
const TypedArray = scalarData.constructor;
|
|
8420
8572
|
const imageScalarData = new TypedArray(voxelsPerImage);
|
|
8421
|
-
const volumeBufferView = new TypedArray(
|
|
8573
|
+
const volumeBufferView = new TypedArray(buffer, byteOffset, voxelsPerImage);
|
|
8422
8574
|
imageScalarData.set(volumeBufferView);
|
|
8423
8575
|
return imageScalarData;
|
|
8424
8576
|
}
|
|
@@ -8445,7 +8597,7 @@ function _isCurrentImagePTPrescaled(modality, imageVolume) {
|
|
|
8445
8597
|
/* harmony export */ g: () => (/* binding */ resetVolumeNewImageState)
|
|
8446
8598
|
/* harmony export */ });
|
|
8447
8599
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35678);
|
|
8448
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
8600
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98362);
|
|
8449
8601
|
/* harmony import */ var _getRenderingEngine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49184);
|
|
8450
8602
|
/* harmony import */ var _BaseVolumeViewport__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6203);
|
|
8451
8603
|
|
|
@@ -8552,8 +8704,8 @@ function viewportTypeUsesCustomRenderingPipeline(viewportType) {
|
|
|
8552
8704
|
var getOrCreateCanvas = __webpack_require__(45543);
|
|
8553
8705
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/init.js + 1 modules
|
|
8554
8706
|
var init = __webpack_require__(71702);
|
|
8555
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js +
|
|
8556
|
-
var enums = __webpack_require__(
|
|
8707
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
8708
|
+
var enums = __webpack_require__(98362);
|
|
8557
8709
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/RenderingEngine.js
|
|
8558
8710
|
|
|
8559
8711
|
|
|
@@ -8844,7 +8996,12 @@ class RenderingEngine {
|
|
|
8844
8996
|
const prevCamera = vp.getCamera();
|
|
8845
8997
|
const rotation = vp.getRotation();
|
|
8846
8998
|
const { flipHorizontal } = prevCamera;
|
|
8847
|
-
|
|
8999
|
+
const resetPan = true;
|
|
9000
|
+
const resetZoom = true;
|
|
9001
|
+
const resetToCenter = true;
|
|
9002
|
+
const resetRotation = false;
|
|
9003
|
+
const supressEvents = true;
|
|
9004
|
+
vp.resetCamera(resetPan, resetZoom, resetToCenter, resetRotation, supressEvents);
|
|
8848
9005
|
const displayArea = vp.getDisplayArea();
|
|
8849
9006
|
if (keepCamera) {
|
|
8850
9007
|
if (displayArea) {
|
|
@@ -15313,7 +15470,7 @@ class Cache {
|
|
|
15313
15470
|
this._imageCacheSize = 0;
|
|
15314
15471
|
this._volumeCacheSize = 0;
|
|
15315
15472
|
this._maxCacheSize = 3 * ONE_GB;
|
|
15316
|
-
this._maxInstanceSize =
|
|
15473
|
+
this._maxInstanceSize = 4 * ONE_GB - 8;
|
|
15317
15474
|
this.setMaxCacheSize = (newMaxCacheSize) => {
|
|
15318
15475
|
if (!newMaxCacheSize || typeof newMaxCacheSize !== 'number') {
|
|
15319
15476
|
const errorMessage = `New max cacheSize ${this._maxCacheSize} should be defined and should be a number.`;
|
|
@@ -18129,6 +18286,20 @@ const presets = [
|
|
|
18129
18286
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (presets);
|
|
18130
18287
|
|
|
18131
18288
|
|
|
18289
|
+
/***/ }),
|
|
18290
|
+
|
|
18291
|
+
/***/ 99842:
|
|
18292
|
+
/***/ (() => {
|
|
18293
|
+
|
|
18294
|
+
"use strict";
|
|
18295
|
+
var ContourType;
|
|
18296
|
+
(function (ContourType) {
|
|
18297
|
+
ContourType["CLOSED_PLANAR"] = "CLOSED_PLANAR";
|
|
18298
|
+
ContourType["OPEN_PLANAR"] = "OPEN_PLANAR";
|
|
18299
|
+
})(ContourType || (ContourType = {}));
|
|
18300
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (ContourType)));
|
|
18301
|
+
|
|
18302
|
+
|
|
18132
18303
|
/***/ }),
|
|
18133
18304
|
|
|
18134
18305
|
/***/ 11731:
|
|
@@ -18488,8 +18659,8 @@ __webpack_require__.d(geometryLoader_namespaceObject, {
|
|
|
18488
18659
|
createAndCacheGeometry: () => (createAndCacheGeometry)
|
|
18489
18660
|
});
|
|
18490
18661
|
|
|
18491
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js +
|
|
18492
|
-
var enums = __webpack_require__(
|
|
18662
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
18663
|
+
var enums = __webpack_require__(98362);
|
|
18493
18664
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/constants/index.js + 2 modules
|
|
18494
18665
|
var constants = __webpack_require__(88903);
|
|
18495
18666
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/index.js + 3 modules
|
|
@@ -23475,7 +23646,7 @@ function createContourSet(geometryId, contourSetData) {
|
|
|
23475
23646
|
data: contourSetData.data,
|
|
23476
23647
|
color: contourSetData.color,
|
|
23477
23648
|
frameOfReferenceUID: contourSetData.frameOfReferenceUID,
|
|
23478
|
-
segmentIndex: 1,
|
|
23649
|
+
segmentIndex: contourSetData.segmentIndex ?? 1,
|
|
23479
23650
|
});
|
|
23480
23651
|
const geometry = {
|
|
23481
23652
|
id: geometryId,
|
|
@@ -23610,8 +23781,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23610
23781
|
;// CONCATENATED MODULE: ../../../node_modules/detect-gpu/dist/detect-gpu.esm.js
|
|
23611
23782
|
function e(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{d(n.next(e))}catch(e){a(e)}}function c(e){try{d(n.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}d((n=n.apply(e,t||[])).next())}))}const t=(/* unused pure expression or super */ null && (["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"]));function r(e){return e=e.toLowerCase().replace(/^angle ?\((.+)\)*$/,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const n="undefined"==typeof window,o=(()=>{if(n)return;const{userAgent:e,platform:t,maxTouchPoints:r}=window.navigator,o=/(iphone|ipod|ipad)/i.test(e),a="iPad"===t||"MacIntel"===t&&r>0&&!window.MSStream;return{isIpad:a,isMobile:/android/i.test(e)||o||a,isSafari12:/Version\/12.+Safari/.test(e)}})();function a(e,t,r){if(!r)return[t];const n=function(e){const t="\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n ",r="\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n ",n=e.createShader(35633),o=e.createShader(35632),a=e.createProgram();if(!(o&&n&&a))return;e.shaderSource(n,t),e.shaderSource(o,r),e.compileShader(n),e.compileShader(o),e.attachShader(a,n),e.attachShader(a,o),e.linkProgram(a),e.detachShader(a,n),e.detachShader(a,o),e.deleteShader(n),e.deleteShader(o),e.useProgram(a);const i=e.createBuffer();e.bindBuffer(34962,i),e.bufferData(34962,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);const c=e.getAttribLocation(a,"aPosition");e.vertexAttribPointer(c,3,5126,!1,0,0),e.enableVertexAttribArray(c),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);const d=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,d),e.deleteProgram(a),e.deleteBuffer(i),d.join("")}(e),a="801621810",i="8016218135",c="80162181161",d=(null==o?void 0:o.isIpad)?[["a7",c,12],["a8",i,15],["a8x",i,15],["a9",i,15],["a9x",i,15],["a10",i,15],["a10x",i,15],["a12",a,15],["a12x",a,15],["a12z",a,15],["a14",a,15],["m1",a,15]]:[["a7",c,12],["a8",i,12],["a9",i,15],["a10",i,15],["a11",a,15],["a12",a,15],["a13",a,15],["a14",a,15]];let l;"80162181255"===n?l=d.filter((([,,e])=>e>=14)):(l=d.filter((([,e])=>e===n)),l.length||(l=d));return l.map((([e])=>`apple ${e} gpu`))}const i=(/* unused pure expression or super */ null && ([])),c=(/* unused pure expression or super */ null && ([]));function d(e,t){if(e===t)return 0;const r=e;e.length>t.length&&(e=t,t=r);let n=e.length,o=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-o);)n--,o--;let a,d=0;for(;d<n&&e.charCodeAt(d)===t.charCodeAt(d);)d++;if(n-=d,o-=d,0===n)return o;let l,s,f=0,u=0,h=0;for(;u<n;)c[u]=e.charCodeAt(d+u),i[u]=++u;for(;h<o;)for(a=t.charCodeAt(d+h),l=h++,f=h,u=0;u<n;u++)s=a===c[u]?l:l+1,l=i[u],f=i[u]=l>f?s>f?f+1:s:s>l?l+1:s;return f}function l(e){return null!=e}class s extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}const f=({mobileTiers:i=[0,15,30,60],desktopTiers:c=[0,15,30,60],override:f={},glContext:u,failIfMajorPerformanceCaveat:h=!1,benchmarksURL:g="https://unpkg.com/detect-gpu@4.0.50/dist/benchmarks"}={})=>e(void 0,void 0,void 0,(function*(){const p={};if(n)return{tier:0,type:"SSR"};const{isIpad:m=!!(null==o?void 0:o.isIpad),isMobile:v=!!(null==o?void 0:o.isMobile),screenSize:w=window.screen,loadBenchmarks:x=(t=>e(void 0,void 0,void 0,(function*(){const e=yield fetch(`${g}/${t}`).then((e=>e.json()));if(parseInt(e.shift().split(".")[0],10)<4)throw new s("Detect GPU benchmark data is out of date. Please update to version 4x");return e})))}=f;let{renderer:A}=f;const P=(e,t,r,n,o)=>({device:o,fps:n,gpu:r,isMobile:v,tier:e,type:t});let b,S="";if(A)A=r(A),b=[A];else{const e=u||function(e,t=!1){const r={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:t,powerPreference:"high-performance",stencil:!1};e&&delete r.powerPreference;const n=window.document.createElement("canvas"),o=n.getContext("webgl",r)||n.getContext("experimental-webgl",r);return null!=o?o:void 0}(null==o?void 0:o.isSafari12,h);if(!e)return P(0,"WEBGL_UNSUPPORTED");const t=e.getExtension("WEBGL_debug_renderer_info");if(t&&(A=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),!A)return P(1,"FALLBACK");S=A,A=r(A),b=function(e,t,r){return"apple gpu"===t?a(e,t,r):[t]}(e,A,v)}const y=(yield Promise.all(b.map((function(t){var r;return e(this,void 0,void 0,(function*(){const e=(e=>{const t=v?["adreno","apple","mali-t","mali","nvidia","powervr"]:["intel","apple","amd","radeon","nvidia","geforce"];for(const r of t)if(e.includes(r))return r})(t);if(!e)return;const n=`${v?"m":"d"}-${e}${m?"-ipad":""}.json`,o=p[n]=null!==(r=p[n])&&void 0!==r?r:x(n);let a;try{a=yield o}catch(e){if(e instanceof s)throw e;return}const i=function(e){var t;const r=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==r?void 0:r.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(t);let c=a.filter((([,e])=>e===i));c.length||(c=a.filter((([e])=>e.includes(t))));const l=c.length;if(0===l)return;let f,[u,,,h]=l>1?c.map((e=>[e,d(t,e[0])])).sort((([,e],[,t])=>e-t))[0][0]:c[0],g=Number.MAX_VALUE;const{devicePixelRatio:A}=window,P=w.width*A*w.height*A;for(const e of h){const[t,r]=e,n=t*r,o=Math.abs(P-n);o<g&&(g=o,f=e)}if(!f)return;const[,,b,S]=f;return[g,b,u,S]}))})))).filter(l).sort((([e=Number.MAX_VALUE,t],[r=Number.MAX_VALUE,n])=>e===r?t-n:e-r));if(!y.length){const e=t.find((e=>A.includes(e)));return e?P(0,"BLOCKLISTED",e):P(1,"FALLBACK",`${A} (${S})`)}const[,C,E,L]=y[0];if(-1===C)return P(0,"BLOCKLISTED",E,C,L);const M=v?i:c;let $=0;for(let e=0;e<M.length;e++)C>=M[e]&&($=e);return P($,"BENCHMARK",E,C,L)}));
|
|
23612
23783
|
|
|
23613
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js +
|
|
23614
|
-
var enums = __webpack_require__(
|
|
23784
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
23785
|
+
var enums = __webpack_require__(98362);
|
|
23615
23786
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/getRenderingEngine.js
|
|
23616
23787
|
var getRenderingEngine = __webpack_require__(49184);
|
|
23617
23788
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 70 modules
|
|
@@ -23854,8 +24025,8 @@ const sequentialRetrieveStages = [
|
|
|
23854
24025
|
];
|
|
23855
24026
|
/* harmony default export */ const sequentialRetrieve = (sequentialRetrieveStages);
|
|
23856
24027
|
|
|
23857
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js +
|
|
23858
|
-
var enums = __webpack_require__(
|
|
24028
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
24029
|
+
var enums = __webpack_require__(98362);
|
|
23859
24030
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/configuration/interleavedRetrieve.js
|
|
23860
24031
|
|
|
23861
24032
|
const nearbyFrames = [
|
|
@@ -24242,7 +24413,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24242
24413
|
/* harmony export */ setupCacheOptimizationEventListener: () => (/* binding */ setupCacheOptimizationEventListener)
|
|
24243
24414
|
/* harmony export */ });
|
|
24244
24415
|
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13320);
|
|
24245
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
24416
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98362);
|
|
24246
24417
|
/* harmony import */ var _eventTarget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51884);
|
|
24247
24418
|
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71702);
|
|
24248
24419
|
|
|
@@ -24364,7 +24535,7 @@ function findMatchingColormap(rgbPoints, actor) {
|
|
|
24364
24535
|
return false;
|
|
24365
24536
|
}
|
|
24366
24537
|
for (let i = 0; i < presetRGBPoints.length; i += 4) {
|
|
24367
|
-
if (!(0,_isEqual__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
24538
|
+
if (!(0,_isEqual__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay)(presetRGBPoints.slice(i + 1, i + 4), rgbPoints.slice(i + 1, i + 4))) {
|
|
24368
24539
|
return false;
|
|
24369
24540
|
}
|
|
24370
24541
|
}
|
|
@@ -24393,6 +24564,7 @@ function findMatchingColormap(rgbPoints, actor) {
|
|
|
24393
24564
|
}
|
|
24394
24565
|
return {
|
|
24395
24566
|
name: matchedColormap.Name,
|
|
24567
|
+
opacity,
|
|
24396
24568
|
};
|
|
24397
24569
|
}
|
|
24398
24570
|
|
|
@@ -24727,6 +24899,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24727
24899
|
__webpack_require__.d(__webpack_exports__, {
|
|
24728
24900
|
PointsManager: () => (/* reexport */ PointsManager),
|
|
24729
24901
|
ProgressiveIterator: () => (/* reexport */ ProgressiveIterator),
|
|
24902
|
+
RLEVoxelMap: () => (/* reexport */ RLEVoxelMap),
|
|
24730
24903
|
VoxelManager: () => (/* reexport */ VoxelManager),
|
|
24731
24904
|
actorIsA: () => (/* reexport */ actorCheck/* actorIsA */.N),
|
|
24732
24905
|
applyPreset: () => (/* reexport */ applyPreset),
|
|
@@ -24782,7 +24955,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24782
24955
|
imageToWorldCoords: () => (/* reexport */ imageToWorldCoords),
|
|
24783
24956
|
indexWithinDimensions: () => (/* reexport */ indexWithinDimensions),
|
|
24784
24957
|
invertRgbTransferFunction: () => (/* reexport */ invertRgbTransferFunction),
|
|
24785
|
-
isEqual: () => (/* reexport */ isEqual/*
|
|
24958
|
+
isEqual: () => (/* reexport */ isEqual/* isEqual */.n4),
|
|
24959
|
+
isEqualAbs: () => (/* reexport */ isEqual/* isEqualAbs */.Ph),
|
|
24960
|
+
isEqualNegative: () => (/* reexport */ isEqual/* isEqualNegative */.WC),
|
|
24786
24961
|
isImageActor: () => (/* reexport */ actorCheck/* isImageActor */.e),
|
|
24787
24962
|
isOpposite: () => (/* reexport */ isOpposite),
|
|
24788
24963
|
isPTPrescaledWithSUV: () => (/* reexport */ utilities_isPTPrescaledWithSUV),
|
|
@@ -25213,6 +25388,9 @@ function createUint8SharedArray(length) {
|
|
|
25213
25388
|
|
|
25214
25389
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/createFloat32SharedArray.js
|
|
25215
25390
|
|
|
25391
|
+
const SMALL_MEMORY_LIMIT = 2 * 1024 * 1024 * 1024 - 2;
|
|
25392
|
+
const BIG_MEMORY_LIMIT = SMALL_MEMORY_LIMIT * 2;
|
|
25393
|
+
const PAGE_SIZE = 65536;
|
|
25216
25394
|
function createFloat32SharedArray(length) {
|
|
25217
25395
|
if (!(0,init/* getShouldUseSharedArrayBuffer */.TB)()) {
|
|
25218
25396
|
throw new Error('Your page is NOT cross-origin isolated, see https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated');
|
|
@@ -25220,8 +25398,20 @@ function createFloat32SharedArray(length) {
|
|
|
25220
25398
|
if (window.SharedArrayBuffer === undefined) {
|
|
25221
25399
|
throw new Error('SharedArrayBuffer is NOT supported in your browser see https://developer.chrome.com/blog/enabling-shared-array-buffer/');
|
|
25222
25400
|
}
|
|
25223
|
-
const
|
|
25224
|
-
|
|
25401
|
+
const byteLength = length * 4;
|
|
25402
|
+
if (byteLength < SMALL_MEMORY_LIMIT) {
|
|
25403
|
+
const sharedArrayBuffer = new SharedArrayBuffer(byteLength);
|
|
25404
|
+
return new Float32Array(sharedArrayBuffer);
|
|
25405
|
+
}
|
|
25406
|
+
else if (byteLength < BIG_MEMORY_LIMIT) {
|
|
25407
|
+
const pages = Math.ceil(byteLength / PAGE_SIZE);
|
|
25408
|
+
const memory = new WebAssembly.Memory({
|
|
25409
|
+
initial: pages,
|
|
25410
|
+
maximum: pages,
|
|
25411
|
+
shared: true,
|
|
25412
|
+
});
|
|
25413
|
+
return new Float32Array(memory.buffer, 0, length);
|
|
25414
|
+
}
|
|
25225
25415
|
}
|
|
25226
25416
|
/* harmony default export */ const utilities_createFloat32SharedArray = (createFloat32SharedArray);
|
|
25227
25417
|
|
|
@@ -25389,8 +25579,8 @@ function transformIndexToWorld(imageData, voxelPos) {
|
|
|
25389
25579
|
|
|
25390
25580
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/imageLoader.js
|
|
25391
25581
|
var imageLoader = __webpack_require__(79220);
|
|
25392
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js +
|
|
25393
|
-
var enums = __webpack_require__(
|
|
25582
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/index.js + 4 modules
|
|
25583
|
+
var enums = __webpack_require__(98362);
|
|
25394
25584
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/requestPool/imageLoadPoolManager.js
|
|
25395
25585
|
var imageLoadPoolManager = __webpack_require__(775);
|
|
25396
25586
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/getOrCreateCanvas.js
|
|
@@ -25409,23 +25599,28 @@ const isPTPrescaledWithSUV = (image) => {
|
|
|
25409
25599
|
|
|
25410
25600
|
|
|
25411
25601
|
|
|
25412
|
-
function renderToCanvasGPU(canvas,
|
|
25602
|
+
function renderToCanvasGPU(canvas, imageOrVolume, modality = undefined, renderingEngineId = '_thumbnails', viewportOptions = {
|
|
25603
|
+
displayArea: { imageArea: [1, 1] },
|
|
25604
|
+
}) {
|
|
25413
25605
|
if (!canvas || !(canvas instanceof HTMLCanvasElement)) {
|
|
25414
25606
|
throw new Error('canvas element is required');
|
|
25415
25607
|
}
|
|
25416
|
-
const
|
|
25608
|
+
const isVolume = !imageOrVolume.imageId;
|
|
25609
|
+
const image = !isVolume && imageOrVolume;
|
|
25610
|
+
const volume = isVolume && imageOrVolume;
|
|
25611
|
+
const imageIdToPrint = image?.imageId || volume?.volumeId;
|
|
25417
25612
|
const viewportId = `renderGPUViewport-${imageIdToPrint}`;
|
|
25418
|
-
const imageId = image.imageId;
|
|
25419
25613
|
const element = document.createElement('div');
|
|
25420
25614
|
const devicePixelRatio = window.devicePixelRatio || 1;
|
|
25615
|
+
if (!viewportOptions.displayArea) {
|
|
25616
|
+
viewportOptions.displayArea = { imageArea: [1, 1] };
|
|
25617
|
+
}
|
|
25421
25618
|
const originalWidth = canvas.width;
|
|
25422
25619
|
const originalHeight = canvas.height;
|
|
25423
|
-
element.style.width = `${originalWidth + getOrCreateCanvas/* EPSILON */.p8}px`;
|
|
25424
|
-
element.style.height = `${originalHeight + getOrCreateCanvas/* EPSILON */.p8}px`;
|
|
25620
|
+
element.style.width = `${originalWidth / devicePixelRatio + getOrCreateCanvas/* EPSILON */.p8}px`;
|
|
25621
|
+
element.style.height = `${originalHeight / devicePixelRatio + getOrCreateCanvas/* EPSILON */.p8}px`;
|
|
25425
25622
|
element.style.visibility = 'hidden';
|
|
25426
25623
|
element.style.position = 'absolute';
|
|
25427
|
-
canvas.width = originalWidth * devicePixelRatio;
|
|
25428
|
-
canvas.height = originalHeight * devicePixelRatio;
|
|
25429
25624
|
document.body.appendChild(element);
|
|
25430
25625
|
const uniqueId = viewportId.split(':').join('-');
|
|
25431
25626
|
element.setAttribute('viewport-id-for-remove', uniqueId);
|
|
@@ -25434,26 +25629,44 @@ function renderToCanvasGPU(canvas, image, modality = undefined, renderingEngineI
|
|
|
25434
25629
|
new RenderingEngine/* default */.Ay(renderingEngineId);
|
|
25435
25630
|
let viewport = renderingEngine.getViewport(viewportId);
|
|
25436
25631
|
if (!viewport) {
|
|
25437
|
-
const
|
|
25632
|
+
const viewportInput = {
|
|
25438
25633
|
viewportId,
|
|
25439
|
-
type: enums.ViewportType.STACK,
|
|
25634
|
+
type: isVolume ? enums.ViewportType.ORTHOGRAPHIC : enums.ViewportType.STACK,
|
|
25440
25635
|
element,
|
|
25441
25636
|
defaultOptions: {
|
|
25442
25637
|
...viewportOptions,
|
|
25443
25638
|
suppressEvents: true,
|
|
25444
25639
|
},
|
|
25445
25640
|
};
|
|
25446
|
-
renderingEngine.enableElement(
|
|
25641
|
+
renderingEngine.enableElement(viewportInput);
|
|
25447
25642
|
viewport = renderingEngine.getViewport(viewportId);
|
|
25448
25643
|
}
|
|
25449
25644
|
return new Promise((resolve) => {
|
|
25450
25645
|
let elementRendered = false;
|
|
25646
|
+
let { viewReference } = viewportOptions;
|
|
25451
25647
|
const onImageRendered = (eventDetail) => {
|
|
25452
25648
|
if (elementRendered) {
|
|
25453
25649
|
return;
|
|
25454
25650
|
}
|
|
25651
|
+
if (viewReference) {
|
|
25652
|
+
const useViewRef = viewReference;
|
|
25653
|
+
viewReference = null;
|
|
25654
|
+
viewport.setViewReference(useViewRef);
|
|
25655
|
+
viewport.render();
|
|
25656
|
+
return;
|
|
25657
|
+
}
|
|
25455
25658
|
const context = canvas.getContext('2d');
|
|
25456
25659
|
context.drawImage(temporaryCanvas, 0, 0, temporaryCanvas.width, temporaryCanvas.height, 0, 0, canvas.width, canvas.height);
|
|
25660
|
+
const origin = viewport.canvasToWorld([0, 0]);
|
|
25661
|
+
const topRight = viewport.canvasToWorld([
|
|
25662
|
+
temporaryCanvas.width / devicePixelRatio,
|
|
25663
|
+
0,
|
|
25664
|
+
]);
|
|
25665
|
+
const bottomLeft = viewport.canvasToWorld([
|
|
25666
|
+
0,
|
|
25667
|
+
temporaryCanvas.height / devicePixelRatio,
|
|
25668
|
+
]);
|
|
25669
|
+
const thicknessMm = 1;
|
|
25457
25670
|
elementRendered = true;
|
|
25458
25671
|
element.removeEventListener(enums.Events.IMAGE_RENDERED, onImageRendered);
|
|
25459
25672
|
setTimeout(() => {
|
|
@@ -25463,10 +25676,20 @@ function renderToCanvasGPU(canvas, image, modality = undefined, renderingEngineI
|
|
|
25463
25676
|
element.remove();
|
|
25464
25677
|
});
|
|
25465
25678
|
}, 0);
|
|
25466
|
-
resolve(
|
|
25679
|
+
resolve({
|
|
25680
|
+
origin,
|
|
25681
|
+
bottomLeft,
|
|
25682
|
+
topRight,
|
|
25683
|
+
thicknessMm,
|
|
25684
|
+
});
|
|
25467
25685
|
};
|
|
25468
25686
|
element.addEventListener(enums.Events.IMAGE_RENDERED, onImageRendered);
|
|
25469
|
-
|
|
25687
|
+
if (isVolume) {
|
|
25688
|
+
viewport.setVolumes([volume], false, true);
|
|
25689
|
+
}
|
|
25690
|
+
else {
|
|
25691
|
+
viewport.renderImageObject(imageOrVolume);
|
|
25692
|
+
}
|
|
25470
25693
|
viewport.resetCamera();
|
|
25471
25694
|
if (modality === 'PT' && !utilities_isPTPrescaledWithSUV(image)) {
|
|
25472
25695
|
viewport.setProperties({
|
|
@@ -25490,7 +25713,12 @@ var drawImageSync = __webpack_require__(49892);
|
|
|
25490
25713
|
|
|
25491
25714
|
|
|
25492
25715
|
|
|
25493
|
-
function renderToCanvasCPU(canvas,
|
|
25716
|
+
function renderToCanvasCPU(canvas, imageOrVolume, modality, _renderingEngineId, _viewportOptions) {
|
|
25717
|
+
const volume = imageOrVolume;
|
|
25718
|
+
if (volume.volumeId) {
|
|
25719
|
+
throw new Error('Unsupported volume rendering for CPU');
|
|
25720
|
+
}
|
|
25721
|
+
const image = imageOrVolume;
|
|
25494
25722
|
const viewport = (0,getDefaultViewport/* default */.A)(canvas, image, modality);
|
|
25495
25723
|
const enabledElement = {
|
|
25496
25724
|
canvas,
|
|
@@ -25502,7 +25730,7 @@ function renderToCanvasCPU(canvas, image, modality, _renderingEngineId, _viewpor
|
|
|
25502
25730
|
const invalidated = true;
|
|
25503
25731
|
return new Promise((resolve, reject) => {
|
|
25504
25732
|
(0,drawImageSync/* default */.A)(enabledElement, invalidated);
|
|
25505
|
-
resolve(
|
|
25733
|
+
resolve(null);
|
|
25506
25734
|
});
|
|
25507
25735
|
}
|
|
25508
25736
|
|
|
@@ -25514,28 +25742,36 @@ function renderToCanvasCPU(canvas, image, modality, _renderingEngineId, _viewpor
|
|
|
25514
25742
|
|
|
25515
25743
|
|
|
25516
25744
|
|
|
25745
|
+
|
|
25517
25746
|
function loadImageToCanvas(options) {
|
|
25518
|
-
const { canvas, imageId, requestType = enums.RequestType.Thumbnail, priority = -5, renderingEngineId = '_thumbnails', useCPURendering = false, thumbnail = false, imageAspect = false,
|
|
25519
|
-
const
|
|
25747
|
+
const { canvas, imageId, viewReference, requestType = enums.RequestType.Thumbnail, priority = -5, renderingEngineId = '_thumbnails', useCPURendering = false, thumbnail = false, imageAspect = false, viewportOptions: baseViewportOptions, } = options;
|
|
25748
|
+
const volumeId = viewReference?.volumeId;
|
|
25749
|
+
const isVolume = volumeId && !imageId;
|
|
25750
|
+
const viewportOptions = viewReference && baseViewportOptions
|
|
25751
|
+
? { ...baseViewportOptions, viewReference }
|
|
25752
|
+
: baseViewportOptions;
|
|
25520
25753
|
const renderFn = useCPURendering ? renderToCanvasCPU : renderToCanvasGPU;
|
|
25521
25754
|
return new Promise((resolve, reject) => {
|
|
25522
|
-
function successCallback(
|
|
25755
|
+
function successCallback(imageOrVolume, imageId) {
|
|
25523
25756
|
const { modality } = metaData.get('generalSeriesModule', imageId) || {};
|
|
25524
|
-
image
|
|
25757
|
+
const image = !isVolume && imageOrVolume;
|
|
25758
|
+
const volume = isVolume && imageOrVolume;
|
|
25759
|
+
if (image) {
|
|
25760
|
+
image.isPreScaled = image.isPreScaled || image.preScale?.scaled;
|
|
25761
|
+
}
|
|
25525
25762
|
if (thumbnail) {
|
|
25526
25763
|
canvas.height = 256;
|
|
25527
25764
|
canvas.width = 256;
|
|
25528
25765
|
}
|
|
25529
|
-
if (
|
|
25530
|
-
canvas.width = canvas.
|
|
25531
|
-
canvas.height = canvas.offsetHeight * devicePixelRatio;
|
|
25766
|
+
if (imageAspect && image) {
|
|
25767
|
+
canvas.width = image && (canvas.height * image.width) / image.height;
|
|
25532
25768
|
}
|
|
25533
|
-
|
|
25534
|
-
|
|
25769
|
+
canvas.style.width = `${canvas.width / devicePixelRatio}px`;
|
|
25770
|
+
canvas.style.height = `${canvas.height / devicePixelRatio}px`;
|
|
25771
|
+
if (volume && useCPURendering) {
|
|
25772
|
+
reject(new Error('CPU rendering of volume not supported'));
|
|
25535
25773
|
}
|
|
25536
|
-
renderFn(canvas,
|
|
25537
|
-
resolve(imageId);
|
|
25538
|
-
});
|
|
25774
|
+
renderFn(canvas, imageOrVolume, modality, renderingEngineId, viewportOptions).then(resolve);
|
|
25539
25775
|
}
|
|
25540
25776
|
function errorCallback(error, imageId) {
|
|
25541
25777
|
console.error(error, imageId);
|
|
@@ -25548,20 +25784,28 @@ function loadImageToCanvas(options) {
|
|
|
25548
25784
|
errorCallback.call(this, error, imageId);
|
|
25549
25785
|
});
|
|
25550
25786
|
}
|
|
25551
|
-
const { useNorm16Texture
|
|
25552
|
-
const useNativeDataType = useNorm16Texture || preferSizeOverAccuracy;
|
|
25787
|
+
const { useNorm16Texture } = (0,init/* getConfiguration */.D0)().rendering;
|
|
25553
25788
|
const options = {
|
|
25554
25789
|
targetBuffer: {
|
|
25555
|
-
type:
|
|
25790
|
+
type: useNorm16Texture ? undefined : 'Float32Array',
|
|
25556
25791
|
},
|
|
25557
25792
|
preScale: {
|
|
25558
25793
|
enabled: true,
|
|
25559
25794
|
},
|
|
25560
|
-
useNativeDataType,
|
|
25561
25795
|
useRGBA: !!useCPURendering,
|
|
25562
25796
|
requestType,
|
|
25563
25797
|
};
|
|
25564
|
-
|
|
25798
|
+
if (volumeId) {
|
|
25799
|
+
const volume = cache/* default */.Ay.getVolume(volumeId);
|
|
25800
|
+
if (!volume) {
|
|
25801
|
+
reject(new Error(`Volume id ${volumeId} not found in cache`));
|
|
25802
|
+
}
|
|
25803
|
+
const useImageId = volume.imageIds[0];
|
|
25804
|
+
successCallback(volume, useImageId);
|
|
25805
|
+
}
|
|
25806
|
+
else {
|
|
25807
|
+
imageLoadPoolManager/* default */.A.addRequest(sendRequest.bind(null, imageId, null, options), requestType, { imageId }, priority);
|
|
25808
|
+
}
|
|
25565
25809
|
});
|
|
25566
25810
|
}
|
|
25567
25811
|
|
|
@@ -26329,8 +26573,8 @@ function getScalingParameters(imageId) {
|
|
|
26329
26573
|
const generalSeriesModule = (0,metaData.get)('generalSeriesModule', imageId) || {};
|
|
26330
26574
|
const { modality } = generalSeriesModule;
|
|
26331
26575
|
const scalingParameters = {
|
|
26332
|
-
rescaleSlope: modalityLutModule.rescaleSlope,
|
|
26333
|
-
rescaleIntercept: modalityLutModule.rescaleIntercept,
|
|
26576
|
+
rescaleSlope: modalityLutModule.rescaleSlope || 1,
|
|
26577
|
+
rescaleIntercept: modalityLutModule.rescaleIntercept ?? 0,
|
|
26334
26578
|
modality,
|
|
26335
26579
|
};
|
|
26336
26580
|
const suvFactor = (0,metaData.get)('scalingModule', imageId) || {};
|
|
@@ -26443,11 +26687,15 @@ function sortImageIdsAndGetSpacing(imageIds, scanAxisNormal) {
|
|
|
26443
26687
|
Math.abs(distanceBetweenFirstAndMiddleImages) /
|
|
26444
26688
|
Math.floor(imageIds.length / 2);
|
|
26445
26689
|
}
|
|
26446
|
-
const { imagePositionPatient: origin, sliceThickness } = dist_esm.metaData.get('imagePlaneModule', sortedImageIds[0]);
|
|
26690
|
+
const { imagePositionPatient: origin, sliceThickness, spacingBetweenSlices, } = dist_esm.metaData.get('imagePlaneModule', sortedImageIds[0]);
|
|
26447
26691
|
const { strictZSpacingForVolumeViewport } = (0,dist_esm.getConfiguration)().rendering;
|
|
26448
26692
|
if (zSpacing === 0 && !strictZSpacingForVolumeViewport) {
|
|
26449
|
-
if (sliceThickness) {
|
|
26450
|
-
console.log('Could not calculate zSpacing. Using
|
|
26693
|
+
if (sliceThickness && spacingBetweenSlices) {
|
|
26694
|
+
console.log('Could not calculate zSpacing. Using spacingBetweenSlices');
|
|
26695
|
+
zSpacing = spacingBetweenSlices;
|
|
26696
|
+
}
|
|
26697
|
+
else if (sliceThickness) {
|
|
26698
|
+
console.log('Could not calculate zSpacing and no spacingBetweenSlices. Using sliceThickness');
|
|
26451
26699
|
zSpacing = sliceThickness;
|
|
26452
26700
|
}
|
|
26453
26701
|
else {
|
|
@@ -26560,8 +26808,8 @@ function isValidVolume(imageIds) {
|
|
|
26560
26808
|
modality === baseMetadata.modality &&
|
|
26561
26809
|
columns === baseMetadata.columns &&
|
|
26562
26810
|
rows === baseMetadata.rows &&
|
|
26563
|
-
(0,isEqual/* default */.
|
|
26564
|
-
(0,isEqual/* default */.
|
|
26811
|
+
(0,isEqual/* default */.Ay)(imageOrientationPatient, baseMetadata.imageOrientationPatient) &&
|
|
26812
|
+
(0,isEqual/* default */.Ay)(pixelSpacing, baseMetadata.pixelSpacing));
|
|
26565
26813
|
});
|
|
26566
26814
|
return validVolume;
|
|
26567
26815
|
}
|
|
@@ -27005,9 +27253,11 @@ async function convertStackToVolumeViewport({ viewport, options, }) {
|
|
|
27005
27253
|
},
|
|
27006
27254
|
], [viewportId]);
|
|
27007
27255
|
const volumeViewportNewVolumeHandler = () => {
|
|
27008
|
-
|
|
27009
|
-
|
|
27010
|
-
|
|
27256
|
+
if (!options.orientation) {
|
|
27257
|
+
volumeViewport.setCamera({
|
|
27258
|
+
...prevCamera,
|
|
27259
|
+
});
|
|
27260
|
+
}
|
|
27011
27261
|
volumeViewport.render();
|
|
27012
27262
|
element.removeEventListener(enums.Events.VOLUME_VIEWPORT_NEW_VOLUME, volumeViewportNewVolumeHandler);
|
|
27013
27263
|
};
|
|
@@ -27394,7 +27644,7 @@ class VoxelManager {
|
|
|
27394
27644
|
return [scalarData[index++], scalarData[index++], scalarData[index++]];
|
|
27395
27645
|
}, (index, v) => {
|
|
27396
27646
|
index *= 3;
|
|
27397
|
-
const isChanged = !(0,isEqual/* default */.
|
|
27647
|
+
const isChanged = !(0,isEqual/* default */.Ay)(scalarData[index], v);
|
|
27398
27648
|
scalarData[index++] = v[0];
|
|
27399
27649
|
scalarData[index++] = v[1];
|
|
27400
27650
|
scalarData[index++] = v[2];
|
|
@@ -27748,6 +27998,7 @@ function hexToRgb(hex) {
|
|
|
27748
27998
|
|
|
27749
27999
|
|
|
27750
28000
|
|
|
28001
|
+
|
|
27751
28002
|
|
|
27752
28003
|
|
|
27753
28004
|
/***/ }),
|
|
@@ -27757,7 +28008,10 @@ function hexToRgb(hex) {
|
|
|
27757
28008
|
|
|
27758
28009
|
"use strict";
|
|
27759
28010
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
27760
|
-
/* harmony export */
|
|
28011
|
+
/* harmony export */ Ay: () => (/* binding */ isEqual),
|
|
28012
|
+
/* harmony export */ Ph: () => (/* binding */ isEqualAbs),
|
|
28013
|
+
/* harmony export */ WC: () => (/* binding */ isEqualNegative),
|
|
28014
|
+
/* harmony export */ n4: () => (/* binding */ isEqual)
|
|
27761
28015
|
/* harmony export */ });
|
|
27762
28016
|
function areNumbersEqualWithTolerance(num1, num2, tolerance) {
|
|
27763
28017
|
return Math.abs(num1 - num2) <= tolerance;
|
|
@@ -27791,6 +28045,11 @@ function isEqual(v1, v2, tolerance = 1e-5) {
|
|
|
27791
28045
|
}
|
|
27792
28046
|
return false;
|
|
27793
28047
|
}
|
|
28048
|
+
const negative = (v) => typeof v === 'number' ? -v : v?.map ? v.map(negative) : !v;
|
|
28049
|
+
const abs = (v) => typeof v === 'number' ? Math.abs(v) : v?.map ? v.map(abs) : v;
|
|
28050
|
+
const isEqualNegative = (v1, v2, tolerance = undefined) => isEqual(v1, negative(v2), tolerance);
|
|
28051
|
+
const isEqualAbs = (v1, v2, tolerance = undefined) => isEqual(abs(v1), abs(v2), tolerance);
|
|
28052
|
+
|
|
27794
28053
|
|
|
27795
28054
|
|
|
27796
28055
|
/***/ }),
|
|
@@ -28811,7 +29070,7 @@ const CursorNames = [...svgCursorNames, ...standardCursorNames];
|
|
|
28811
29070
|
|
|
28812
29071
|
/***/ }),
|
|
28813
29072
|
|
|
28814
|
-
/***/
|
|
29073
|
+
/***/ 49574:
|
|
28815
29074
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
28816
29075
|
|
|
28817
29076
|
"use strict";
|
|
@@ -28829,6 +29088,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28829
29088
|
drawPath: () => (/* reexport */ drawPath),
|
|
28830
29089
|
drawPolyline: () => (/* reexport */ drawPolyline),
|
|
28831
29090
|
drawRect: () => (/* reexport */ drawRect),
|
|
29091
|
+
drawRectByCoordinates: () => (/* reexport */ drawRectByCoordinates),
|
|
28832
29092
|
drawRedactionRect: () => (/* reexport */ drawRedactionRect),
|
|
28833
29093
|
drawTextBox: () => (/* reexport */ drawingSvg_drawTextBox)
|
|
28834
29094
|
});
|
|
@@ -29348,11 +29608,11 @@ function drawLinkedTextBox(svgDrawingHelper, annotationUID, textBoxUID, textLine
|
|
|
29348
29608
|
}
|
|
29349
29609
|
/* harmony default export */ const drawingSvg_drawLinkedTextBox = (drawLinkedTextBox);
|
|
29350
29610
|
|
|
29351
|
-
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/
|
|
29611
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawRectByCoordinates.js
|
|
29352
29612
|
|
|
29353
29613
|
|
|
29354
29614
|
|
|
29355
|
-
function
|
|
29615
|
+
function drawRectByCoordinates(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates, options = {}, dataId = '') {
|
|
29356
29616
|
const { color, width: _width, lineWidth, lineDash, } = Object.assign({
|
|
29357
29617
|
color: 'rgb(0, 255, 0)',
|
|
29358
29618
|
width: '2',
|
|
@@ -29363,16 +29623,28 @@ function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, opt
|
|
|
29363
29623
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
29364
29624
|
const svgNodeHash = drawingSvg_getHash(annotationUID, 'rect', rectangleUID);
|
|
29365
29625
|
const existingRect = svgDrawingHelper.getSvgNode(svgNodeHash);
|
|
29366
|
-
const
|
|
29367
|
-
const width = Math.
|
|
29368
|
-
const height = Math.
|
|
29626
|
+
const [topLeft, topRight, bottomLeft, bottomRight] = canvasCoordinates;
|
|
29627
|
+
const width = Math.hypot(topLeft[0] - topRight[0], topLeft[1] - topRight[1]);
|
|
29628
|
+
const height = Math.hypot(topLeft[0] - bottomLeft[0], topLeft[1] - bottomLeft[1]);
|
|
29629
|
+
const center = [
|
|
29630
|
+
(bottomRight[0] + topLeft[0]) / 2,
|
|
29631
|
+
(bottomRight[1] + topLeft[1]) / 2,
|
|
29632
|
+
];
|
|
29633
|
+
const leftEdgeCenter = [
|
|
29634
|
+
(bottomLeft[0] + topLeft[0]) / 2,
|
|
29635
|
+
(bottomLeft[1] + topLeft[1]) / 2,
|
|
29636
|
+
];
|
|
29637
|
+
const angle = (Math.atan2(center[1] - leftEdgeCenter[1], center[0] - leftEdgeCenter[0]) *
|
|
29638
|
+
180) /
|
|
29639
|
+
Math.PI;
|
|
29369
29640
|
const attributes = {
|
|
29370
|
-
x: `${
|
|
29371
|
-
y: `${
|
|
29641
|
+
x: `${center[0] - width / 2}`,
|
|
29642
|
+
y: `${center[1] - height / 2}`,
|
|
29372
29643
|
width: `${width}`,
|
|
29373
29644
|
height: `${height}`,
|
|
29374
29645
|
stroke: color,
|
|
29375
29646
|
fill: 'transparent',
|
|
29647
|
+
transform: `rotate(${angle} ${center[0]} ${center[1]})`,
|
|
29376
29648
|
'stroke-width': strokeWidth,
|
|
29377
29649
|
'stroke-dasharray': lineDash,
|
|
29378
29650
|
};
|
|
@@ -29390,6 +29662,16 @@ function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, opt
|
|
|
29390
29662
|
}
|
|
29391
29663
|
}
|
|
29392
29664
|
|
|
29665
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawRect.js
|
|
29666
|
+
|
|
29667
|
+
function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, options = {}, dataId = '') {
|
|
29668
|
+
const topLeft = [start[0], start[1]];
|
|
29669
|
+
const topRight = [end[0], start[1]];
|
|
29670
|
+
const bottomLeft = [start[0], end[1]];
|
|
29671
|
+
const bottomRight = [end[0], end[1]];
|
|
29672
|
+
drawRectByCoordinates(svgDrawingHelper, annotationUID, rectangleUID, [topLeft, topRight, bottomLeft, bottomRight], options, dataId);
|
|
29673
|
+
}
|
|
29674
|
+
|
|
29393
29675
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawArrow.js
|
|
29394
29676
|
|
|
29395
29677
|
function drawArrow(svgDrawingHelper, annotationUID, arrowUID, start, end, options = {}) {
|
|
@@ -29495,6 +29777,7 @@ function drawRedactionRect(svgDrawingHelper, annotationUID, rectangleUID, start,
|
|
|
29495
29777
|
|
|
29496
29778
|
|
|
29497
29779
|
|
|
29780
|
+
|
|
29498
29781
|
/***/ }),
|
|
29499
29782
|
|
|
29500
29783
|
/***/ 42111:
|
|
@@ -29730,12 +30013,12 @@ var WorkerTypes_ChangeTypes;
|
|
|
29730
30013
|
|
|
29731
30014
|
/***/ }),
|
|
29732
30015
|
|
|
29733
|
-
/***/
|
|
30016
|
+
/***/ 94101:
|
|
29734
30017
|
/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
|
29735
30018
|
|
|
29736
30019
|
"use strict";
|
|
29737
30020
|
|
|
29738
|
-
// UNUSED EXPORTS: annotationInterpolationEventDispatcher, cameraModifiedEventDispatcher, imageRenderedEventDispatcher, imageSpacingCalibratedEventDispatcher, keyboardToolEventDispatcher, mouseToolEventDispatcher, touchToolEventDispatcher
|
|
30021
|
+
// UNUSED EXPORTS: annotationInterpolationEventDispatcher, cameraModifiedEventDispatcher, cameraResetEventDispatcher, imageRenderedEventDispatcher, imageSpacingCalibratedEventDispatcher, keyboardToolEventDispatcher, mouseToolEventDispatcher, touchToolEventDispatcher
|
|
29739
30022
|
|
|
29740
30023
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
29741
30024
|
var esm = __webpack_require__(92136);
|
|
@@ -29917,6 +30200,34 @@ const annotationInterpolationEventDispatcher_disable = function () {
|
|
|
29917
30200
|
disable: annotationInterpolationEventDispatcher_disable,
|
|
29918
30201
|
});
|
|
29919
30202
|
|
|
30203
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/cameraResetEventDispatcher.js
|
|
30204
|
+
|
|
30205
|
+
|
|
30206
|
+
|
|
30207
|
+
const { Active: cameraResetEventDispatcher_Active, Passive: cameraResetEventDispatcher_Passive, Enabled: cameraResetEventDispatcher_Enabled } = enums.ToolModes;
|
|
30208
|
+
const onCameraReset = function (evt) {
|
|
30209
|
+
const enabledTools = (0,getToolsWithModesForMouseEvent/* default */.A)(evt, [
|
|
30210
|
+
cameraResetEventDispatcher_Active,
|
|
30211
|
+
cameraResetEventDispatcher_Passive,
|
|
30212
|
+
cameraResetEventDispatcher_Enabled,
|
|
30213
|
+
]);
|
|
30214
|
+
enabledTools.forEach((tool) => {
|
|
30215
|
+
if (tool.onResetCamera) {
|
|
30216
|
+
tool.onResetCamera(evt);
|
|
30217
|
+
}
|
|
30218
|
+
});
|
|
30219
|
+
};
|
|
30220
|
+
const cameraResetEventDispatcher_enable = function (element) {
|
|
30221
|
+
element.addEventListener(esm.Enums.Events.CAMERA_RESET, onCameraReset);
|
|
30222
|
+
};
|
|
30223
|
+
const cameraResetEventDispatcher_disable = function (element) {
|
|
30224
|
+
element.removeEventListener(esm.Enums.Events.CAMERA_RESET, onCameraReset);
|
|
30225
|
+
};
|
|
30226
|
+
/* harmony default export */ const cameraResetEventDispatcher = ({
|
|
30227
|
+
enable: cameraResetEventDispatcher_enable,
|
|
30228
|
+
disable: cameraResetEventDispatcher_disable,
|
|
30229
|
+
});
|
|
30230
|
+
|
|
29920
30231
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js
|
|
29921
30232
|
|
|
29922
30233
|
|
|
@@ -29928,6 +30239,7 @@ const annotationInterpolationEventDispatcher_disable = function () {
|
|
|
29928
30239
|
|
|
29929
30240
|
|
|
29930
30241
|
|
|
30242
|
+
|
|
29931
30243
|
/***/ }),
|
|
29932
30244
|
|
|
29933
30245
|
/***/ 90202:
|
|
@@ -29943,7 +30255,7 @@ const annotationInterpolationEventDispatcher_disable = function () {
|
|
|
29943
30255
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74119);
|
|
29944
30256
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90252);
|
|
29945
30257
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38296);
|
|
29946
|
-
/* harmony import */ var _utilities_contours__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
30258
|
+
/* harmony import */ var _utilities_contours__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75908);
|
|
29947
30259
|
/* harmony import */ var _utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7259);
|
|
29948
30260
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
29949
30261
|
/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(81848);
|
|
@@ -30046,12 +30358,14 @@ function findIntersectingContour(viewport, sourcePolyline, contourSegmentationAn
|
|
|
30046
30358
|
function createPolylineHole(viewport, targetAnnotation, holeAnnotation) {
|
|
30047
30359
|
const { windingDirection: targetWindingDirection } = targetAnnotation.data.contour;
|
|
30048
30360
|
const { windingDirection: holeWindingDirection } = holeAnnotation.data.contour;
|
|
30049
|
-
if (targetWindingDirection === holeWindingDirection) {
|
|
30050
|
-
holeAnnotation.data.contour.polyline.reverse();
|
|
30051
|
-
holeAnnotation.data.contour.windingDirection = targetWindingDirection * -1;
|
|
30052
|
-
}
|
|
30053
30361
|
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__.addChildAnnotation)(targetAnnotation, holeAnnotation);
|
|
30054
30362
|
_utilities_contourSegmentation__WEBPACK_IMPORTED_MODULE_6__.removeContourSegmentationAnnotation(holeAnnotation);
|
|
30363
|
+
const { contour: holeContour } = holeAnnotation.data;
|
|
30364
|
+
const holePolyline = convertContourPolylineToCanvasSpace(holeContour.polyline, viewport);
|
|
30365
|
+
_utilities_contours__WEBPACK_IMPORTED_MODULE_5__.updateContourPolyline(holeAnnotation, {
|
|
30366
|
+
points: holePolyline,
|
|
30367
|
+
closed: holeContour.closed,
|
|
30368
|
+
}, viewport);
|
|
30055
30369
|
const { element } = viewport;
|
|
30056
30370
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
30057
30371
|
const { renderingEngine } = enabledElement;
|
|
@@ -30539,7 +30853,7 @@ function _imageChangeEventListener(evt) {
|
|
|
30539
30853
|
imageActor.getMapper().setInputData(imageData);
|
|
30540
30854
|
},
|
|
30541
30855
|
},
|
|
30542
|
-
]
|
|
30856
|
+
]);
|
|
30543
30857
|
(0,segmentation_triggerSegmentationRender/* default */.Ay)(toolGroup.id);
|
|
30544
30858
|
return;
|
|
30545
30859
|
}
|
|
@@ -30665,7 +30979,7 @@ function annotationRemovedListener(evt) {
|
|
|
30665
30979
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
|
|
30666
30980
|
/* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(55588);
|
|
30667
30981
|
/* harmony import */ var _eventListeners__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(60878);
|
|
30668
|
-
/* harmony import */ var _eventDispatchers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
30982
|
+
/* harmony import */ var _eventDispatchers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(94101);
|
|
30669
30983
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(52610);
|
|
30670
30984
|
|
|
30671
30985
|
|
|
@@ -30831,6 +31145,8 @@ class AnnotationGroup {
|
|
|
30831
31145
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
30832
31146
|
/* harmony import */ var _annotationLocking__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48428);
|
|
30833
31147
|
/* harmony import */ var _annotationVisibility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21009);
|
|
31148
|
+
/* harmony import */ var _utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99595);
|
|
31149
|
+
|
|
30834
31150
|
|
|
30835
31151
|
|
|
30836
31152
|
|
|
@@ -30927,6 +31243,8 @@ class FrameOfReferenceSpecificAnnotationManager {
|
|
|
30927
31243
|
toolSpecificAnnotations.push(annotation);
|
|
30928
31244
|
(0,_annotationLocking__WEBPACK_IMPORTED_MODULE_2__.checkAndDefineIsLockedProperty)(annotation);
|
|
30929
31245
|
(0,_annotationVisibility__WEBPACK_IMPORTED_MODULE_3__.checkAndDefineIsVisibleProperty)(annotation);
|
|
31246
|
+
(0,_utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__/* .checkAndDefineTextBoxProperty */ .Q)(annotation);
|
|
31247
|
+
(0,_utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__/* .checkAndDefineCachedStatsProperty */ .d)(annotation);
|
|
30930
31248
|
};
|
|
30931
31249
|
this.removeAnnotation = (annotationUID) => {
|
|
30932
31250
|
const { annotations } = this;
|
|
@@ -34659,8 +34977,8 @@ function removeTool(ToolClass) {
|
|
|
34659
34977
|
|
|
34660
34978
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 17 modules
|
|
34661
34979
|
var eventListeners = __webpack_require__(60878);
|
|
34662
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js +
|
|
34663
|
-
var eventDispatchers = __webpack_require__(
|
|
34980
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/index.js + 8 modules
|
|
34981
|
+
var eventDispatchers = __webpack_require__(94101);
|
|
34664
34982
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/triggerAnnotationRender.js
|
|
34665
34983
|
var triggerAnnotationRender = __webpack_require__(6805);
|
|
34666
34984
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/addEnabledElement.js
|
|
@@ -34682,6 +35000,7 @@ function addEnabledElement(evt) {
|
|
|
34682
35000
|
imageRenderedEventDispatcher.enable(element);
|
|
34683
35001
|
cameraModifiedEventDispatcher.enable(element);
|
|
34684
35002
|
imageSpacingCalibratedEventDispatcher.enable(element);
|
|
35003
|
+
cameraResetEventDispatcher.enable(element);
|
|
34685
35004
|
mouseToolEventDispatcher.enable(element);
|
|
34686
35005
|
keyboardToolEventDispatcher.enable(element);
|
|
34687
35006
|
touchToolEventDispatcher.enable(element);
|
|
@@ -34772,6 +35091,7 @@ function removeEnabledElement(elementDisabledEvt) {
|
|
|
34772
35091
|
imageRenderedEventDispatcher.disable(element);
|
|
34773
35092
|
cameraModifiedEventDispatcher.disable(element);
|
|
34774
35093
|
imageSpacingCalibratedEventDispatcher.disable(element);
|
|
35094
|
+
cameraResetEventDispatcher.disable(element);
|
|
34775
35095
|
mouseToolEventDispatcher.disable(element);
|
|
34776
35096
|
keyboardToolEventDispatcher.disable(element);
|
|
34777
35097
|
touchToolEventDispatcher.disable(element);
|
|
@@ -34978,7 +35298,7 @@ function presentationViewSyncCallback_presentationViewSyncCallback(_synchronizer
|
|
|
34978
35298
|
const tViewport = renderingEngine.getViewport(targetViewport.viewportId);
|
|
34979
35299
|
const sViewport = renderingEngine.getViewport(sourceViewport.viewportId);
|
|
34980
35300
|
const presentationView = sViewport.getViewPresentation(options);
|
|
34981
|
-
tViewport.
|
|
35301
|
+
tViewport.setViewPresentation(presentationView);
|
|
34982
35302
|
tViewport.render();
|
|
34983
35303
|
}
|
|
34984
35304
|
|
|
@@ -35221,7 +35541,7 @@ const createStackImageSynchronizer = (/* unused pure expression or super */ null
|
|
|
35221
35541
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48428);
|
|
35222
35542
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21009);
|
|
35223
35543
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54177);
|
|
35224
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
35544
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
35225
35545
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
35226
35546
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84901);
|
|
35227
35547
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(90252);
|
|
@@ -35710,10 +36030,10 @@ class AnnotationEraserTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .BaseToo
|
|
|
35710
36030
|
continue;
|
|
35711
36031
|
}
|
|
35712
36032
|
const annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotations)(toolName, element);
|
|
35713
|
-
if (!annotations) {
|
|
36033
|
+
if (!annotations.length) {
|
|
35714
36034
|
continue;
|
|
35715
36035
|
}
|
|
35716
|
-
const interactableAnnotations = toolInstance.filterInteractableAnnotationsForElement(element, annotations);
|
|
36036
|
+
const interactableAnnotations = toolInstance.filterInteractableAnnotationsForElement(element, annotations) || [];
|
|
35717
36037
|
for (const annotation of interactableAnnotations) {
|
|
35718
36038
|
if (toolInstance.isPointNearTool(element, annotation, currentPoints.canvas, 10, interactionType)) {
|
|
35719
36039
|
annotationsToRemove.push(annotation.annotationUID);
|
|
@@ -35745,7 +36065,7 @@ AnnotationEraserTool.toolName = 'Eraser';
|
|
|
35745
36065
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92136);
|
|
35746
36066
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52610);
|
|
35747
36067
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38296);
|
|
35748
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
36068
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(49574);
|
|
35749
36069
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(61738);
|
|
35750
36070
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84901);
|
|
35751
36071
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(90252);
|
|
@@ -35795,7 +36115,12 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
35795
36115
|
supportedInteractionTypes: ['Mouse'],
|
|
35796
36116
|
configuration: {
|
|
35797
36117
|
shadow: true,
|
|
35798
|
-
viewportIndicators:
|
|
36118
|
+
viewportIndicators: false,
|
|
36119
|
+
viewportIndicatorsConfig: {
|
|
36120
|
+
radius: 5,
|
|
36121
|
+
x: null,
|
|
36122
|
+
y: null,
|
|
36123
|
+
},
|
|
35799
36124
|
autoPan: {
|
|
35800
36125
|
enabled: false,
|
|
35801
36126
|
panSize: 10,
|
|
@@ -35859,12 +36184,20 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
35859
36184
|
viewportsInfo.forEach(({ viewportId, renderingEngineId }) => {
|
|
35860
36185
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__.getEnabledElementByIds)(viewportId, renderingEngineId);
|
|
35861
36186
|
const { viewport } = enabledElement;
|
|
36187
|
+
const resetPan = true;
|
|
36188
|
+
const resetZoom = true;
|
|
36189
|
+
const resetToCenter = true;
|
|
36190
|
+
const resetRotation = true;
|
|
36191
|
+
const supressEvents = true;
|
|
36192
|
+
viewport.resetCamera(resetPan, resetZoom, resetToCenter, resetRotation, supressEvents);
|
|
36193
|
+
viewport.resetSlabThickness();
|
|
35862
36194
|
const { element } = viewport;
|
|
35863
36195
|
let annotations = this._getAnnotations(enabledElement);
|
|
35864
36196
|
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
35865
36197
|
if (annotations.length) {
|
|
35866
36198
|
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__.removeAnnotation)(annotations[0].annotationUID);
|
|
35867
36199
|
}
|
|
36200
|
+
viewport.render();
|
|
35868
36201
|
});
|
|
35869
36202
|
this.computeToolCenter(viewportsInfo);
|
|
35870
36203
|
};
|
|
@@ -36002,6 +36335,9 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
36002
36335
|
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_10__.getViewportIdsWithToolToRender)(element, this.getToolName(), requireSameOrientation);
|
|
36003
36336
|
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
|
|
36004
36337
|
};
|
|
36338
|
+
this.onResetCamera = (evt) => {
|
|
36339
|
+
this.resetCrosshairs();
|
|
36340
|
+
};
|
|
36005
36341
|
this.mouseMoveCallback = (evt, filteredToolAnnotations) => {
|
|
36006
36342
|
const { element, currentPoints } = evt.detail;
|
|
36007
36343
|
const canvasCoords = currentPoints.canvas;
|
|
@@ -36383,12 +36719,16 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
36383
36719
|
renderStatus = true;
|
|
36384
36720
|
data.handles.rotationPoints = newRtpoints;
|
|
36385
36721
|
data.handles.slabThicknessPoints = newStpoints;
|
|
36722
|
+
debugger;
|
|
36386
36723
|
if (this.configuration.viewportIndicators) {
|
|
36724
|
+
const { viewportIndicatorsConfig } = this.configuration;
|
|
36725
|
+
const xOffset = viewportIndicatorsConfig?.xOffset || 0.95;
|
|
36726
|
+
const yOffset = viewportIndicatorsConfig?.yOffset || 0.05;
|
|
36387
36727
|
const referenceColorCoordinates = [
|
|
36388
|
-
clientWidth *
|
|
36389
|
-
clientHeight *
|
|
36728
|
+
clientWidth * xOffset,
|
|
36729
|
+
clientHeight * yOffset,
|
|
36390
36730
|
];
|
|
36391
|
-
const circleRadius = canvasDiagonalLength * 0.01;
|
|
36731
|
+
const circleRadius = viewportIndicatorsConfig?.circleRadius || canvasDiagonalLength * 0.01;
|
|
36392
36732
|
const circleUID = '0';
|
|
36393
36733
|
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, referenceColorCoordinates, circleRadius, { color, fill: color });
|
|
36394
36734
|
}
|
|
@@ -37455,7 +37795,7 @@ MagnifyTool.toolName = 'Magnify';
|
|
|
37455
37795
|
"use strict";
|
|
37456
37796
|
/* harmony import */ var _kitware_vtk_js_Interaction_Widgets_OrientationMarkerWidget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7914);
|
|
37457
37797
|
/* harmony import */ var _kitware_vtk_js_Rendering_Core_AnnotatedCubeActor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50638);
|
|
37458
|
-
/* harmony import */ var _kitware_vtk_js_Rendering_Core_AxesActor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
37798
|
+
/* harmony import */ var _kitware_vtk_js_Rendering_Core_AxesActor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43387);
|
|
37459
37799
|
/* harmony import */ var _kitware_vtk_js_Rendering_Core_Actor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48987);
|
|
37460
37800
|
/* harmony import */ var _kitware_vtk_js_Rendering_Core_Mapper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22745);
|
|
37461
37801
|
/* harmony import */ var _kitware_vtk_js_IO_XML_XMLPolyDataReader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(88099);
|
|
@@ -37587,7 +37927,11 @@ class OrientationMarkerTool extends _base__WEBPACK_IMPORTED_MODULE_7__/* .BaseTo
|
|
|
37587
37927
|
element.addEventListener(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_8__.Enums.Events.VOLUME_VIEWPORT_NEW_VOLUME, this.initViewports.bind(this));
|
|
37588
37928
|
const resizeObserver = new ResizeObserver(() => {
|
|
37589
37929
|
setTimeout(() => {
|
|
37590
|
-
const
|
|
37930
|
+
const element = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_8__.getEnabledElementByIds)(viewportId, renderingEngineId);
|
|
37931
|
+
if (!element) {
|
|
37932
|
+
return;
|
|
37933
|
+
}
|
|
37934
|
+
const { viewport } = element;
|
|
37591
37935
|
this.resize(viewportId);
|
|
37592
37936
|
viewport.render();
|
|
37593
37937
|
}, 100);
|
|
@@ -37750,7 +38094,7 @@ OrientationMarkerTool.toolName = 'OrientationMarker';
|
|
|
37750
38094
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
37751
38095
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
|
|
37752
38096
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52610);
|
|
37753
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
38097
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
|
|
37754
38098
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
|
|
37755
38099
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(28062);
|
|
37756
38100
|
|
|
@@ -38039,7 +38383,7 @@ PlanarRotateTool.toolName = 'PlanarRotate';
|
|
|
38039
38383
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
38040
38384
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38296);
|
|
38041
38385
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21009);
|
|
38042
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
38386
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
38043
38387
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
|
|
38044
38388
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
|
|
38045
38389
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44753);
|
|
@@ -38367,7 +38711,7 @@ ReferenceCursors.toolName = 'ReferenceCursors';
|
|
|
38367
38711
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44753);
|
|
38368
38712
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
38369
38713
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
|
|
38370
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
38714
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
38371
38715
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
|
|
38372
38716
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23072);
|
|
38373
38717
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(28062);
|
|
@@ -38606,7 +38950,7 @@ ReferenceLines.toolName = 'ReferenceLines';
|
|
|
38606
38950
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44753);
|
|
38607
38951
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92136);
|
|
38608
38952
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
38609
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
38953
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
|
|
38610
38954
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52610);
|
|
38611
38955
|
|
|
38612
38956
|
|
|
@@ -38908,8 +39252,8 @@ class ScaleOverlayTool extends _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MOD
|
|
|
38908
39252
|
viewportId: enabledElement.viewport.id,
|
|
38909
39253
|
};
|
|
38910
39254
|
const canvasSize = {
|
|
38911
|
-
width: canvas.width,
|
|
38912
|
-
height: canvas.height,
|
|
39255
|
+
width: canvas.width / window.devicePixelRatio || 1,
|
|
39256
|
+
height: canvas.height / window.devicePixelRatio || 1,
|
|
38913
39257
|
};
|
|
38914
39258
|
const topLeft = annotation.data.handles.points[0];
|
|
38915
39259
|
const topRight = annotation.data.handles.points[1];
|
|
@@ -39004,6 +39348,316 @@ ScaleOverlayTool.toolName = 'ScaleOverlay';
|
|
|
39004
39348
|
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (ScaleOverlayTool)));
|
|
39005
39349
|
|
|
39006
39350
|
|
|
39351
|
+
/***/ }),
|
|
39352
|
+
|
|
39353
|
+
/***/ 16151:
|
|
39354
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
39355
|
+
|
|
39356
|
+
"use strict";
|
|
39357
|
+
/* unused harmony export contourIndex */
|
|
39358
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
39359
|
+
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96214);
|
|
39360
|
+
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95778);
|
|
39361
|
+
/* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(73047);
|
|
39362
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
|
|
39363
|
+
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61738);
|
|
39364
|
+
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(23072);
|
|
39365
|
+
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(40233);
|
|
39366
|
+
/* harmony import */ var _stateManagement_annotation_config_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(28664);
|
|
39367
|
+
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54177);
|
|
39368
|
+
/* harmony import */ var _SculptorTool_CircleSculptCursor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(16639);
|
|
39369
|
+
/* harmony import */ var _distancePointToContour__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7783);
|
|
39370
|
+
|
|
39371
|
+
|
|
39372
|
+
|
|
39373
|
+
|
|
39374
|
+
|
|
39375
|
+
|
|
39376
|
+
|
|
39377
|
+
|
|
39378
|
+
|
|
39379
|
+
|
|
39380
|
+
|
|
39381
|
+
|
|
39382
|
+
class SculptorTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool */ .oS {
|
|
39383
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
39384
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
39385
|
+
configuration: {
|
|
39386
|
+
minSpacing: 1,
|
|
39387
|
+
referencedToolNames: [
|
|
39388
|
+
'PlanarFreehandROI',
|
|
39389
|
+
'PlanarFreehandContourSegmentationTool',
|
|
39390
|
+
],
|
|
39391
|
+
toolShape: 'circle',
|
|
39392
|
+
referencedToolName: 'PlanarFreehandROI',
|
|
39393
|
+
},
|
|
39394
|
+
}) {
|
|
39395
|
+
super(toolProps, defaultToolProps);
|
|
39396
|
+
this.registeredShapes = new Map();
|
|
39397
|
+
this.isActive = false;
|
|
39398
|
+
this.commonData = {
|
|
39399
|
+
activeAnnotationUID: null,
|
|
39400
|
+
viewportIdsToRender: [],
|
|
39401
|
+
isEditingOpenContour: false,
|
|
39402
|
+
canvasLocation: undefined,
|
|
39403
|
+
};
|
|
39404
|
+
this.preMouseDownCallback = (evt) => {
|
|
39405
|
+
const eventData = evt.detail;
|
|
39406
|
+
const element = eventData.element;
|
|
39407
|
+
this.configureToolSize(evt);
|
|
39408
|
+
this.selectFreehandTool(eventData);
|
|
39409
|
+
if (this.commonData.activeAnnotationUID === null) {
|
|
39410
|
+
return;
|
|
39411
|
+
}
|
|
39412
|
+
this.isActive = true;
|
|
39413
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_7__.hideElementCursor)(element);
|
|
39414
|
+
this.activateModify(element);
|
|
39415
|
+
return true;
|
|
39416
|
+
};
|
|
39417
|
+
this.mouseMoveCallback = (evt) => {
|
|
39418
|
+
if (this.mode === _enums__WEBPACK_IMPORTED_MODULE_4__.ToolModes.Active) {
|
|
39419
|
+
this.configureToolSize(evt);
|
|
39420
|
+
this.updateCursor(evt);
|
|
39421
|
+
}
|
|
39422
|
+
else {
|
|
39423
|
+
this.commonData.canvasLocation = undefined;
|
|
39424
|
+
}
|
|
39425
|
+
};
|
|
39426
|
+
this.endCallback = (evt) => {
|
|
39427
|
+
const eventData = evt.detail;
|
|
39428
|
+
const { element } = eventData;
|
|
39429
|
+
const config = this.configuration;
|
|
39430
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
39431
|
+
this.isActive = false;
|
|
39432
|
+
this.deactivateModify(element);
|
|
39433
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_7__.resetElementCursor)(element);
|
|
39434
|
+
const { renderingEngineId, viewportId } = enabledElement;
|
|
39435
|
+
const toolGroup = _store__WEBPACK_IMPORTED_MODULE_5__/* .ToolGroupManager.getToolGroupForViewport */ .dU.getToolGroupForViewport(viewportId, renderingEngineId);
|
|
39436
|
+
const toolInstance = toolGroup.getToolInstance(config.referencedToolName);
|
|
39437
|
+
const annotations = this.filterSculptableAnnotationsForElement(element);
|
|
39438
|
+
const activeAnnotation = annotations.find((annotation) => annotation.annotationUID === this.commonData.activeAnnotationUID);
|
|
39439
|
+
if (toolInstance.configuration.calculateStats) {
|
|
39440
|
+
activeAnnotation.invalidated = true;
|
|
39441
|
+
}
|
|
39442
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__/* .triggerAnnotationModified */ .XF)(activeAnnotation, element);
|
|
39443
|
+
};
|
|
39444
|
+
this.dragCallback = (evt) => {
|
|
39445
|
+
const eventData = evt.detail;
|
|
39446
|
+
const element = eventData.element;
|
|
39447
|
+
this.updateCursor(evt);
|
|
39448
|
+
const annotations = this.filterSculptableAnnotationsForElement(element);
|
|
39449
|
+
const activeAnnotation = annotations.find((annotation) => annotation.annotationUID === this.commonData.activeAnnotationUID);
|
|
39450
|
+
if (!annotations?.length || !this.isActive) {
|
|
39451
|
+
return;
|
|
39452
|
+
}
|
|
39453
|
+
const points = activeAnnotation.data.contour.polyline;
|
|
39454
|
+
this.sculpt(eventData, points);
|
|
39455
|
+
};
|
|
39456
|
+
this.registerShapes(_SculptorTool_CircleSculptCursor__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.shapeName, _SculptorTool_CircleSculptCursor__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A);
|
|
39457
|
+
this.setToolShape(this.configuration.toolShape);
|
|
39458
|
+
}
|
|
39459
|
+
registerShapes(shapeName, shapeClass) {
|
|
39460
|
+
const shape = new shapeClass();
|
|
39461
|
+
this.registeredShapes.set(shapeName, shape);
|
|
39462
|
+
}
|
|
39463
|
+
sculpt(eventData, points) {
|
|
39464
|
+
const config = this.configuration;
|
|
39465
|
+
const element = eventData.element;
|
|
39466
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
39467
|
+
const { viewport } = enabledElement;
|
|
39468
|
+
const cursorShape = this.registeredShapes.get(this.selectedShape);
|
|
39469
|
+
this.sculptData = {
|
|
39470
|
+
mousePoint: eventData.currentPoints.world,
|
|
39471
|
+
mouseCanvasPoint: eventData.currentPoints.canvas,
|
|
39472
|
+
points,
|
|
39473
|
+
maxSpacing: cursorShape.getMaxSpacing(config.minSpacing),
|
|
39474
|
+
element: element,
|
|
39475
|
+
};
|
|
39476
|
+
const pushedHandles = cursorShape.pushHandles(viewport, this.sculptData);
|
|
39477
|
+
if (pushedHandles.first !== undefined) {
|
|
39478
|
+
this.insertNewHandles(pushedHandles);
|
|
39479
|
+
}
|
|
39480
|
+
}
|
|
39481
|
+
interpolatePointsWithinMaxSpacing(i, points, indicesToInsertAfter, maxSpacing) {
|
|
39482
|
+
const { element } = this.sculptData;
|
|
39483
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
39484
|
+
const { viewport } = enabledElement;
|
|
39485
|
+
const nextHandleIndex = contourIndex(i + 1, points.length);
|
|
39486
|
+
const currentCanvasPoint = viewport.worldToCanvas(points[i]);
|
|
39487
|
+
const nextCanvasPoint = viewport.worldToCanvas(points[nextHandleIndex]);
|
|
39488
|
+
const distanceToNextHandle = _utilities_math__WEBPACK_IMPORTED_MODULE_3__.point.distanceToPoint(currentCanvasPoint, nextCanvasPoint);
|
|
39489
|
+
if (distanceToNextHandle > maxSpacing) {
|
|
39490
|
+
indicesToInsertAfter.push(i);
|
|
39491
|
+
}
|
|
39492
|
+
}
|
|
39493
|
+
updateCursor(evt) {
|
|
39494
|
+
const eventData = evt.detail;
|
|
39495
|
+
const element = eventData.element;
|
|
39496
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
39497
|
+
const { renderingEngine, viewport } = enabledElement;
|
|
39498
|
+
this.commonData.viewportIdsToRender = [viewport.id];
|
|
39499
|
+
const annotations = this.filterSculptableAnnotationsForElement(element);
|
|
39500
|
+
if (!annotations?.length) {
|
|
39501
|
+
return;
|
|
39502
|
+
}
|
|
39503
|
+
const activeAnnotation = annotations.find((annotation) => annotation.annotationUID === this.commonData.activeAnnotationUID);
|
|
39504
|
+
this.commonData.canvasLocation = eventData.currentPoints.canvas;
|
|
39505
|
+
if (this.isActive) {
|
|
39506
|
+
activeAnnotation.highlighted = true;
|
|
39507
|
+
}
|
|
39508
|
+
else {
|
|
39509
|
+
const cursorShape = this.registeredShapes.get(this.selectedShape);
|
|
39510
|
+
const canvasCoords = eventData.currentPoints.canvas;
|
|
39511
|
+
cursorShape.updateToolSize(canvasCoords, viewport, activeAnnotation);
|
|
39512
|
+
}
|
|
39513
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_6__/* .triggerAnnotationRenderForViewportIds */ .t)(renderingEngine, this.commonData.viewportIdsToRender);
|
|
39514
|
+
}
|
|
39515
|
+
filterSculptableAnnotationsForElement(element) {
|
|
39516
|
+
const config = this.configuration;
|
|
39517
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
39518
|
+
const { renderingEngineId, viewportId } = enabledElement;
|
|
39519
|
+
const sculptableAnnotations = [];
|
|
39520
|
+
const toolGroup = _store__WEBPACK_IMPORTED_MODULE_5__/* .ToolGroupManager.getToolGroupForViewport */ .dU.getToolGroupForViewport(viewportId, renderingEngineId);
|
|
39521
|
+
const toolInstance = toolGroup.getToolInstance(config.referencedToolName);
|
|
39522
|
+
config.referencedToolNames.forEach((referencedToolName) => {
|
|
39523
|
+
const annotations = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotations */ .Rh)(referencedToolName, element);
|
|
39524
|
+
if (annotations) {
|
|
39525
|
+
sculptableAnnotations.push(...annotations);
|
|
39526
|
+
}
|
|
39527
|
+
});
|
|
39528
|
+
return toolInstance.filterInteractableAnnotationsForElement(element, sculptableAnnotations);
|
|
39529
|
+
}
|
|
39530
|
+
configureToolSize(evt) {
|
|
39531
|
+
const cursorShape = this.registeredShapes.get(this.selectedShape);
|
|
39532
|
+
cursorShape.configureToolSize(evt);
|
|
39533
|
+
}
|
|
39534
|
+
insertNewHandles(pushedHandles) {
|
|
39535
|
+
const indicesToInsertAfter = this.findNewHandleIndices(pushedHandles);
|
|
39536
|
+
let newIndexModifier = 0;
|
|
39537
|
+
for (let i = 0; i < indicesToInsertAfter?.length; i++) {
|
|
39538
|
+
const insertIndex = indicesToInsertAfter[i] + 1 + newIndexModifier;
|
|
39539
|
+
this.insertHandleRadially(insertIndex);
|
|
39540
|
+
newIndexModifier++;
|
|
39541
|
+
}
|
|
39542
|
+
}
|
|
39543
|
+
findNewHandleIndices(pushedHandles) {
|
|
39544
|
+
const { points, maxSpacing } = this.sculptData;
|
|
39545
|
+
const indicesToInsertAfter = [];
|
|
39546
|
+
for (let i = pushedHandles.first; i <= pushedHandles.last; i++) {
|
|
39547
|
+
this.interpolatePointsWithinMaxSpacing(i, points, indicesToInsertAfter, maxSpacing);
|
|
39548
|
+
}
|
|
39549
|
+
return indicesToInsertAfter;
|
|
39550
|
+
}
|
|
39551
|
+
insertHandleRadially(insertIndex) {
|
|
39552
|
+
const { points } = this.sculptData;
|
|
39553
|
+
if (insertIndex > points.length - 1 &&
|
|
39554
|
+
this.commonData.isEditingOpenContour) {
|
|
39555
|
+
return;
|
|
39556
|
+
}
|
|
39557
|
+
const cursorShape = this.registeredShapes.get(this.selectedShape);
|
|
39558
|
+
const previousIndex = insertIndex - 1;
|
|
39559
|
+
const nextIndex = contourIndex(insertIndex, points.length);
|
|
39560
|
+
const insertPosition = cursorShape.getInsertPosition(previousIndex, nextIndex, this.sculptData);
|
|
39561
|
+
const handleData = insertPosition;
|
|
39562
|
+
points.splice(insertIndex, 0, handleData);
|
|
39563
|
+
}
|
|
39564
|
+
selectFreehandTool(eventData) {
|
|
39565
|
+
const closestAnnotationUID = this.getClosestFreehandToolOnElement(eventData);
|
|
39566
|
+
if (closestAnnotationUID === undefined) {
|
|
39567
|
+
return;
|
|
39568
|
+
}
|
|
39569
|
+
this.commonData.activeAnnotationUID = closestAnnotationUID;
|
|
39570
|
+
}
|
|
39571
|
+
getClosestFreehandToolOnElement(eventData) {
|
|
39572
|
+
const { element } = eventData;
|
|
39573
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
39574
|
+
const { viewport } = enabledElement;
|
|
39575
|
+
const config = this.configuration;
|
|
39576
|
+
const annotations = this.filterSculptableAnnotationsForElement(element);
|
|
39577
|
+
if (!annotations?.length) {
|
|
39578
|
+
return;
|
|
39579
|
+
}
|
|
39580
|
+
const canvasPoints = eventData.currentPoints.canvas;
|
|
39581
|
+
const closest = {
|
|
39582
|
+
distance: Infinity,
|
|
39583
|
+
toolIndex: undefined,
|
|
39584
|
+
annotationUID: undefined,
|
|
39585
|
+
};
|
|
39586
|
+
for (let i = 0; i < annotations?.length; i++) {
|
|
39587
|
+
if (annotations[i].isLocked || !annotations[i].isVisible) {
|
|
39588
|
+
continue;
|
|
39589
|
+
}
|
|
39590
|
+
const distanceFromTool = (0,_distancePointToContour__WEBPACK_IMPORTED_MODULE_11__/* .distancePointToContour */ .X)(viewport, annotations[i], canvasPoints);
|
|
39591
|
+
if (distanceFromTool === -1) {
|
|
39592
|
+
continue;
|
|
39593
|
+
}
|
|
39594
|
+
if (distanceFromTool < closest.distance) {
|
|
39595
|
+
closest.distance = distanceFromTool;
|
|
39596
|
+
closest.toolIndex = i;
|
|
39597
|
+
closest.annotationUID = annotations[i].annotationUID;
|
|
39598
|
+
}
|
|
39599
|
+
}
|
|
39600
|
+
this.commonData.isEditingOpenContour =
|
|
39601
|
+
!annotations[closest.toolIndex].data.contour.closed;
|
|
39602
|
+
config.referencedToolName =
|
|
39603
|
+
annotations[closest.toolIndex].metadata.toolName;
|
|
39604
|
+
return closest.annotationUID;
|
|
39605
|
+
}
|
|
39606
|
+
activateModify(element) {
|
|
39607
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.MOUSE_UP, this.endCallback);
|
|
39608
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.MOUSE_CLICK, this.endCallback);
|
|
39609
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.MOUSE_DRAG, this.dragCallback);
|
|
39610
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.TOUCH_TAP, this.endCallback);
|
|
39611
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.TOUCH_END, this.endCallback);
|
|
39612
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.TOUCH_DRAG, this.dragCallback);
|
|
39613
|
+
}
|
|
39614
|
+
deactivateModify(element) {
|
|
39615
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.MOUSE_UP, this.endCallback);
|
|
39616
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.MOUSE_CLICK, this.endCallback);
|
|
39617
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.MOUSE_DRAG, this.dragCallback);
|
|
39618
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.TOUCH_TAP, this.endCallback);
|
|
39619
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.TOUCH_END, this.endCallback);
|
|
39620
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_4__.Events.TOUCH_DRAG, this.dragCallback);
|
|
39621
|
+
}
|
|
39622
|
+
setToolShape(toolShape) {
|
|
39623
|
+
this.selectedShape =
|
|
39624
|
+
this.registeredShapes.get(toolShape) ?? _SculptorTool_CircleSculptCursor__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A.shapeName;
|
|
39625
|
+
}
|
|
39626
|
+
renderAnnotation(enabledElement, svgDrawingHelper) {
|
|
39627
|
+
const { viewport } = enabledElement;
|
|
39628
|
+
const { element } = viewport;
|
|
39629
|
+
const viewportIdsToRender = this.commonData.viewportIdsToRender;
|
|
39630
|
+
if (!this.commonData.canvasLocation ||
|
|
39631
|
+
this.mode !== _enums__WEBPACK_IMPORTED_MODULE_4__.ToolModes.Active ||
|
|
39632
|
+
!viewportIdsToRender.includes(viewport.id)) {
|
|
39633
|
+
return;
|
|
39634
|
+
}
|
|
39635
|
+
const annotations = this.filterSculptableAnnotationsForElement(element);
|
|
39636
|
+
if (!annotations?.length) {
|
|
39637
|
+
return;
|
|
39638
|
+
}
|
|
39639
|
+
const styleSpecifier = {
|
|
39640
|
+
toolGroupId: this.toolGroupId,
|
|
39641
|
+
toolName: this.getToolName(),
|
|
39642
|
+
viewportId: enabledElement.viewport.id,
|
|
39643
|
+
};
|
|
39644
|
+
let color = (0,_stateManagement_annotation_config_helpers__WEBPACK_IMPORTED_MODULE_8__/* .getStyleProperty */ .h)('color', styleSpecifier, _enums__WEBPACK_IMPORTED_MODULE_4__.AnnotationStyleStates.Default, this.mode);
|
|
39645
|
+
if (this.isActive) {
|
|
39646
|
+
color = (0,_stateManagement_annotation_config_helpers__WEBPACK_IMPORTED_MODULE_8__/* .getStyleProperty */ .h)('color', styleSpecifier, _enums__WEBPACK_IMPORTED_MODULE_4__.AnnotationStyleStates.Highlighted, this.mode);
|
|
39647
|
+
}
|
|
39648
|
+
const cursorShape = this.registeredShapes.get(this.selectedShape);
|
|
39649
|
+
cursorShape.renderShape(svgDrawingHelper, this.commonData.canvasLocation, {
|
|
39650
|
+
color,
|
|
39651
|
+
});
|
|
39652
|
+
}
|
|
39653
|
+
}
|
|
39654
|
+
const contourIndex = (i, length) => {
|
|
39655
|
+
return (i + length) % length;
|
|
39656
|
+
};
|
|
39657
|
+
SculptorTool.toolName = 'SculptorTool';
|
|
39658
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (SculptorTool)));
|
|
39659
|
+
|
|
39660
|
+
|
|
39007
39661
|
/***/ }),
|
|
39008
39662
|
|
|
39009
39663
|
/***/ 70494:
|
|
@@ -39012,7 +39666,7 @@ ScaleOverlayTool.toolName = 'ScaleOverlay';
|
|
|
39012
39666
|
"use strict";
|
|
39013
39667
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
39014
39668
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38296);
|
|
39015
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
39669
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49574);
|
|
39016
39670
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52610);
|
|
39017
39671
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23072);
|
|
39018
39672
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28062);
|
|
@@ -39557,6 +40211,248 @@ VolumeRotateMouseWheelTool.toolName = 'VolumeRotateMouseWheel';
|
|
|
39557
40211
|
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (VolumeRotateMouseWheelTool)));
|
|
39558
40212
|
|
|
39559
40213
|
|
|
40214
|
+
/***/ }),
|
|
40215
|
+
|
|
40216
|
+
/***/ 60747:
|
|
40217
|
+
/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
|
40218
|
+
|
|
40219
|
+
"use strict";
|
|
40220
|
+
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96214);
|
|
40221
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
40222
|
+
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95778);
|
|
40223
|
+
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
|
|
40224
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49574);
|
|
40225
|
+
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61738);
|
|
40226
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(84901);
|
|
40227
|
+
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(90252);
|
|
40228
|
+
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40233);
|
|
40229
|
+
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23072);
|
|
40230
|
+
/* harmony import */ var _utilities_voi__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14149);
|
|
40231
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(74119);
|
|
40232
|
+
|
|
40233
|
+
|
|
40234
|
+
|
|
40235
|
+
|
|
40236
|
+
|
|
40237
|
+
|
|
40238
|
+
|
|
40239
|
+
|
|
40240
|
+
|
|
40241
|
+
|
|
40242
|
+
|
|
40243
|
+
|
|
40244
|
+
class WindowLevelRegionTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationTool */ .EC {
|
|
40245
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
40246
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
40247
|
+
configuration: {
|
|
40248
|
+
minWindowWidth: 10,
|
|
40249
|
+
},
|
|
40250
|
+
}) {
|
|
40251
|
+
super(toolProps, defaultToolProps);
|
|
40252
|
+
this.addNewAnnotation = (evt) => {
|
|
40253
|
+
const eventDetail = evt.detail;
|
|
40254
|
+
const { currentPoints, element } = eventDetail;
|
|
40255
|
+
const worldPos = currentPoints.world;
|
|
40256
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
40257
|
+
const { viewport, renderingEngine } = enabledElement;
|
|
40258
|
+
this.isDrawing = true;
|
|
40259
|
+
const camera = viewport.getCamera();
|
|
40260
|
+
const { viewPlaneNormal, viewUp } = camera;
|
|
40261
|
+
const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
|
|
40262
|
+
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
40263
|
+
const annotation = {
|
|
40264
|
+
invalidated: true,
|
|
40265
|
+
highlighted: true,
|
|
40266
|
+
metadata: {
|
|
40267
|
+
toolName: this.getToolName(),
|
|
40268
|
+
viewPlaneNormal: [...viewPlaneNormal],
|
|
40269
|
+
viewUp: [...viewUp],
|
|
40270
|
+
FrameOfReferenceUID,
|
|
40271
|
+
referencedImageId,
|
|
40272
|
+
},
|
|
40273
|
+
data: {
|
|
40274
|
+
handles: {
|
|
40275
|
+
points: [
|
|
40276
|
+
[...worldPos],
|
|
40277
|
+
[...worldPos],
|
|
40278
|
+
[...worldPos],
|
|
40279
|
+
[...worldPos],
|
|
40280
|
+
],
|
|
40281
|
+
},
|
|
40282
|
+
cachedStats: {},
|
|
40283
|
+
},
|
|
40284
|
+
};
|
|
40285
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .addAnnotation */ .lC)(annotation, element);
|
|
40286
|
+
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
40287
|
+
this.editData = {
|
|
40288
|
+
annotation,
|
|
40289
|
+
viewportIdsToRender,
|
|
40290
|
+
};
|
|
40291
|
+
this._activateDraw(element);
|
|
40292
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.hideElementCursor)(element);
|
|
40293
|
+
evt.preventDefault();
|
|
40294
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
|
|
40295
|
+
return annotation;
|
|
40296
|
+
};
|
|
40297
|
+
this._endCallback = (evt) => {
|
|
40298
|
+
const eventDetail = evt.detail;
|
|
40299
|
+
const { element } = eventDetail;
|
|
40300
|
+
const { annotation, viewportIdsToRender } = this.editData;
|
|
40301
|
+
this._deactivateDraw(element);
|
|
40302
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_8__.resetElementCursor)(element);
|
|
40303
|
+
const { renderingEngine } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
40304
|
+
this.editData = null;
|
|
40305
|
+
this.isDrawing = false;
|
|
40306
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .removeAnnotation */ .O8)(annotation.annotationUID);
|
|
40307
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
|
|
40308
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__/* .triggerAnnotationCompleted */ .dZ)(annotation);
|
|
40309
|
+
this.applyWindowLevelRegion(annotation, element);
|
|
40310
|
+
};
|
|
40311
|
+
this._dragCallback = (evt) => {
|
|
40312
|
+
this.isDrawing = true;
|
|
40313
|
+
const eventDetail = evt.detail;
|
|
40314
|
+
const { element } = eventDetail;
|
|
40315
|
+
const { annotation, viewportIdsToRender } = this.editData;
|
|
40316
|
+
const { data } = annotation;
|
|
40317
|
+
const { currentPoints } = eventDetail;
|
|
40318
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
40319
|
+
const { worldToCanvas, canvasToWorld } = enabledElement.viewport;
|
|
40320
|
+
const worldPos = currentPoints.world;
|
|
40321
|
+
const { points } = data.handles;
|
|
40322
|
+
const DEFAULT_HANDLE_INDEX = 3;
|
|
40323
|
+
points[DEFAULT_HANDLE_INDEX] = [...worldPos];
|
|
40324
|
+
const bottomLeftCanvas = worldToCanvas(points[0]);
|
|
40325
|
+
const topRightCanvas = worldToCanvas(points[3]);
|
|
40326
|
+
const bottomRightCanvas = [
|
|
40327
|
+
topRightCanvas[0],
|
|
40328
|
+
bottomLeftCanvas[1],
|
|
40329
|
+
];
|
|
40330
|
+
const topLeftCanvas = [
|
|
40331
|
+
bottomLeftCanvas[0],
|
|
40332
|
+
topRightCanvas[1],
|
|
40333
|
+
];
|
|
40334
|
+
const bottomRightWorld = canvasToWorld(bottomRightCanvas);
|
|
40335
|
+
const topLeftWorld = canvasToWorld(topLeftCanvas);
|
|
40336
|
+
points[1] = bottomRightWorld;
|
|
40337
|
+
points[2] = topLeftWorld;
|
|
40338
|
+
annotation.invalidated = true;
|
|
40339
|
+
const { renderingEngine } = enabledElement;
|
|
40340
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(renderingEngine, viewportIdsToRender);
|
|
40341
|
+
};
|
|
40342
|
+
this._activateDraw = (element) => {
|
|
40343
|
+
_store__WEBPACK_IMPORTED_MODULE_5__/* .state */ .wk.isInteractingWithTool = true;
|
|
40344
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_UP, this._endCallback);
|
|
40345
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_DRAG, this._dragCallback);
|
|
40346
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_MOVE, this._dragCallback);
|
|
40347
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_CLICK, this._endCallback);
|
|
40348
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_END, this._endCallback);
|
|
40349
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_DRAG, this._dragCallback);
|
|
40350
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_TAP, this._endCallback);
|
|
40351
|
+
};
|
|
40352
|
+
this._deactivateDraw = (element) => {
|
|
40353
|
+
_store__WEBPACK_IMPORTED_MODULE_5__/* .state */ .wk.isInteractingWithTool = false;
|
|
40354
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_UP, this._endCallback);
|
|
40355
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_DRAG, this._dragCallback);
|
|
40356
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_MOVE, this._dragCallback);
|
|
40357
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.MOUSE_CLICK, this._endCallback);
|
|
40358
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_END, this._endCallback);
|
|
40359
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_DRAG, this._dragCallback);
|
|
40360
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_6__.Events.TOUCH_TAP, this._endCallback);
|
|
40361
|
+
};
|
|
40362
|
+
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
40363
|
+
let renderStatus = false;
|
|
40364
|
+
const { viewport } = enabledElement;
|
|
40365
|
+
const { element } = viewport;
|
|
40366
|
+
let annotations = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .getAnnotations */ .Rh)(this.getToolName(), element);
|
|
40367
|
+
if (!annotations?.length) {
|
|
40368
|
+
return renderStatus;
|
|
40369
|
+
}
|
|
40370
|
+
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
40371
|
+
if (!annotations?.length) {
|
|
40372
|
+
return renderStatus;
|
|
40373
|
+
}
|
|
40374
|
+
const styleSpecifier = {
|
|
40375
|
+
toolGroupId: this.toolGroupId,
|
|
40376
|
+
toolName: this.getToolName(),
|
|
40377
|
+
viewportId: enabledElement.viewport.id,
|
|
40378
|
+
};
|
|
40379
|
+
for (let i = 0; i < annotations.length; i++) {
|
|
40380
|
+
const annotation = annotations[i];
|
|
40381
|
+
const { annotationUID, data } = annotation;
|
|
40382
|
+
const { points } = data.handles;
|
|
40383
|
+
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
40384
|
+
styleSpecifier.annotationUID = annotationUID;
|
|
40385
|
+
const { color, lineWidth, lineDash } = this.getAnnotationStyle({
|
|
40386
|
+
annotation,
|
|
40387
|
+
styleSpecifier,
|
|
40388
|
+
});
|
|
40389
|
+
if (!viewport.getRenderingEngine()) {
|
|
40390
|
+
console.warn('Rendering Engine has been destroyed');
|
|
40391
|
+
return renderStatus;
|
|
40392
|
+
}
|
|
40393
|
+
const dataId = `${annotationUID}-rect`;
|
|
40394
|
+
const rectangleUID = '0';
|
|
40395
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_4__.drawRect)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates[0], canvasCoordinates[3], {
|
|
40396
|
+
color,
|
|
40397
|
+
lineDash,
|
|
40398
|
+
lineWidth,
|
|
40399
|
+
}, dataId);
|
|
40400
|
+
renderStatus = true;
|
|
40401
|
+
}
|
|
40402
|
+
return renderStatus;
|
|
40403
|
+
};
|
|
40404
|
+
this.applyWindowLevelRegion = (annotation, element) => {
|
|
40405
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
40406
|
+
const { viewport } = enabledElement;
|
|
40407
|
+
const imageData = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.extractWindowLevelRegionToolData(viewport);
|
|
40408
|
+
const { data } = annotation;
|
|
40409
|
+
const { points } = data.handles;
|
|
40410
|
+
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
40411
|
+
const startCanvas = canvasCoordinates[0];
|
|
40412
|
+
const endCanvas = canvasCoordinates[3];
|
|
40413
|
+
let left = Math.min(startCanvas[0], endCanvas[0]);
|
|
40414
|
+
let top = Math.min(startCanvas[1], endCanvas[1]);
|
|
40415
|
+
let width = Math.abs(startCanvas[0] - endCanvas[0]);
|
|
40416
|
+
let height = Math.abs(startCanvas[1] - endCanvas[1]);
|
|
40417
|
+
left = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.clip)(left, 0, imageData.width);
|
|
40418
|
+
top = (0,_utilities__WEBPACK_IMPORTED_MODULE_11__.clip)(top, 0, imageData.height);
|
|
40419
|
+
width = Math.floor(Math.min(width, Math.abs(imageData.width - left)));
|
|
40420
|
+
height = Math.floor(Math.min(height, Math.abs(imageData.height - top)));
|
|
40421
|
+
const pixelLuminanceData = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.getLuminanceFromRegion(imageData, Math.round(left), Math.round(top), width, height);
|
|
40422
|
+
const minMaxMean = _utilities_voi__WEBPACK_IMPORTED_MODULE_10__.windowLevel.calculateMinMaxMean(pixelLuminanceData, imageData.minPixelValue, imageData.maxPixelValue);
|
|
40423
|
+
if (this.configuration.minWindowWidth === undefined) {
|
|
40424
|
+
this.configuration.minWindowWidth = 10;
|
|
40425
|
+
}
|
|
40426
|
+
const windowWidth = Math.max(Math.abs(minMaxMean.max - minMaxMean.min), this.configuration.minWindowWidth);
|
|
40427
|
+
const windowCenter = minMaxMean.mean;
|
|
40428
|
+
const voiRange = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.windowLevel.toLowHighRange(windowWidth, windowCenter);
|
|
40429
|
+
viewport.setProperties({ voiRange });
|
|
40430
|
+
viewport.render();
|
|
40431
|
+
};
|
|
40432
|
+
this.cancel = () => {
|
|
40433
|
+
return null;
|
|
40434
|
+
};
|
|
40435
|
+
this.isPointNearTool = () => {
|
|
40436
|
+
return null;
|
|
40437
|
+
};
|
|
40438
|
+
this.toolSelectedCallback = () => {
|
|
40439
|
+
return null;
|
|
40440
|
+
};
|
|
40441
|
+
this.handleSelectedCallback = () => {
|
|
40442
|
+
return null;
|
|
40443
|
+
};
|
|
40444
|
+
this._activateModify = () => {
|
|
40445
|
+
return null;
|
|
40446
|
+
};
|
|
40447
|
+
this._deactivateModify = () => {
|
|
40448
|
+
return null;
|
|
40449
|
+
};
|
|
40450
|
+
}
|
|
40451
|
+
}
|
|
40452
|
+
WindowLevelRegionTool.toolName = 'WindowLevelRegion';
|
|
40453
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (WindowLevelRegionTool)));
|
|
40454
|
+
|
|
40455
|
+
|
|
39560
40456
|
/***/ }),
|
|
39561
40457
|
|
|
39562
40458
|
/***/ 455:
|
|
@@ -39968,7 +40864,7 @@ ZoomTool.toolName = 'Zoom';
|
|
|
39968
40864
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(21954);
|
|
39969
40865
|
/* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(52475);
|
|
39970
40866
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(74119);
|
|
39971
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
40867
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
|
|
39972
40868
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
|
|
39973
40869
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(90252);
|
|
39974
40870
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(23072);
|
|
@@ -40024,6 +40920,7 @@ class AngleTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .AnnotationTool */
|
|
|
40024
40920
|
viewUp: [...viewUp],
|
|
40025
40921
|
FrameOfReferenceUID,
|
|
40026
40922
|
referencedImageId,
|
|
40923
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
40027
40924
|
},
|
|
40028
40925
|
data: {
|
|
40029
40926
|
handles: {
|
|
@@ -40437,7 +41334,7 @@ AngleTool.toolName = 'Angle';
|
|
|
40437
41334
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
40438
41335
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48428);
|
|
40439
41336
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21954);
|
|
40440
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
41337
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
40441
41338
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
40442
41339
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
|
|
40443
41340
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23072);
|
|
@@ -40489,6 +41386,7 @@ class ArrowAnnotateTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .Annotation
|
|
|
40489
41386
|
viewUp: [...viewUp],
|
|
40490
41387
|
FrameOfReferenceUID,
|
|
40491
41388
|
referencedImageId,
|
|
41389
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
40492
41390
|
},
|
|
40493
41391
|
data: {
|
|
40494
41392
|
text: '',
|
|
@@ -40886,7 +41784,7 @@ ArrowAnnotateTool.toolName = 'ArrowAnnotate';
|
|
|
40886
41784
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
|
|
40887
41785
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
|
|
40888
41786
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
|
|
40889
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
41787
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
|
|
40890
41788
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
|
|
40891
41789
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
|
|
40892
41790
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
|
|
@@ -40956,6 +41854,7 @@ class CircleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationTool
|
|
|
40956
41854
|
viewUp: [...viewUp],
|
|
40957
41855
|
FrameOfReferenceUID,
|
|
40958
41856
|
referencedImageId,
|
|
41857
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
40959
41858
|
},
|
|
40960
41859
|
data: {
|
|
40961
41860
|
label: '',
|
|
@@ -41505,7 +42404,7 @@ CircleROITool.toolName = 'CircleROI';
|
|
|
41505
42404
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21954);
|
|
41506
42405
|
/* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(52475);
|
|
41507
42406
|
/* harmony import */ var _utilities_math_midPoint__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(76727);
|
|
41508
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
42407
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(49574);
|
|
41509
42408
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(61738);
|
|
41510
42409
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(90252);
|
|
41511
42410
|
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(10910);
|
|
@@ -41564,6 +42463,7 @@ class CobbAngleTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationTool
|
|
|
41564
42463
|
viewUp: [...viewUp],
|
|
41565
42464
|
FrameOfReferenceUID,
|
|
41566
42465
|
referencedImageId,
|
|
42466
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
41567
42467
|
},
|
|
41568
42468
|
data: {
|
|
41569
42469
|
handles: {
|
|
@@ -42203,7 +43103,7 @@ CobbAngleTool.toolName = 'CobbAngle';
|
|
|
42203
43103
|
|
|
42204
43104
|
"use strict";
|
|
42205
43105
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
42206
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
43106
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49574);
|
|
42207
43107
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90252);
|
|
42208
43108
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(40233);
|
|
42209
43109
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23072);
|
|
@@ -42361,7 +43261,7 @@ DragProbeTool.toolName = 'DragProbe';
|
|
|
42361
43261
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
|
|
42362
43262
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
|
|
42363
43263
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
|
|
42364
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
43264
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
|
|
42365
43265
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
|
|
42366
43266
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
|
|
42367
43267
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
|
|
@@ -42430,6 +43330,7 @@ class EllipticalROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .Annotation
|
|
|
42430
43330
|
viewUp: [...viewUp],
|
|
42431
43331
|
FrameOfReferenceUID,
|
|
42432
43332
|
referencedImageId,
|
|
43333
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
42433
43334
|
},
|
|
42434
43335
|
data: {
|
|
42435
43336
|
label: '',
|
|
@@ -43065,7 +43966,7 @@ EllipticalROITool.toolName = 'EllipticalROI';
|
|
|
43065
43966
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96214);
|
|
43066
43967
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
43067
43968
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54177);
|
|
43068
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
43969
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
43069
43970
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61738);
|
|
43070
43971
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(90252);
|
|
43071
43972
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23072);
|
|
@@ -43264,7 +44165,7 @@ KeyImageTool.toolName = 'KeyImage';
|
|
|
43264
44165
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21009);
|
|
43265
44166
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54177);
|
|
43266
44167
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21954);
|
|
43267
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
44168
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(49574);
|
|
43268
44169
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(61738);
|
|
43269
44170
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(90252);
|
|
43270
44171
|
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(10910);
|
|
@@ -43710,7 +44611,7 @@ LengthTool.toolName = 'Length';
|
|
|
43710
44611
|
/* harmony import */ var _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1320);
|
|
43711
44612
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
|
|
43712
44613
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
|
|
43713
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
44614
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
43714
44615
|
|
|
43715
44616
|
|
|
43716
44617
|
|
|
@@ -43763,7 +44664,7 @@ class LivewireContourSegmentationTool extends _LivewireContourTool__WEBPACK_IMPO
|
|
|
43763
44664
|
}
|
|
43764
44665
|
this.updateAnnotation(acceptedPath);
|
|
43765
44666
|
this.scissors = null;
|
|
43766
|
-
this.
|
|
44667
|
+
this.scissorsNext = null;
|
|
43767
44668
|
this.editData = null;
|
|
43768
44669
|
annotation.data.handles.interpolationSources = null;
|
|
43769
44670
|
if (repeatInterpolation) {
|
|
@@ -43814,7 +44715,7 @@ LivewireContourSegmentationTool.toolName = 'LivewireContourSegmentationTool';
|
|
|
43814
44715
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44753);
|
|
43815
44716
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
43816
44717
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
|
|
43817
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
44718
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
43818
44719
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
|
|
43819
44720
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
|
|
43820
44721
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
|
|
@@ -44109,7 +45010,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
|
|
|
44109
45010
|
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_5__.Events.TOUCH_TAP, this._mouseDownCallback);
|
|
44110
45011
|
};
|
|
44111
45012
|
}
|
|
44112
|
-
setupBaseEditData(worldPos, element, annotation,
|
|
45013
|
+
setupBaseEditData(worldPos, element, annotation, nextPos, contourHoleProcessingEnabled) {
|
|
44113
45014
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
44114
45015
|
const { viewport } = enabledElement;
|
|
44115
45016
|
this.isDrawing = true;
|
|
@@ -44152,12 +45053,12 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
|
|
|
44152
45053
|
const { voiRange } = viewport.getProperties();
|
|
44153
45054
|
const startPos = worldToSlice(worldPos);
|
|
44154
45055
|
this.scissors = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_12__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
|
|
44155
|
-
if (
|
|
44156
|
-
this.
|
|
44157
|
-
this.
|
|
45056
|
+
if (nextPos) {
|
|
45057
|
+
this.scissorsNext = _utilities_livewire_LivewireScissors__WEBPACK_IMPORTED_MODULE_12__/* .LivewireScissors */ .f.createInstanceFromRawPixelData(scalarData, width, height, voiRange);
|
|
45058
|
+
this.scissorsNext.startSearch(worldToSlice(nextPos));
|
|
44158
45059
|
}
|
|
44159
45060
|
this.scissors.startSearch(startPos);
|
|
44160
|
-
const newAnnotation = !
|
|
45061
|
+
const newAnnotation = !nextPos;
|
|
44161
45062
|
const confirmedPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
|
|
44162
45063
|
const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
|
|
44163
45064
|
const currentPathNext = newAnnotation ? undefined : new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
|
|
@@ -44173,7 +45074,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
|
|
|
44173
45074
|
lastCanvasPoint,
|
|
44174
45075
|
confirmedPath,
|
|
44175
45076
|
currentPath,
|
|
44176
|
-
|
|
45077
|
+
confirmedPathNext: currentPathNext,
|
|
44177
45078
|
closed: false,
|
|
44178
45079
|
handleIndex: this.editData?.handleIndex ?? annotation.handles?.activeHandleIndex,
|
|
44179
45080
|
worldToSlice,
|
|
@@ -44199,7 +45100,7 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
|
|
|
44199
45100
|
clearEditData() {
|
|
44200
45101
|
this.editData = null;
|
|
44201
45102
|
this.scissors = null;
|
|
44202
|
-
this.
|
|
45103
|
+
this.scissorsNext = null;
|
|
44203
45104
|
this.isDrawing = false;
|
|
44204
45105
|
}
|
|
44205
45106
|
editHandle(worldPos, element, annotation, handleIndex) {
|
|
@@ -44208,11 +45109,11 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
|
|
|
44208
45109
|
const { length: numHandles } = handlePoints;
|
|
44209
45110
|
const previousHandle = handlePoints[(handleIndex - 1 + numHandles) % numHandles];
|
|
44210
45111
|
const nextHandle = handlePoints[(handleIndex + 1) % numHandles];
|
|
44211
|
-
if (!this.editData?.
|
|
45112
|
+
if (!this.editData?.confirmedPathNext) {
|
|
44212
45113
|
this.setupBaseEditData(previousHandle, element, annotation, nextHandle);
|
|
44213
45114
|
const { polyline } = data.contour;
|
|
44214
45115
|
const confirmedPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
|
|
44215
|
-
const
|
|
45116
|
+
const confirmedPathNext = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
|
|
44216
45117
|
const { worldToSlice } = this.editData;
|
|
44217
45118
|
const previousIndex = (0,_utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(annotation, handleIndex - 1);
|
|
44218
45119
|
const nextIndex = (0,_utilities_contours_findHandlePolylineIndex__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(annotation, handleIndex + 1);
|
|
@@ -44220,17 +45121,14 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
|
|
|
44220
45121
|
throw new Error(`Can't find handle index ${nextIndex === -1 && nextHandle} ${previousIndex === -1 && previousHandle}`);
|
|
44221
45122
|
}
|
|
44222
45123
|
if (handleIndex === 0) {
|
|
44223
|
-
|
|
44224
|
-
}
|
|
44225
|
-
else if (nextIndex < previousIndex) {
|
|
44226
|
-
throw new Error(`Expected right index after left index, but were: ${previousIndex} ${nextIndex}`);
|
|
45124
|
+
confirmedPathNext.addPoints(polyline.slice(nextIndex + 1, previousIndex).map(worldToSlice));
|
|
44227
45125
|
}
|
|
44228
45126
|
else {
|
|
44229
45127
|
confirmedPath.addPoints(polyline.slice(0, previousIndex + 1).map(worldToSlice));
|
|
44230
|
-
|
|
45128
|
+
confirmedPathNext.addPoints(polyline.slice(nextIndex, polyline.length).map(worldToSlice));
|
|
44231
45129
|
}
|
|
44232
45130
|
this.editData.confirmedPath = confirmedPath;
|
|
44233
|
-
this.editData.
|
|
45131
|
+
this.editData.confirmedPathNext = confirmedPathNext;
|
|
44234
45132
|
}
|
|
44235
45133
|
const { editData, scissors } = this;
|
|
44236
45134
|
const { worldToSlice, sliceToWorld } = editData;
|
|
@@ -44250,14 +45148,14 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
|
|
|
44250
45148
|
}
|
|
44251
45149
|
handlePoints[handleIndex] = sliceToWorld(slicePos);
|
|
44252
45150
|
const pathPointsLeft = scissors.findPathToPoint(slicePos);
|
|
44253
|
-
const pathPointsRight = this.
|
|
45151
|
+
const pathPointsRight = this.scissorsNext.findPathToPoint(slicePos);
|
|
44254
45152
|
const currentPath = new _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_13__/* .LivewirePath */ .j();
|
|
44255
45153
|
currentPath.prependPath(editData.confirmedPath);
|
|
44256
45154
|
if (handleIndex !== 0) {
|
|
44257
45155
|
currentPath.addPoints(pathPointsLeft);
|
|
44258
45156
|
}
|
|
44259
45157
|
currentPath.addPoints(pathPointsRight.reverse());
|
|
44260
|
-
currentPath.appendPath(editData.
|
|
45158
|
+
currentPath.appendPath(editData.confirmedPathNext);
|
|
44261
45159
|
if (handleIndex === 0) {
|
|
44262
45160
|
currentPath.addPoints(pathPointsLeft);
|
|
44263
45161
|
}
|
|
@@ -44316,17 +45214,19 @@ class LivewireContourTool extends _base_ContourSegmentationBaseTool__WEBPACK_IMP
|
|
|
44316
45214
|
if (!this.editData || !livewirePath) {
|
|
44317
45215
|
return;
|
|
44318
45216
|
}
|
|
44319
|
-
const { annotation, sliceToWorld } = this.editData;
|
|
45217
|
+
const { annotation, sliceToWorld, worldToSlice, closed, newAnnotation } = this.editData;
|
|
44320
45218
|
let { pointArray: imagePoints } = livewirePath;
|
|
44321
45219
|
if (imagePoints.length > 1) {
|
|
44322
45220
|
imagePoints = [...imagePoints, imagePoints[0]];
|
|
44323
45221
|
}
|
|
45222
|
+
const targetWindingDirection = newAnnotation && closed ? _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_10__/* .ContourWindingDirection */ .W.Clockwise : undefined;
|
|
44324
45223
|
this.updateContourPolyline(annotation, {
|
|
44325
45224
|
points: imagePoints,
|
|
44326
|
-
closed
|
|
44327
|
-
targetWindingDirection
|
|
45225
|
+
closed,
|
|
45226
|
+
targetWindingDirection,
|
|
44328
45227
|
}, {
|
|
44329
45228
|
canvasToWorld: sliceToWorld,
|
|
45229
|
+
worldToCanvas: worldToSlice,
|
|
44330
45230
|
});
|
|
44331
45231
|
}
|
|
44332
45232
|
}
|
|
@@ -44393,7 +45293,7 @@ PlanarFreehandContourSegmentationTool.toolName =
|
|
|
44393
45293
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
44394
45294
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54177);
|
|
44395
45295
|
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24592);
|
|
44396
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
45296
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
44397
45297
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
44398
45298
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84901);
|
|
44399
45299
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(90252);
|
|
@@ -44773,7 +45673,7 @@ ProbeTool.toolName = 'Probe';
|
|
|
44773
45673
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(48428);
|
|
44774
45674
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21009);
|
|
44775
45675
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54177);
|
|
44776
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
45676
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49574);
|
|
44777
45677
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61738);
|
|
44778
45678
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84901);
|
|
44779
45679
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(90252);
|
|
@@ -44839,6 +45739,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
|
|
|
44839
45739
|
viewUp: [...viewUp],
|
|
44840
45740
|
FrameOfReferenceUID,
|
|
44841
45741
|
referencedImageId,
|
|
45742
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
44842
45743
|
},
|
|
44843
45744
|
data: {
|
|
44844
45745
|
label: '',
|
|
@@ -45186,7 +46087,7 @@ class RectangleROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .AnnotationT
|
|
|
45186
46087
|
}
|
|
45187
46088
|
const dataId = `${annotationUID}-rect`;
|
|
45188
46089
|
const rectangleUID = '0';
|
|
45189
|
-
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.
|
|
46090
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_9__.drawRectByCoordinates)(svgDrawingHelper, annotationUID, rectangleUID, canvasCoordinates, {
|
|
45190
46091
|
color,
|
|
45191
46092
|
lineDash,
|
|
45192
46093
|
lineWidth,
|
|
@@ -45370,7 +46271,7 @@ SplineContourSegmentationTool.toolName = 'SplineContourSegmentationTool';
|
|
|
45370
46271
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
45371
46272
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44753);
|
|
45372
46273
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38296);
|
|
45373
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
46274
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
|
|
45374
46275
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61738);
|
|
45375
46276
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
|
|
45376
46277
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
|
|
@@ -46124,7 +47025,7 @@ SplineROITool.toolName = 'SplineROI';
|
|
|
46124
47025
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21090);
|
|
46125
47026
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38296);
|
|
46126
47027
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54177);
|
|
46127
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
47028
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
46128
47029
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61738);
|
|
46129
47030
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
|
|
46130
47031
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(74119);
|
|
@@ -46609,7 +47510,7 @@ UltrasoundDirectionalTool.toolName = 'UltrasoundDirectionalTool';
|
|
|
46609
47510
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96214);
|
|
46610
47511
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21090);
|
|
46611
47512
|
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95778);
|
|
46612
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
47513
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
46613
47514
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61738);
|
|
46614
47515
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(84901);
|
|
46615
47516
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90252);
|
|
@@ -47305,7 +48206,7 @@ BaseTool.toolName = 'BaseTool';
|
|
|
47305
48206
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47306
48207
|
/* harmony export */ T: () => (/* reexport safe */ _contourDisplay__WEBPACK_IMPORTED_MODULE_0__.A)
|
|
47307
48208
|
/* harmony export */ });
|
|
47308
|
-
/* harmony import */ var _contourDisplay__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
48209
|
+
/* harmony import */ var _contourDisplay__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57784);
|
|
47309
48210
|
|
|
47310
48211
|
|
|
47311
48212
|
|
|
@@ -47634,7 +48535,7 @@ async function _addLabelmapToViewport(viewport, labelmapData, segmentationRepres
|
|
|
47634
48535
|
/* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4069);
|
|
47635
48536
|
/* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11852);
|
|
47636
48537
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(84901);
|
|
47637
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
48538
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(49574);
|
|
47638
48539
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(40233);
|
|
47639
48540
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23072);
|
|
47640
48541
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(63421);
|
|
@@ -48106,7 +49007,7 @@ BrushTool.toolName = 'Brush';
|
|
|
48106
49007
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84901);
|
|
48107
49008
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38296);
|
|
48108
49009
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(48428);
|
|
48109
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
49010
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
48110
49011
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(90252);
|
|
48111
49012
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21090);
|
|
48112
49013
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21009);
|
|
@@ -48470,7 +49371,7 @@ CircleROIStartEndThresholdTool.toolName = 'CircleROIStartEndThreshold';
|
|
|
48470
49371
|
/* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4069);
|
|
48471
49372
|
/* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11852);
|
|
48472
49373
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
|
|
48473
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
49374
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
48474
49375
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
|
|
48475
49376
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23072);
|
|
48476
49377
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(63421);
|
|
@@ -48967,7 +49868,7 @@ PaintFillTool.toolName = 'PaintFill';
|
|
|
48967
49868
|
/* harmony import */ var _strategies_eraseRectangle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66211);
|
|
48968
49869
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90252);
|
|
48969
49870
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84901);
|
|
48970
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
49871
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
|
|
48971
49872
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(40233);
|
|
48972
49873
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23072);
|
|
48973
49874
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63421);
|
|
@@ -49337,7 +50238,7 @@ SegmentSelectTool.toolName = 'SegmentSelectTool';
|
|
|
49337
50238
|
/* harmony import */ var _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61604);
|
|
49338
50239
|
/* harmony import */ var _strategies_eraseSphere__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4373);
|
|
49339
50240
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84901);
|
|
49340
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
50241
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49574);
|
|
49341
50242
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40233);
|
|
49342
50243
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23072);
|
|
49343
50244
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(63421);
|
|
@@ -49938,7 +50839,7 @@ function triggerSegmentationRender(toolGroupId) {
|
|
|
49938
50839
|
/* unused harmony exports annotationRenderingEngine, triggerAnnotationRender */
|
|
49939
50840
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
49940
50841
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84901);
|
|
49941
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
50842
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49574);
|
|
49942
50843
|
/* harmony import */ var _getToolsWithModesForElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42360);
|
|
49943
50844
|
|
|
49944
50845
|
|
|
@@ -50065,9 +50966,9 @@ function triggerAnnotationRender(element) {
|
|
|
50065
50966
|
|
|
50066
50967
|
"use strict";
|
|
50067
50968
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
50068
|
-
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
50969
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
50970
|
+
/* harmony export */ t: () => (/* binding */ triggerAnnotationRenderForViewportIds)
|
|
50069
50971
|
/* harmony export */ });
|
|
50070
|
-
/* unused harmony export triggerAnnotationRenderForViewportIds */
|
|
50071
50972
|
/* harmony import */ var _triggerAnnotationRender__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6805);
|
|
50072
50973
|
|
|
50073
50974
|
function triggerAnnotationRenderForViewportIds(renderingEngine, viewportIdsToRender) {
|