@ohif/app 3.9.0-beta.37 → 3.9.0-beta.39
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/{164.bundle.e30009bee13acb6967da.js → 164.bundle.2b23bfbcb23497d7c87a.js} +2 -2
- package/dist/{211.bundle.1dadd3a10b19ec23356f.js → 211.bundle.b75880678d4d85b219c6.js} +8 -10
- package/dist/{236.bundle.a7e2f9e0cb3668fb6937.js → 236.bundle.34db90a140e37d34fd71.js} +117 -86
- package/dist/{363.bundle.49553b1b46f57050ffd4.js → 363.bundle.07e8fc7ffcf0c56d4864.js} +6 -0
- package/dist/{370.bundle.26738a863fd92e6b0d96.js → 370.bundle.bd9884c274c26a54dfae.js} +14 -2
- package/dist/{382.bundle.f4bd84334e5d406347c3.js → 382.bundle.3d07a76859cdfa5d9a47.js} +8 -10
- package/dist/{501.bundle.ae2420b042bb0e7f72a7.js → 501.bundle.2f703ca4598a3be0d748.js} +117 -86
- package/dist/{806.bundle.6ac0d509f2e4c5fc34a4.js → 806.bundle.be586413c13fe96f9bf8.js} +8 -10
- package/dist/{914.bundle.2b3a856b7d41ac8298e6.js → 914.bundle.e15be8089bf422ed7b51.js} +2 -2
- package/dist/{944.bundle.d1390315f675965a73cd.js → 944.bundle.4e01734236affbcdeb65.js} +2 -2
- package/dist/{app.bundle.8585dccb2f18d449dfec.js → app.bundle.be214f196f97f6364a28.js} +23 -8
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.bbb334a78132a383ef54.js → polySeg.bundle.df492df5042827938ba4.js} +1 -1
- package/dist/{suv-peak-worker.bundle.6347271d0c99d33d64cf.js → suv-peak-worker.bundle.8f4b505fad3d371489fe.js} +1 -1
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- /package/dist/{117.bundle.17ae130d2bb21ef9d31f.js → 117.bundle.1f7b56504d506e7259e3.js} +0 -0
- /package/dist/{121.bundle.d8aa59f8c8ecc46cc15a.js → 121.bundle.363586b21d14d2edc34f.js} +0 -0
- /package/dist/{129.bundle.eacc355e8999093f400e.js → 129.bundle.a12b0e49408ddf8bd13b.js} +0 -0
- /package/dist/{139.bundle.6eb8039adf55b8c9ca62.js → 139.bundle.09e5af0a9ae8a285af77.js} +0 -0
- /package/dist/{14.bundle.54ee1b893786159552b4.js → 14.bundle.dbb258188d740658c239.js} +0 -0
- /package/dist/{140.bundle.0e803da0633d161b41f0.js → 140.bundle.9ab4bd5c2357a02abb16.js} +0 -0
- /package/dist/{194.bundle.2de1109c4a4ff75007c1.js → 194.bundle.a270a7db387b77248efc.js} +0 -0
- /package/dist/{218.bundle.8f36f9fb906500430bc6.js → 218.bundle.49968cc1d722c61c1c4e.js} +0 -0
- /package/dist/{323.bundle.1fd7c8d38a76f9ad0a16.js → 323.bundle.955cc8f5eb5c01295118.js} +0 -0
- /package/dist/{342.bundle.11ecb4c2b7014443a64b.js → 342.bundle.fcb2038060a062129d34.js} +0 -0
- /package/dist/{444.bundle.81cf89e148c19e073b8c.js → 444.bundle.815b2273b4ffa5eb3b8b.js} +0 -0
- /package/dist/{483.bundle.016de3c3ec209d9fa42a.js → 483.bundle.0f1848f6a2cf34829fef.js} +0 -0
- /package/dist/{552.bundle.605ef941b5c0038a48e9.js → 552.bundle.b3a424eb08a2bd8b9a8d.js} +0 -0
- /package/dist/{555.bundle.d5dec4c061ee87e1cb75.js → 555.bundle.281003f11bd3cb7889a5.js} +0 -0
- /package/dist/{717.bundle.53b7cb8fde157458e9b5.js → 717.bundle.c88ec7a3f296a5425d93.js} +0 -0
- /package/dist/{799.bundle.f2b732c724930107c3b5.js → 799.bundle.89dc60db83b71d34c73d.js} +0 -0
- /package/dist/{853.bundle.24390ff65af896a51419.js → 853.bundle.58d1b9e13a2c7a62c3e4.js} +0 -0
- /package/dist/{920.bundle.d464bfb03ab6eb996fc3.js → 920.bundle.142a154d473a3dc370d6.js} +0 -0
- /package/dist/{989.bundle.e08caf89477fa8a18272.js → 989.bundle.fbcba647fc12d4b3457c.js} +0 -0
|
@@ -9219,7 +9219,7 @@ function stackContextPrefetch_prefetch(element) {
|
|
|
9219
9219
|
.then(() => doneCallback(imageId));
|
|
9220
9220
|
const { useNorm16Texture, preferSizeOverAccuracy } = (0,esm.getConfiguration)().rendering;
|
|
9221
9221
|
const useNativeDataType = useNorm16Texture || preferSizeOverAccuracy;
|
|
9222
|
-
|
|
9222
|
+
stackPrefetch.indicesToRequest.forEach((imageIdIndex) => {
|
|
9223
9223
|
const imageId = stack.imageIds[imageIdIndex];
|
|
9224
9224
|
const options = {
|
|
9225
9225
|
targetBuffer: {
|
|
@@ -9318,7 +9318,7 @@ function stackContextPrefetch_disable(element) {
|
|
|
9318
9318
|
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.m0)(element);
|
|
9319
9319
|
esm.eventTarget.removeEventListener(esm.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
9320
9320
|
const stackPrefetchData = (0,state/* getToolState */.k)(element);
|
|
9321
|
-
if (stackPrefetchData
|
|
9321
|
+
if (stackPrefetchData) {
|
|
9322
9322
|
stackPrefetchData.enabled = false;
|
|
9323
9323
|
}
|
|
9324
9324
|
}
|
|
@@ -53,15 +53,6 @@ const toolbarButtons = [{
|
|
|
53
53
|
commands: setToolActiveToolbar,
|
|
54
54
|
evaluate: 'evaluate.cornerstoneTool'
|
|
55
55
|
}
|
|
56
|
-
}, {
|
|
57
|
-
id: 'WindowLevelRegion',
|
|
58
|
-
uiType: 'ohif.radioGroup',
|
|
59
|
-
props: {
|
|
60
|
-
icon: 'icon-tool-window-region',
|
|
61
|
-
label: 'Window Level Region',
|
|
62
|
-
commands: setToolActiveToolbar,
|
|
63
|
-
evaluate: 'evaluate.cornerstoneTool'
|
|
64
|
-
}
|
|
65
56
|
}, {
|
|
66
57
|
id: 'Pan',
|
|
67
58
|
uiType: 'ohif.radioGroup',
|
|
@@ -253,6 +244,13 @@ const toolbarButtons = [{
|
|
|
253
244
|
tooltip: 'Ultrasound Directional',
|
|
254
245
|
commands: setToolActiveToolbar,
|
|
255
246
|
evaluate: ['evaluate.cornerstoneTool', 'evaluate.isUS']
|
|
247
|
+
}), createButton({
|
|
248
|
+
id: 'WindowLevelRegion',
|
|
249
|
+
icon: 'icon-tool-window-region',
|
|
250
|
+
label: 'Window Level Region',
|
|
251
|
+
tooltip: 'Window Level Region',
|
|
252
|
+
commands: setToolActiveToolbar,
|
|
253
|
+
evaluate: 'evaluate.cornerstoneTool'
|
|
256
254
|
})]
|
|
257
255
|
}
|
|
258
256
|
}];
|
|
@@ -711,7 +709,7 @@ function modeFactory({
|
|
|
711
709
|
src_initToolGroups(extensionManager, toolGroupService, commandsManager);
|
|
712
710
|
toolbarService.addButtons(src_toolbarButtons);
|
|
713
711
|
toolbarService.addButtons(segmentationButtons);
|
|
714
|
-
toolbarService.createButtonSection('primary', ['WindowLevel', '
|
|
712
|
+
toolbarService.createButtonSection('primary', ['WindowLevel', 'Pan', 'Zoom', 'TrackballRotate', 'Capture', 'Layout', 'Crosshairs', 'MoreTools']);
|
|
715
713
|
toolbarService.createButtonSection('segmentationToolbox', ['BrushTools', 'Shapes']);
|
|
716
714
|
},
|
|
717
715
|
onModeExit: ({
|
|
@@ -3298,14 +3298,27 @@ class FrameOfReferenceSpecificAnnotationManager {
|
|
|
3298
3298
|
};
|
|
3299
3299
|
this.removeAnnotations = (groupKey, toolName) => {
|
|
3300
3300
|
const annotations = this.annotations;
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3301
|
+
const removedAnnotations = [];
|
|
3302
|
+
if (!annotations[groupKey]) {
|
|
3303
|
+
return removedAnnotations;
|
|
3304
|
+
}
|
|
3305
|
+
if (toolName) {
|
|
3306
|
+
const annotationsForTool = annotations[groupKey][toolName];
|
|
3307
|
+
for (const annotation of annotationsForTool) {
|
|
3308
|
+
this.removeAnnotation(annotation.annotationUID);
|
|
3309
|
+
removedAnnotations.push(annotation);
|
|
3304
3310
|
}
|
|
3305
|
-
|
|
3306
|
-
|
|
3311
|
+
}
|
|
3312
|
+
else {
|
|
3313
|
+
for (const toolName in annotations[groupKey]) {
|
|
3314
|
+
const annotationsForTool = annotations[groupKey][toolName];
|
|
3315
|
+
for (const annotation of annotationsForTool) {
|
|
3316
|
+
this.removeAnnotation(annotation.annotationUID);
|
|
3317
|
+
removedAnnotations.push(annotation);
|
|
3318
|
+
}
|
|
3307
3319
|
}
|
|
3308
3320
|
}
|
|
3321
|
+
return removedAnnotations;
|
|
3309
3322
|
};
|
|
3310
3323
|
this.saveAnnotations = (groupKey, toolName) => {
|
|
3311
3324
|
const annotations = this.annotations;
|
|
@@ -3358,7 +3371,12 @@ class FrameOfReferenceSpecificAnnotationManager {
|
|
|
3358
3371
|
return count;
|
|
3359
3372
|
};
|
|
3360
3373
|
this.removeAllAnnotations = () => {
|
|
3361
|
-
|
|
3374
|
+
const removedAnnotations = [];
|
|
3375
|
+
for (const annotation of this.getAllAnnotations()) {
|
|
3376
|
+
this.removeAnnotation(annotation.annotationUID);
|
|
3377
|
+
removedAnnotations.push(annotation);
|
|
3378
|
+
}
|
|
3379
|
+
return removedAnnotations;
|
|
3362
3380
|
};
|
|
3363
3381
|
if (!uid) {
|
|
3364
3382
|
uid = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.uuidv4();
|
|
@@ -3588,18 +3606,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3588
3606
|
/* harmony export */ invalidateAnnotation: () => (/* binding */ invalidateAnnotation),
|
|
3589
3607
|
/* harmony export */ removeAllAnnotations: () => (/* binding */ removeAllAnnotations),
|
|
3590
3608
|
/* harmony export */ removeAnnotation: () => (/* binding */ removeAnnotation),
|
|
3609
|
+
/* harmony export */ removeAnnotations: () => (/* binding */ removeAnnotations),
|
|
3591
3610
|
/* harmony export */ resetAnnotationManager: () => (/* binding */ resetAnnotationManager),
|
|
3592
3611
|
/* harmony export */ setAnnotationManager: () => (/* binding */ setAnnotationManager)
|
|
3593
3612
|
/* harmony export */ });
|
|
3594
3613
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
3595
|
-
/* harmony import */ var
|
|
3596
|
-
/* harmony import */ var
|
|
3597
|
-
/* harmony import */ var _helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54177);
|
|
3598
|
-
|
|
3614
|
+
/* harmony import */ var _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22581);
|
|
3615
|
+
/* harmony import */ var _helpers_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54177);
|
|
3599
3616
|
|
|
3600
3617
|
|
|
3601
3618
|
|
|
3602
|
-
let defaultManager =
|
|
3619
|
+
let defaultManager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
|
|
3603
3620
|
function getAnnotationManager() {
|
|
3604
3621
|
return defaultManager;
|
|
3605
3622
|
}
|
|
@@ -3607,7 +3624,7 @@ function setAnnotationManager(annotationManager) {
|
|
|
3607
3624
|
defaultManager = annotationManager;
|
|
3608
3625
|
}
|
|
3609
3626
|
function resetAnnotationManager() {
|
|
3610
|
-
defaultManager =
|
|
3627
|
+
defaultManager = _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__/* .defaultFrameOfReferenceSpecificAnnotationManager */ .H;
|
|
3611
3628
|
}
|
|
3612
3629
|
function getAnnotations(toolName, annotationGroupSelector) {
|
|
3613
3630
|
const manager = getAnnotationManager();
|
|
@@ -3657,11 +3674,11 @@ function addAnnotation(annotation, annotationGroupSelector) {
|
|
|
3657
3674
|
if (annotationGroupSelector instanceof HTMLDivElement) {
|
|
3658
3675
|
const groupKey = manager.getGroupKey(annotationGroupSelector);
|
|
3659
3676
|
manager.addAnnotation(annotation, groupKey);
|
|
3660
|
-
(0,
|
|
3677
|
+
(0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationAddedForElement */ .$f)(annotation, annotationGroupSelector);
|
|
3661
3678
|
}
|
|
3662
3679
|
else {
|
|
3663
3680
|
manager.addAnnotation(annotation);
|
|
3664
|
-
(0,
|
|
3681
|
+
(0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationAddedForFOR */ ._3)(annotation);
|
|
3665
3682
|
}
|
|
3666
3683
|
return annotation.annotationUID;
|
|
3667
3684
|
}
|
|
@@ -3681,12 +3698,7 @@ function removeAnnotation(annotationUID) {
|
|
|
3681
3698
|
}
|
|
3682
3699
|
annotation.childAnnotationUIDs?.forEach((childAnnotationUID) => removeAnnotation(childAnnotationUID));
|
|
3683
3700
|
manager.removeAnnotation(annotationUID);
|
|
3684
|
-
|
|
3685
|
-
const eventDetail = {
|
|
3686
|
-
annotation,
|
|
3687
|
-
annotationManagerUID: manager.uid,
|
|
3688
|
-
};
|
|
3689
|
-
(0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, eventType, eventDetail);
|
|
3701
|
+
(0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationRemoved */ .SH)({ annotation, annotationManagerUID: manager.uid });
|
|
3690
3702
|
}
|
|
3691
3703
|
function getAnnotation(annotationUID) {
|
|
3692
3704
|
const manager = getAnnotationManager();
|
|
@@ -3695,7 +3707,24 @@ function getAnnotation(annotationUID) {
|
|
|
3695
3707
|
}
|
|
3696
3708
|
function removeAllAnnotations() {
|
|
3697
3709
|
const manager = getAnnotationManager();
|
|
3698
|
-
manager.removeAllAnnotations();
|
|
3710
|
+
const removedAnnotations = manager.removeAllAnnotations();
|
|
3711
|
+
for (const annotation of removedAnnotations) {
|
|
3712
|
+
(0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationRemoved */ .SH)({
|
|
3713
|
+
annotation,
|
|
3714
|
+
annotationManagerUID: manager.uid,
|
|
3715
|
+
});
|
|
3716
|
+
}
|
|
3717
|
+
}
|
|
3718
|
+
function removeAnnotations(toolName, annotationGroupSelector) {
|
|
3719
|
+
const manager = getAnnotationManager();
|
|
3720
|
+
const groupKey = manager.getGroupKey(annotationGroupSelector);
|
|
3721
|
+
const removedAnnotations = manager.removeAnnotations(groupKey, toolName);
|
|
3722
|
+
for (const annotation of removedAnnotations) {
|
|
3723
|
+
(0,_helpers_state__WEBPACK_IMPORTED_MODULE_2__/* .triggerAnnotationRemoved */ .SH)({
|
|
3724
|
+
annotation,
|
|
3725
|
+
annotationManagerUID: manager.uid,
|
|
3726
|
+
});
|
|
3727
|
+
}
|
|
3699
3728
|
}
|
|
3700
3729
|
function invalidateAnnotation(annotation) {
|
|
3701
3730
|
let currAnnotation = annotation;
|
|
@@ -4069,6 +4098,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4069
4098
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4070
4099
|
/* harmony export */ $f: () => (/* binding */ triggerAnnotationAddedForElement),
|
|
4071
4100
|
/* harmony export */ PS: () => (/* binding */ triggerContourAnnotationCompleted),
|
|
4101
|
+
/* harmony export */ SH: () => (/* binding */ triggerAnnotationRemoved),
|
|
4072
4102
|
/* harmony export */ XF: () => (/* binding */ triggerAnnotationModified),
|
|
4073
4103
|
/* harmony export */ _3: () => (/* binding */ triggerAnnotationAddedForFOR),
|
|
4074
4104
|
/* harmony export */ dZ: () => (/* binding */ triggerAnnotationCompleted)
|
|
@@ -4118,6 +4148,10 @@ function triggerAnnotationAddedForFOR(annotation) {
|
|
|
4118
4148
|
(0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, eventType, eventDetail);
|
|
4119
4149
|
});
|
|
4120
4150
|
}
|
|
4151
|
+
function triggerAnnotationRemoved(eventDetail) {
|
|
4152
|
+
const eventType = _enums__WEBPACK_IMPORTED_MODULE_1__.Events.ANNOTATION_REMOVED;
|
|
4153
|
+
(0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, eventType, eventDetail);
|
|
4154
|
+
}
|
|
4121
4155
|
function triggerAnnotationModified(annotation, element, changeType = _enums__WEBPACK_IMPORTED_MODULE_1__.ChangeTypes.HandlesUpdated) {
|
|
4122
4156
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
4123
4157
|
const { viewportId, renderingEngineId } = enabledElement;
|
|
@@ -12127,6 +12161,7 @@ class TrackballRotateTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .BaseTool
|
|
|
12127
12161
|
}) {
|
|
12128
12162
|
super(toolProps, defaultToolProps);
|
|
12129
12163
|
this._resizeObservers = new Map();
|
|
12164
|
+
this._hasResolutionChanged = false;
|
|
12130
12165
|
this.preMouseDownCallback = (evt) => {
|
|
12131
12166
|
const eventDetail = evt.detail;
|
|
12132
12167
|
const { element } = eventDetail;
|
|
@@ -12136,15 +12171,19 @@ class TrackballRotateTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .BaseTool
|
|
|
12136
12171
|
const actor = actorEntry.actor;
|
|
12137
12172
|
const mapper = actor.getMapper();
|
|
12138
12173
|
const originalSampleDistance = mapper.getSampleDistance();
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12174
|
+
if (!this._hasResolutionChanged) {
|
|
12175
|
+
mapper.setSampleDistance(originalSampleDistance * 2);
|
|
12176
|
+
this._hasResolutionChanged = true;
|
|
12177
|
+
if (this.cleanUp !== null) {
|
|
12178
|
+
document.removeEventListener('mouseup', this.cleanUp);
|
|
12179
|
+
}
|
|
12180
|
+
this.cleanUp = () => {
|
|
12181
|
+
mapper.setSampleDistance(originalSampleDistance);
|
|
12182
|
+
viewport.render();
|
|
12183
|
+
this._hasResolutionChanged = false;
|
|
12184
|
+
};
|
|
12185
|
+
document.addEventListener('mouseup', this.cleanUp, { once: true });
|
|
12142
12186
|
}
|
|
12143
|
-
this.cleanUp = () => {
|
|
12144
|
-
mapper.setSampleDistance(originalSampleDistance);
|
|
12145
|
-
viewport.render();
|
|
12146
|
-
};
|
|
12147
|
-
document.addEventListener('mouseup', this.cleanUp, { once: true });
|
|
12148
12187
|
return true;
|
|
12149
12188
|
};
|
|
12150
12189
|
this._getViewportsInfo = () => {
|
|
@@ -16748,63 +16787,55 @@ class EllipticalROITool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .Annotation
|
|
|
16748
16787
|
post2Index[0] = Math.floor(post2Index[0]);
|
|
16749
16788
|
post2Index[1] = Math.floor(post2Index[1]);
|
|
16750
16789
|
post2Index[2] = Math.floor(post2Index[2]);
|
|
16751
|
-
|
|
16752
|
-
|
|
16753
|
-
|
|
16754
|
-
|
|
16755
|
-
|
|
16756
|
-
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16760
|
-
|
|
16761
|
-
|
|
16762
|
-
|
|
16763
|
-
|
|
16764
|
-
|
|
16765
|
-
|
|
16766
|
-
|
|
16767
|
-
|
|
16768
|
-
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16772
|
-
|
|
16773
|
-
|
|
16774
|
-
|
|
16775
|
-
|
|
16776
|
-
|
|
16777
|
-
|
|
16778
|
-
|
|
16779
|
-
|
|
16780
|
-
|
|
16781
|
-
|
|
16782
|
-
|
|
16783
|
-
|
|
16784
|
-
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
16790
|
-
|
|
16791
|
-
|
|
16792
|
-
|
|
16793
|
-
|
|
16794
|
-
|
|
16795
|
-
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
};
|
|
16801
|
-
}
|
|
16802
|
-
else {
|
|
16803
|
-
this.isHandleOutsideImage = true;
|
|
16804
|
-
cachedStats[targetId] = {
|
|
16805
|
-
Modality: metadata.Modality,
|
|
16806
|
-
};
|
|
16807
|
-
}
|
|
16790
|
+
this.isHandleOutsideImage = !this._isInsideVolume(pos1Index, post2Index, dimensions);
|
|
16791
|
+
const iMin = Math.min(pos1Index[0], post2Index[0]);
|
|
16792
|
+
const iMax = Math.max(pos1Index[0], post2Index[0]);
|
|
16793
|
+
const jMin = Math.min(pos1Index[1], post2Index[1]);
|
|
16794
|
+
const jMax = Math.max(pos1Index[1], post2Index[1]);
|
|
16795
|
+
const kMin = Math.min(pos1Index[2], post2Index[2]);
|
|
16796
|
+
const kMax = Math.max(pos1Index[2], post2Index[2]);
|
|
16797
|
+
const boundsIJK = [
|
|
16798
|
+
[iMin, iMax],
|
|
16799
|
+
[jMin, jMax],
|
|
16800
|
+
[kMin, kMax],
|
|
16801
|
+
];
|
|
16802
|
+
const center = [
|
|
16803
|
+
(topLeftWorld[0] + bottomRightWorld[0]) / 2,
|
|
16804
|
+
(topLeftWorld[1] + bottomRightWorld[1]) / 2,
|
|
16805
|
+
(topLeftWorld[2] + bottomRightWorld[2]) / 2,
|
|
16806
|
+
];
|
|
16807
|
+
const ellipseObj = {
|
|
16808
|
+
center,
|
|
16809
|
+
xRadius: Math.abs(topLeftWorld[0] - bottomRightWorld[0]) / 2,
|
|
16810
|
+
yRadius: Math.abs(topLeftWorld[1] - bottomRightWorld[1]) / 2,
|
|
16811
|
+
zRadius: Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2,
|
|
16812
|
+
};
|
|
16813
|
+
const { worldWidth, worldHeight } = (0,_utilities_planar_getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .A)(viewPlaneNormal, viewUp, worldPos1, worldPos2);
|
|
16814
|
+
const isEmptyArea = worldWidth === 0 && worldHeight === 0;
|
|
16815
|
+
const handles = [pos1Index, post2Index];
|
|
16816
|
+
const { scale, areaUnits } = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__/* .getCalibratedLengthUnitsAndScale */ .Op)(image, handles);
|
|
16817
|
+
const area = Math.abs(Math.PI * (worldWidth / 2) * (worldHeight / 2)) /
|
|
16818
|
+
scale /
|
|
16819
|
+
scale;
|
|
16820
|
+
const modalityUnitOptions = {
|
|
16821
|
+
isPreScaled: (0,_utilities_viewport_isViewportPreScaled__WEBPACK_IMPORTED_MODULE_19__/* .isViewportPreScaled */ .u)(viewport, targetId),
|
|
16822
|
+
isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
|
|
16823
|
+
};
|
|
16824
|
+
const modalityUnit = (0,_utilities_getModalityUnit__WEBPACK_IMPORTED_MODULE_18__/* .getModalityUnit */ .c)(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
|
|
16825
|
+
const pointsInShape = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__.pointInShapeCallback)(imageData, (pointLPS) => (0,_utilities_math_ellipse__WEBPACK_IMPORTED_MODULE_15__.pointInEllipse)(ellipseObj, pointLPS, { fast: true }), this.configuration.statsCalculator.statsCallback, boundsIJK);
|
|
16826
|
+
const stats = this.configuration.statsCalculator.getStatistics();
|
|
16827
|
+
cachedStats[targetId] = {
|
|
16828
|
+
Modality: metadata.Modality,
|
|
16829
|
+
area,
|
|
16830
|
+
mean: stats.mean?.value,
|
|
16831
|
+
max: stats.max?.value,
|
|
16832
|
+
stdDev: stats.stdDev?.value,
|
|
16833
|
+
statsArray: stats.array,
|
|
16834
|
+
pointsInShape,
|
|
16835
|
+
isEmptyArea,
|
|
16836
|
+
areaUnit: areaUnits,
|
|
16837
|
+
modalityUnit,
|
|
16838
|
+
};
|
|
16808
16839
|
}
|
|
16809
16840
|
annotation.invalidated = false;
|
|
16810
16841
|
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__/* .triggerAnnotationModified */ .XF)(annotation, element);
|
|
@@ -152,8 +152,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
152
152
|
ImageOverlayViewerTool: () => (/* reexport */ tools_ImageOverlayViewerTool),
|
|
153
153
|
Types: () => (/* reexport */ types_namespaceObject),
|
|
154
154
|
"default": () => (/* binding */ cornerstone_src),
|
|
155
|
+
findNearbyToolData: () => (/* reexport */ findNearbyToolData),
|
|
155
156
|
getActiveViewportEnabledElement: () => (/* reexport */ getActiveViewportEnabledElement),
|
|
157
|
+
getEnabledElement: () => (/* reexport */ state/* getEnabledElement */.kJ),
|
|
158
|
+
getSOPInstanceAttributes: () => (/* reexport */ getSOPInstanceAttributes/* default */.A),
|
|
156
159
|
measurementMappingUtils: () => (/* reexport */ utils_namespaceObject),
|
|
160
|
+
setEnabledElement: () => (/* reexport */ state/* setEnabledElement */.ye),
|
|
157
161
|
toolNames: () => (/* reexport */ toolNames)
|
|
158
162
|
});
|
|
159
163
|
|
|
@@ -13123,6 +13127,8 @@ function src_extends() { src_extends = Object.assign ? Object.assign.bind() : fu
|
|
|
13123
13127
|
|
|
13124
13128
|
|
|
13125
13129
|
|
|
13130
|
+
|
|
13131
|
+
|
|
13126
13132
|
|
|
13127
13133
|
|
|
13128
13134
|
|
|
@@ -2899,11 +2899,17 @@ function completeClosedContourEdit(element) {
|
|
|
2899
2899
|
const updatedPoints = (0,_utilities_planarFreehandROITool_smoothPoints__WEBPACK_IMPORTED_MODULE_7__/* .shouldSmooth */ .Q)(this.configuration, annotation)
|
|
2900
2900
|
? (0,_utilities_planarFreehandROITool_smoothPoints__WEBPACK_IMPORTED_MODULE_7__/* .getInterpolatedPoints */ .p)(this.configuration, fusedCanvasPoints, prevCanvasPoints)
|
|
2901
2901
|
: fusedCanvasPoints;
|
|
2902
|
+
const decimateConfig = this.configuration?.decimate || {};
|
|
2902
2903
|
(0,_utilities_contours_updateContourPolyline__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(annotation, {
|
|
2903
2904
|
points: updatedPoints,
|
|
2904
2905
|
closed: true,
|
|
2905
2906
|
targetWindingDirection: _types_ContourAnnotation__WEBPACK_IMPORTED_MODULE_6__/* .ContourWindingDirection */ .W.Clockwise,
|
|
2906
|
-
}, viewport
|
|
2907
|
+
}, viewport, {
|
|
2908
|
+
decimate: {
|
|
2909
|
+
enabled: !!decimateConfig.enabled,
|
|
2910
|
+
epsilon: decimateConfig.epsilon,
|
|
2911
|
+
},
|
|
2912
|
+
});
|
|
2907
2913
|
if (annotation.autoGenerated) {
|
|
2908
2914
|
annotation.autoGenerated = false;
|
|
2909
2915
|
}
|
|
@@ -3747,10 +3753,16 @@ function completeOpenContourEdit(element) {
|
|
|
3747
3753
|
const updatedPoints = (0,_utilities_planarFreehandROITool_smoothPoints__WEBPACK_IMPORTED_MODULE_6__/* .shouldSmooth */ .Q)(this.configuration)
|
|
3748
3754
|
? (0,_utilities_planarFreehandROITool_smoothPoints__WEBPACK_IMPORTED_MODULE_6__/* .getInterpolatedPoints */ .p)(this.configuration, fusedCanvasPoints, prevCanvasPoints)
|
|
3749
3755
|
: fusedCanvasPoints;
|
|
3756
|
+
const decimateConfig = this.configuration?.decimate || {};
|
|
3750
3757
|
(0,_utilities_contours__WEBPACK_IMPORTED_MODULE_8__.updateContourPolyline)(annotation, {
|
|
3751
3758
|
points: updatedPoints,
|
|
3752
3759
|
closed: false,
|
|
3753
|
-
}, viewport
|
|
3760
|
+
}, viewport, {
|
|
3761
|
+
decimate: {
|
|
3762
|
+
enabled: !!decimateConfig.enabled,
|
|
3763
|
+
epsilon: decimateConfig.epsilon,
|
|
3764
|
+
},
|
|
3765
|
+
});
|
|
3754
3766
|
const worldPoints = annotation.data.contour.polyline;
|
|
3755
3767
|
annotation.data.handles.points = [
|
|
3756
3768
|
worldPoints[0],
|
|
@@ -470,15 +470,6 @@ const toolbarButtons = [{
|
|
|
470
470
|
commands: setToolActiveToolbar,
|
|
471
471
|
evaluate: 'evaluate.cornerstoneTool'
|
|
472
472
|
}
|
|
473
|
-
}, {
|
|
474
|
-
id: 'WindowLevelRegion',
|
|
475
|
-
uiType: 'ohif.radioGroup',
|
|
476
|
-
props: {
|
|
477
|
-
icon: 'icon-tool-window-region',
|
|
478
|
-
label: 'Window Level Region',
|
|
479
|
-
commands: setToolActiveToolbar,
|
|
480
|
-
evaluate: 'evaluate.cornerstoneTool'
|
|
481
|
-
}
|
|
482
473
|
},
|
|
483
474
|
// Pan...
|
|
484
475
|
{
|
|
@@ -708,6 +699,13 @@ const moreTools = [{
|
|
|
708
699
|
tooltip: 'Ultrasound Directional',
|
|
709
700
|
commands: setToolActiveToolbar,
|
|
710
701
|
evaluate: ['evaluate.cornerstoneTool', 'evaluate.isUS']
|
|
702
|
+
}), moreTools_createButton({
|
|
703
|
+
id: 'WindowLevelRegion',
|
|
704
|
+
icon: 'icon-tool-window-region',
|
|
705
|
+
label: 'Window Level Region',
|
|
706
|
+
tooltip: 'Window Level Region',
|
|
707
|
+
commands: setToolActiveToolbar,
|
|
708
|
+
evaluate: 'evaluate.cornerstoneTool'
|
|
711
709
|
})]
|
|
712
710
|
}
|
|
713
711
|
}];
|
|
@@ -808,7 +806,7 @@ function modeFactory({
|
|
|
808
806
|
// Init Default and SR ToolGroups
|
|
809
807
|
src_initToolGroups(extensionManager, toolGroupService, commandsManager, this.labelConfig);
|
|
810
808
|
toolbarService.addButtons([...src_toolbarButtons, ...src_moreTools]);
|
|
811
|
-
toolbarService.createButtonSection('primary', ['MeasurementTools', 'Zoom', 'Pan', 'TrackballRotate', 'WindowLevel', '
|
|
809
|
+
toolbarService.createButtonSection('primary', ['MeasurementTools', 'Zoom', 'Pan', 'TrackballRotate', 'WindowLevel', 'Capture', 'Layout', 'Crosshairs', 'MoreTools']);
|
|
812
810
|
customizationService.addModeCustomizations([{
|
|
813
811
|
id: 'segmentation.panel',
|
|
814
812
|
disableEditing: true
|