@ohif/app 3.9.0-beta.45 → 3.9.0-beta.47
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/031089e563a18ada8441.wasm +0 -0
- package/dist/{445.bundle.38c6d2af64e41cd7c614.js → 10.bundle.c626810bd199ab63f3a2.js} +3 -3
- package/dist/{501.bundle.2f703ca4598a3be0d748.js → 129.bundle.3102eccbd5c78524c3dd.js} +6036 -11592
- package/dist/{140.bundle.fcf29be726bb9dcea834.js → 153.bundle.d3732d0fdebb39e139b4.js} +7 -4
- package/dist/{139.bundle.09e5af0a9ae8a285af77.js → 169.bundle.eeb9614e7b06f896c70f.js} +65 -535
- package/dist/{139.css → 169.css} +0 -1
- package/dist/{164.bundle.2b23bfbcb23497d7c87a.js → 196.bundle.cf8c2311aafb5312bbf7.js} +15562 -8539
- package/dist/{342.bundle.fcb2038060a062129d34.js → 202.bundle.bb0e8196739bb896dc9e.js} +238 -276
- package/dist/{129.bundle.894f29369d609094208b.js → 210.bundle.d6d6cbd1b65e4f506ed1.js} +46 -46
- package/dist/{363.bundle.c7e38cf0c1fc7d19a701.js → 217.bundle.042317b439df47cd38b1.js} +2099 -195
- package/dist/{363.css → 217.css} +1 -0
- package/dist/{14.bundle.60eed1138c62b91572a7.js → 246.bundle.288317813cd5781e64f7.js} +11 -11
- package/dist/250.bundle.4743b359797751102600.js +663 -0
- package/dist/{944.bundle.baa0880e0bbde13fccc5.js → 281.bundle.5946cbee5150dec1532f.js} +241 -254
- package/dist/{727.bundle.7b7f3962207601643615.js → 286.bundle.985c5ebbb2158c7e59ab.js} +4 -4
- package/dist/29.bundle.976319462f33868497c2.js +12347 -0
- package/dist/{675.bundle.c9720f40fd7c7e9b7e54.js → 315.bundle.92d7aefc4dc9cfd951bd.js} +18 -18
- package/dist/{218.bundle.a1709956bc65c4f54874.js → 353.bundle.58b3ea80771ebaca956b.js} +8 -8
- package/dist/{799.bundle.33fc63add3b915d0c2b2.js → 360.bundle.81592d66456d25930928.js} +62 -62
- package/dist/{555.bundle.768f1594e1d40b707342.js → 372.bundle.5e3dc2539055ca5861e6.js} +50 -50
- package/dist/{211.bundle.194272cd32bedb302303.js → 376.bundle.45b94427174400b86d5d.js} +8 -8
- package/dist/{612.bundle.297a033523539e0b47f9.js → 412.bundle.836f106f6e2896dc42a5.js} +4 -4
- package/dist/{931.bundle.058f8de4606f27b31f4f.js → 417.bundle.abf8bcee0f246002acb9.js} +25 -25
- package/dist/{370.bundle.bd9884c274c26a54dfae.js → 428.bundle.744fc5865b2d747de88a.js} +829 -1511
- package/dist/{483.bundle.0f1848f6a2cf34829fef.js → 497.bundle.ee102d6243f984113f08.js} +141 -141
- package/dist/{323.bundle.955cc8f5eb5c01295118.js → 498.bundle.bb47c493dd02451f77ef.js} +17 -17
- package/dist/{552.bundle.0d11c419f675cb5a63b1.js → 502.bundle.857675fc2cbb2fbe3e47.js} +8 -9
- package/dist/{835.bundle.5d1951da8bbc6afdf3e0.js → 530.bundle.87f8b13ff55bf7b2a6d1.js} +28 -28
- package/dist/{121.bundle.57fe5a392b0910f33c2d.js → 552.bundle.95c0f28b051797242104.js} +733 -62
- package/dist/{265.bundle.61b0e1ce9d444704a976.js → 571.bundle.a80609c9815339516d77.js} +24 -24
- package/dist/{853.bundle.26b774ab3259f3e6087c.js → 591.bundle.1dca7dfd3e0490ea6dc1.js} +15 -14
- package/dist/604.bundle.83f50929b208c60e48da.js +1950 -0
- package/dist/610.min.worker.js +1 -1
- package/dist/610.min.worker.js.map +1 -1
- package/dist/{792.bundle.485ad2f98823a4b3feb1.js → 658.bundle.219ed199728759098008.js} +17 -17
- package/dist/{989.bundle.4be1e8f36734961852a8.js → 791.bundle.be08fa50f9a84244253b.js} +11 -11
- package/dist/{722.bundle.1242e0348afc63ca4f5e.js → 793.bundle.c92f52ddff0e3bf506e6.js} +13 -13
- package/dist/{914.bundle.e15be8089bf422ed7b51.js → 818.bundle.cda4e369fdee5459a544.js} +1239 -627
- package/dist/{726.bundle.90d63d40a19b058034ee.js → 831.bundle.9e1a3495947e5bb49756.js} +512 -512
- package/dist/{382.bundle.7cdad0f12b64f248dd28.js → 842.bundle.0664bcdeb7f153ab52bb.js} +11 -11
- package/dist/{806.bundle.1ec5fda0b16e053350d7.js → 888.bundle.2d02f805cedcf5d2ee7d.js} +14 -14
- package/dist/{702.bundle.963481fbf871984b646f.js → 909.bundle.1fbb8bb4c41d0bb2994d.js} +119 -381
- package/dist/{109.bundle.b4fee2a22b622839baf5.js → 931.bundle.f6fa2a436ace89ebf60f.js} +5036 -4642
- package/dist/{141.bundle.556b4c1e4cab770417ac.js → 937.bundle.cc709c922731f9496810.js} +86 -478
- package/dist/{444.bundle.75f58f53dab4d04db97d.js → 944.bundle.194f4f4e4e55ec466b78.js} +9 -10
- package/dist/945.min.worker.js +1 -1
- package/dist/945.min.worker.js.map +1 -1
- package/dist/{194.bundle.e6fb48f13f312eded76b.js → 962.bundle.225fcd92e6a5af66b6a2.js} +33 -37
- package/dist/{920.bundle.f75637a18563de8c8235.js → 978.bundle.4edc8c4615d7e3b4717a.js} +6 -6
- package/dist/{236.bundle.34db90a140e37d34fd71.js → 993.bundle.aa31ebda5a5f62c44de5.js} +2363 -2351
- package/dist/{717.bundle.3b84fbd289af82208a19.js → 994.bundle.269ce05b16fd6aa28006.js} +90 -164
- package/dist/app-config.js +58 -4
- package/dist/app.bundle.css +3 -3
- package/dist/{app.bundle.e2d3b6781252f9c7b2a3.js → app.bundle.ecc3736aff52e6abfd49.js} +52547 -36094
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/dicom-microscopy-viewer/5004fdc02f329ce53b69.wasm +0 -0
- package/dist/dicom-microscopy-viewer/c22b37c3488e1d6c3aa4.wasm +0 -0
- package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js +3 -0
- package/dist/{dicomMicroscopyViewer.min.js.LICENSE.txt → dicom-microscopy-viewer/dicomMicroscopyViewer.min.js.LICENSE.txt} +11 -0
- package/dist/dicom-microscopy-viewer/index.worker.min.worker.js +2 -0
- package/dist/dicom-microscopy-viewer/index.worker.min.worker.js.map +1 -0
- package/dist/{histogram-worker.bundle.6b31e5ed4c4a7a6998f2.js → histogram-worker.bundle.e7e9fea2c3236b0e747a.js} +12 -16
- package/dist/index.html +1 -1
- package/dist/index.worker.5a5a581362c14598c3d9.worker.js +2 -0
- package/dist/index.worker.5a5a581362c14598c3d9.worker.js.map +1 -0
- package/dist/{polySeg.bundle.df492df5042827938ba4.js → polySeg.bundle.b25c61224998018d0f79.js} +24 -5
- package/dist/{suv-peak-worker.bundle.8f4b505fad3d371489fe.js → suv-peak-worker.bundle.eb11e71db02e52601ecf.js} +40 -21
- package/dist/sw.js +1 -1
- package/package.json +25 -33
- package/dist/117.bundle.1f7b56504d506e7259e3.js +0 -6552
- package/dist/172.bundle.e0ee762bee7496d6491e.js +0 -662
- package/dist/36785fbd89b0e17f6099.wasm +0 -0
- package/dist/62ab5d58a2bea7b5a1dc.wasm +0 -0
- package/dist/644.bundle.1e77691d2eeb96a423b0.js +0 -19159
- package/dist/75a0c2dfe07b824c7d21.wasm +0 -0
- package/dist/dicom-microscopy-viewer.bundle.d3a56dc9f62df5e11019.js +0 -13
- package/dist/dicomMicroscopyViewer.min.js +0 -3
- package/dist/index.worker.f4bda803c15bc6359d5f.worker.js +0 -2
- package/dist/index.worker.f4bda803c15bc6359d5f.worker.js.map +0 -1
- package/dist/index.worker.min.worker.js +0 -2
- package/dist/index.worker.min.worker.js.map +0 -1
- /package/dist/{129.css → 210.css} +0 -0
- /package/dist/{727.css → 286.css} +0 -0
- /package/dist/{172.css → 552.css} +0 -0
- /package/dist/{404.css → 757.css} +0 -0
- /package/dist/{717.css → 994.css} +0 -0
- /package/dist/{65916ef3def695744bda.wasm → dicom-microscopy-viewer/65916ef3def695744bda.wasm} +0 -0
- /package/dist/{b6b803111e2d06a825bd.wasm → dicom-microscopy-viewer/b6b803111e2d06a825bd.wasm} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[818],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 66809:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8
|
-
/* harmony export */
|
|
8
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9
9
|
/* harmony export */ });
|
|
10
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
11
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
12
|
-
/* harmony import */ var _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
13
|
-
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
14
|
-
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
15
|
-
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
16
|
-
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
10
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
11
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
12
|
+
/* harmony import */ var _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92622);
|
|
13
|
+
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11163);
|
|
14
|
+
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41836);
|
|
15
|
+
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86614);
|
|
16
|
+
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36705);
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .
|
|
24
|
+
class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z {
|
|
25
25
|
constructor(toolProps, defaultToolProps) {
|
|
26
26
|
super(toolProps, defaultToolProps);
|
|
27
27
|
this.mouseMoveCallback = (evt, filteredAnnotations) => {
|
|
@@ -99,7 +99,7 @@ class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__
|
|
|
99
99
|
static createAndAddAnnotation(viewport, ...annotationBaseData) {
|
|
100
100
|
const annotation = this.createAnnotationForViewport(viewport, ...annotationBaseData);
|
|
101
101
|
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__.addAnnotation)(annotation, viewport.element);
|
|
102
|
-
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_6__/* .triggerAnnotationModified */ .
|
|
102
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_6__/* .triggerAnnotationModified */ .hg)(annotation, viewport.element);
|
|
103
103
|
}
|
|
104
104
|
getHandleNearImagePoint(element, annotation, canvasCoords, proximity) {
|
|
105
105
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
@@ -130,7 +130,7 @@ class AnnotationTool extends _AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_2__
|
|
|
130
130
|
const annotationCanvasCoordinate = isCanvasAnnotation
|
|
131
131
|
? point.slice(0, 2)
|
|
132
132
|
: viewport.worldToCanvas(point);
|
|
133
|
-
const near = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.distance */ .
|
|
133
|
+
const near = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.distance */ .K4.distance(canvasCoords, annotationCanvasCoordinate) < proximity;
|
|
134
134
|
if (near === true) {
|
|
135
135
|
data.handles.activeHandleIndex = i;
|
|
136
136
|
return point;
|
|
@@ -200,12 +200,12 @@ AnnotationTool.toolName = 'AnnotationTool';
|
|
|
200
200
|
|
|
201
201
|
/***/ }),
|
|
202
202
|
|
|
203
|
-
/***/
|
|
203
|
+
/***/ 35904:
|
|
204
204
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
205
205
|
|
|
206
206
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
207
|
-
/* harmony export */
|
|
208
|
-
/* harmony export */
|
|
207
|
+
/* harmony export */ R: () => (/* binding */ isValidLabelmapConfig),
|
|
208
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
209
209
|
/* harmony export */ });
|
|
210
210
|
const defaultLabelmapConfig = {
|
|
211
211
|
renderOutline: true,
|
|
@@ -241,14 +241,14 @@ function isValidLabelmapConfig(config) {
|
|
|
241
241
|
|
|
242
242
|
/***/ }),
|
|
243
243
|
|
|
244
|
-
/***/
|
|
244
|
+
/***/ 52600:
|
|
245
245
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
246
246
|
|
|
247
247
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
248
|
-
/* harmony export */
|
|
248
|
+
/* harmony export */ Z: () => (/* binding */ AnnotationFrameRange)
|
|
249
249
|
/* harmony export */ });
|
|
250
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
251
|
-
/* harmony import */ var _enums_Events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
250
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
251
|
+
/* harmony import */ var _enums_Events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34539);
|
|
252
252
|
|
|
253
253
|
|
|
254
254
|
class AnnotationFrameRange {
|
|
@@ -285,7 +285,7 @@ class AnnotationFrameRange {
|
|
|
285
285
|
...eventBase,
|
|
286
286
|
annotation,
|
|
287
287
|
};
|
|
288
|
-
(0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, _enums_Events__WEBPACK_IMPORTED_MODULE_1__
|
|
288
|
+
(0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, _enums_Events__WEBPACK_IMPORTED_MODULE_1__["default"].ANNOTATION_MODIFIED, eventDetail);
|
|
289
289
|
}
|
|
290
290
|
static getFrameRange(annotation) {
|
|
291
291
|
return this.imageIdToFrames(annotation.metadata.referencedImageId);
|
|
@@ -295,16 +295,16 @@ class AnnotationFrameRange {
|
|
|
295
295
|
|
|
296
296
|
/***/ }),
|
|
297
297
|
|
|
298
|
-
/***/
|
|
298
|
+
/***/ 13278:
|
|
299
299
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
300
300
|
|
|
301
301
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
302
|
-
/* harmony export */
|
|
303
|
-
/* harmony export */
|
|
302
|
+
/* harmony export */ B: () => (/* binding */ getClosestImageIdForStackViewport),
|
|
303
|
+
/* harmony export */ M: () => (/* binding */ annotationHydration)
|
|
304
304
|
/* harmony export */ });
|
|
305
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
306
|
-
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
307
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
305
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
306
|
+
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50097);
|
|
307
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(72076);
|
|
308
308
|
|
|
309
309
|
|
|
310
310
|
|
|
@@ -331,7 +331,7 @@ function annotationHydration(viewport, toolName, worldPoints, options) {
|
|
|
331
331
|
...options,
|
|
332
332
|
},
|
|
333
333
|
};
|
|
334
|
-
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_1__/* .addAnnotation */ .
|
|
334
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_1__/* .addAnnotation */ .ud)(annotation, viewport.element);
|
|
335
335
|
return annotation;
|
|
336
336
|
}
|
|
337
337
|
function getReferencedImageId(viewport, worldPos, viewPlaneNormal) {
|
|
@@ -381,9 +381,9 @@ function getClosestImageIdForStackViewport(viewport, worldPos, viewPlaneNormal)
|
|
|
381
381
|
return distanceImagePairs[0].imageId;
|
|
382
382
|
}
|
|
383
383
|
function calculateDistanceToImage(worldPos, ImagePositionPatient, viewPlaneNormal) {
|
|
384
|
-
const dir = gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.create */ .
|
|
385
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.sub */ .
|
|
386
|
-
const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.dot */ .
|
|
384
|
+
const dir = gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.create */ .R3.create();
|
|
385
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.sub */ .R3.sub(dir, worldPos, ImagePositionPatient);
|
|
386
|
+
const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_2__/* .vec3.dot */ .R3.dot(dir, viewPlaneNormal);
|
|
387
387
|
return Math.abs(dot);
|
|
388
388
|
}
|
|
389
389
|
|
|
@@ -391,11 +391,11 @@ function calculateDistanceToImage(worldPos, ImagePositionPatient, viewPlaneNorma
|
|
|
391
391
|
|
|
392
392
|
/***/ }),
|
|
393
393
|
|
|
394
|
-
/***/
|
|
394
|
+
/***/ 93341:
|
|
395
395
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
396
396
|
|
|
397
397
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
398
|
-
/* harmony export */
|
|
398
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
399
399
|
/* harmony export */ });
|
|
400
400
|
function extend2DBoundingBoxInViewAxis(boundsIJK, numSlicesToProject) {
|
|
401
401
|
const sliceNormalIndex = boundsIJK.findIndex(([min, max]) => min === max);
|
|
@@ -411,14 +411,14 @@ function extend2DBoundingBoxInViewAxis(boundsIJK, numSlicesToProject) {
|
|
|
411
411
|
|
|
412
412
|
/***/ }),
|
|
413
413
|
|
|
414
|
-
/***/
|
|
414
|
+
/***/ 64652:
|
|
415
415
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
416
416
|
|
|
417
417
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
418
|
-
/* harmony export */
|
|
419
|
-
/* harmony export */
|
|
418
|
+
/* harmony export */ g: () => (/* binding */ getBoundingBoxAroundShapeIJK),
|
|
419
|
+
/* harmony export */ o: () => (/* binding */ getBoundingBoxAroundShapeWorld)
|
|
420
420
|
/* harmony export */ });
|
|
421
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
421
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
422
422
|
|
|
423
423
|
const { EPSILON } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS;
|
|
424
424
|
function calculateBoundingBox(points, dimensions, isWorld = false) {
|
|
@@ -478,18 +478,18 @@ function getBoundingBoxAroundShapeWorld(points, clipBounds) {
|
|
|
478
478
|
|
|
479
479
|
/***/ }),
|
|
480
480
|
|
|
481
|
-
/***/
|
|
481
|
+
/***/ 87758:
|
|
482
482
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
483
483
|
|
|
484
484
|
__webpack_require__.r(__webpack_exports__);
|
|
485
485
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
486
|
-
/* harmony export */ extend2DBoundingBoxInViewAxis: () => (/* reexport safe */ _extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_0__.
|
|
486
|
+
/* harmony export */ extend2DBoundingBoxInViewAxis: () => (/* reexport safe */ _extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_0__.Z),
|
|
487
487
|
/* harmony export */ getBoundingBoxAroundShape: () => (/* reexport safe */ _getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__.g),
|
|
488
488
|
/* harmony export */ getBoundingBoxAroundShapeIJK: () => (/* reexport safe */ _getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__.g),
|
|
489
|
-
/* harmony export */ getBoundingBoxAroundShapeWorld: () => (/* reexport safe */ _getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__.
|
|
489
|
+
/* harmony export */ getBoundingBoxAroundShapeWorld: () => (/* reexport safe */ _getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__.o)
|
|
490
490
|
/* harmony export */ });
|
|
491
|
-
/* harmony import */ var _extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
492
|
-
/* harmony import */ var _getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
491
|
+
/* harmony import */ var _extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93341);
|
|
492
|
+
/* harmony import */ var _getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64652);
|
|
493
493
|
|
|
494
494
|
|
|
495
495
|
|
|
@@ -497,13 +497,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
497
497
|
|
|
498
498
|
/***/ }),
|
|
499
499
|
|
|
500
|
-
/***/
|
|
500
|
+
/***/ 90892:
|
|
501
501
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
502
502
|
|
|
503
503
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
504
|
-
/* harmony export */
|
|
504
|
+
/* harmony export */ Z: () => (/* binding */ calibrateImageSpacing)
|
|
505
505
|
/* harmony export */ });
|
|
506
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
506
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
507
507
|
|
|
508
508
|
const { calibratedPixelSpacingMetadataProvider } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
|
|
509
509
|
function calibrateImageSpacing(imageId, renderingEngine, calibrationOrScale) {
|
|
@@ -526,7 +526,7 @@ function calibrateImageSpacing(imageId, renderingEngine, calibrationOrScale) {
|
|
|
526
526
|
|
|
527
527
|
/***/ }),
|
|
528
528
|
|
|
529
|
-
/***/
|
|
529
|
+
/***/ 51563:
|
|
530
530
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
531
531
|
|
|
532
532
|
// ESM COMPAT FLAG
|
|
@@ -542,9 +542,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
542
542
|
});
|
|
543
543
|
|
|
544
544
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
545
|
-
var esm = __webpack_require__(
|
|
545
|
+
var esm = __webpack_require__(72076);
|
|
546
546
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
547
|
-
var dist_esm = __webpack_require__(
|
|
547
|
+
var dist_esm = __webpack_require__(62709);
|
|
548
548
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/cine/events.js
|
|
549
549
|
var Events;
|
|
550
550
|
(function (Events) {
|
|
@@ -572,7 +572,7 @@ function getToolStateByViewportId(viewportId) {
|
|
|
572
572
|
|
|
573
573
|
|
|
574
574
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/scroll.js
|
|
575
|
-
var utilities_scroll = __webpack_require__(
|
|
575
|
+
var utilities_scroll = __webpack_require__(63478);
|
|
576
576
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/cine/playClip.js
|
|
577
577
|
|
|
578
578
|
|
|
@@ -803,20 +803,20 @@ function _createStackViewportCinePlayContext(viewport, waitForRendered) {
|
|
|
803
803
|
return;
|
|
804
804
|
}
|
|
805
805
|
this.waitForRenderedCount = 0;
|
|
806
|
-
(0,utilities_scroll/* default */.
|
|
806
|
+
(0,utilities_scroll/* default */.Z)(viewport, { delta, debounceLoading: debounced });
|
|
807
807
|
},
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
810
|
function _createVolumeViewportCinePlayContext(viewport, volume) {
|
|
811
811
|
const { volumeId } = volume;
|
|
812
812
|
const cachedScrollInfo = {
|
|
813
|
-
viewPlaneNormal: esm/* vec3.create */.
|
|
813
|
+
viewPlaneNormal: esm/* vec3.create */.R3.create(),
|
|
814
814
|
scrollInfo: null,
|
|
815
815
|
};
|
|
816
816
|
const getScrollInfo = () => {
|
|
817
817
|
const camera = viewport.getCamera();
|
|
818
818
|
const updateCache = !cachedScrollInfo.scrollInfo ||
|
|
819
|
-
!esm/* vec3.equals */.
|
|
819
|
+
!esm/* vec3.equals */.R3.equals(camera.viewPlaneNormal, cachedScrollInfo.viewPlaneNormal);
|
|
820
820
|
if (updateCache) {
|
|
821
821
|
const scrollInfo = dist_esm.utilities.getVolumeViewportScrollInfo(viewport, volumeId);
|
|
822
822
|
cachedScrollInfo.viewPlaneNormal = camera.viewPlaneNormal;
|
|
@@ -836,12 +836,12 @@ function _createVolumeViewportCinePlayContext(viewport, volume) {
|
|
|
836
836
|
const volumeViewPlaneNormal = volume.direction
|
|
837
837
|
.slice(6, 9)
|
|
838
838
|
.map((x) => -x);
|
|
839
|
-
const dot = esm/* vec3.dot */.
|
|
840
|
-
return esm/* glMatrix.equals */.
|
|
839
|
+
const dot = esm/* vec3.dot */.R3.dot(volumeViewPlaneNormal, camera.viewPlaneNormal);
|
|
840
|
+
return esm/* glMatrix.equals */.DV.equals(dot, 1);
|
|
841
841
|
},
|
|
842
842
|
scroll(delta) {
|
|
843
843
|
getScrollInfo().currentStepIndex += delta;
|
|
844
|
-
(0,utilities_scroll/* default */.
|
|
844
|
+
(0,utilities_scroll/* default */.Z)(viewport, { delta });
|
|
845
845
|
},
|
|
846
846
|
};
|
|
847
847
|
}
|
|
@@ -885,11 +885,11 @@ function _createCinePlayContext(viewport, playClipOptions) {
|
|
|
885
885
|
|
|
886
886
|
/***/ }),
|
|
887
887
|
|
|
888
|
-
/***/
|
|
888
|
+
/***/ 70232:
|
|
889
889
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
890
890
|
|
|
891
891
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
892
|
-
/* harmony export */
|
|
892
|
+
/* harmony export */ ZP: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
893
893
|
/* harmony export */ });
|
|
894
894
|
/* unused harmony exports clip, clipToBox */
|
|
895
895
|
function clip(val, low, high) {
|
|
@@ -904,13 +904,13 @@ function clipToBox(point, box) {
|
|
|
904
904
|
|
|
905
905
|
/***/ }),
|
|
906
906
|
|
|
907
|
-
/***/
|
|
907
|
+
/***/ 52577:
|
|
908
908
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
909
909
|
|
|
910
910
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
911
|
-
/* harmony export */
|
|
911
|
+
/* harmony export */ D: () => (/* binding */ addContourSegmentationAnnotation)
|
|
912
912
|
/* harmony export */ });
|
|
913
|
-
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
913
|
+
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14305);
|
|
914
914
|
|
|
915
915
|
function addContourSegmentationAnnotation(annotation) {
|
|
916
916
|
if (annotation.parentAnnotationUID) {
|
|
@@ -936,11 +936,11 @@ function addContourSegmentationAnnotation(annotation) {
|
|
|
936
936
|
|
|
937
937
|
/***/ }),
|
|
938
938
|
|
|
939
|
-
/***/
|
|
939
|
+
/***/ 40682:
|
|
940
940
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
941
941
|
|
|
942
942
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
943
|
-
/* harmony export */
|
|
943
|
+
/* harmony export */ Z: () => (/* binding */ areSameSegment)
|
|
944
944
|
/* harmony export */ });
|
|
945
945
|
function areSameSegment(firstAnnotation, secondAnnotation) {
|
|
946
946
|
const { segmentation: firstSegmentation } = firstAnnotation.data;
|
|
@@ -952,11 +952,11 @@ function areSameSegment(firstAnnotation, secondAnnotation) {
|
|
|
952
952
|
|
|
953
953
|
/***/ }),
|
|
954
954
|
|
|
955
|
-
/***/
|
|
955
|
+
/***/ 75170:
|
|
956
956
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
957
957
|
|
|
958
958
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
959
|
-
/* harmony export */
|
|
959
|
+
/* harmony export */ Z: () => (/* binding */ isContourSegmentationAnnotation)
|
|
960
960
|
/* harmony export */ });
|
|
961
961
|
function isContourSegmentationAnnotation(annotation) {
|
|
962
962
|
return !!annotation.data?.segmentation;
|
|
@@ -965,13 +965,13 @@ function isContourSegmentationAnnotation(annotation) {
|
|
|
965
965
|
|
|
966
966
|
/***/ }),
|
|
967
967
|
|
|
968
|
-
/***/
|
|
968
|
+
/***/ 31514:
|
|
969
969
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
970
970
|
|
|
971
971
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
972
|
-
/* harmony export */
|
|
972
|
+
/* harmony export */ E: () => (/* binding */ removeContourSegmentationAnnotation)
|
|
973
973
|
/* harmony export */ });
|
|
974
|
-
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
974
|
+
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95482);
|
|
975
975
|
|
|
976
976
|
function removeContourSegmentationAnnotation(annotation) {
|
|
977
977
|
if (!annotation.data.segmentation) {
|
|
@@ -993,11 +993,11 @@ function removeContourSegmentationAnnotation(annotation) {
|
|
|
993
993
|
|
|
994
994
|
/***/ }),
|
|
995
995
|
|
|
996
|
-
/***/
|
|
996
|
+
/***/ 3042:
|
|
997
997
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
998
998
|
|
|
999
999
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1000
|
-
/* harmony export */
|
|
1000
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1001
1001
|
/* harmony export */ });
|
|
1002
1002
|
function calculatePerimeter(polyline, closed) {
|
|
1003
1003
|
let perimeter = 0;
|
|
@@ -1019,14 +1019,14 @@ function calculatePerimeter(polyline, closed) {
|
|
|
1019
1019
|
|
|
1020
1020
|
/***/ }),
|
|
1021
1021
|
|
|
1022
|
-
/***/
|
|
1022
|
+
/***/ 66299:
|
|
1023
1023
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1024
1024
|
|
|
1025
1025
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1026
|
-
/* harmony export */
|
|
1026
|
+
/* harmony export */ Z: () => (/* binding */ findHandlePolylineIndex)
|
|
1027
1027
|
/* harmony export */ });
|
|
1028
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1029
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1028
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
1029
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
1030
1030
|
|
|
1031
1031
|
|
|
1032
1032
|
const { isEqual } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
|
|
@@ -1050,7 +1050,7 @@ function findHandlePolylineIndex(annotation, handleIndex) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
let closestDistance = Infinity;
|
|
1052
1052
|
return polyline.reduce((closestIndex, point, testIndex) => {
|
|
1053
|
-
const distance = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.squaredDistance */ .
|
|
1053
|
+
const distance = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.squaredDistance */ .R3.squaredDistance(point, handle);
|
|
1054
1054
|
if (distance < closestDistance) {
|
|
1055
1055
|
closestDistance = distance;
|
|
1056
1056
|
return testIndex;
|
|
@@ -1062,7 +1062,7 @@ function findHandlePolylineIndex(annotation, handleIndex) {
|
|
|
1062
1062
|
|
|
1063
1063
|
/***/ }),
|
|
1064
1064
|
|
|
1065
|
-
/***/
|
|
1065
|
+
/***/ 11203:
|
|
1066
1066
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1067
1067
|
|
|
1068
1068
|
// ESM COMPAT FLAG
|
|
@@ -1073,35 +1073,35 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1073
1073
|
AnnotationToPointData: () => (/* reexport */ contours_AnnotationToPointData),
|
|
1074
1074
|
acceptAutogeneratedInterpolations: () => (/* reexport */ acceptAutogeneratedInterpolations),
|
|
1075
1075
|
areCoplanarContours: () => (/* reexport */ areCoplanarContours),
|
|
1076
|
-
calculatePerimeter: () => (/* reexport */ calculatePerimeter/* default */.
|
|
1076
|
+
calculatePerimeter: () => (/* reexport */ calculatePerimeter/* default */.Z),
|
|
1077
1077
|
contourFinder: () => (/* reexport */ contourFinder),
|
|
1078
1078
|
detectContourHoles: () => (/* reexport */ detectContourHoles),
|
|
1079
|
-
findHandlePolylineIndex: () => (/* reexport */ findHandlePolylineIndex/* default */.
|
|
1079
|
+
findHandlePolylineIndex: () => (/* reexport */ findHandlePolylineIndex/* default */.Z),
|
|
1080
1080
|
generateContourSetsFromLabelmap: () => (/* reexport */ generateContourSetsFromLabelmap),
|
|
1081
1081
|
getContourHolesDataCanvas: () => (/* reexport */ getContourHolesDataCanvas),
|
|
1082
1082
|
getContourHolesDataWorld: () => (/* reexport */ getContourHolesDataWorld),
|
|
1083
1083
|
getDeduplicatedVTKPolyDataPoints: () => (/* reexport */ getDeduplicatedVTKPolyDataPoints),
|
|
1084
1084
|
interpolation: () => (/* reexport */ interpolation),
|
|
1085
|
-
updateContourPolyline: () => (/* reexport */ updateContourPolyline/* default */.
|
|
1085
|
+
updateContourPolyline: () => (/* reexport */ updateContourPolyline/* default */.Z)
|
|
1086
1086
|
});
|
|
1087
1087
|
|
|
1088
1088
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
1089
|
-
var esm = __webpack_require__(
|
|
1089
|
+
var esm = __webpack_require__(72076);
|
|
1090
1090
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/areCoplanarContours.js
|
|
1091
1091
|
|
|
1092
1092
|
function areCoplanarContours(firstAnnotation, secondAnnotation) {
|
|
1093
1093
|
const { viewPlaneNormal: firstViewPlaneNormal } = firstAnnotation.metadata;
|
|
1094
1094
|
const { viewPlaneNormal: secondViewPlaneNormal } = secondAnnotation.metadata;
|
|
1095
|
-
const dot = esm/* vec3.dot */.
|
|
1096
|
-
const parallelPlanes = esm/* glMatrix.equals */.
|
|
1095
|
+
const dot = esm/* vec3.dot */.R3.dot(firstViewPlaneNormal, secondViewPlaneNormal);
|
|
1096
|
+
const parallelPlanes = esm/* glMatrix.equals */.DV.equals(1, Math.abs(dot));
|
|
1097
1097
|
if (!parallelPlanes) {
|
|
1098
1098
|
return false;
|
|
1099
1099
|
}
|
|
1100
1100
|
const { polyline: firstPolyline } = firstAnnotation.data.contour;
|
|
1101
1101
|
const { polyline: secondPolyline } = secondAnnotation.data.contour;
|
|
1102
|
-
const firstDistance = esm/* vec3.dot */.
|
|
1103
|
-
const secondDistance = esm/* vec3.dot */.
|
|
1104
|
-
return esm/* glMatrix.equals */.
|
|
1102
|
+
const firstDistance = esm/* vec3.dot */.R3.dot(firstViewPlaneNormal, firstPolyline[0]);
|
|
1103
|
+
const secondDistance = esm/* vec3.dot */.R3.dot(firstViewPlaneNormal, secondPolyline[0]);
|
|
1104
|
+
return esm/* glMatrix.equals */.DV.equals(firstDistance, secondDistance);
|
|
1105
1105
|
}
|
|
1106
1106
|
|
|
1107
1107
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/contourFinder.js
|
|
@@ -1291,15 +1291,15 @@ function processContourHoles(contours, points, useXOR = true) {
|
|
|
1291
1291
|
/* harmony default export */ const detectContourHoles = ({ processContourHoles });
|
|
1292
1292
|
|
|
1293
1293
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
1294
|
-
var dist_esm = __webpack_require__(
|
|
1294
|
+
var dist_esm = __webpack_require__(62709);
|
|
1295
1295
|
// EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Filters/General/ImageMarchingSquares.js
|
|
1296
|
-
var ImageMarchingSquares = __webpack_require__(
|
|
1296
|
+
var ImageMarchingSquares = __webpack_require__(60318);
|
|
1297
1297
|
// EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Common/Core/DataArray.js
|
|
1298
|
-
var DataArray = __webpack_require__(
|
|
1298
|
+
var DataArray = __webpack_require__(54131);
|
|
1299
1299
|
// EXTERNAL MODULE: ../../../node_modules/@kitware/vtk.js/Common/DataModel/ImageData.js
|
|
1300
|
-
var ImageData = __webpack_require__(
|
|
1300
|
+
var ImageData = __webpack_require__(8455);
|
|
1301
1301
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/SegmentationRepresentations.js
|
|
1302
|
-
var SegmentationRepresentations = __webpack_require__(
|
|
1302
|
+
var SegmentationRepresentations = __webpack_require__(74297);
|
|
1303
1303
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/generateContourSetsFromLabelmap.js
|
|
1304
1304
|
|
|
1305
1305
|
|
|
@@ -1308,7 +1308,7 @@ var SegmentationRepresentations = __webpack_require__(83946);
|
|
|
1308
1308
|
|
|
1309
1309
|
|
|
1310
1310
|
|
|
1311
|
-
const { Labelmap } = SegmentationRepresentations
|
|
1311
|
+
const { Labelmap } = SegmentationRepresentations["default"];
|
|
1312
1312
|
function generateContourSetsFromLabelmap({ segmentations }) {
|
|
1313
1313
|
const { representationData, segments = [0, 1] } = segmentations;
|
|
1314
1314
|
const { volumeId: segVolumeId } = representationData[Labelmap];
|
|
@@ -1336,7 +1336,7 @@ function generateContourSetsFromLabelmap({ segmentations }) {
|
|
|
1336
1336
|
continue;
|
|
1337
1337
|
}
|
|
1338
1338
|
const sliceContours = [];
|
|
1339
|
-
const scalars = DataArray
|
|
1339
|
+
const scalars = DataArray["default"].newInstance({
|
|
1340
1340
|
name: 'Scalars',
|
|
1341
1341
|
numberOfComponents: 1,
|
|
1342
1342
|
size: pixelsPerSlice * numSlices,
|
|
@@ -1358,10 +1358,10 @@ function generateContourSetsFromLabelmap({ segmentations }) {
|
|
|
1358
1358
|
scalars.setValue(i, 0);
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
const mSquares = ImageMarchingSquares/* default.newInstance */.
|
|
1361
|
+
const mSquares = ImageMarchingSquares/* default.newInstance */.ZP.newInstance({
|
|
1362
1362
|
slice: sliceIndex,
|
|
1363
1363
|
});
|
|
1364
|
-
const imageDataCopy = ImageData/* default.newInstance */.
|
|
1364
|
+
const imageDataCopy = ImageData/* default.newInstance */.ZP.newInstance();
|
|
1365
1365
|
imageDataCopy.shallowCopy(vol.imageData);
|
|
1366
1366
|
imageDataCopy.getPointData().setScalars(scalars);
|
|
1367
1367
|
mSquares.setInputData(imageDataCopy);
|
|
@@ -1412,7 +1412,7 @@ function isSliceEmptyForSegment(sliceIndex, segData, pixelsPerSlice, segIndex) {
|
|
|
1412
1412
|
|
|
1413
1413
|
|
|
1414
1414
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/RectangleROIStartEndThreshold.js
|
|
1415
|
-
var RectangleROIStartEndThreshold = __webpack_require__(
|
|
1415
|
+
var RectangleROIStartEndThreshold = __webpack_require__(94627);
|
|
1416
1416
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/AnnotationToPointData.js
|
|
1417
1417
|
|
|
1418
1418
|
function validateAnnotation(annotation) {
|
|
@@ -1450,16 +1450,16 @@ class AnnotationToPointData {
|
|
|
1450
1450
|
AnnotationToPointData.TOOL_NAMES[toolClass.toolName] = toolClass;
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
|
-
AnnotationToPointData.register(RectangleROIStartEndThreshold/* default */.
|
|
1453
|
+
AnnotationToPointData.register(RectangleROIStartEndThreshold/* default */.Z);
|
|
1454
1454
|
/* harmony default export */ const contours_AnnotationToPointData = (AnnotationToPointData);
|
|
1455
1455
|
|
|
1456
1456
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/index.js
|
|
1457
|
-
var stateManagement = __webpack_require__(
|
|
1457
|
+
var stateManagement = __webpack_require__(50097);
|
|
1458
1458
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/getContourHolesDataWorld.js
|
|
1459
1459
|
|
|
1460
1460
|
function getContourHolesDataWorld(annotation) {
|
|
1461
1461
|
const childAnnotationUIDs = annotation.childAnnotationUIDs ?? [];
|
|
1462
|
-
return childAnnotationUIDs.map((uid) => (0,stateManagement/* getAnnotation */.
|
|
1462
|
+
return childAnnotationUIDs.map((uid) => (0,stateManagement/* getAnnotation */.AR)(uid).data.contour.polyline);
|
|
1463
1463
|
}
|
|
1464
1464
|
|
|
1465
1465
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/getContourHolesDataCanvas.js
|
|
@@ -1479,21 +1479,21 @@ function getContourHolesDataCanvas(annotation, viewport) {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
|
|
1481
1481
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/updateContourPolyline.js
|
|
1482
|
-
var updateContourPolyline = __webpack_require__(
|
|
1482
|
+
var updateContourPolyline = __webpack_require__(48561);
|
|
1483
1483
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.js
|
|
1484
|
-
var InterpolationManager = __webpack_require__(
|
|
1484
|
+
var InterpolationManager = __webpack_require__(7966);
|
|
1485
1485
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js
|
|
1486
1486
|
|
|
1487
1487
|
function acceptAutogeneratedInterpolations(annotationGroupSelector, selector) {
|
|
1488
|
-
InterpolationManager/* default */.
|
|
1488
|
+
InterpolationManager/* default */.Z.acceptAutoGenerated(annotationGroupSelector, selector);
|
|
1489
1489
|
}
|
|
1490
1490
|
|
|
1491
1491
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/interpolation/index.js
|
|
1492
|
-
var interpolation = __webpack_require__(
|
|
1492
|
+
var interpolation = __webpack_require__(61065);
|
|
1493
1493
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/findHandlePolylineIndex.js
|
|
1494
|
-
var findHandlePolylineIndex = __webpack_require__(
|
|
1494
|
+
var findHandlePolylineIndex = __webpack_require__(66299);
|
|
1495
1495
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/calculatePerimeter.js
|
|
1496
|
-
var calculatePerimeter = __webpack_require__(
|
|
1496
|
+
var calculatePerimeter = __webpack_require__(3042);
|
|
1497
1497
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/index.js
|
|
1498
1498
|
|
|
1499
1499
|
|
|
@@ -1513,29 +1513,29 @@ var calculatePerimeter = __webpack_require__(53891);
|
|
|
1513
1513
|
|
|
1514
1514
|
/***/ }),
|
|
1515
1515
|
|
|
1516
|
-
/***/
|
|
1516
|
+
/***/ 61065:
|
|
1517
1517
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1518
1518
|
|
|
1519
1519
|
__webpack_require__.r(__webpack_exports__);
|
|
1520
1520
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1521
|
-
/* harmony export */ InterpolationManager: () => (/* reexport safe */ _segmentation_InterpolationManager_InterpolationManager__WEBPACK_IMPORTED_MODULE_0__.
|
|
1521
|
+
/* harmony export */ InterpolationManager: () => (/* reexport safe */ _segmentation_InterpolationManager_InterpolationManager__WEBPACK_IMPORTED_MODULE_0__.Z)
|
|
1522
1522
|
/* harmony export */ });
|
|
1523
|
-
/* harmony import */ var _segmentation_InterpolationManager_InterpolationManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1523
|
+
/* harmony import */ var _segmentation_InterpolationManager_InterpolationManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7966);
|
|
1524
1524
|
|
|
1525
1525
|
|
|
1526
1526
|
|
|
1527
1527
|
|
|
1528
1528
|
/***/ }),
|
|
1529
1529
|
|
|
1530
|
-
/***/
|
|
1530
|
+
/***/ 48561:
|
|
1531
1531
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1532
1532
|
|
|
1533
1533
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1534
|
-
/* harmony export */
|
|
1534
|
+
/* harmony export */ Z: () => (/* binding */ updateContourPolyline)
|
|
1535
1535
|
/* harmony export */ });
|
|
1536
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1537
|
-
/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1538
|
-
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
1536
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
1537
|
+
/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79390);
|
|
1538
|
+
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50097);
|
|
1539
1539
|
|
|
1540
1540
|
|
|
1541
1541
|
|
|
@@ -1551,7 +1551,7 @@ function updateContourPolyline(annotation, polylineData, transforms, options) {
|
|
|
1551
1551
|
const numPoints = polyline.length;
|
|
1552
1552
|
const polylineWorldPoints = new Array(numPoints);
|
|
1553
1553
|
const currentPolylineWindingDirection = _math__WEBPACK_IMPORTED_MODULE_1__.polyline.getWindingDirection(polyline);
|
|
1554
|
-
const parentAnnotation = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .getParentAnnotation */ .
|
|
1554
|
+
const parentAnnotation = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .getParentAnnotation */ .VI)(annotation);
|
|
1555
1555
|
if (closed === undefined) {
|
|
1556
1556
|
let currentClosedState = false;
|
|
1557
1557
|
if (polyline.length > 3) {
|
|
@@ -1582,19 +1582,19 @@ function updateContourPolyline(annotation, polylineData, transforms, options) {
|
|
|
1582
1582
|
data.contour.polyline = polylineWorldPoints;
|
|
1583
1583
|
data.contour.closed = closed;
|
|
1584
1584
|
data.contour.windingDirection = windingDirection;
|
|
1585
|
-
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .invalidateAnnotation */ .
|
|
1585
|
+
(0,_stateManagement__WEBPACK_IMPORTED_MODULE_2__/* .invalidateAnnotation */ .X9)(annotation);
|
|
1586
1586
|
}
|
|
1587
1587
|
|
|
1588
1588
|
|
|
1589
1589
|
/***/ }),
|
|
1590
1590
|
|
|
1591
|
-
/***/
|
|
1591
|
+
/***/ 82298:
|
|
1592
1592
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1593
1593
|
|
|
1594
1594
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1595
|
-
/* harmony export */
|
|
1595
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1596
1596
|
/* harmony export */ });
|
|
1597
|
-
/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1597
|
+
/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73609);
|
|
1598
1598
|
|
|
1599
1599
|
function debounce(func, wait, options) {
|
|
1600
1600
|
let lastArgs, lastThis, maxWait, result, timerId, lastCallTime;
|
|
@@ -1607,7 +1607,7 @@ function debounce(func, wait, options) {
|
|
|
1607
1607
|
throw new TypeError('Expected a function');
|
|
1608
1608
|
}
|
|
1609
1609
|
wait = Number(wait) || 0;
|
|
1610
|
-
if ((0,_isObject__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
1610
|
+
if ((0,_isObject__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(options)) {
|
|
1611
1611
|
leading = Boolean(options.leading);
|
|
1612
1612
|
maxing = 'maxWait' in options;
|
|
1613
1613
|
maxWait = maxing ? Math.max(Number(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -1712,7 +1712,7 @@ function debounce(func, wait, options) {
|
|
|
1712
1712
|
|
|
1713
1713
|
/***/ }),
|
|
1714
1714
|
|
|
1715
|
-
/***/
|
|
1715
|
+
/***/ 20724:
|
|
1716
1716
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1717
1717
|
|
|
1718
1718
|
// ESM COMPAT FLAG
|
|
@@ -1756,7 +1756,7 @@ function _determineCorners(canvasPoints) {
|
|
|
1756
1756
|
|
|
1757
1757
|
/***/ }),
|
|
1758
1758
|
|
|
1759
|
-
/***/
|
|
1759
|
+
/***/ 62379:
|
|
1760
1760
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1761
1761
|
|
|
1762
1762
|
// ESM COMPAT FLAG
|
|
@@ -1769,11 +1769,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1769
1769
|
});
|
|
1770
1770
|
|
|
1771
1771
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
1772
|
-
var esm = __webpack_require__(
|
|
1772
|
+
var esm = __webpack_require__(62709);
|
|
1773
1773
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/utilities.js
|
|
1774
|
-
var utilities = __webpack_require__(
|
|
1774
|
+
var utilities = __webpack_require__(89776);
|
|
1775
1775
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/pointInShapeCallback.js
|
|
1776
|
-
var pointInShapeCallback = __webpack_require__(
|
|
1776
|
+
var pointInShapeCallback = __webpack_require__(31955);
|
|
1777
1777
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/dynamicVolume/getDataInTime.js
|
|
1778
1778
|
|
|
1779
1779
|
|
|
@@ -1860,7 +1860,7 @@ function _getTimePointDataMask(frames, dynamicVolume, segmentationVolume) {
|
|
|
1860
1860
|
if (segValue === 0) {
|
|
1861
1861
|
return;
|
|
1862
1862
|
}
|
|
1863
|
-
const overlapIJKMinMax = (0,utilities/* getVoxelOverlap */.
|
|
1863
|
+
const overlapIJKMinMax = (0,utilities/* getVoxelOverlap */.yW)(dynamicVolume.imageData, dynamicVolume.dimensions, dynamicVolume.spacing, segPointLPS);
|
|
1864
1864
|
let count = 0;
|
|
1865
1865
|
const perFrameSum = new Map();
|
|
1866
1866
|
frames.forEach((frame) => perFrameSum.set(frame, 0));
|
|
@@ -1872,7 +1872,7 @@ function _getTimePointDataMask(frames, dynamicVolume, segmentationVolume) {
|
|
|
1872
1872
|
}
|
|
1873
1873
|
count++;
|
|
1874
1874
|
};
|
|
1875
|
-
(0,pointInShapeCallback/* default */.
|
|
1875
|
+
(0,pointInShapeCallback/* default */.Z)(dynamicVolume.imageData, () => true, averageCallback, overlapIJKMinMax);
|
|
1876
1876
|
const averageValues = [];
|
|
1877
1877
|
perFrameSum.forEach((sum) => {
|
|
1878
1878
|
averageValues.push(sum / count);
|
|
@@ -1880,7 +1880,7 @@ function _getTimePointDataMask(frames, dynamicVolume, segmentationVolume) {
|
|
|
1880
1880
|
ijkCoords.push(segPointIJK);
|
|
1881
1881
|
values.push(averageValues);
|
|
1882
1882
|
};
|
|
1883
|
-
(0,pointInShapeCallback/* default */.
|
|
1883
|
+
(0,pointInShapeCallback/* default */.Z)(maskImageData, () => true, callback);
|
|
1884
1884
|
return [values, ijkCoords];
|
|
1885
1885
|
}
|
|
1886
1886
|
/* harmony default export */ const dynamicVolume_getDataInTime = (getDataInTime);
|
|
@@ -1938,16 +1938,16 @@ function generateImageFromTimeData(dynamicVolume, operation, frameNumbers) {
|
|
|
1938
1938
|
|
|
1939
1939
|
/***/ }),
|
|
1940
1940
|
|
|
1941
|
-
/***/
|
|
1941
|
+
/***/ 62358:
|
|
1942
1942
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1943
1943
|
|
|
1944
1944
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1945
|
-
/* harmony export */
|
|
1946
|
-
/* harmony export */
|
|
1945
|
+
/* harmony export */ U: () => (/* binding */ getAnnotationNearPointOnEnabledElement),
|
|
1946
|
+
/* harmony export */ r: () => (/* binding */ getAnnotationNearPoint)
|
|
1947
1947
|
/* harmony export */ });
|
|
1948
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1949
|
-
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1950
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
1948
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
1949
|
+
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86614);
|
|
1950
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27078);
|
|
1951
1951
|
|
|
1952
1952
|
|
|
1953
1953
|
|
|
@@ -1998,15 +1998,15 @@ function findAnnotationNearPointByTool(tool, enabledElement, point, proximity) {
|
|
|
1998
1998
|
|
|
1999
1999
|
/***/ }),
|
|
2000
2000
|
|
|
2001
|
-
/***/
|
|
2001
|
+
/***/ 39661:
|
|
2002
2002
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2003
2003
|
|
|
2004
2004
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2005
|
-
/* harmony export */
|
|
2006
|
-
/* harmony export */
|
|
2007
|
-
/* harmony export */
|
|
2005
|
+
/* harmony export */ G6: () => (/* binding */ getCalibratedAspect),
|
|
2006
|
+
/* harmony export */ Sh: () => (/* binding */ getCalibratedProbeUnitsAndValue),
|
|
2007
|
+
/* harmony export */ mh: () => (/* binding */ getCalibratedLengthUnitsAndScale)
|
|
2008
2008
|
/* harmony export */ });
|
|
2009
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2009
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
2010
2010
|
|
|
2011
2011
|
const { CalibrationTypes } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.Enums;
|
|
2012
2012
|
const PIXEL_UNITS = 'px';
|
|
@@ -2144,23 +2144,23 @@ const getCalibratedAspect = (image) => image.calibration?.aspect || 1;
|
|
|
2144
2144
|
|
|
2145
2145
|
/***/ }),
|
|
2146
2146
|
|
|
2147
|
-
/***/
|
|
2147
|
+
/***/ 28921:
|
|
2148
2148
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2149
2149
|
|
|
2150
2150
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2151
|
-
/* harmony export */
|
|
2151
|
+
/* harmony export */ v: () => (/* binding */ getSphereBoundsInfo)
|
|
2152
2152
|
/* harmony export */ });
|
|
2153
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2154
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
2155
|
-
/* harmony import */ var _boundingBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2153
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
2154
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
2155
|
+
/* harmony import */ var _boundingBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87758);
|
|
2156
2156
|
|
|
2157
2157
|
|
|
2158
2158
|
|
|
2159
2159
|
const { transformWorldToIndex } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
|
|
2160
2160
|
function getSphereBoundsInfo(circlePoints, imageData, viewport) {
|
|
2161
2161
|
const [bottom, top] = circlePoints;
|
|
2162
|
-
const centerWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .
|
|
2163
|
-
const radiusWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.distance */ .
|
|
2162
|
+
const centerWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .R3.fromValues((bottom[0] + top[0]) / 2, (bottom[1] + top[1]) / 2, (bottom[2] + top[2]) / 2);
|
|
2163
|
+
const radiusWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.distance */ .R3.distance(bottom, top) / 2;
|
|
2164
2164
|
if (!viewport) {
|
|
2165
2165
|
throw new Error('viewport is required in order to calculate the sphere bounds');
|
|
2166
2166
|
}
|
|
@@ -2177,16 +2177,16 @@ function _computeBoundsIJKWithCamera(imageData, viewport, circlePoints, centerWo
|
|
|
2177
2177
|
const [bottom, top] = circlePoints;
|
|
2178
2178
|
const dimensions = imageData.getDimensions();
|
|
2179
2179
|
const camera = viewport.getCamera();
|
|
2180
|
-
const viewUp = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .
|
|
2181
|
-
const viewPlaneNormal = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .
|
|
2182
|
-
const viewRight = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .
|
|
2183
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.cross */ .
|
|
2184
|
-
const topLeftWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .
|
|
2185
|
-
const bottomRightWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .
|
|
2186
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .
|
|
2187
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .
|
|
2188
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .
|
|
2189
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .
|
|
2180
|
+
const viewUp = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .R3.fromValues(camera.viewUp[0], camera.viewUp[1], camera.viewUp[2]);
|
|
2181
|
+
const viewPlaneNormal = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .R3.fromValues(camera.viewPlaneNormal[0], camera.viewPlaneNormal[1], camera.viewPlaneNormal[2]);
|
|
2182
|
+
const viewRight = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
2183
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.cross */ .R3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
2184
|
+
const topLeftWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
2185
|
+
const bottomRightWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
2186
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(topLeftWorld, top, viewPlaneNormal, radiusWorld);
|
|
2187
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(bottomRightWorld, bottom, viewPlaneNormal, -radiusWorld);
|
|
2188
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(topLeftWorld, topLeftWorld, viewRight, -radiusWorld);
|
|
2189
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(bottomRightWorld, bottomRightWorld, viewRight, radiusWorld);
|
|
2190
2190
|
const topLeftIJK = transformWorldToIndex(imageData, topLeftWorld);
|
|
2191
2191
|
const bottomRightIJK = transformWorldToIndex(imageData, bottomRightWorld);
|
|
2192
2192
|
const pointsIJK = circlePoints.map((p) => transformWorldToIndex(imageData, p));
|
|
@@ -2198,27 +2198,27 @@ function _computeBoundsIJKWithCamera(imageData, viewport, circlePoints, centerWo
|
|
|
2198
2198
|
|
|
2199
2199
|
/***/ }),
|
|
2200
2200
|
|
|
2201
|
-
/***/
|
|
2201
|
+
/***/ 82220:
|
|
2202
2202
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2203
2203
|
|
|
2204
2204
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2205
|
-
/* harmony export */
|
|
2205
|
+
/* harmony export */ Z: () => (/* binding */ getViewportForAnnotation)
|
|
2206
2206
|
/* harmony export */ });
|
|
2207
|
-
/* harmony import */ var _getViewportsForAnnotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2207
|
+
/* harmony import */ var _getViewportsForAnnotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22319);
|
|
2208
2208
|
|
|
2209
2209
|
function getViewportForAnnotation(annotation) {
|
|
2210
|
-
const viewports = (0,_getViewportsForAnnotation__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
2210
|
+
const viewports = (0,_getViewportsForAnnotation__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(annotation);
|
|
2211
2211
|
return viewports.length ? viewports[0] : undefined;
|
|
2212
2212
|
}
|
|
2213
2213
|
|
|
2214
2214
|
|
|
2215
2215
|
/***/ }),
|
|
2216
2216
|
|
|
2217
|
-
/***/
|
|
2217
|
+
/***/ 73609:
|
|
2218
2218
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2219
2219
|
|
|
2220
2220
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2221
|
-
/* harmony export */
|
|
2221
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2222
2222
|
/* harmony export */ });
|
|
2223
2223
|
function isObject(value) {
|
|
2224
2224
|
const type = typeof value;
|
|
@@ -2229,7 +2229,7 @@ function isObject(value) {
|
|
|
2229
2229
|
|
|
2230
2230
|
/***/ }),
|
|
2231
2231
|
|
|
2232
|
-
/***/
|
|
2232
|
+
/***/ 5260:
|
|
2233
2233
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2234
2234
|
|
|
2235
2235
|
// ESM COMPAT FLAG
|
|
@@ -2286,7 +2286,7 @@ function distanceToPoint(aabb, point) {
|
|
|
2286
2286
|
|
|
2287
2287
|
/***/ }),
|
|
2288
2288
|
|
|
2289
|
-
/***/
|
|
2289
|
+
/***/ 51053:
|
|
2290
2290
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2291
2291
|
|
|
2292
2292
|
// ESM COMPAT FLAG
|
|
@@ -2299,7 +2299,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
2299
2299
|
});
|
|
2300
2300
|
|
|
2301
2301
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
2302
|
-
var esm = __webpack_require__(
|
|
2302
|
+
var esm = __webpack_require__(62709);
|
|
2303
2303
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/basic/Calculator.js
|
|
2304
2304
|
class Calculator {
|
|
2305
2305
|
}
|
|
@@ -2407,7 +2407,7 @@ function singleArrayAsNumber(val) {
|
|
|
2407
2407
|
|
|
2408
2408
|
/***/ }),
|
|
2409
2409
|
|
|
2410
|
-
/***/
|
|
2410
|
+
/***/ 92600:
|
|
2411
2411
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2412
2412
|
|
|
2413
2413
|
// ESM COMPAT FLAG
|
|
@@ -2474,7 +2474,7 @@ function getCanvasEllipseCorners(ellipseCanvasPoints) {
|
|
|
2474
2474
|
|
|
2475
2475
|
/***/ }),
|
|
2476
2476
|
|
|
2477
|
-
/***/
|
|
2477
|
+
/***/ 79922:
|
|
2478
2478
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2479
2479
|
|
|
2480
2480
|
// ESM COMPAT FLAG
|
|
@@ -2490,7 +2490,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
2490
2490
|
});
|
|
2491
2491
|
|
|
2492
2492
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/index.js
|
|
2493
|
-
var math = __webpack_require__(
|
|
2493
|
+
var math = __webpack_require__(79390);
|
|
2494
2494
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/line/distanceToPointSquaredInfo.js
|
|
2495
2495
|
|
|
2496
2496
|
function distanceToPointSquaredInfo(lineStart, lineEnd, point) {
|
|
@@ -2611,26 +2611,26 @@ function isPointOnLineSegment(lineStart, lineEnd, point) {
|
|
|
2611
2611
|
|
|
2612
2612
|
/***/ }),
|
|
2613
2613
|
|
|
2614
|
-
/***/
|
|
2614
|
+
/***/ 25523:
|
|
2615
2615
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2616
2616
|
|
|
2617
2617
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2618
|
-
/* harmony export */
|
|
2618
|
+
/* harmony export */ Z: () => (/* binding */ distanceToPoint)
|
|
2619
2619
|
/* harmony export */ });
|
|
2620
|
-
/* harmony import */ var _distanceToPointSquared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2620
|
+
/* harmony import */ var _distanceToPointSquared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94363);
|
|
2621
2621
|
|
|
2622
2622
|
function distanceToPoint(p1, p2) {
|
|
2623
|
-
return Math.sqrt((0,_distanceToPointSquared__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
2623
|
+
return Math.sqrt((0,_distanceToPointSquared__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(p1, p2));
|
|
2624
2624
|
}
|
|
2625
2625
|
|
|
2626
2626
|
|
|
2627
2627
|
/***/ }),
|
|
2628
2628
|
|
|
2629
|
-
/***/
|
|
2629
|
+
/***/ 94363:
|
|
2630
2630
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2631
2631
|
|
|
2632
2632
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2633
|
-
/* harmony export */
|
|
2633
|
+
/* harmony export */ Z: () => (/* binding */ distanceToPointSquared)
|
|
2634
2634
|
/* harmony export */ });
|
|
2635
2635
|
function distanceToPointSquared(p1, p2) {
|
|
2636
2636
|
if (p1.length !== p2.length) {
|
|
@@ -2647,11 +2647,11 @@ function distanceToPointSquared(p1, p2) {
|
|
|
2647
2647
|
|
|
2648
2648
|
/***/ }),
|
|
2649
2649
|
|
|
2650
|
-
/***/
|
|
2650
|
+
/***/ 18668:
|
|
2651
2651
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2652
2652
|
|
|
2653
2653
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2654
|
-
/* harmony export */
|
|
2654
|
+
/* harmony export */ Z: () => (/* binding */ mirror)
|
|
2655
2655
|
/* harmony export */ });
|
|
2656
2656
|
function mirror(mirrorPoint, staticPoint) {
|
|
2657
2657
|
const [x1, y1] = mirrorPoint;
|
|
@@ -2664,7 +2664,7 @@ function mirror(mirrorPoint, staticPoint) {
|
|
|
2664
2664
|
|
|
2665
2665
|
/***/ }),
|
|
2666
2666
|
|
|
2667
|
-
/***/
|
|
2667
|
+
/***/ 42744:
|
|
2668
2668
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2669
2669
|
|
|
2670
2670
|
// ESM COMPAT FLAG
|
|
@@ -2676,7 +2676,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
2676
2676
|
containsPoint: () => (/* reexport */ containsPoint),
|
|
2677
2677
|
containsPoints: () => (/* reexport */ containsPoints),
|
|
2678
2678
|
decimate: () => (/* reexport */ decimate),
|
|
2679
|
-
getAABB: () => (/* reexport */ getAABB/* default */.
|
|
2679
|
+
getAABB: () => (/* reexport */ getAABB/* default */.Z),
|
|
2680
2680
|
getArea: () => (/* reexport */ getArea),
|
|
2681
2681
|
getClosestLineSegmentIntersection: () => (/* reexport */ getClosestLineSegmentIntersection),
|
|
2682
2682
|
getFirstLineSegmentIntersectionIndexes: () => (/* reexport */ getFirstLineSegmentIntersectionIndexes),
|
|
@@ -2698,9 +2698,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
2698
2698
|
});
|
|
2699
2699
|
|
|
2700
2700
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
2701
|
-
var esm = __webpack_require__(
|
|
2701
|
+
var esm = __webpack_require__(72076);
|
|
2702
2702
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/index.js
|
|
2703
|
-
var math = __webpack_require__(
|
|
2703
|
+
var math = __webpack_require__(79390);
|
|
2704
2704
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/isClosed.js
|
|
2705
2705
|
|
|
2706
2706
|
|
|
@@ -2712,7 +2712,7 @@ function isClosed(polyline) {
|
|
|
2712
2712
|
const firstPoint = polyline[0];
|
|
2713
2713
|
const lastPoint = polyline[numPolylinePoints - 1];
|
|
2714
2714
|
const distFirstToLastPoints = math.point.distanceToPointSquared(firstPoint, lastPoint);
|
|
2715
|
-
return esm/* glMatrix.equals */.
|
|
2715
|
+
return esm/* glMatrix.equals */.DV.equals(0, distFirstToLastPoints);
|
|
2716
2716
|
}
|
|
2717
2717
|
|
|
2718
2718
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/containsPoint.js
|
|
@@ -2768,7 +2768,7 @@ function containsPoints(polyline, points) {
|
|
|
2768
2768
|
}
|
|
2769
2769
|
|
|
2770
2770
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/getAABB.js
|
|
2771
|
-
var getAABB = __webpack_require__(
|
|
2771
|
+
var getAABB = __webpack_require__(13837);
|
|
2772
2772
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/getArea.js
|
|
2773
2773
|
function getArea(points) {
|
|
2774
2774
|
const n = points.length;
|
|
@@ -2812,7 +2812,7 @@ function getWindingDirection(polyline) {
|
|
|
2812
2812
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/getNormal3.js
|
|
2813
2813
|
|
|
2814
2814
|
function _getAreaVector(polyline) {
|
|
2815
|
-
const vecArea = esm/* vec3.create */.
|
|
2815
|
+
const vecArea = esm/* vec3.create */.R3.create();
|
|
2816
2816
|
const refPoint = polyline[0];
|
|
2817
2817
|
for (let i = 0, len = polyline.length; i < len; i++) {
|
|
2818
2818
|
const p1 = polyline[i];
|
|
@@ -2828,12 +2828,12 @@ function _getAreaVector(polyline) {
|
|
|
2828
2828
|
vecArea[1] += aZ * bX - aX * bZ;
|
|
2829
2829
|
vecArea[2] += aX * bY - aY * bX;
|
|
2830
2830
|
}
|
|
2831
|
-
esm/* vec3.scale */.
|
|
2831
|
+
esm/* vec3.scale */.R3.scale(vecArea, vecArea, 0.5);
|
|
2832
2832
|
return vecArea;
|
|
2833
2833
|
}
|
|
2834
2834
|
function getNormal3(polyline) {
|
|
2835
2835
|
const vecArea = _getAreaVector(polyline);
|
|
2836
|
-
return esm/* vec3.normalize */.
|
|
2836
|
+
return esm/* vec3.normalize */.R3.normalize(vecArea, vecArea);
|
|
2837
2837
|
}
|
|
2838
2838
|
|
|
2839
2839
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/getNormal2.js
|
|
@@ -2844,7 +2844,7 @@ function getNormal2(polyline) {
|
|
|
2844
2844
|
}
|
|
2845
2845
|
|
|
2846
2846
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/index.js
|
|
2847
|
-
var point = __webpack_require__(
|
|
2847
|
+
var point = __webpack_require__(74474);
|
|
2848
2848
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/areLineSegmentsIntersecting.js
|
|
2849
2849
|
function areLineSegmentsIntersecting(p1, q1, p2, q2) {
|
|
2850
2850
|
let result = false;
|
|
@@ -2920,7 +2920,7 @@ function getLineSegmentIntersectionsIndexes(polyline, p1, q1, closed = true) {
|
|
|
2920
2920
|
}
|
|
2921
2921
|
|
|
2922
2922
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/line/index.js + 5 modules
|
|
2923
|
-
var line = __webpack_require__(
|
|
2923
|
+
var line = __webpack_require__(79922);
|
|
2924
2924
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/getLinesIntersection.js
|
|
2925
2925
|
|
|
2926
2926
|
const PARALLEL_LINES_TOLERANCE = 1e-2;
|
|
@@ -3110,8 +3110,8 @@ function getUnvisitedOutsidePoint(polylinePoints) {
|
|
|
3110
3110
|
function mergePolylines(targetPolyline, sourcePolyline) {
|
|
3111
3111
|
const targetNormal = getNormal2(targetPolyline);
|
|
3112
3112
|
const sourceNormal = getNormal2(sourcePolyline);
|
|
3113
|
-
const dotNormals = esm/* vec3.dot */.
|
|
3114
|
-
if (!esm/* glMatrix.equals */.
|
|
3113
|
+
const dotNormals = esm/* vec3.dot */.R3.dot(sourceNormal, targetNormal);
|
|
3114
|
+
if (!esm/* glMatrix.equals */.DV.equals(1, dotNormals)) {
|
|
3115
3115
|
sourcePolyline = sourcePolyline.slice().reverse();
|
|
3116
3116
|
}
|
|
3117
3117
|
const { targetPolylinePoints } = getSourceAndTargetPointsList(targetPolyline, sourcePolyline);
|
|
@@ -3135,8 +3135,8 @@ function mergePolylines(targetPolyline, sourcePolyline) {
|
|
|
3135
3135
|
function subtractPolylines(targetPolyline, sourcePolyline) {
|
|
3136
3136
|
const targetNormal = getNormal2(targetPolyline);
|
|
3137
3137
|
const sourceNormal = getNormal2(sourcePolyline);
|
|
3138
|
-
const dotNormals = esm/* vec3.dot */.
|
|
3139
|
-
if (!esm/* glMatrix.equals */.
|
|
3138
|
+
const dotNormals = esm/* vec3.dot */.R3.dot(sourceNormal, targetNormal);
|
|
3139
|
+
if (!esm/* glMatrix.equals */.DV.equals(-1, dotNormals)) {
|
|
3140
3140
|
sourcePolyline = sourcePolyline.slice().reverse();
|
|
3141
3141
|
}
|
|
3142
3142
|
const { targetPolylinePoints } = getSourceAndTargetPointsList(targetPolyline, sourcePolyline);
|
|
@@ -3299,7 +3299,7 @@ function getClosestLineSegmentIntersection(points, p1, q1, closed = true) {
|
|
|
3299
3299
|
(intersectionPoints[0][0] + intersectionPoints[1][0]) / 2,
|
|
3300
3300
|
(intersectionPoints[0][1] + intersectionPoints[1][1]) / 2,
|
|
3301
3301
|
];
|
|
3302
|
-
distances.push(esm/* vec2.distance */.
|
|
3302
|
+
distances.push(esm/* vec2.distance */.K4.distance(midpoint, p1));
|
|
3303
3303
|
});
|
|
3304
3304
|
const minDistance = Math.min(...distances);
|
|
3305
3305
|
const indexOfMinDistance = distances.indexOf(minDistance);
|
|
@@ -3310,7 +3310,7 @@ function getClosestLineSegmentIntersection(points, p1, q1, closed = true) {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
|
|
3312
3312
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
3313
|
-
var dist_esm = __webpack_require__(
|
|
3313
|
+
var dist_esm = __webpack_require__(62709);
|
|
3314
3314
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js
|
|
3315
3315
|
|
|
3316
3316
|
|
|
@@ -3332,11 +3332,11 @@ const getSubPixelSpacingAndXYDirections = (viewport, subPixelResolution) => {
|
|
|
3332
3332
|
const iVector = direction.slice(0, 3);
|
|
3333
3333
|
const jVector = direction.slice(3, 6);
|
|
3334
3334
|
const kVector = direction.slice(6, 9);
|
|
3335
|
-
const viewRight = esm/* vec3.create */.
|
|
3336
|
-
esm/* vec3.cross */.
|
|
3337
|
-
const absViewRightDotI = Math.abs(esm/* vec3.dot */.
|
|
3338
|
-
const absViewRightDotJ = Math.abs(esm/* vec3.dot */.
|
|
3339
|
-
const absViewRightDotK = Math.abs(esm/* vec3.dot */.
|
|
3335
|
+
const viewRight = esm/* vec3.create */.R3.create();
|
|
3336
|
+
esm/* vec3.cross */.R3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
3337
|
+
const absViewRightDotI = Math.abs(esm/* vec3.dot */.R3.dot(viewRight, iVector));
|
|
3338
|
+
const absViewRightDotJ = Math.abs(esm/* vec3.dot */.R3.dot(viewRight, jVector));
|
|
3339
|
+
const absViewRightDotK = Math.abs(esm/* vec3.dot */.R3.dot(viewRight, kVector));
|
|
3340
3340
|
let xSpacing;
|
|
3341
3341
|
if (Math.abs(1 - absViewRightDotI) < EPSILON) {
|
|
3342
3342
|
xSpacing = volumeSpacing[0];
|
|
@@ -3353,9 +3353,9 @@ const getSubPixelSpacingAndXYDirections = (viewport, subPixelResolution) => {
|
|
|
3353
3353
|
else {
|
|
3354
3354
|
throw new Error('No support yet for oblique plane planar contours');
|
|
3355
3355
|
}
|
|
3356
|
-
const absViewUpDotI = Math.abs(esm/* vec3.dot */.
|
|
3357
|
-
const absViewUpDotJ = Math.abs(esm/* vec3.dot */.
|
|
3358
|
-
const absViewUpDotK = Math.abs(esm/* vec3.dot */.
|
|
3356
|
+
const absViewUpDotI = Math.abs(esm/* vec3.dot */.R3.dot(viewUp, iVector));
|
|
3357
|
+
const absViewUpDotJ = Math.abs(esm/* vec3.dot */.R3.dot(viewUp, jVector));
|
|
3358
|
+
const absViewUpDotK = Math.abs(esm/* vec3.dot */.R3.dot(viewUp, kVector));
|
|
3359
3359
|
let ySpacing;
|
|
3360
3360
|
if (Math.abs(1 - absViewUpDotI) < EPSILON) {
|
|
3361
3361
|
ySpacing = volumeSpacing[0];
|
|
@@ -3385,7 +3385,7 @@ const getSubPixelSpacingAndXYDirections = (viewport, subPixelResolution) => {
|
|
|
3385
3385
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.js
|
|
3386
3386
|
|
|
3387
3387
|
const pointsAreWithinCloseContourProximity = (p1, p2, closeContourProximity) => {
|
|
3388
|
-
return esm/* vec2.dist */.
|
|
3388
|
+
return esm/* vec2.dist */.K4.dist(p1, p2) < closeContourProximity;
|
|
3389
3389
|
};
|
|
3390
3390
|
/* harmony default export */ const polyline_pointsAreWithinCloseContourProximity = (pointsAreWithinCloseContourProximity);
|
|
3391
3391
|
|
|
@@ -3403,17 +3403,17 @@ const addCanvasPointsToArray = (element, canvasPoints, newCanvasPoint, commonDat
|
|
|
3403
3403
|
}
|
|
3404
3404
|
const lastWorldPos = viewport.canvasToWorld(canvasPoints[canvasPoints.length - 1]);
|
|
3405
3405
|
const newWorldPos = viewport.canvasToWorld(newCanvasPoint);
|
|
3406
|
-
const worldPosDiff = esm/* vec3.create */.
|
|
3407
|
-
esm/* vec3.subtract */.
|
|
3408
|
-
const xDist = Math.abs(esm/* vec3.dot */.
|
|
3409
|
-
const yDist = Math.abs(esm/* vec3.dot */.
|
|
3406
|
+
const worldPosDiff = esm/* vec3.create */.R3.create();
|
|
3407
|
+
esm/* vec3.subtract */.R3.subtract(worldPosDiff, newWorldPos, lastWorldPos);
|
|
3408
|
+
const xDist = Math.abs(esm/* vec3.dot */.R3.dot(worldPosDiff, xDir));
|
|
3409
|
+
const yDist = Math.abs(esm/* vec3.dot */.R3.dot(worldPosDiff, yDir));
|
|
3410
3410
|
const numPointsToAdd = Math.max(Math.floor(xDist / spacing[0]), Math.floor(yDist / spacing[0]));
|
|
3411
3411
|
if (numPointsToAdd > 1) {
|
|
3412
3412
|
const lastCanvasPoint = canvasPoints[canvasPoints.length - 1];
|
|
3413
|
-
const canvasDist = esm/* vec2.dist */.
|
|
3414
|
-
const canvasDir = esm/* vec2.create */.
|
|
3415
|
-
esm/* vec2.subtract */.
|
|
3416
|
-
esm/* vec2.set */.
|
|
3413
|
+
const canvasDist = esm/* vec2.dist */.K4.dist(lastCanvasPoint, newCanvasPoint);
|
|
3414
|
+
const canvasDir = esm/* vec2.create */.K4.create();
|
|
3415
|
+
esm/* vec2.subtract */.K4.subtract(canvasDir, newCanvasPoint, lastCanvasPoint);
|
|
3416
|
+
esm/* vec2.set */.K4.set(canvasDir, canvasDir[0] / canvasDist, canvasDir[1] / canvasDist);
|
|
3417
3417
|
const distPerPoint = canvasDist / numPointsToAdd;
|
|
3418
3418
|
for (let i = 1; i <= numPointsToAdd; i++) {
|
|
3419
3419
|
canvasPoints.push([
|
|
@@ -3452,11 +3452,11 @@ const pointCanProjectOnLine = (p, p1, p2, proximity) => {
|
|
|
3452
3452
|
p1[0] + projectionVector[0],
|
|
3453
3453
|
p1[1] + projectionVector[1],
|
|
3454
3454
|
];
|
|
3455
|
-
const distance = esm/* vec2.distance */.
|
|
3455
|
+
const distance = esm/* vec2.distance */.K4.distance(p, projectionPoint);
|
|
3456
3456
|
if (distance > proximity) {
|
|
3457
3457
|
return false;
|
|
3458
3458
|
}
|
|
3459
|
-
if (esm/* vec2.distance */.
|
|
3459
|
+
if (esm/* vec2.distance */.K4.distance(p1, projectionPoint) > esm/* vec2.distance */.K4.distance(p1, p2)) {
|
|
3460
3460
|
return false;
|
|
3461
3461
|
}
|
|
3462
3462
|
return true;
|
|
@@ -3545,7 +3545,7 @@ function isPointInsidePolyline3D(point, polyline, options = {}) {
|
|
|
3545
3545
|
|
|
3546
3546
|
/***/ }),
|
|
3547
3547
|
|
|
3548
|
-
/***/
|
|
3548
|
+
/***/ 81671:
|
|
3549
3549
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3550
3550
|
|
|
3551
3551
|
// ESM COMPAT FLAG
|
|
@@ -3557,7 +3557,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3557
3557
|
});
|
|
3558
3558
|
|
|
3559
3559
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/line/index.js + 5 modules
|
|
3560
|
-
var line = __webpack_require__(
|
|
3560
|
+
var line = __webpack_require__(79922);
|
|
3561
3561
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/rectangle/distanceToPoint.js
|
|
3562
3562
|
|
|
3563
3563
|
function rectToLineSegments(left, top, width, height) {
|
|
@@ -3601,13 +3601,13 @@ function distanceToPoint(rect, point) {
|
|
|
3601
3601
|
|
|
3602
3602
|
/***/ }),
|
|
3603
3603
|
|
|
3604
|
-
/***/
|
|
3604
|
+
/***/ 34603:
|
|
3605
3605
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3606
3606
|
|
|
3607
3607
|
|
|
3608
3608
|
// EXPORTS
|
|
3609
3609
|
__webpack_require__.d(__webpack_exports__, {
|
|
3610
|
-
|
|
3610
|
+
E: () => (/* reexport */ pointInSphere)
|
|
3611
3611
|
});
|
|
3612
3612
|
|
|
3613
3613
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/sphere/pointInSphere.js
|
|
@@ -3627,16 +3627,16 @@ function pointInSphere(sphere, pointLPS) {
|
|
|
3627
3627
|
|
|
3628
3628
|
/***/ }),
|
|
3629
3629
|
|
|
3630
|
-
/***/
|
|
3630
|
+
/***/ 13230:
|
|
3631
3631
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3632
3632
|
|
|
3633
3633
|
__webpack_require__.r(__webpack_exports__);
|
|
3634
3634
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3635
|
-
/* harmony export */ findClosestPoint: () => (/* reexport safe */ _findClosestPoint__WEBPACK_IMPORTED_MODULE_0__.
|
|
3636
|
-
/* harmony export */ liangBarksyClip: () => (/* reexport safe */ _liangBarksyClip__WEBPACK_IMPORTED_MODULE_1__.
|
|
3635
|
+
/* harmony export */ findClosestPoint: () => (/* reexport safe */ _findClosestPoint__WEBPACK_IMPORTED_MODULE_0__.Z),
|
|
3636
|
+
/* harmony export */ liangBarksyClip: () => (/* reexport safe */ _liangBarksyClip__WEBPACK_IMPORTED_MODULE_1__.Z)
|
|
3637
3637
|
/* harmony export */ });
|
|
3638
|
-
/* harmony import */ var _findClosestPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3639
|
-
/* harmony import */ var _liangBarksyClip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3638
|
+
/* harmony import */ var _findClosestPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78924);
|
|
3639
|
+
/* harmony import */ var _liangBarksyClip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3467);
|
|
3640
3640
|
|
|
3641
3641
|
|
|
3642
3642
|
|
|
@@ -3644,11 +3644,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3644
3644
|
|
|
3645
3645
|
/***/ }),
|
|
3646
3646
|
|
|
3647
|
-
/***/
|
|
3647
|
+
/***/ 3467:
|
|
3648
3648
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3649
3649
|
|
|
3650
3650
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3651
|
-
/* harmony export */
|
|
3651
|
+
/* harmony export */ Z: () => (/* binding */ clip)
|
|
3652
3652
|
/* harmony export */ });
|
|
3653
3653
|
const EPSILON = 1e-6;
|
|
3654
3654
|
const INSIDE = 1;
|
|
@@ -3722,11 +3722,11 @@ function clip(a, b, box, da, db) {
|
|
|
3722
3722
|
|
|
3723
3723
|
/***/ }),
|
|
3724
3724
|
|
|
3725
|
-
/***/
|
|
3725
|
+
/***/ 67958:
|
|
3726
3726
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3727
3727
|
|
|
3728
3728
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3729
|
-
/* harmony export */
|
|
3729
|
+
/* harmony export */ Z: () => (/* binding */ getOrientationStringLPS)
|
|
3730
3730
|
/* harmony export */ });
|
|
3731
3731
|
function getOrientationStringLPS(vector) {
|
|
3732
3732
|
let orientation = '';
|
|
@@ -3773,11 +3773,11 @@ function getOrientationStringLPS(vector) {
|
|
|
3773
3773
|
|
|
3774
3774
|
/***/ }),
|
|
3775
3775
|
|
|
3776
|
-
/***/
|
|
3776
|
+
/***/ 67125:
|
|
3777
3777
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3778
3778
|
|
|
3779
3779
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3780
|
-
/* harmony export */
|
|
3780
|
+
/* harmony export */ Z: () => (/* binding */ invertOrientationStringLPS)
|
|
3781
3781
|
/* harmony export */ });
|
|
3782
3782
|
function invertOrientationStringLPS(orientationString) {
|
|
3783
3783
|
let inverted = orientationString.replace('H', 'f');
|
|
@@ -3793,65 +3793,65 @@ function invertOrientationStringLPS(orientationString) {
|
|
|
3793
3793
|
|
|
3794
3794
|
/***/ }),
|
|
3795
3795
|
|
|
3796
|
-
/***/
|
|
3796
|
+
/***/ 44037:
|
|
3797
3797
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3798
3798
|
|
|
3799
3799
|
__webpack_require__.r(__webpack_exports__);
|
|
3800
3800
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3801
3801
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
3802
|
-
/* harmony export */ filterAnnotationsForDisplay: () => (/* reexport safe */ _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__.
|
|
3803
|
-
/* harmony export */ filterAnnotationsWithinSlice: () => (/* reexport safe */ _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__.
|
|
3804
|
-
/* harmony export */ getPointInLineOfSightWithCriteria: () => (/* reexport safe */ _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_3__.
|
|
3805
|
-
/* harmony export */ getWorldWidthAndHeightFromCorners: () => (/* reexport safe */ _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__.
|
|
3806
|
-
/* harmony export */ isPlaneIntersectingAABB: () => (/* reexport safe */ _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_4__.
|
|
3802
|
+
/* harmony export */ filterAnnotationsForDisplay: () => (/* reexport safe */ _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__.Z),
|
|
3803
|
+
/* harmony export */ filterAnnotationsWithinSlice: () => (/* reexport safe */ _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__.Z),
|
|
3804
|
+
/* harmony export */ getPointInLineOfSightWithCriteria: () => (/* reexport safe */ _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_3__.Z),
|
|
3805
|
+
/* harmony export */ getWorldWidthAndHeightFromCorners: () => (/* reexport safe */ _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
3806
|
+
/* harmony export */ isPlaneIntersectingAABB: () => (/* reexport safe */ _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_4__.U)
|
|
3807
3807
|
/* harmony export */ });
|
|
3808
|
-
/* harmony import */ var _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3809
|
-
/* harmony import */ var _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3810
|
-
/* harmony import */ var _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
3811
|
-
/* harmony import */ var _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
3812
|
-
/* harmony import */ var _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
3808
|
+
/* harmony import */ var _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(88642);
|
|
3809
|
+
/* harmony import */ var _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88582);
|
|
3810
|
+
/* harmony import */ var _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69943);
|
|
3811
|
+
/* harmony import */ var _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1023);
|
|
3812
|
+
/* harmony import */ var _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61890);
|
|
3813
3813
|
|
|
3814
3814
|
|
|
3815
3815
|
|
|
3816
3816
|
|
|
3817
3817
|
|
|
3818
3818
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
3819
|
-
filterAnnotationsWithinSlice: _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
3820
|
-
getWorldWidthAndHeightFromCorners: _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
3821
|
-
filterAnnotationsForDisplay: _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .
|
|
3822
|
-
getPointInLineOfSightWithCriteria: _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .
|
|
3823
|
-
isPlaneIntersectingAABB: _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_4__/* .isPlaneIntersectingAABB */ .
|
|
3819
|
+
filterAnnotationsWithinSlice: _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z,
|
|
3820
|
+
getWorldWidthAndHeightFromCorners: _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z,
|
|
3821
|
+
filterAnnotationsForDisplay: _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z,
|
|
3822
|
+
getPointInLineOfSightWithCriteria: _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z,
|
|
3823
|
+
isPlaneIntersectingAABB: _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_4__/* .isPlaneIntersectingAABB */ .U,
|
|
3824
3824
|
});
|
|
3825
3825
|
|
|
3826
3826
|
|
|
3827
3827
|
|
|
3828
3828
|
/***/ }),
|
|
3829
3829
|
|
|
3830
|
-
/***/
|
|
3830
|
+
/***/ 28861:
|
|
3831
3831
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3832
3832
|
|
|
3833
3833
|
__webpack_require__.r(__webpack_exports__);
|
|
3834
3834
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3835
3835
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
3836
|
-
/* harmony export */ smoothAnnotation: () => (/* reexport safe */ _smoothAnnotation__WEBPACK_IMPORTED_MODULE_0__.
|
|
3836
|
+
/* harmony export */ smoothAnnotation: () => (/* reexport safe */ _smoothAnnotation__WEBPACK_IMPORTED_MODULE_0__.Z)
|
|
3837
3837
|
/* harmony export */ });
|
|
3838
|
-
/* harmony import */ var _smoothAnnotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3838
|
+
/* harmony import */ var _smoothAnnotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2036);
|
|
3839
3839
|
|
|
3840
3840
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
3841
|
-
smoothAnnotation: _smoothAnnotation__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
3841
|
+
smoothAnnotation: _smoothAnnotation__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z,
|
|
3842
3842
|
});
|
|
3843
3843
|
|
|
3844
3844
|
|
|
3845
3845
|
|
|
3846
3846
|
/***/ }),
|
|
3847
3847
|
|
|
3848
|
-
/***/
|
|
3848
|
+
/***/ 31955:
|
|
3849
3849
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3850
3850
|
|
|
3851
3851
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3852
|
-
/* harmony export */
|
|
3852
|
+
/* harmony export */ Z: () => (/* binding */ pointInShapeCallback)
|
|
3853
3853
|
/* harmony export */ });
|
|
3854
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3854
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
3855
3855
|
|
|
3856
3856
|
function pointInShapeCallback(imageData, pointInShapeFn, callback, boundsIJK) {
|
|
3857
3857
|
let iMin, iMax, jMin, jMax, kMin, kMax;
|
|
@@ -3866,6 +3866,10 @@ function pointInShapeCallback(imageData, pointInShapeFn, callback, boundsIJK) {
|
|
|
3866
3866
|
.getScalars()
|
|
3867
3867
|
.getData();
|
|
3868
3868
|
}
|
|
3869
|
+
if (!scalarData) {
|
|
3870
|
+
console.warn('No scalar data found for imageData', imageData);
|
|
3871
|
+
return;
|
|
3872
|
+
}
|
|
3869
3873
|
const dimensions = imageData.getDimensions();
|
|
3870
3874
|
if (!boundsIJK) {
|
|
3871
3875
|
iMin = 0;
|
|
@@ -3878,7 +3882,7 @@ function pointInShapeCallback(imageData, pointInShapeFn, callback, boundsIJK) {
|
|
|
3878
3882
|
else {
|
|
3879
3883
|
[[iMin, iMax], [jMin, jMax], [kMin, kMax]] = boundsIJK;
|
|
3880
3884
|
}
|
|
3881
|
-
const start = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .
|
|
3885
|
+
const start = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .R3.fromValues(iMin, jMin, kMin);
|
|
3882
3886
|
const direction = imageData.getDirection();
|
|
3883
3887
|
const rowCosines = direction.slice(0, 3);
|
|
3884
3888
|
const columnCosines = direction.slice(3, 6);
|
|
@@ -3886,19 +3890,19 @@ function pointInShapeCallback(imageData, pointInShapeFn, callback, boundsIJK) {
|
|
|
3886
3890
|
const spacing = imageData.getSpacing();
|
|
3887
3891
|
const [rowSpacing, columnSpacing, scanAxisSpacing] = spacing;
|
|
3888
3892
|
const worldPosStart = imageData.indexToWorld(start);
|
|
3889
|
-
const rowStep = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .
|
|
3890
|
-
const columnStep = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .
|
|
3891
|
-
const scanAxisStep = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .
|
|
3893
|
+
const rowStep = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .R3.fromValues(rowCosines[0] * rowSpacing, rowCosines[1] * rowSpacing, rowCosines[2] * rowSpacing);
|
|
3894
|
+
const columnStep = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .R3.fromValues(columnCosines[0] * columnSpacing, columnCosines[1] * columnSpacing, columnCosines[2] * columnSpacing);
|
|
3895
|
+
const scanAxisStep = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .R3.fromValues(scanAxisNormal[0] * scanAxisSpacing, scanAxisNormal[1] * scanAxisSpacing, scanAxisNormal[2] * scanAxisSpacing);
|
|
3892
3896
|
const xMultiple = numComps ||
|
|
3893
3897
|
scalarData.length / dimensions[2] / dimensions[1] / dimensions[0];
|
|
3894
3898
|
const yMultiple = dimensions[0] * xMultiple;
|
|
3895
3899
|
const zMultiple = dimensions[1] * yMultiple;
|
|
3896
3900
|
const pointsInShape = [];
|
|
3897
|
-
const currentPos = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.clone */ .
|
|
3901
|
+
const currentPos = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.clone */ .R3.clone(worldPosStart);
|
|
3898
3902
|
for (let k = kMin; k <= kMax; k++) {
|
|
3899
|
-
const startPosJ = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.clone */ .
|
|
3903
|
+
const startPosJ = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.clone */ .R3.clone(currentPos);
|
|
3900
3904
|
for (let j = jMin; j <= jMax; j++) {
|
|
3901
|
-
const startPosI = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.clone */ .
|
|
3905
|
+
const startPosI = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.clone */ .R3.clone(currentPos);
|
|
3902
3906
|
for (let i = iMin; i <= iMax; i++) {
|
|
3903
3907
|
const pointIJK = [i, j, k];
|
|
3904
3908
|
if (pointInShapeFn(currentPos, pointIJK)) {
|
|
@@ -3924,13 +3928,13 @@ function pointInShapeCallback(imageData, pointInShapeFn, callback, boundsIJK) {
|
|
|
3924
3928
|
callback({ value, index, pointIJK, pointLPS: currentPos });
|
|
3925
3929
|
}
|
|
3926
3930
|
}
|
|
3927
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.add */ .
|
|
3931
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.add */ .R3.add(currentPos, currentPos, rowStep);
|
|
3928
3932
|
}
|
|
3929
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.copy */ .
|
|
3930
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.add */ .
|
|
3933
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.copy */ .R3.copy(currentPos, startPosI);
|
|
3934
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.add */ .R3.add(currentPos, currentPos, columnStep);
|
|
3931
3935
|
}
|
|
3932
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.copy */ .
|
|
3933
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.add */ .
|
|
3936
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.copy */ .R3.copy(currentPos, startPosJ);
|
|
3937
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.add */ .R3.add(currentPos, currentPos, scanAxisStep);
|
|
3934
3938
|
}
|
|
3935
3939
|
return pointsInShape;
|
|
3936
3940
|
}
|
|
@@ -3938,17 +3942,17 @@ function pointInShapeCallback(imageData, pointInShapeFn, callback, boundsIJK) {
|
|
|
3938
3942
|
|
|
3939
3943
|
/***/ }),
|
|
3940
3944
|
|
|
3941
|
-
/***/
|
|
3945
|
+
/***/ 70134:
|
|
3942
3946
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3943
3947
|
|
|
3944
3948
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3945
|
-
/* harmony export */
|
|
3949
|
+
/* harmony export */ Z: () => (/* binding */ pointInSurroundingSphereCallback)
|
|
3946
3950
|
/* harmony export */ });
|
|
3947
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3948
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3949
|
-
/* harmony import */ var _math_sphere__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
3950
|
-
/* harmony import */ var _pointInShapeCallback__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
3951
|
-
/* harmony import */ var _boundingBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
3951
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
3952
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
3953
|
+
/* harmony import */ var _math_sphere__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(34603);
|
|
3954
|
+
/* harmony import */ var _pointInShapeCallback__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31955);
|
|
3955
|
+
/* harmony import */ var _boundingBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(87758);
|
|
3952
3956
|
|
|
3953
3957
|
|
|
3954
3958
|
|
|
@@ -3961,12 +3965,12 @@ function pointInSurroundingSphereCallback(imageData, circlePoints, callback, vie
|
|
|
3961
3965
|
center: centerWorld,
|
|
3962
3966
|
radius: radiusWorld,
|
|
3963
3967
|
};
|
|
3964
|
-
(0,_pointInShapeCallback__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .
|
|
3968
|
+
(0,_pointInShapeCallback__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(imageData, (pointLPS) => (0,_math_sphere__WEBPACK_IMPORTED_MODULE_2__/* .pointInSphere */ .E)(sphereObj, pointLPS), callback, boundsIJK);
|
|
3965
3969
|
}
|
|
3966
3970
|
function _getBounds(circlePoints, imageData, viewport) {
|
|
3967
3971
|
const [bottom, top] = circlePoints;
|
|
3968
|
-
const centerWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .
|
|
3969
|
-
const radiusWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.distance */ .
|
|
3972
|
+
const centerWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .R3.fromValues((bottom[0] + top[0]) / 2, (bottom[1] + top[1]) / 2, (bottom[2] + top[2]) / 2);
|
|
3973
|
+
const radiusWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.distance */ .R3.distance(bottom, top) / 2;
|
|
3970
3974
|
let boundsIJK;
|
|
3971
3975
|
if (!viewport) {
|
|
3972
3976
|
const centerIJK = transformWorldToIndex(imageData, centerWorld);
|
|
@@ -3995,16 +3999,16 @@ function _computeBoundsIJKWithCamera(imageData, viewport, circlePoints, centerWo
|
|
|
3995
3999
|
const [bottom, top] = circlePoints;
|
|
3996
4000
|
const dimensions = imageData.getDimensions();
|
|
3997
4001
|
const camera = viewport.getCamera();
|
|
3998
|
-
const viewUp = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .
|
|
3999
|
-
const viewPlaneNormal = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .
|
|
4000
|
-
const viewRight = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .
|
|
4001
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.cross */ .
|
|
4002
|
-
const topLeftWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .
|
|
4003
|
-
const bottomRightWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .
|
|
4004
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .
|
|
4005
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .
|
|
4006
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .
|
|
4007
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .
|
|
4002
|
+
const viewUp = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .R3.fromValues(camera.viewUp[0], camera.viewUp[1], camera.viewUp[2]);
|
|
4003
|
+
const viewPlaneNormal = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .R3.fromValues(camera.viewPlaneNormal[0], camera.viewPlaneNormal[1], camera.viewPlaneNormal[2]);
|
|
4004
|
+
const viewRight = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
4005
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.cross */ .R3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
4006
|
+
const topLeftWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
4007
|
+
const bottomRightWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
4008
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(topLeftWorld, top, viewPlaneNormal, radiusWorld);
|
|
4009
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(bottomRightWorld, bottom, viewPlaneNormal, -radiusWorld);
|
|
4010
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(topLeftWorld, topLeftWorld, viewRight, -radiusWorld);
|
|
4011
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(bottomRightWorld, bottomRightWorld, viewRight, radiusWorld);
|
|
4008
4012
|
const sphereCornersIJK = [
|
|
4009
4013
|
transformWorldToIndex(imageData, topLeftWorld),
|
|
4010
4014
|
(transformWorldToIndex(imageData, bottomRightWorld)),
|
|
@@ -4016,11 +4020,11 @@ function _computeBoundsIJKWithCamera(imageData, viewport, circlePoints, centerWo
|
|
|
4016
4020
|
|
|
4017
4021
|
/***/ }),
|
|
4018
4022
|
|
|
4019
|
-
/***/
|
|
4023
|
+
/***/ 5205:
|
|
4020
4024
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4021
4025
|
|
|
4022
4026
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4023
|
-
/* harmony export */
|
|
4027
|
+
/* harmony export */ s: () => (/* binding */ pointToString)
|
|
4024
4028
|
/* harmony export */ });
|
|
4025
4029
|
function pointToString(point, decimals = 5) {
|
|
4026
4030
|
return (parseFloat(point[0]).toFixed(decimals) +
|
|
@@ -4034,7 +4038,7 @@ function pointToString(point, decimals = 5) {
|
|
|
4034
4038
|
|
|
4035
4039
|
/***/ }),
|
|
4036
4040
|
|
|
4037
|
-
/***/
|
|
4041
|
+
/***/ 89977:
|
|
4038
4042
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4039
4043
|
|
|
4040
4044
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -4043,12 +4047,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4043
4047
|
/* harmony export */ getPolyDataPointIndexes: () => (/* binding */ getPolyDataPointIndexes),
|
|
4044
4048
|
/* harmony export */ getPolyDataPoints: () => (/* binding */ getPolyDataPoints)
|
|
4045
4049
|
/* harmony export */ });
|
|
4046
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4050
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
4047
4051
|
|
|
4048
4052
|
function getPoint(points, idx) {
|
|
4049
4053
|
const idx3 = idx * 3;
|
|
4050
4054
|
if (idx3 < points.length) {
|
|
4051
|
-
return gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .
|
|
4055
|
+
return gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .R3.fromValues(points[idx3], points[idx3 + 1], points[idx3 + 2]);
|
|
4052
4056
|
}
|
|
4053
4057
|
}
|
|
4054
4058
|
function getPolyDataPointIndexes(polyData) {
|
|
@@ -4101,15 +4105,15 @@ function getPolyDataPoints(polyData) {
|
|
|
4101
4105
|
|
|
4102
4106
|
/***/ }),
|
|
4103
4107
|
|
|
4104
|
-
/***/
|
|
4108
|
+
/***/ 35765:
|
|
4105
4109
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4106
4110
|
|
|
4107
4111
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4108
|
-
/* harmony export */
|
|
4112
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4109
4113
|
/* harmony export */ });
|
|
4110
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4111
|
-
/* harmony import */ var _boundingBox_getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
4112
|
-
/* harmony import */ var _boundingBox_extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
4114
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
4115
|
+
/* harmony import */ var _boundingBox_getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64652);
|
|
4116
|
+
/* harmony import */ var _boundingBox_extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93341);
|
|
4113
4117
|
|
|
4114
4118
|
|
|
4115
4119
|
|
|
@@ -4127,7 +4131,7 @@ function getBoundsIJKFromRectangleAnnotations(annotations, referenceVolume, opti
|
|
|
4127
4131
|
const rectangleCornersIJK = pointsToUse.map((world) => _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.transformWorldToIndex(imageData, world));
|
|
4128
4132
|
let boundsIJK = (0,_boundingBox_getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_1__/* .getBoundingBoxAroundShapeIJK */ .g)(rectangleCornersIJK, dimensions);
|
|
4129
4133
|
if (options.numSlicesToProject && !data.cachedStats?.projectionPoints) {
|
|
4130
|
-
boundsIJK = (0,_boundingBox_extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .
|
|
4134
|
+
boundsIJK = (0,_boundingBox_extend2DBoundingBoxInViewAxis__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(boundsIJK, options.numSlicesToProject);
|
|
4131
4135
|
}
|
|
4132
4136
|
AllBoundsIJK.push(boundsIJK);
|
|
4133
4137
|
});
|
|
@@ -4158,16 +4162,16 @@ function getBoundsIJKFromRectangleAnnotations(annotations, referenceVolume, opti
|
|
|
4158
4162
|
|
|
4159
4163
|
/***/ }),
|
|
4160
4164
|
|
|
4161
|
-
/***/
|
|
4165
|
+
/***/ 78536:
|
|
4162
4166
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4163
4167
|
|
|
4164
4168
|
__webpack_require__.r(__webpack_exports__);
|
|
4165
4169
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4166
|
-
/* harmony export */ getBoundsIJKFromRectangleAnnotations: () => (/* reexport safe */ _getBoundsIJKFromRectangleAnnotations__WEBPACK_IMPORTED_MODULE_0__.
|
|
4167
|
-
/* harmony export */ isAxisAlignedRectangle: () => (/* reexport safe */ _isAxisAlignedRectangle__WEBPACK_IMPORTED_MODULE_1__.
|
|
4170
|
+
/* harmony export */ getBoundsIJKFromRectangleAnnotations: () => (/* reexport safe */ _getBoundsIJKFromRectangleAnnotations__WEBPACK_IMPORTED_MODULE_0__.Z),
|
|
4171
|
+
/* harmony export */ isAxisAlignedRectangle: () => (/* reexport safe */ _isAxisAlignedRectangle__WEBPACK_IMPORTED_MODULE_1__.r)
|
|
4168
4172
|
/* harmony export */ });
|
|
4169
|
-
/* harmony import */ var _getBoundsIJKFromRectangleAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4170
|
-
/* harmony import */ var _isAxisAlignedRectangle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
4173
|
+
/* harmony import */ var _getBoundsIJKFromRectangleAnnotations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35765);
|
|
4174
|
+
/* harmony import */ var _isAxisAlignedRectangle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59941);
|
|
4171
4175
|
|
|
4172
4176
|
|
|
4173
4177
|
|
|
@@ -4175,24 +4179,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4175
4179
|
|
|
4176
4180
|
/***/ }),
|
|
4177
4181
|
|
|
4178
|
-
/***/
|
|
4182
|
+
/***/ 59941:
|
|
4179
4183
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4180
4184
|
|
|
4181
4185
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4182
|
-
/* harmony export */
|
|
4186
|
+
/* harmony export */ r: () => (/* binding */ isAxisAlignedRectangle)
|
|
4183
4187
|
/* harmony export */ });
|
|
4184
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4185
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
4188
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
4189
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62709);
|
|
4186
4190
|
|
|
4187
4191
|
|
|
4188
4192
|
const { isEqual } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities;
|
|
4189
|
-
const iAxis = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .
|
|
4190
|
-
const jAxis = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .
|
|
4191
|
-
const kAxis = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .
|
|
4193
|
+
const iAxis = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .R3.fromValues(1, 0, 0);
|
|
4194
|
+
const jAxis = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .R3.fromValues(0, 1, 0);
|
|
4195
|
+
const kAxis = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.fromValues */ .R3.fromValues(0, 0, 1);
|
|
4192
4196
|
const axisList = [iAxis, jAxis, kAxis];
|
|
4193
4197
|
function isAxisAlignedRectangle(rectangleCornersIJK) {
|
|
4194
|
-
const rectangleVec1 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.subtract */ .
|
|
4195
|
-
const rectangleVec2 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.subtract */ .
|
|
4198
|
+
const rectangleVec1 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.subtract */ .R3.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .R3.create(), rectangleCornersIJK[0], rectangleCornersIJK[1]);
|
|
4199
|
+
const rectangleVec2 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.subtract */ .R3.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .R3.create(), rectangleCornersIJK[0], rectangleCornersIJK[2]);
|
|
4196
4200
|
const anglesVec1 = calculateAnglesWithAxes(rectangleVec1, axisList);
|
|
4197
4201
|
const anglesVec2 = calculateAnglesWithAxes(rectangleVec2, axisList);
|
|
4198
4202
|
const isAligned = [...anglesVec1, ...anglesVec2].every((angle) => isEqual(angle, 0) ||
|
|
@@ -4202,21 +4206,21 @@ function isAxisAlignedRectangle(rectangleCornersIJK) {
|
|
|
4202
4206
|
return isAligned;
|
|
4203
4207
|
}
|
|
4204
4208
|
function calculateAnglesWithAxes(vec, axes) {
|
|
4205
|
-
return axes.map((axis) => (gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.angle */ .
|
|
4209
|
+
return axes.map((axis) => (gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.angle */ .R3.angle(vec, axis) * 180) / Math.PI);
|
|
4206
4210
|
}
|
|
4207
4211
|
|
|
4208
4212
|
|
|
4209
4213
|
|
|
4210
4214
|
/***/ }),
|
|
4211
4215
|
|
|
4212
|
-
/***/
|
|
4216
|
+
/***/ 63478:
|
|
4213
4217
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4214
4218
|
|
|
4215
4219
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4216
|
-
/* harmony export */
|
|
4220
|
+
/* harmony export */ Z: () => (/* binding */ scroll)
|
|
4217
4221
|
/* harmony export */ });
|
|
4218
4222
|
/* unused harmony export scrollVolume */
|
|
4219
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4223
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
4220
4224
|
|
|
4221
4225
|
function scroll(viewport, options) {
|
|
4222
4226
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(viewport.element);
|
|
@@ -4227,19 +4231,12 @@ function scroll(viewport, options) {
|
|
|
4227
4231
|
viewport.getImageIds().length === 0) {
|
|
4228
4232
|
throw new Error('Scroll::Stack Viewport has no images');
|
|
4229
4233
|
}
|
|
4230
|
-
const { type: viewportType } = viewport;
|
|
4231
4234
|
const { volumeId, delta, scrollSlabs } = options;
|
|
4232
|
-
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.
|
|
4233
|
-
viewport.scroll(delta, options.debounceLoading, options.loop);
|
|
4234
|
-
}
|
|
4235
|
-
else if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.VolumeViewport) {
|
|
4235
|
+
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.VolumeViewport) {
|
|
4236
4236
|
scrollVolume(viewport, volumeId, delta, scrollSlabs);
|
|
4237
4237
|
}
|
|
4238
|
-
else if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.VideoViewport) {
|
|
4239
|
-
viewport.scroll(delta);
|
|
4240
|
-
}
|
|
4241
4238
|
else {
|
|
4242
|
-
|
|
4239
|
+
viewport.scroll(delta, options.debounceLoading, options.loop);
|
|
4243
4240
|
}
|
|
4244
4241
|
}
|
|
4245
4242
|
function scrollVolume(viewport, volumeId, delta, scrollSlabs = false) {
|
|
@@ -4278,20 +4275,20 @@ function scrollVolume(viewport, volumeId, delta, scrollSlabs = false) {
|
|
|
4278
4275
|
|
|
4279
4276
|
/***/ }),
|
|
4280
4277
|
|
|
4281
|
-
/***/
|
|
4278
|
+
/***/ 7966:
|
|
4282
4279
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4283
4280
|
|
|
4284
4281
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4285
|
-
/* harmony export */
|
|
4282
|
+
/* harmony export */ Z: () => (/* binding */ InterpolationManager)
|
|
4286
4283
|
/* harmony export */ });
|
|
4287
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4288
|
-
/* harmony import */ var _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
4289
|
-
/* harmony import */ var _contours_interpolation_getInterpolationDataCollection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
4290
|
-
/* harmony import */ var _contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
4291
|
-
/* harmony import */ var _deleteRelatedAnnotations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
4292
|
-
/* harmony import */ var _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
4293
|
-
/* harmony import */ var _getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
4294
|
-
/* harmony import */ var _contourSegmentation_addContourSegmentationAnnotation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
4284
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
4285
|
+
/* harmony import */ var _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88706);
|
|
4286
|
+
/* harmony import */ var _contours_interpolation_getInterpolationDataCollection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92472);
|
|
4287
|
+
/* harmony import */ var _contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28898);
|
|
4288
|
+
/* harmony import */ var _deleteRelatedAnnotations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16524);
|
|
4289
|
+
/* harmony import */ var _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(98806);
|
|
4290
|
+
/* harmony import */ var _getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(82220);
|
|
4291
|
+
/* harmony import */ var _contourSegmentation_addContourSegmentationAnnotation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(52577);
|
|
4295
4292
|
|
|
4296
4293
|
|
|
4297
4294
|
|
|
@@ -4302,8 +4299,8 @@ function scrollVolume(viewport, volumeId, delta, scrollSlabs = false) {
|
|
|
4302
4299
|
|
|
4303
4300
|
const { uuidv4 } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
|
|
4304
4301
|
const ChangeTypesForInterpolation = [
|
|
4305
|
-
_enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .
|
|
4306
|
-
_enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .
|
|
4302
|
+
_enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z.HandlesUpdated,
|
|
4303
|
+
_enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z.InterpolationUpdated,
|
|
4307
4304
|
];
|
|
4308
4305
|
class InterpolationManager {
|
|
4309
4306
|
static { this.toolNames = []; }
|
|
@@ -4339,7 +4336,7 @@ class InterpolationManager {
|
|
|
4339
4336
|
segmentationId !== data.segmentation.segmentationId) {
|
|
4340
4337
|
continue;
|
|
4341
4338
|
}
|
|
4342
|
-
(0,_contourSegmentation_addContourSegmentationAnnotation__WEBPACK_IMPORTED_MODULE_7__/* .addContourSegmentationAnnotation */ .
|
|
4339
|
+
(0,_contourSegmentation_addContourSegmentationAnnotation__WEBPACK_IMPORTED_MODULE_7__/* .addContourSegmentationAnnotation */ .D)(annotation);
|
|
4343
4340
|
annotation.autoGenerated = false;
|
|
4344
4341
|
}
|
|
4345
4342
|
}
|
|
@@ -4354,7 +4351,7 @@ class InterpolationManager {
|
|
|
4354
4351
|
!this.toolNames.includes(originalToolName)) {
|
|
4355
4352
|
return;
|
|
4356
4353
|
}
|
|
4357
|
-
const viewport = (0,_getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .
|
|
4354
|
+
const viewport = (0,_getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(annotation);
|
|
4358
4355
|
if (!viewport) {
|
|
4359
4356
|
console.warn('Unable to find viewport for', annotation);
|
|
4360
4357
|
return;
|
|
@@ -4369,8 +4366,8 @@ class InterpolationManager {
|
|
|
4369
4366
|
const hasInterpolationUID = !!annotation.interpolationUID;
|
|
4370
4367
|
annotation.autoGenerated = false;
|
|
4371
4368
|
if (hasInterpolationUID) {
|
|
4372
|
-
(0,_deleteRelatedAnnotations__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .
|
|
4373
|
-
(0,_contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .
|
|
4369
|
+
(0,_deleteRelatedAnnotations__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(viewportData);
|
|
4370
|
+
(0,_contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(viewportData);
|
|
4374
4371
|
return;
|
|
4375
4372
|
}
|
|
4376
4373
|
const filterData = [
|
|
@@ -4390,7 +4387,7 @@ class InterpolationManager {
|
|
|
4390
4387
|
parentKey: (annotation) => annotation.metadata,
|
|
4391
4388
|
},
|
|
4392
4389
|
];
|
|
4393
|
-
let interpolationAnnotations = (0,_contours_interpolation_getInterpolationDataCollection__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .
|
|
4390
|
+
let interpolationAnnotations = (0,_contours_interpolation_getInterpolationDataCollection__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(viewportData, filterData);
|
|
4394
4391
|
const { sliceIndex } = annotation.metadata;
|
|
4395
4392
|
const skipUIDs = new Set();
|
|
4396
4393
|
interpolationAnnotations.forEach((interpolationAnnotation) => {
|
|
@@ -4404,11 +4401,11 @@ class InterpolationManager {
|
|
|
4404
4401
|
annotation.interpolationUID =
|
|
4405
4402
|
interpolationAnnotations[0]?.interpolationUID || uuidv4();
|
|
4406
4403
|
viewportData.interpolationUID = annotation.interpolationUID;
|
|
4407
|
-
(0,_contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .
|
|
4404
|
+
(0,_contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(viewportData);
|
|
4408
4405
|
}; }
|
|
4409
4406
|
static { this.handleAnnotationUpdate = (evt) => {
|
|
4410
4407
|
const annotation = evt.detail.annotation;
|
|
4411
|
-
const { changeType = _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .
|
|
4408
|
+
const { changeType = _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z.HandlesUpdated } = evt.detail;
|
|
4412
4409
|
if (!annotation?.metadata) {
|
|
4413
4410
|
return;
|
|
4414
4411
|
}
|
|
@@ -4418,13 +4415,13 @@ class InterpolationManager {
|
|
|
4418
4415
|
!ChangeTypesForInterpolation.includes(changeType)) {
|
|
4419
4416
|
return;
|
|
4420
4417
|
}
|
|
4421
|
-
const viewport = (0,_getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .
|
|
4418
|
+
const viewport = (0,_getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(annotation);
|
|
4422
4419
|
if (!viewport) {
|
|
4423
4420
|
console.warn('Unable to find matching viewport for annotation interpolation', annotation);
|
|
4424
4421
|
return;
|
|
4425
4422
|
}
|
|
4426
4423
|
if (annotation.autoGenerated) {
|
|
4427
|
-
(0,_contourSegmentation_addContourSegmentationAnnotation__WEBPACK_IMPORTED_MODULE_7__/* .addContourSegmentationAnnotation */ .
|
|
4424
|
+
(0,_contourSegmentation_addContourSegmentationAnnotation__WEBPACK_IMPORTED_MODULE_7__/* .addContourSegmentationAnnotation */ .D)(annotation);
|
|
4428
4425
|
annotation.autoGenerated = false;
|
|
4429
4426
|
}
|
|
4430
4427
|
const sliceData = getSliceData(viewport);
|
|
@@ -4433,9 +4430,9 @@ class InterpolationManager {
|
|
|
4433
4430
|
sliceData,
|
|
4434
4431
|
annotation,
|
|
4435
4432
|
interpolationUID: annotation.interpolationUID,
|
|
4436
|
-
isInterpolationUpdate: changeType === _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .
|
|
4433
|
+
isInterpolationUpdate: changeType === _enums_ChangeTypes__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z.InterpolationUpdated,
|
|
4437
4434
|
};
|
|
4438
|
-
(0,_contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .
|
|
4435
|
+
(0,_contours_interpolation_interpolate__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(viewportData);
|
|
4439
4436
|
}; }
|
|
4440
4437
|
static { this.handleAnnotationDelete = (evt) => {
|
|
4441
4438
|
const annotation = evt.detail.annotation;
|
|
@@ -4446,7 +4443,7 @@ class InterpolationManager {
|
|
|
4446
4443
|
if (!this.toolNames.includes(toolName) || annotation.autoGenerated) {
|
|
4447
4444
|
return;
|
|
4448
4445
|
}
|
|
4449
|
-
const viewport = (0,_getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .
|
|
4446
|
+
const viewport = (0,_getViewportForAnnotation__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(annotation);
|
|
4450
4447
|
if (!viewport) {
|
|
4451
4448
|
console.warn("No viewport, can't delete interpolated results", annotation);
|
|
4452
4449
|
return;
|
|
@@ -4459,7 +4456,7 @@ class InterpolationManager {
|
|
|
4459
4456
|
interpolationUID: annotation.interpolationUID,
|
|
4460
4457
|
};
|
|
4461
4458
|
annotation.autoGenerated = false;
|
|
4462
|
-
(0,_deleteRelatedAnnotations__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .
|
|
4459
|
+
(0,_deleteRelatedAnnotations__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(viewportData);
|
|
4463
4460
|
}; }
|
|
4464
4461
|
}
|
|
4465
4462
|
function getSliceData(viewport) {
|
|
@@ -4473,17 +4470,17 @@ function getSliceData(viewport) {
|
|
|
4473
4470
|
|
|
4474
4471
|
/***/ }),
|
|
4475
4472
|
|
|
4476
|
-
/***/
|
|
4473
|
+
/***/ 39427:
|
|
4477
4474
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4478
4475
|
|
|
4479
4476
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4480
|
-
/* harmony export */
|
|
4481
|
-
/* harmony export */
|
|
4477
|
+
/* harmony export */ G: () => (/* binding */ getBrushSizeForToolGroup),
|
|
4478
|
+
/* harmony export */ d: () => (/* binding */ setBrushSizeForToolGroup)
|
|
4482
4479
|
/* harmony export */ });
|
|
4483
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4484
|
-
/* harmony import */ var _triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
4485
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
4486
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
4480
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27078);
|
|
4481
|
+
/* harmony import */ var _triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66878);
|
|
4482
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62709);
|
|
4483
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89776);
|
|
4487
4484
|
|
|
4488
4485
|
|
|
4489
4486
|
|
|
@@ -4493,7 +4490,7 @@ function setBrushSizeForToolGroup(toolGroupId, brushSize, toolName) {
|
|
|
4493
4490
|
if (toolGroup === undefined) {
|
|
4494
4491
|
return;
|
|
4495
4492
|
}
|
|
4496
|
-
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .
|
|
4493
|
+
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .Xb)(toolGroupId, toolName);
|
|
4497
4494
|
brushBasedToolInstances.forEach((tool) => {
|
|
4498
4495
|
tool.configuration.brushSize = brushSize;
|
|
4499
4496
|
tool.invalidateBrushCursor();
|
|
@@ -4506,7 +4503,7 @@ function setBrushSizeForToolGroup(toolGroupId, brushSize, toolName) {
|
|
|
4506
4503
|
const { renderingEngineId } = viewportsInfoArray[0];
|
|
4507
4504
|
const viewportIds = toolGroup.getViewportIds();
|
|
4508
4505
|
const renderingEngine = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__.getRenderingEngine)(renderingEngineId);
|
|
4509
|
-
(0,_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
4506
|
+
(0,_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(renderingEngine, viewportIds);
|
|
4510
4507
|
}
|
|
4511
4508
|
function getBrushSizeForToolGroup(toolGroupId, toolName) {
|
|
4512
4509
|
const toolGroup = (0,_store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__.getToolGroup)(toolGroupId);
|
|
@@ -4517,7 +4514,7 @@ function getBrushSizeForToolGroup(toolGroupId, toolName) {
|
|
|
4517
4514
|
if (!Object.keys(toolInstances).length) {
|
|
4518
4515
|
return;
|
|
4519
4516
|
}
|
|
4520
|
-
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .
|
|
4517
|
+
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .Xb)(toolGroupId, toolName);
|
|
4521
4518
|
const brushToolInstance = brushBasedToolInstances[0];
|
|
4522
4519
|
if (!brushToolInstance) {
|
|
4523
4520
|
return;
|
|
@@ -4528,17 +4525,17 @@ function getBrushSizeForToolGroup(toolGroupId, toolName) {
|
|
|
4528
4525
|
|
|
4529
4526
|
/***/ }),
|
|
4530
4527
|
|
|
4531
|
-
/***/
|
|
4528
|
+
/***/ 78005:
|
|
4532
4529
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4533
4530
|
|
|
4534
4531
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4535
|
-
/* harmony export */
|
|
4536
|
-
/* harmony export */
|
|
4532
|
+
/* harmony export */ H: () => (/* binding */ getBrushThresholdForToolGroup),
|
|
4533
|
+
/* harmony export */ h: () => (/* binding */ setBrushThresholdForToolGroup)
|
|
4537
4534
|
/* harmony export */ });
|
|
4538
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4539
|
-
/* harmony import */ var _triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
4540
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
4541
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
4535
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27078);
|
|
4536
|
+
/* harmony import */ var _triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66878);
|
|
4537
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62709);
|
|
4538
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89776);
|
|
4542
4539
|
|
|
4543
4540
|
|
|
4544
4541
|
|
|
@@ -4548,7 +4545,7 @@ function setBrushThresholdForToolGroup(toolGroupId, threshold, otherArgs = { isD
|
|
|
4548
4545
|
if (toolGroup === undefined) {
|
|
4549
4546
|
return;
|
|
4550
4547
|
}
|
|
4551
|
-
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .
|
|
4548
|
+
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .Xb)(toolGroupId);
|
|
4552
4549
|
const configuration = {
|
|
4553
4550
|
...otherArgs,
|
|
4554
4551
|
...(threshold !== undefined && { threshold }),
|
|
@@ -4566,7 +4563,7 @@ function setBrushThresholdForToolGroup(toolGroupId, threshold, otherArgs = { isD
|
|
|
4566
4563
|
const { renderingEngineId } = viewportsInfo[0];
|
|
4567
4564
|
const viewportIds = toolGroup.getViewportIds();
|
|
4568
4565
|
const renderingEngine = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__.getRenderingEngine)(renderingEngineId);
|
|
4569
|
-
(0,_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
4566
|
+
(0,_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(renderingEngine, viewportIds);
|
|
4570
4567
|
}
|
|
4571
4568
|
function getBrushThresholdForToolGroup(toolGroupId) {
|
|
4572
4569
|
const toolGroup = (0,_store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__.getToolGroup)(toolGroupId);
|
|
@@ -4577,7 +4574,7 @@ function getBrushThresholdForToolGroup(toolGroupId) {
|
|
|
4577
4574
|
if (!Object.keys(toolInstances).length) {
|
|
4578
4575
|
return;
|
|
4579
4576
|
}
|
|
4580
|
-
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .
|
|
4577
|
+
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .Xb)(toolGroupId);
|
|
4581
4578
|
const brushToolInstance = brushBasedToolInstances[0];
|
|
4582
4579
|
if (!brushToolInstance) {
|
|
4583
4580
|
return;
|
|
@@ -4589,39 +4586,39 @@ function getBrushThresholdForToolGroup(toolGroupId) {
|
|
|
4589
4586
|
|
|
4590
4587
|
/***/ }),
|
|
4591
4588
|
|
|
4592
|
-
/***/
|
|
4589
|
+
/***/ 74484:
|
|
4593
4590
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4594
4591
|
|
|
4595
4592
|
|
|
4596
4593
|
// EXPORTS
|
|
4597
4594
|
__webpack_require__.d(__webpack_exports__, {
|
|
4598
|
-
|
|
4595
|
+
Z: () => (/* binding */ contourAndFindLargestBidirectional)
|
|
4599
4596
|
});
|
|
4600
4597
|
|
|
4601
4598
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/contours/index.js + 9 modules
|
|
4602
|
-
var utilities_contours = __webpack_require__(
|
|
4599
|
+
var utilities_contours = __webpack_require__(11203);
|
|
4603
4600
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/SegmentationRepresentations.js
|
|
4604
|
-
var SegmentationRepresentations = __webpack_require__(
|
|
4601
|
+
var SegmentationRepresentations = __webpack_require__(74297);
|
|
4605
4602
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
4606
|
-
var esm = __webpack_require__(
|
|
4603
|
+
var esm = __webpack_require__(72076);
|
|
4607
4604
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
4608
|
-
var dist_esm = __webpack_require__(
|
|
4605
|
+
var dist_esm = __webpack_require__(62709);
|
|
4609
4606
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/segmentation/isLineInSegment.js
|
|
4610
4607
|
|
|
4611
4608
|
|
|
4612
4609
|
function isLineInSegment(point1, point2, isInSegment) {
|
|
4613
4610
|
const ijk1 = isInSegment.toIJK(point1);
|
|
4614
4611
|
const ijk2 = isInSegment.toIJK(point2);
|
|
4615
|
-
const testPoint = esm/* vec3.create */.
|
|
4612
|
+
const testPoint = esm/* vec3.create */.R3.create();
|
|
4616
4613
|
const { testIJK } = isInSegment;
|
|
4617
|
-
const delta = esm/* vec3.sub */.
|
|
4614
|
+
const delta = esm/* vec3.sub */.R3.sub(esm/* vec3.create */.R3.create(), ijk1, ijk2);
|
|
4618
4615
|
const testSize = Math.round(Math.max(...delta.map(Math.abs)));
|
|
4619
4616
|
if (testSize < 2) {
|
|
4620
4617
|
return true;
|
|
4621
4618
|
}
|
|
4622
|
-
const unitDelta = esm/* vec3.scale */.
|
|
4619
|
+
const unitDelta = esm/* vec3.scale */.R3.scale(esm/* vec3.create */.R3.create(), delta, 1 / testSize);
|
|
4623
4620
|
for (let i = 1; i < testSize; i++) {
|
|
4624
|
-
esm/* vec3.scaleAndAdd */.
|
|
4621
|
+
esm/* vec3.scaleAndAdd */.R3.scaleAndAdd(testPoint, ijk2, unitDelta, i);
|
|
4625
4622
|
if (!testIJK(testPoint)) {
|
|
4626
4623
|
return false;
|
|
4627
4624
|
}
|
|
@@ -4639,7 +4636,7 @@ function createIsInSegment(segVolumeId, segmentIndex, containedSegmentIndices) {
|
|
|
4639
4636
|
const pixelsPerSlice = width * vol.dimensions[1];
|
|
4640
4637
|
return {
|
|
4641
4638
|
testCenter: (point1, point2) => {
|
|
4642
|
-
const point = esm/* vec3.add */.
|
|
4639
|
+
const point = esm/* vec3.add */.R3.add(esm/* vec3.create */.R3.create(), point1, point2).map((it) => it / 2);
|
|
4643
4640
|
const ijk = vol.imageData.worldToIndex(point).map(Math.round);
|
|
4644
4641
|
const [i, j, k] = ijk;
|
|
4645
4642
|
const index = i + j * width + k * pixelsPerSlice;
|
|
@@ -4688,7 +4685,7 @@ function createBidirectionalForSlice(sliceContour, isInSegment, currentMax = { m
|
|
|
4688
4685
|
for (let index2 = index1 + 1; index2 < points.length; index2++) {
|
|
4689
4686
|
const point1 = points[index1];
|
|
4690
4687
|
const point2 = points[index2];
|
|
4691
|
-
const distance2 = esm/* vec3.sqrDist */.
|
|
4688
|
+
const distance2 = esm/* vec3.sqrDist */.R3.sqrDist(point1, point2);
|
|
4692
4689
|
if (distance2 < maxMajor) {
|
|
4693
4690
|
continue;
|
|
4694
4691
|
}
|
|
@@ -4712,19 +4709,19 @@ function createBidirectionalForSlice(sliceContour, isInSegment, currentMax = { m
|
|
|
4712
4709
|
maxMajor = Math.sqrt(maxMajor + EPSILON);
|
|
4713
4710
|
const handle0 = points[maxMajorPoints[0]];
|
|
4714
4711
|
const handle1 = points[maxMajorPoints[1]];
|
|
4715
|
-
const unitMajor = esm/* vec3.sub */.
|
|
4716
|
-
esm/* vec3.scale */.
|
|
4712
|
+
const unitMajor = esm/* vec3.sub */.R3.sub(esm/* vec3.create */.R3.create(), handle0, handle1);
|
|
4713
|
+
esm/* vec3.scale */.R3.scale(unitMajor, unitMajor, 1 / maxMajor);
|
|
4717
4714
|
let maxMinorPoints;
|
|
4718
4715
|
for (let index1 = 0; index1 < points.length; index1++) {
|
|
4719
4716
|
for (let index2 = index1 + 1; index2 < points.length; index2++) {
|
|
4720
4717
|
const point1 = points[index1];
|
|
4721
4718
|
const point2 = points[index2];
|
|
4722
|
-
const distance2 = esm/* vec3.sqrDist */.
|
|
4719
|
+
const distance2 = esm/* vec3.sqrDist */.R3.sqrDist(point1, point2);
|
|
4723
4720
|
if (distance2 <= maxMinor) {
|
|
4724
4721
|
continue;
|
|
4725
4722
|
}
|
|
4726
|
-
const delta = esm/* vec3.sub */.
|
|
4727
|
-
const dot = Math.abs(esm/* vec3.dot */.
|
|
4723
|
+
const delta = esm/* vec3.sub */.R3.sub(esm/* vec3.create */.R3.create(), point1, point2);
|
|
4724
|
+
const dot = Math.abs(esm/* vec3.dot */.R3.dot(delta, unitMajor)) / Math.sqrt(distance2);
|
|
4728
4725
|
if (dot > EPSILON) {
|
|
4729
4726
|
continue;
|
|
4730
4727
|
}
|
|
@@ -4758,7 +4755,7 @@ function createBidirectionalForSlice(sliceContour, isInSegment, currentMax = { m
|
|
|
4758
4755
|
|
|
4759
4756
|
|
|
4760
4757
|
|
|
4761
|
-
const { Labelmap } = SegmentationRepresentations
|
|
4758
|
+
const { Labelmap } = SegmentationRepresentations["default"];
|
|
4762
4759
|
function contourAndFindLargestBidirectional(segmentation) {
|
|
4763
4760
|
const contours = (0,utilities_contours.generateContourSetsFromLabelmap)({
|
|
4764
4761
|
segmentations: segmentation,
|
|
@@ -4782,11 +4779,11 @@ function contourAndFindLargestBidirectional(segmentation) {
|
|
|
4782
4779
|
|
|
4783
4780
|
/***/ }),
|
|
4784
4781
|
|
|
4785
|
-
/***/
|
|
4782
|
+
/***/ 36059:
|
|
4786
4783
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4787
4784
|
|
|
4788
4785
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4789
|
-
/* harmony export */
|
|
4786
|
+
/* harmony export */ Z: () => (/* binding */ createBidirectionalToolData)
|
|
4790
4787
|
/* harmony export */ });
|
|
4791
4788
|
function createBidirectionalToolData(bidirectionalData, viewport) {
|
|
4792
4789
|
const { majorAxis, minorAxis, label = '', sliceIndex } = bidirectionalData;
|
|
@@ -4827,11 +4824,11 @@ function createBidirectionalToolData(bidirectionalData, viewport) {
|
|
|
4827
4824
|
|
|
4828
4825
|
/***/ }),
|
|
4829
4826
|
|
|
4830
|
-
/***/
|
|
4827
|
+
/***/ 10190:
|
|
4831
4828
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4832
4829
|
|
|
4833
4830
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4834
|
-
/* harmony export */
|
|
4831
|
+
/* harmony export */ A: () => (/* binding */ createImageIdReferenceMap)
|
|
4835
4832
|
/* harmony export */ });
|
|
4836
4833
|
function createImageIdReferenceMap(imageIdsArray, segmentationImageIds) {
|
|
4837
4834
|
const imageIdReferenceMap = new Map(imageIdsArray.map((imageId, index) => {
|
|
@@ -4844,15 +4841,15 @@ function createImageIdReferenceMap(imageIdsArray, segmentationImageIds) {
|
|
|
4844
4841
|
|
|
4845
4842
|
/***/ }),
|
|
4846
4843
|
|
|
4847
|
-
/***/
|
|
4844
|
+
/***/ 64618:
|
|
4848
4845
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4849
4846
|
|
|
4850
4847
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4851
|
-
/* harmony export */
|
|
4848
|
+
/* harmony export */ Z: () => (/* binding */ createLabelmapVolumeForViewport)
|
|
4852
4849
|
/* harmony export */ });
|
|
4853
|
-
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4850
|
+
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11677);
|
|
4854
4851
|
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0__);
|
|
4855
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
4852
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62709);
|
|
4856
4853
|
|
|
4857
4854
|
|
|
4858
4855
|
async function createLabelmapVolumeForViewport(input) {
|
|
@@ -4886,13 +4883,13 @@ async function createLabelmapVolumeForViewport(input) {
|
|
|
4886
4883
|
|
|
4887
4884
|
/***/ }),
|
|
4888
4885
|
|
|
4889
|
-
/***/
|
|
4886
|
+
/***/ 71880:
|
|
4890
4887
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4891
4888
|
|
|
4892
4889
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4893
|
-
/* harmony export */
|
|
4890
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4894
4891
|
/* harmony export */ });
|
|
4895
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4892
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
4896
4893
|
|
|
4897
4894
|
function createMergedLabelmapForIndex(labelmaps, segmentIndex = 1, volumeId = 'mergedLabelmap') {
|
|
4898
4895
|
labelmaps.forEach(({ direction, dimensions, origin, spacing }) => {
|
|
@@ -4931,11 +4928,11 @@ function createMergedLabelmapForIndex(labelmaps, segmentIndex = 1, volumeId = 'm
|
|
|
4931
4928
|
|
|
4932
4929
|
/***/ }),
|
|
4933
4930
|
|
|
4934
|
-
/***/
|
|
4931
|
+
/***/ 2680:
|
|
4935
4932
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4936
4933
|
|
|
4937
4934
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4938
|
-
/* harmony export */
|
|
4935
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4939
4936
|
/* harmony export */ });
|
|
4940
4937
|
function floodFill(getter, seed, options = {}) {
|
|
4941
4938
|
const onFlood = options.onFlood;
|
|
@@ -5063,21 +5060,21 @@ function lpad(string, character, length) {
|
|
|
5063
5060
|
|
|
5064
5061
|
/***/ }),
|
|
5065
5062
|
|
|
5066
|
-
/***/
|
|
5063
|
+
/***/ 8297:
|
|
5067
5064
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5068
5065
|
|
|
5069
5066
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5070
|
-
/* harmony export */
|
|
5067
|
+
/* harmony export */ Z: () => (/* binding */ getDefaultRepresentationConfig)
|
|
5071
5068
|
/* harmony export */ });
|
|
5072
|
-
/* harmony import */ var _tools_displayTools_Labelmap_labelmapConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5073
|
-
/* harmony import */ var _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5069
|
+
/* harmony import */ var _tools_displayTools_Labelmap_labelmapConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35904);
|
|
5070
|
+
/* harmony import */ var _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74297);
|
|
5074
5071
|
|
|
5075
5072
|
|
|
5076
5073
|
function getDefaultRepresentationConfig(segmentation) {
|
|
5077
5074
|
const { type: representationType } = segmentation;
|
|
5078
5075
|
switch (representationType) {
|
|
5079
|
-
case _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__
|
|
5080
|
-
return (0,_tools_displayTools_Labelmap_labelmapConfig__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
5076
|
+
case _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__["default"].Labelmap:
|
|
5077
|
+
return (0,_tools_displayTools_Labelmap_labelmapConfig__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)();
|
|
5081
5078
|
default:
|
|
5082
5079
|
throw new Error(`Unknown representation type: ${representationType}`);
|
|
5083
5080
|
}
|
|
@@ -5086,21 +5083,21 @@ function getDefaultRepresentationConfig(segmentation) {
|
|
|
5086
5083
|
|
|
5087
5084
|
/***/ }),
|
|
5088
5085
|
|
|
5089
|
-
/***/
|
|
5086
|
+
/***/ 5992:
|
|
5090
5087
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5091
5088
|
|
|
5092
5089
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5093
|
-
/* harmony export */
|
|
5090
|
+
/* harmony export */ P: () => (/* binding */ getHoveredContourSegmentationAnnotation)
|
|
5094
5091
|
/* harmony export */ });
|
|
5095
|
-
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5096
|
-
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5092
|
+
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50097);
|
|
5093
|
+
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14305);
|
|
5097
5094
|
|
|
5098
5095
|
|
|
5099
5096
|
function getHoveredContourSegmentationAnnotation(segmentationId) {
|
|
5100
5097
|
const segmentation = (0,_stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_1__.getSegmentation)(segmentationId);
|
|
5101
5098
|
const { annotationUIDsMap } = segmentation.representationData.CONTOUR;
|
|
5102
5099
|
for (const [segmentIndex, annotationUIDs] of annotationUIDsMap.entries()) {
|
|
5103
|
-
const highlightedAnnotationUID = Array.from(annotationUIDs).find((annotationUID) => (0,_stateManagement__WEBPACK_IMPORTED_MODULE_0__/* .getAnnotation */ .
|
|
5100
|
+
const highlightedAnnotationUID = Array.from(annotationUIDs).find((annotationUID) => (0,_stateManagement__WEBPACK_IMPORTED_MODULE_0__/* .getAnnotation */ .AR)(annotationUID).highlighted);
|
|
5104
5101
|
if (highlightedAnnotationUID) {
|
|
5105
5102
|
return segmentIndex;
|
|
5106
5103
|
}
|
|
@@ -5111,22 +5108,22 @@ function getHoveredContourSegmentationAnnotation(segmentationId) {
|
|
|
5111
5108
|
|
|
5112
5109
|
/***/ }),
|
|
5113
5110
|
|
|
5114
|
-
/***/
|
|
5111
|
+
/***/ 50972:
|
|
5115
5112
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5116
5113
|
|
|
5117
5114
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5118
|
-
/* harmony export */
|
|
5115
|
+
/* harmony export */ T: () => (/* binding */ getSegmentAtLabelmapBorder)
|
|
5119
5116
|
/* harmony export */ });
|
|
5120
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5121
|
-
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5122
|
-
/* harmony import */ var _tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
5117
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
5118
|
+
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14305);
|
|
5119
|
+
/* harmony import */ var _tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88439);
|
|
5123
5120
|
|
|
5124
5121
|
|
|
5125
5122
|
|
|
5126
5123
|
function getSegmentAtLabelmapBorder(segmentationId, worldPoint, { viewport, searchRadius }) {
|
|
5127
5124
|
const segmentation = (0,_stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_1__.getSegmentation)(segmentationId);
|
|
5128
5125
|
const labelmapData = segmentation.representationData.LABELMAP;
|
|
5129
|
-
if ((0,_tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_2__/* .isVolumeSegmentation */ .
|
|
5126
|
+
if ((0,_tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_2__/* .isVolumeSegmentation */ .y)(labelmapData)) {
|
|
5130
5127
|
const { volumeId } = labelmapData;
|
|
5131
5128
|
const segmentationVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
|
|
5132
5129
|
if (!segmentationVolume) {
|
|
@@ -5197,19 +5194,19 @@ function isSegmentOnEdgeCanvas(canvasPoint, segmentIndex, viewport, imageData, s
|
|
|
5197
5194
|
|
|
5198
5195
|
/***/ }),
|
|
5199
5196
|
|
|
5200
|
-
/***/
|
|
5197
|
+
/***/ 47138:
|
|
5201
5198
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5202
5199
|
|
|
5203
5200
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5204
|
-
/* harmony export */
|
|
5201
|
+
/* harmony export */ uA: () => (/* binding */ getSegmentAtWorldPoint)
|
|
5205
5202
|
/* harmony export */ });
|
|
5206
5203
|
/* unused harmony exports getSegmentAtWorldForLabelmap, getSegmentAtWorldForContour */
|
|
5207
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5208
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5209
|
-
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
5210
|
-
/* harmony import */ var _tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
5211
|
-
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
5212
|
-
/* harmony import */ var _math_polyline__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
5204
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
5205
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
5206
|
+
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14305);
|
|
5207
|
+
/* harmony import */ var _tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(88439);
|
|
5208
|
+
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50097);
|
|
5209
|
+
/* harmony import */ var _math_polyline__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42744);
|
|
5213
5210
|
|
|
5214
5211
|
|
|
5215
5212
|
|
|
@@ -5234,7 +5231,7 @@ function getSegmentAtWorldPoint(segmentationId, worldPoint, options = {}) {
|
|
|
5234
5231
|
}
|
|
5235
5232
|
function getSegmentAtWorldForLabelmap(segmentation, worldPoint, { viewport }) {
|
|
5236
5233
|
const labelmapData = segmentation.representationData.LABELMAP;
|
|
5237
|
-
if ((0,_tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_3__/* .isVolumeSegmentation */ .
|
|
5234
|
+
if ((0,_tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_3__/* .isVolumeSegmentation */ .y)(labelmapData)) {
|
|
5238
5235
|
const { volumeId } = labelmapData;
|
|
5239
5236
|
const segmentationVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(volumeId);
|
|
5240
5237
|
if (!segmentationVolume) {
|
|
@@ -5271,7 +5268,7 @@ function getSegmentAtWorldForContour(segmentation, worldPoint, { viewport }) {
|
|
|
5271
5268
|
continue;
|
|
5272
5269
|
}
|
|
5273
5270
|
for (const annotationUID of annotationsSet) {
|
|
5274
|
-
const annotation = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .getAnnotation */ .
|
|
5271
|
+
const annotation = (0,_stateManagement__WEBPACK_IMPORTED_MODULE_4__/* .getAnnotation */ .AR)(annotationUID);
|
|
5275
5272
|
if (!annotation) {
|
|
5276
5273
|
continue;
|
|
5277
5274
|
}
|
|
@@ -5289,16 +5286,16 @@ function getSegmentAtWorldForContour(segmentation, worldPoint, { viewport }) {
|
|
|
5289
5286
|
|
|
5290
5287
|
/***/ }),
|
|
5291
5288
|
|
|
5292
|
-
/***/
|
|
5289
|
+
/***/ 4229:
|
|
5293
5290
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5294
5291
|
|
|
5295
5292
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5296
|
-
/* harmony export */
|
|
5293
|
+
/* harmony export */ C: () => (/* binding */ invalidateBrushCursor)
|
|
5297
5294
|
/* harmony export */ });
|
|
5298
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5299
|
-
/* harmony import */ var _triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5300
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
5301
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
5295
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27078);
|
|
5296
|
+
/* harmony import */ var _triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66878);
|
|
5297
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62709);
|
|
5298
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89776);
|
|
5302
5299
|
|
|
5303
5300
|
|
|
5304
5301
|
|
|
@@ -5308,7 +5305,7 @@ function invalidateBrushCursor(toolGroupId) {
|
|
|
5308
5305
|
if (toolGroup === undefined) {
|
|
5309
5306
|
return;
|
|
5310
5307
|
}
|
|
5311
|
-
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .
|
|
5308
|
+
const brushBasedToolInstances = (0,_utilities__WEBPACK_IMPORTED_MODULE_3__/* .getBrushToolInstances */ .Xb)(toolGroupId);
|
|
5312
5309
|
brushBasedToolInstances.forEach((tool) => {
|
|
5313
5310
|
tool.invalidateBrushCursor();
|
|
5314
5311
|
});
|
|
@@ -5320,26 +5317,26 @@ function invalidateBrushCursor(toolGroupId) {
|
|
|
5320
5317
|
const { renderingEngineId } = viewportsInfoArray[0];
|
|
5321
5318
|
const viewportIds = toolGroup.getViewportIds();
|
|
5322
5319
|
const renderingEngine = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__.getRenderingEngine)(renderingEngineId);
|
|
5323
|
-
(0,_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
5320
|
+
(0,_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(renderingEngine, viewportIds);
|
|
5324
5321
|
}
|
|
5325
5322
|
|
|
5326
5323
|
|
|
5327
5324
|
/***/ }),
|
|
5328
5325
|
|
|
5329
|
-
/***/
|
|
5326
|
+
/***/ 75702:
|
|
5330
5327
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5331
5328
|
|
|
5332
5329
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5333
|
-
/* harmony export */
|
|
5330
|
+
/* harmony export */ Z: () => (/* binding */ isValidRepresentationConfig)
|
|
5334
5331
|
/* harmony export */ });
|
|
5335
|
-
/* harmony import */ var _tools_displayTools_Labelmap_labelmapConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5336
|
-
/* harmony import */ var _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5332
|
+
/* harmony import */ var _tools_displayTools_Labelmap_labelmapConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35904);
|
|
5333
|
+
/* harmony import */ var _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74297);
|
|
5337
5334
|
|
|
5338
5335
|
|
|
5339
5336
|
function isValidRepresentationConfig(representationType, config) {
|
|
5340
5337
|
switch (representationType) {
|
|
5341
|
-
case _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__
|
|
5342
|
-
return (0,_tools_displayTools_Labelmap_labelmapConfig__WEBPACK_IMPORTED_MODULE_0__/* .isValidLabelmapConfig */ .
|
|
5338
|
+
case _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__["default"].Labelmap:
|
|
5339
|
+
return (0,_tools_displayTools_Labelmap_labelmapConfig__WEBPACK_IMPORTED_MODULE_0__/* .isValidLabelmapConfig */ .R)(config);
|
|
5343
5340
|
default:
|
|
5344
5341
|
throw new Error(`Unknown representation type: ${representationType}`);
|
|
5345
5342
|
}
|
|
@@ -5348,16 +5345,16 @@ function isValidRepresentationConfig(representationType, config) {
|
|
|
5348
5345
|
|
|
5349
5346
|
/***/ }),
|
|
5350
5347
|
|
|
5351
|
-
/***/
|
|
5348
|
+
/***/ 69367:
|
|
5352
5349
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5353
5350
|
|
|
5354
5351
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5355
|
-
/* harmony export */
|
|
5352
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5356
5353
|
/* harmony export */ });
|
|
5357
|
-
/* harmony import */ var _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5358
|
-
/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5359
|
-
/* harmony import */ var _thresholdVolumeByRange__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
5360
|
-
/* harmony import */ var _rectangleROITool_getBoundsIJKFromRectangleAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
5354
|
+
/* harmony import */ var _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(88706);
|
|
5355
|
+
/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42486);
|
|
5356
|
+
/* harmony import */ var _thresholdVolumeByRange__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10018);
|
|
5357
|
+
/* harmony import */ var _rectangleROITool_getBoundsIJKFromRectangleAnnotations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35765);
|
|
5361
5358
|
|
|
5362
5359
|
|
|
5363
5360
|
|
|
@@ -5371,17 +5368,17 @@ function rectangleROIThresholdVolumeByRange(annotationUIDs, segmentationVolume,
|
|
|
5371
5368
|
for (let i = 0; i < thresholdVolumeInformation.length; i++) {
|
|
5372
5369
|
const volumeSize = thresholdVolumeInformation[i].volume.getScalarData().length;
|
|
5373
5370
|
if (volumeSize === segmentationVolume.getScalarData().length || i === 0) {
|
|
5374
|
-
boundsIJK = (0,_rectangleROITool_getBoundsIJKFromRectangleAnnotations__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .
|
|
5371
|
+
boundsIJK = (0,_rectangleROITool_getBoundsIJKFromRectangleAnnotations__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(annotations, thresholdVolumeInformation[i].volume, options);
|
|
5375
5372
|
}
|
|
5376
5373
|
}
|
|
5377
|
-
const outputSegmentationVolume = (0,_thresholdVolumeByRange__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .
|
|
5374
|
+
const outputSegmentationVolume = (0,_thresholdVolumeByRange__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(segmentationVolume, thresholdVolumeInformation, { ...options, boundsIJK });
|
|
5378
5375
|
outputSegmentationVolume.modified();
|
|
5379
5376
|
return outputSegmentationVolume;
|
|
5380
5377
|
}
|
|
5381
5378
|
function _validateAnnotations(annotations) {
|
|
5382
5379
|
const validToolNames = [
|
|
5383
|
-
_tools__WEBPACK_IMPORTED_MODULE_1__/* .RectangleROIThresholdTool */ .
|
|
5384
|
-
_tools__WEBPACK_IMPORTED_MODULE_1__/* .RectangleROIStartEndThresholdTool */ .
|
|
5380
|
+
_tools__WEBPACK_IMPORTED_MODULE_1__/* .RectangleROIThresholdTool */ .Cd.toolName,
|
|
5381
|
+
_tools__WEBPACK_IMPORTED_MODULE_1__/* .RectangleROIStartEndThresholdTool */ .Qt.toolName,
|
|
5385
5382
|
];
|
|
5386
5383
|
for (const annotation of annotations) {
|
|
5387
5384
|
const name = annotation.metadata.toolName;
|
|
@@ -5395,20 +5392,20 @@ function _validateAnnotations(annotations) {
|
|
|
5395
5392
|
|
|
5396
5393
|
/***/ }),
|
|
5397
5394
|
|
|
5398
|
-
/***/
|
|
5395
|
+
/***/ 61999:
|
|
5399
5396
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5400
5397
|
|
|
5401
5398
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5402
|
-
/* harmony export */
|
|
5399
|
+
/* harmony export */ Z: () => (/* binding */ segmentContourAction)
|
|
5403
5400
|
/* harmony export */ });
|
|
5404
5401
|
/* unused harmony export defaultGetSegment */
|
|
5405
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5406
|
-
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5407
|
-
/* harmony import */ var _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
5408
|
-
/* harmony import */ var _viewport__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
5409
|
-
/* harmony import */ var _contourAndFindLargestBidirectional__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
5410
|
-
/* harmony import */ var _createBidirectionalToolData__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
5411
|
-
/* harmony import */ var _tools_annotation_BidirectionalTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
5402
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
5403
|
+
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95482);
|
|
5404
|
+
/* harmony import */ var _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88706);
|
|
5405
|
+
/* harmony import */ var _viewport__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(85217);
|
|
5406
|
+
/* harmony import */ var _contourAndFindLargestBidirectional__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74484);
|
|
5407
|
+
/* harmony import */ var _createBidirectionalToolData__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36059);
|
|
5408
|
+
/* harmony import */ var _tools_annotation_BidirectionalTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(56611);
|
|
5412
5409
|
|
|
5413
5410
|
|
|
5414
5411
|
|
|
@@ -5426,7 +5423,7 @@ function segmentContourAction(element, configuration) {
|
|
|
5426
5423
|
const FrameOfReferenceUID = enabledElement.viewport.getFrameOfReferenceUID();
|
|
5427
5424
|
const segmentationsList = _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_1__.state.getSegmentations();
|
|
5428
5425
|
const { segmentIndex, segmentationId } = segment;
|
|
5429
|
-
const bidirectionals = _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_2__.state.getAnnotations(this.toolName || _tools_annotation_BidirectionalTool__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .
|
|
5426
|
+
const bidirectionals = _stateManagement_annotation__WEBPACK_IMPORTED_MODULE_2__.state.getAnnotations(this.toolName || _tools_annotation_BidirectionalTool__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.toolName, FrameOfReferenceUID);
|
|
5430
5427
|
let hasExistingActiveSegment = false;
|
|
5431
5428
|
const existingLargestBidirectionals = bidirectionals.filter((existingBidirectionalItem) => {
|
|
5432
5429
|
const { segment } = existingBidirectionalItem.data;
|
|
@@ -5452,14 +5449,14 @@ function segmentContourAction(element, configuration) {
|
|
|
5452
5449
|
const { segmentIndex, segmentationId } = updateSegment;
|
|
5453
5450
|
segments[segmentIndex] = updateSegment;
|
|
5454
5451
|
_stateManagement_annotation__WEBPACK_IMPORTED_MODULE_2__.state.removeAnnotation(existingLargestBidirectional.annotationUID);
|
|
5455
|
-
const bidirectionalData = (0,_contourAndFindLargestBidirectional__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .
|
|
5452
|
+
const bidirectionalData = (0,_contourAndFindLargestBidirectional__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({
|
|
5456
5453
|
...segmentationsList.find((segmentation) => segmentation.segmentationId === segmentationId),
|
|
5457
5454
|
segments,
|
|
5458
5455
|
});
|
|
5459
5456
|
if (!bidirectionalData) {
|
|
5460
5457
|
return;
|
|
5461
5458
|
}
|
|
5462
|
-
const bidirectionalToolData = (0,_createBidirectionalToolData__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .
|
|
5459
|
+
const bidirectionalToolData = (0,_createBidirectionalToolData__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(bidirectionalData, enabledElement.viewport);
|
|
5463
5460
|
bidirectionalToolData.annotationUID =
|
|
5464
5461
|
existingLargestBidirectional.annotationUID;
|
|
5465
5462
|
bidirectionalToolData.data.segment = updateSegment;
|
|
@@ -5509,21 +5506,21 @@ function defaultGetSegment(enabledElement, configuration) {
|
|
|
5509
5506
|
|
|
5510
5507
|
/***/ }),
|
|
5511
5508
|
|
|
5512
|
-
/***/
|
|
5509
|
+
/***/ 42425:
|
|
5513
5510
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5514
5511
|
|
|
5515
5512
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5516
|
-
/* harmony export */
|
|
5513
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5517
5514
|
/* harmony export */ });
|
|
5518
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5519
|
-
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5520
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
5515
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42975);
|
|
5516
|
+
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32140);
|
|
5517
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89776);
|
|
5521
5518
|
|
|
5522
5519
|
|
|
5523
5520
|
|
|
5524
5521
|
function thresholdSegmentationByRange(segmentationVolume, segmentationIndex, thresholdVolumeInformation, overlapType) {
|
|
5525
5522
|
const scalarData = segmentationVolume.getScalarData();
|
|
5526
|
-
const { baseVolumeIdx, volumeInfoList } = (0,_utilities__WEBPACK_IMPORTED_MODULE_2__/* .processVolumes */ .
|
|
5523
|
+
const { baseVolumeIdx, volumeInfoList } = (0,_utilities__WEBPACK_IMPORTED_MODULE_2__/* .processVolumes */ .Ep)(segmentationVolume, thresholdVolumeInformation);
|
|
5527
5524
|
volumeInfoList.forEach((volumeInfo) => {
|
|
5528
5525
|
const { volumeSize } = volumeInfo;
|
|
5529
5526
|
if (volumeSize === scalarData.length) {
|
|
@@ -5541,7 +5538,7 @@ function _handleDifferentSizeVolume(scalarData, segmentationIndex, volumeInfo, v
|
|
|
5541
5538
|
let total, overlaps, range;
|
|
5542
5539
|
for (let i = 0; i < scalarData.length; i++) {
|
|
5543
5540
|
if (scalarData[i] === segmentationIndex) {
|
|
5544
|
-
const overlapBounds = (0,_utilities__WEBPACK_IMPORTED_MODULE_2__/* .getVoxelOverlap */ .
|
|
5541
|
+
const overlapBounds = (0,_utilities__WEBPACK_IMPORTED_MODULE_2__/* .getVoxelOverlap */ .yW)(imageData, dimensions, volumeInfoList[baseVolumeIdx].spacing, volumeInfoList[baseVolumeIdx].imageData.getPoint(i));
|
|
5545
5542
|
const callbackOverlap = ({ value }) => {
|
|
5546
5543
|
total = total + 1;
|
|
5547
5544
|
if (value >= range.lower && value <= range.upper) {
|
|
@@ -5573,15 +5570,15 @@ function _handleSameSizeVolume(scalarData, segmentationIndex, volumeInfo) {
|
|
|
5573
5570
|
|
|
5574
5571
|
/***/ }),
|
|
5575
5572
|
|
|
5576
|
-
/***/
|
|
5573
|
+
/***/ 10018:
|
|
5577
5574
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5578
5575
|
|
|
5579
5576
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5580
|
-
/* harmony export */
|
|
5577
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5581
5578
|
/* harmony export */ });
|
|
5582
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5583
|
-
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5584
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
5579
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42975);
|
|
5580
|
+
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32140);
|
|
5581
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89776);
|
|
5585
5582
|
|
|
5586
5583
|
|
|
5587
5584
|
|
|
@@ -5595,7 +5592,7 @@ function thresholdVolumeByRange(segmentationVolume, thresholdVolumeInformation,
|
|
|
5595
5592
|
scalarData[i] = 0;
|
|
5596
5593
|
}
|
|
5597
5594
|
}
|
|
5598
|
-
const { baseVolumeIdx, volumeInfoList } = (0,_utilities__WEBPACK_IMPORTED_MODULE_2__/* .processVolumes */ .
|
|
5595
|
+
const { baseVolumeIdx, volumeInfoList } = (0,_utilities__WEBPACK_IMPORTED_MODULE_2__/* .processVolumes */ .Ep)(segmentationVolume, thresholdVolumeInformation);
|
|
5599
5596
|
let overlaps, total, range;
|
|
5600
5597
|
const testOverlapRange = (volumeInfo, voxelSpacing, voxelCenter) => {
|
|
5601
5598
|
const callbackOverlap = ({ value }) => {
|
|
@@ -5605,7 +5602,7 @@ function thresholdVolumeByRange(segmentationVolume, thresholdVolumeInformation,
|
|
|
5605
5602
|
}
|
|
5606
5603
|
};
|
|
5607
5604
|
const { imageData, dimensions, lower, upper } = volumeInfo;
|
|
5608
|
-
const overlapBounds = (0,_utilities__WEBPACK_IMPORTED_MODULE_2__/* .getVoxelOverlap */ .
|
|
5605
|
+
const overlapBounds = (0,_utilities__WEBPACK_IMPORTED_MODULE_2__/* .getVoxelOverlap */ .yW)(imageData, dimensions, voxelSpacing, voxelCenter);
|
|
5609
5606
|
total = 0;
|
|
5610
5607
|
overlaps = 0;
|
|
5611
5608
|
range = { lower, upper };
|
|
@@ -5656,18 +5653,18 @@ function thresholdVolumeByRange(segmentationVolume, thresholdVolumeInformation,
|
|
|
5656
5653
|
|
|
5657
5654
|
/***/ }),
|
|
5658
5655
|
|
|
5659
|
-
/***/
|
|
5656
|
+
/***/ 89776:
|
|
5660
5657
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5661
5658
|
|
|
5662
5659
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5663
|
-
/* harmony export */
|
|
5664
|
-
/* harmony export */
|
|
5665
|
-
/* harmony export */
|
|
5660
|
+
/* harmony export */ Ep: () => (/* binding */ processVolumes),
|
|
5661
|
+
/* harmony export */ Xb: () => (/* binding */ getBrushToolInstances),
|
|
5662
|
+
/* harmony export */ yW: () => (/* binding */ getVoxelOverlap)
|
|
5666
5663
|
/* harmony export */ });
|
|
5667
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
5668
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
5669
|
-
/* harmony import */ var _tools_segmentation_BrushTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
5670
|
-
/* harmony import */ var _boundingBox_getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
5664
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
5665
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27078);
|
|
5666
|
+
/* harmony import */ var _tools_segmentation_BrushTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95459);
|
|
5667
|
+
/* harmony import */ var _boundingBox_getBoundingBoxAroundShape__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64652);
|
|
5671
5668
|
|
|
5672
5669
|
|
|
5673
5670
|
|
|
@@ -5684,7 +5681,7 @@ function getBrushToolInstances(toolGroupId, toolName) {
|
|
|
5684
5681
|
if (toolName && toolInstances[toolName]) {
|
|
5685
5682
|
return [toolInstances[toolName]];
|
|
5686
5683
|
}
|
|
5687
|
-
const brushBasedToolInstances = Object.values(toolInstances).filter((toolInstance) => toolInstance instanceof _tools_segmentation_BrushTool__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .
|
|
5684
|
+
const brushBasedToolInstances = Object.values(toolInstances).filter((toolInstance) => toolInstance instanceof _tools_segmentation_BrushTool__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
|
|
5688
5685
|
return brushBasedToolInstances;
|
|
5689
5686
|
}
|
|
5690
5687
|
const equalsCheck = (a, b) => {
|
|
@@ -5741,22 +5738,22 @@ function processVolumes(segmentationVolume, thresholdVolumeInformation) {
|
|
|
5741
5738
|
|
|
5742
5739
|
/***/ }),
|
|
5743
5740
|
|
|
5744
|
-
/***/
|
|
5741
|
+
/***/ 2185:
|
|
5745
5742
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5746
5743
|
|
|
5747
5744
|
|
|
5748
5745
|
// EXPORTS
|
|
5749
5746
|
__webpack_require__.d(__webpack_exports__, {
|
|
5750
|
-
|
|
5751
|
-
|
|
5747
|
+
l: () => (/* reexport */ stackPrefetch_stackContextPrefetch),
|
|
5748
|
+
U: () => (/* reexport */ stackPrefetch_stackPrefetch)
|
|
5752
5749
|
});
|
|
5753
5750
|
|
|
5754
5751
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
5755
|
-
var esm = __webpack_require__(
|
|
5752
|
+
var esm = __webpack_require__(62709);
|
|
5756
5753
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/stackPrefetch/state.js
|
|
5757
|
-
var state = __webpack_require__(
|
|
5754
|
+
var state = __webpack_require__(22446);
|
|
5758
5755
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/stackPrefetch/stackPrefetchUtils.js
|
|
5759
|
-
var stackPrefetchUtils = __webpack_require__(
|
|
5756
|
+
var stackPrefetchUtils = __webpack_require__(93471);
|
|
5760
5757
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/stackPrefetch/stackPrefetch.js
|
|
5761
5758
|
|
|
5762
5759
|
|
|
@@ -5768,12 +5765,12 @@ let configuration = {
|
|
|
5768
5765
|
let resetPrefetchTimeout;
|
|
5769
5766
|
const resetPrefetchDelay = 10;
|
|
5770
5767
|
function prefetch(element) {
|
|
5771
|
-
const stackPrefetchData = (0,state/* getToolState */.
|
|
5768
|
+
const stackPrefetchData = (0,state/* getToolState */.T)(element);
|
|
5772
5769
|
if (!stackPrefetchData) {
|
|
5773
5770
|
return;
|
|
5774
5771
|
}
|
|
5775
5772
|
const stackPrefetch = stackPrefetchData || {};
|
|
5776
|
-
const stack = (0,stackPrefetchUtils/* getStackData */.
|
|
5773
|
+
const stack = (0,stackPrefetchUtils/* getStackData */.gf)(element);
|
|
5777
5774
|
if (!stack?.imageIds?.length) {
|
|
5778
5775
|
console.warn('CornerstoneTools.stackPrefetch: No images in stack.');
|
|
5779
5776
|
return;
|
|
@@ -5808,9 +5805,9 @@ function prefetch(element) {
|
|
|
5808
5805
|
return;
|
|
5809
5806
|
}
|
|
5810
5807
|
if (!configuration.preserveExistingPool) {
|
|
5811
|
-
esm.imageLoadPoolManager.clearRequestStack(stackPrefetchUtils/* requestType */.
|
|
5808
|
+
esm.imageLoadPoolManager.clearRequestStack(stackPrefetchUtils/* requestType */.rI);
|
|
5812
5809
|
}
|
|
5813
|
-
const nearest = (0,stackPrefetchUtils/* nearestIndex */.
|
|
5810
|
+
const nearest = (0,stackPrefetchUtils/* nearestIndex */.cD)(stackPrefetch.indicesToRequest, stack.currentImageIdIndex);
|
|
5814
5811
|
let imageId;
|
|
5815
5812
|
let nextImageIdIndex;
|
|
5816
5813
|
const preventCache = false;
|
|
@@ -5857,11 +5854,11 @@ function prefetch(element) {
|
|
|
5857
5854
|
enabled: true,
|
|
5858
5855
|
},
|
|
5859
5856
|
useNativeDataType,
|
|
5860
|
-
requestType: stackPrefetchUtils/* requestType */.
|
|
5857
|
+
requestType: stackPrefetchUtils/* requestType */.rI,
|
|
5861
5858
|
};
|
|
5862
|
-
esm.imageLoadPoolManager.addRequest(requestFn.bind(null, imageId, options), stackPrefetchUtils/* requestType */.
|
|
5859
|
+
esm.imageLoadPoolManager.addRequest(requestFn.bind(null, imageId, options), stackPrefetchUtils/* requestType */.rI, {
|
|
5863
5860
|
imageId,
|
|
5864
|
-
}, stackPrefetchUtils/* priority */.
|
|
5861
|
+
}, stackPrefetchUtils/* priority */.O3);
|
|
5865
5862
|
});
|
|
5866
5863
|
}
|
|
5867
5864
|
function onImageUpdated(e) {
|
|
@@ -5877,35 +5874,35 @@ function onImageUpdated(e) {
|
|
|
5877
5874
|
}, resetPrefetchDelay);
|
|
5878
5875
|
}
|
|
5879
5876
|
function enable(element) {
|
|
5880
|
-
const stack = (0,stackPrefetchUtils/* getStackData */.
|
|
5877
|
+
const stack = (0,stackPrefetchUtils/* getStackData */.gf)(element);
|
|
5881
5878
|
if (!stack || !stack.imageIds || stack.imageIds.length === 0) {
|
|
5882
5879
|
console.warn('CornerstoneTools.stackPrefetch: No images in stack.');
|
|
5883
5880
|
return;
|
|
5884
5881
|
}
|
|
5885
5882
|
const stackPrefetchData = {
|
|
5886
|
-
indicesToRequest: (0,stackPrefetchUtils/* range */.
|
|
5883
|
+
indicesToRequest: (0,stackPrefetchUtils/* range */.w6)(0, stack.imageIds.length - 1),
|
|
5887
5884
|
enabled: true,
|
|
5888
5885
|
direction: 1,
|
|
5889
5886
|
};
|
|
5890
5887
|
const indexOfCurrentImage = stackPrefetchData.indicesToRequest.indexOf(stack.currentImageIdIndex);
|
|
5891
5888
|
stackPrefetchData.indicesToRequest.splice(indexOfCurrentImage, 1);
|
|
5892
|
-
(0,state/* addToolState */.
|
|
5889
|
+
(0,state/* addToolState */.w)(element, stackPrefetchData);
|
|
5893
5890
|
prefetch(element);
|
|
5894
5891
|
element.removeEventListener(esm.Enums.Events.STACK_NEW_IMAGE, onImageUpdated);
|
|
5895
5892
|
element.addEventListener(esm.Enums.Events.STACK_NEW_IMAGE, onImageUpdated);
|
|
5896
|
-
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.
|
|
5893
|
+
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.mN)(element);
|
|
5897
5894
|
esm.eventTarget.removeEventListener(esm.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
5898
5895
|
esm.eventTarget.addEventListener(esm.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
5899
5896
|
}
|
|
5900
5897
|
function disable(element) {
|
|
5901
5898
|
clearTimeout(resetPrefetchTimeout);
|
|
5902
5899
|
element.removeEventListener(esm.Enums.Events.STACK_NEW_IMAGE, onImageUpdated);
|
|
5903
|
-
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.
|
|
5900
|
+
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.mN)(element);
|
|
5904
5901
|
esm.eventTarget.removeEventListener(esm.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
5905
|
-
const stackPrefetchData = (0,state/* getToolState */.
|
|
5902
|
+
const stackPrefetchData = (0,state/* getToolState */.T)(element);
|
|
5906
5903
|
if (stackPrefetchData && stackPrefetchData.indicesToRequest.length) {
|
|
5907
5904
|
stackPrefetchData.enabled = false;
|
|
5908
|
-
esm.imageLoadPoolManager.clearRequestStack(stackPrefetchUtils/* requestType */.
|
|
5905
|
+
esm.imageLoadPoolManager.clearRequestStack(stackPrefetchUtils/* requestType */.rI);
|
|
5909
5906
|
}
|
|
5910
5907
|
}
|
|
5911
5908
|
function getConfiguration() {
|
|
@@ -5918,7 +5915,7 @@ const stackPrefetch = { enable, disable, getConfiguration, setConfiguration };
|
|
|
5918
5915
|
/* harmony default export */ const stackPrefetch_stackPrefetch = (stackPrefetch);
|
|
5919
5916
|
|
|
5920
5917
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/index.js + 1 modules
|
|
5921
|
-
var utilities = __webpack_require__(
|
|
5918
|
+
var utilities = __webpack_require__(42975);
|
|
5922
5919
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/stackPrefetch/stackContextPrefetch.js
|
|
5923
5920
|
|
|
5924
5921
|
|
|
@@ -5934,7 +5931,7 @@ let stackContextPrefetch_configuration = {
|
|
|
5934
5931
|
let stackContextPrefetch_resetPrefetchTimeout;
|
|
5935
5932
|
const stackContextPrefetch_resetPrefetchDelay = 5;
|
|
5936
5933
|
const stackContextPrefetch_enable = (element) => {
|
|
5937
|
-
const stack = (0,stackPrefetchUtils/* getStackData */.
|
|
5934
|
+
const stack = (0,stackPrefetchUtils/* getStackData */.gf)(element);
|
|
5938
5935
|
if (!stack || !stack.imageIds || stack.imageIds.length === 0) {
|
|
5939
5936
|
console.warn('CornerstoneTools.stackPrefetch: No images in stack.');
|
|
5940
5937
|
return;
|
|
@@ -5943,17 +5940,17 @@ const stackContextPrefetch_enable = (element) => {
|
|
|
5943
5940
|
stackContextPrefetch_prefetch(element);
|
|
5944
5941
|
element.removeEventListener(esm.Enums.Events.STACK_NEW_IMAGE, stackContextPrefetch_onImageUpdated);
|
|
5945
5942
|
element.addEventListener(esm.Enums.Events.STACK_NEW_IMAGE, stackContextPrefetch_onImageUpdated);
|
|
5946
|
-
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.
|
|
5943
|
+
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.mN)(element);
|
|
5947
5944
|
esm.eventTarget.removeEventListener(esm.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
5948
5945
|
esm.eventTarget.addEventListener(esm.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
5949
5946
|
};
|
|
5950
5947
|
function stackContextPrefetch_prefetch(element) {
|
|
5951
|
-
const stack = (0,stackPrefetchUtils/* getStackData */.
|
|
5948
|
+
const stack = (0,stackPrefetchUtils/* getStackData */.gf)(element);
|
|
5952
5949
|
if (!stack?.imageIds?.length) {
|
|
5953
5950
|
console.warn('CornerstoneTools.stackPrefetch: No images in stack.');
|
|
5954
5951
|
return;
|
|
5955
5952
|
}
|
|
5956
|
-
const stackPrefetchData = (0,state/* getToolState */.
|
|
5953
|
+
const stackPrefetchData = (0,state/* getToolState */.T)(element);
|
|
5957
5954
|
if (!stackPrefetchData) {
|
|
5958
5955
|
return;
|
|
5959
5956
|
}
|
|
@@ -5987,7 +5984,7 @@ function stackContextPrefetch_prefetch(element) {
|
|
|
5987
5984
|
return;
|
|
5988
5985
|
}
|
|
5989
5986
|
if (!stackContextPrefetch_configuration.preserveExistingPool) {
|
|
5990
|
-
esm.imageLoadPoolManager.filterRequests((0,stackPrefetchUtils/* clearFromImageIds */.
|
|
5987
|
+
esm.imageLoadPoolManager.filterRequests((0,stackPrefetchUtils/* clearFromImageIds */.EI)(stack));
|
|
5991
5988
|
}
|
|
5992
5989
|
function doneCallback(imageId) {
|
|
5993
5990
|
const imageIdIndex = stack.imageIds.indexOf(imageId);
|
|
@@ -6034,11 +6031,11 @@ function stackContextPrefetch_prefetch(element) {
|
|
|
6034
6031
|
enabled: true,
|
|
6035
6032
|
},
|
|
6036
6033
|
useNativeDataType,
|
|
6037
|
-
requestType: stackPrefetchUtils/* requestType */.
|
|
6034
|
+
requestType: stackPrefetchUtils/* requestType */.rI,
|
|
6038
6035
|
};
|
|
6039
|
-
esm.imageLoadPoolManager.addRequest(requestFn.bind(null, imageId, options), stackPrefetchUtils/* requestType */.
|
|
6036
|
+
esm.imageLoadPoolManager.addRequest(requestFn.bind(null, imageId, options), stackPrefetchUtils/* requestType */.rI, {
|
|
6040
6037
|
imageId,
|
|
6041
|
-
}, stackPrefetchUtils/* priority */.
|
|
6038
|
+
}, stackPrefetchUtils/* priority */.O3);
|
|
6042
6039
|
});
|
|
6043
6040
|
}
|
|
6044
6041
|
function stackContextPrefetch_onImageUpdated(e) {
|
|
@@ -6056,7 +6053,7 @@ function stackContextPrefetch_onImageUpdated(e) {
|
|
|
6056
6053
|
}
|
|
6057
6054
|
const signum = (x) => (x < 0 ? -1 : 1);
|
|
6058
6055
|
const updateToolState = (element, usage) => {
|
|
6059
|
-
const stack = (0,stackPrefetchUtils/* getStackData */.
|
|
6056
|
+
const stack = (0,stackPrefetchUtils/* getStackData */.gf)(element);
|
|
6060
6057
|
if (!stack || !stack.imageIds || stack.imageIds.length === 0) {
|
|
6061
6058
|
console.warn('CornerstoneTools.stackPrefetch: No images in stack.');
|
|
6062
6059
|
return;
|
|
@@ -6064,7 +6061,7 @@ const updateToolState = (element, usage) => {
|
|
|
6064
6061
|
const { currentImageIdIndex } = stack;
|
|
6065
6062
|
let { maxAfter = 2, minBefore = 2 } = stackContextPrefetch_configuration;
|
|
6066
6063
|
const { directionExtraImages = 10 } = stackContextPrefetch_configuration;
|
|
6067
|
-
const stackPrefetchData = (0,state/* getToolState */.
|
|
6064
|
+
const stackPrefetchData = (0,state/* getToolState */.T)(element) || {
|
|
6068
6065
|
indicesToRequest: [],
|
|
6069
6066
|
currentImageIdIndex,
|
|
6070
6067
|
stackCount: 0,
|
|
@@ -6115,14 +6112,14 @@ const updateToolState = (element, usage) => {
|
|
|
6115
6112
|
indicesToRequest.push(i);
|
|
6116
6113
|
}
|
|
6117
6114
|
stackPrefetchData.indicesToRequest = indicesToRequest;
|
|
6118
|
-
(0,state/* addToolState */.
|
|
6115
|
+
(0,state/* addToolState */.w)(element, stackPrefetchData);
|
|
6119
6116
|
};
|
|
6120
6117
|
function stackContextPrefetch_disable(element) {
|
|
6121
6118
|
clearTimeout(stackContextPrefetch_resetPrefetchTimeout);
|
|
6122
6119
|
element.removeEventListener(esm.Enums.Events.STACK_NEW_IMAGE, stackContextPrefetch_onImageUpdated);
|
|
6123
|
-
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.
|
|
6120
|
+
const promiseRemovedHandler = (0,stackPrefetchUtils/* getPromiseRemovedHandler */.mN)(element);
|
|
6124
6121
|
esm.eventTarget.removeEventListener(esm.Enums.Events.IMAGE_CACHE_IMAGE_REMOVED, promiseRemovedHandler);
|
|
6125
|
-
const stackPrefetchData = (0,state/* getToolState */.
|
|
6122
|
+
const stackPrefetchData = (0,state/* getToolState */.T)(element);
|
|
6126
6123
|
if (stackPrefetchData) {
|
|
6127
6124
|
stackPrefetchData.enabled = false;
|
|
6128
6125
|
}
|
|
@@ -6149,14 +6146,14 @@ const stackContextPrefetch = {
|
|
|
6149
6146
|
|
|
6150
6147
|
/***/ }),
|
|
6151
6148
|
|
|
6152
|
-
/***/
|
|
6149
|
+
/***/ 90685:
|
|
6153
6150
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6154
6151
|
|
|
6155
6152
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6156
|
-
/* harmony export */
|
|
6153
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6157
6154
|
/* harmony export */ });
|
|
6158
|
-
/* harmony import */ var _debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6159
|
-
/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
6155
|
+
/* harmony import */ var _debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82298);
|
|
6156
|
+
/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73609);
|
|
6160
6157
|
|
|
6161
6158
|
|
|
6162
6159
|
function throttle(func, wait, options) {
|
|
@@ -6165,11 +6162,11 @@ function throttle(func, wait, options) {
|
|
|
6165
6162
|
if (typeof func !== 'function') {
|
|
6166
6163
|
throw new TypeError('Expected a function');
|
|
6167
6164
|
}
|
|
6168
|
-
if ((0,_isObject__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
6165
|
+
if ((0,_isObject__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(options)) {
|
|
6169
6166
|
leading = 'leading' in options ? Boolean(options.leading) : leading;
|
|
6170
6167
|
trailing = 'trailing' in options ? Boolean(options.trailing) : trailing;
|
|
6171
6168
|
}
|
|
6172
|
-
return (0,_debounce__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
6169
|
+
return (0,_debounce__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(func, wait, {
|
|
6173
6170
|
leading,
|
|
6174
6171
|
trailing,
|
|
6175
6172
|
maxWait: wait,
|
|
@@ -6180,7 +6177,7 @@ function throttle(func, wait, options) {
|
|
|
6180
6177
|
|
|
6181
6178
|
/***/ }),
|
|
6182
6179
|
|
|
6183
|
-
/***/
|
|
6180
|
+
/***/ 25068:
|
|
6184
6181
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6185
6182
|
|
|
6186
6183
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -6350,16 +6347,16 @@ function _getDistance3D(point0, point1) {
|
|
|
6350
6347
|
|
|
6351
6348
|
/***/ }),
|
|
6352
6349
|
|
|
6353
|
-
/***/
|
|
6350
|
+
/***/ 70180:
|
|
6354
6351
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6355
6352
|
|
|
6356
6353
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6357
|
-
/* harmony export */
|
|
6354
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6358
6355
|
/* harmony export */ });
|
|
6359
6356
|
/* unused harmony export triggerAnnotationRenderForToolGroupIds */
|
|
6360
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6361
|
-
/* harmony import */ var _triggerAnnotationRender__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
6362
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
6357
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
6358
|
+
/* harmony import */ var _triggerAnnotationRender__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64307);
|
|
6359
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27078);
|
|
6363
6360
|
|
|
6364
6361
|
|
|
6365
6362
|
|
|
@@ -6379,7 +6376,7 @@ function triggerAnnotationRenderForToolGroupIds(toolGroupIds) {
|
|
|
6379
6376
|
return;
|
|
6380
6377
|
}
|
|
6381
6378
|
const viewport = renderingEngine.getViewport(viewportId);
|
|
6382
|
-
(0,_triggerAnnotationRender__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
6379
|
+
(0,_triggerAnnotationRender__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(viewport.element);
|
|
6383
6380
|
});
|
|
6384
6381
|
});
|
|
6385
6382
|
}
|
|
@@ -6388,18 +6385,18 @@ function triggerAnnotationRenderForToolGroupIds(toolGroupIds) {
|
|
|
6388
6385
|
|
|
6389
6386
|
/***/ }),
|
|
6390
6387
|
|
|
6391
|
-
/***/
|
|
6388
|
+
/***/ 85217:
|
|
6392
6389
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6393
6390
|
|
|
6394
6391
|
__webpack_require__.r(__webpack_exports__);
|
|
6395
6392
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6396
|
-
/* harmony export */ isViewportPreScaled: () => (/* reexport safe */ _isViewportPreScaled__WEBPACK_IMPORTED_MODULE_0__.
|
|
6397
|
-
/* harmony export */ jumpToSlice: () => (/* reexport safe */ _jumpToSlice__WEBPACK_IMPORTED_MODULE_1__.
|
|
6398
|
-
/* harmony export */ jumpToWorld: () => (/* reexport safe */ _jumpToWorld__WEBPACK_IMPORTED_MODULE_2__.
|
|
6393
|
+
/* harmony export */ isViewportPreScaled: () => (/* reexport safe */ _isViewportPreScaled__WEBPACK_IMPORTED_MODULE_0__.P),
|
|
6394
|
+
/* harmony export */ jumpToSlice: () => (/* reexport safe */ _jumpToSlice__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
6395
|
+
/* harmony export */ jumpToWorld: () => (/* reexport safe */ _jumpToWorld__WEBPACK_IMPORTED_MODULE_2__.Z)
|
|
6399
6396
|
/* harmony export */ });
|
|
6400
|
-
/* harmony import */ var _isViewportPreScaled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6401
|
-
/* harmony import */ var _jumpToSlice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
6402
|
-
/* harmony import */ var _jumpToWorld__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
6397
|
+
/* harmony import */ var _isViewportPreScaled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20752);
|
|
6398
|
+
/* harmony import */ var _jumpToSlice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68009);
|
|
6399
|
+
/* harmony import */ var _jumpToWorld__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94451);
|
|
6403
6400
|
|
|
6404
6401
|
|
|
6405
6402
|
|
|
@@ -6408,13 +6405,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6408
6405
|
|
|
6409
6406
|
/***/ }),
|
|
6410
6407
|
|
|
6411
|
-
/***/
|
|
6408
|
+
/***/ 20752:
|
|
6412
6409
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6413
6410
|
|
|
6414
6411
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6415
|
-
/* harmony export */
|
|
6412
|
+
/* harmony export */ P: () => (/* binding */ isViewportPreScaled)
|
|
6416
6413
|
/* harmony export */ });
|
|
6417
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6414
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
6418
6415
|
|
|
6419
6416
|
function isViewportPreScaled(viewport, targetId) {
|
|
6420
6417
|
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.BaseVolumeViewport) {
|
|
@@ -6438,15 +6435,15 @@ function isViewportPreScaled(viewport, targetId) {
|
|
|
6438
6435
|
|
|
6439
6436
|
/***/ }),
|
|
6440
6437
|
|
|
6441
|
-
/***/
|
|
6438
|
+
/***/ 68009:
|
|
6442
6439
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6443
6440
|
|
|
6444
6441
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6445
|
-
/* harmony export */
|
|
6442
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6446
6443
|
/* harmony export */ });
|
|
6447
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6448
|
-
/* harmony import */ var _clip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
6449
|
-
/* harmony import */ var _scroll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
6444
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
6445
|
+
/* harmony import */ var _clip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70232);
|
|
6446
|
+
/* harmony import */ var _scroll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63478);
|
|
6450
6447
|
|
|
6451
6448
|
|
|
6452
6449
|
|
|
@@ -6460,7 +6457,7 @@ async function jumpToSlice(element, options = {}) {
|
|
|
6460
6457
|
const { imageIndex: currentImageIndex, numberOfSlices } = _getImageSliceData(viewport, debounceLoading);
|
|
6461
6458
|
const imageIndexToJump = _getImageIndexToJump(numberOfSlices, imageIndex);
|
|
6462
6459
|
const delta = imageIndexToJump - currentImageIndex;
|
|
6463
|
-
(0,_scroll__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .
|
|
6460
|
+
(0,_scroll__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(viewport, { delta, debounceLoading, volumeId });
|
|
6464
6461
|
}
|
|
6465
6462
|
function _getImageSliceData(viewport, debounceLoading) {
|
|
6466
6463
|
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.StackViewport) {
|
|
@@ -6480,21 +6477,21 @@ function _getImageSliceData(viewport, debounceLoading) {
|
|
|
6480
6477
|
}
|
|
6481
6478
|
function _getImageIndexToJump(numberOfSlices, imageIndex) {
|
|
6482
6479
|
const lastSliceIndex = numberOfSlices - 1;
|
|
6483
|
-
return (0,_clip__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .
|
|
6480
|
+
return (0,_clip__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(imageIndex, 0, lastSliceIndex);
|
|
6484
6481
|
}
|
|
6485
6482
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (jumpToSlice);
|
|
6486
6483
|
|
|
6487
6484
|
|
|
6488
6485
|
/***/ }),
|
|
6489
6486
|
|
|
6490
|
-
/***/
|
|
6487
|
+
/***/ 94451:
|
|
6491
6488
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6492
6489
|
|
|
6493
6490
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6494
|
-
/* harmony export */
|
|
6491
|
+
/* harmony export */ Z: () => (/* binding */ jumpToWorld)
|
|
6495
6492
|
/* harmony export */ });
|
|
6496
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6497
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
6493
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62709);
|
|
6494
|
+
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
6498
6495
|
|
|
6499
6496
|
|
|
6500
6497
|
function jumpToWorld(viewport, jumpWorld) {
|
|
@@ -6503,23 +6500,23 @@ function jumpToWorld(viewport, jumpWorld) {
|
|
|
6503
6500
|
}
|
|
6504
6501
|
const { focalPoint } = viewport.getCamera();
|
|
6505
6502
|
const delta = [0, 0, 0];
|
|
6506
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.sub */ .
|
|
6503
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.sub */ .R3.sub(delta, jumpWorld, focalPoint);
|
|
6507
6504
|
_applyShift(viewport, delta);
|
|
6508
6505
|
return true;
|
|
6509
6506
|
}
|
|
6510
6507
|
function _applyShift(viewport, delta) {
|
|
6511
6508
|
const camera = viewport.getCamera();
|
|
6512
6509
|
const normal = camera.viewPlaneNormal;
|
|
6513
|
-
const dotProd = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .
|
|
6514
|
-
const projectedDelta = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .
|
|
6515
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scale */ .
|
|
6510
|
+
const dotProd = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .R3.dot(delta, normal);
|
|
6511
|
+
const projectedDelta = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .R3.fromValues(normal[0], normal[1], normal[2]);
|
|
6512
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scale */ .R3.scale(projectedDelta, projectedDelta, dotProd);
|
|
6516
6513
|
if (Math.abs(projectedDelta[0]) > 1e-3 ||
|
|
6517
6514
|
Math.abs(projectedDelta[1]) > 1e-3 ||
|
|
6518
6515
|
Math.abs(projectedDelta[2]) > 1e-3) {
|
|
6519
6516
|
const newFocalPoint = [0, 0, 0];
|
|
6520
6517
|
const newPosition = [0, 0, 0];
|
|
6521
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.add */ .
|
|
6522
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.add */ .
|
|
6518
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.add */ .R3.add(newFocalPoint, camera.focalPoint, projectedDelta);
|
|
6519
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.add */ .R3.add(newPosition, camera.position, projectedDelta);
|
|
6523
6520
|
viewport.setCamera({
|
|
6524
6521
|
focalPoint: newFocalPoint,
|
|
6525
6522
|
position: newPosition,
|
|
@@ -6531,7 +6528,7 @@ function _applyShift(viewport, delta) {
|
|
|
6531
6528
|
|
|
6532
6529
|
/***/ }),
|
|
6533
6530
|
|
|
6534
|
-
/***/
|
|
6531
|
+
/***/ 46966:
|
|
6535
6532
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6536
6533
|
|
|
6537
6534
|
// ESM COMPAT FLAG
|
|
@@ -6559,9 +6556,9 @@ function filterViewportsWithFrameOfReferenceUID(viewports, FrameOfReferenceUID)
|
|
|
6559
6556
|
}
|
|
6560
6557
|
|
|
6561
6558
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/index.js + 4 modules
|
|
6562
|
-
var store = __webpack_require__(
|
|
6559
|
+
var store = __webpack_require__(33232);
|
|
6563
6560
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js + 3 modules
|
|
6564
|
-
var enums = __webpack_require__(
|
|
6561
|
+
var enums = __webpack_require__(68096);
|
|
6565
6562
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewportFilters/filterViewportsWithToolEnabled.js
|
|
6566
6563
|
|
|
6567
6564
|
|
|
@@ -6571,7 +6568,7 @@ function filterViewportsWithToolEnabled(viewports, toolName) {
|
|
|
6571
6568
|
const viewportsWithToolEnabled = [];
|
|
6572
6569
|
for (let vp = 0; vp < numViewports; vp++) {
|
|
6573
6570
|
const viewport = viewports[vp];
|
|
6574
|
-
const toolGroup = store/* ToolGroupManager.getToolGroupForViewport */.
|
|
6571
|
+
const toolGroup = store/* ToolGroupManager.getToolGroupForViewport */.fT.getToolGroupForViewport(viewport.id, viewport.renderingEngineId);
|
|
6575
6572
|
if (!toolGroup) {
|
|
6576
6573
|
continue;
|
|
6577
6574
|
}
|
|
@@ -6593,15 +6590,15 @@ function _toolGroupHasActiveEnabledOrPassiveTool(toolGroup, toolName) {
|
|
|
6593
6590
|
}
|
|
6594
6591
|
|
|
6595
6592
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
6596
|
-
var esm = __webpack_require__(
|
|
6593
|
+
var esm = __webpack_require__(62709);
|
|
6597
6594
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
6598
|
-
var gl_matrix_esm = __webpack_require__(
|
|
6595
|
+
var gl_matrix_esm = __webpack_require__(72076);
|
|
6599
6596
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewportFilters/filterViewportsWithParallelNormals.js
|
|
6600
6597
|
|
|
6601
6598
|
function filterViewportsWithParallelNormals(viewports, camera, EPS = 0.999) {
|
|
6602
6599
|
return viewports.filter((viewport) => {
|
|
6603
6600
|
const vpCamera = viewport.getCamera();
|
|
6604
|
-
const isParallel = Math.abs(gl_matrix_esm/* vec3.dot */.
|
|
6601
|
+
const isParallel = Math.abs(gl_matrix_esm/* vec3.dot */.R3.dot(vpCamera.viewPlaneNormal, camera.viewPlaneNormal)) >
|
|
6605
6602
|
EPS;
|
|
6606
6603
|
return isParallel;
|
|
6607
6604
|
});
|
|
@@ -6637,35 +6634,622 @@ function getViewportIdsWithToolToRender(element, toolName, requireParallelNormal
|
|
|
6637
6634
|
|
|
6638
6635
|
/***/ }),
|
|
6639
6636
|
|
|
6640
|
-
/***/
|
|
6637
|
+
/***/ 53766:
|
|
6641
6638
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6642
6639
|
|
|
6643
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6644
|
-
/* harmony export */ P: () => (/* binding */ Colorbar)
|
|
6645
|
-
/* harmony export */ });
|
|
6646
|
-
/* unused harmony export default */
|
|
6647
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44753);
|
|
6648
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92136);
|
|
6649
|
-
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24284);
|
|
6650
|
-
/* harmony import */ var _enums_ColorbarRangeTextPosition__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50614);
|
|
6651
|
-
/* harmony import */ var _ColorbarCanvas__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25605);
|
|
6652
|
-
/* harmony import */ var _ColorbarTicks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4856);
|
|
6653
|
-
/* harmony import */ var _common_isRangeTextPositionValid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(57457);
|
|
6654
|
-
/* harmony import */ var _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(38461);
|
|
6655
6640
|
|
|
6641
|
+
// EXPORTS
|
|
6642
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
6643
|
+
Y: () => (/* binding */ Colorbar)
|
|
6644
|
+
});
|
|
6656
6645
|
|
|
6646
|
+
// UNUSED EXPORTS: default
|
|
6657
6647
|
|
|
6648
|
+
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
6649
|
+
var esm = __webpack_require__(72076);
|
|
6650
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
6651
|
+
var dist_esm = __webpack_require__(62709);
|
|
6652
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/common/isRangeValid.js
|
|
6653
|
+
const isRangeValid = (range) => {
|
|
6654
|
+
return range && range.upper > range.lower;
|
|
6655
|
+
};
|
|
6656
|
+
|
|
6657
|
+
|
|
6658
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/common/isColorbarSizeValid.js
|
|
6659
|
+
const isColorbarSizeValid = (size) => {
|
|
6660
|
+
return !!size && size.width > 0 && size.height > 0;
|
|
6661
|
+
};
|
|
6662
|
+
|
|
6663
|
+
|
|
6664
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/common/areColorbarRangesEqual.js
|
|
6665
|
+
const areColorbarRangesEqual = (a, b) => {
|
|
6666
|
+
return !!a && !!b && a.lower === b.lower && a.upper === b.upper;
|
|
6667
|
+
};
|
|
6658
6668
|
|
|
6659
6669
|
|
|
6670
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/common/areColorbarSizesEqual.js
|
|
6671
|
+
const areColorbarSizesEqual = (a, b) => {
|
|
6672
|
+
return !!a && !!b && a.width === b.width && a.height === b.height;
|
|
6673
|
+
};
|
|
6674
|
+
|
|
6675
|
+
|
|
6676
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/common/index.js
|
|
6677
|
+
|
|
6660
6678
|
|
|
6661
6679
|
|
|
6662
6680
|
|
|
6681
|
+
|
|
6682
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/enums/ColorbarRangeTextPosition.js
|
|
6683
|
+
var ColorbarRangeTextPosition = __webpack_require__(91889);
|
|
6684
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/vec3/interpolateVec3.js
|
|
6685
|
+
const interpolateVec3 = (a, b, t) => {
|
|
6686
|
+
return [
|
|
6687
|
+
a[0] * (1 - t) + b[0] * t,
|
|
6688
|
+
a[1] * (1 - t) + b[1] * t,
|
|
6689
|
+
a[2] * (1 - t) + b[2] * t,
|
|
6690
|
+
];
|
|
6691
|
+
};
|
|
6692
|
+
|
|
6693
|
+
|
|
6694
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/ColorbarCanvas.js
|
|
6695
|
+
|
|
6696
|
+
|
|
6697
|
+
|
|
6698
|
+
const { clamp } = dist_esm.utilities;
|
|
6699
|
+
class ColorbarCanvas {
|
|
6700
|
+
constructor(props) {
|
|
6701
|
+
ColorbarCanvas.validateProps(props);
|
|
6702
|
+
const { colormap, size = { width: 20, height: 100 }, imageRange = { lower: 0, upper: 1 }, voiRange = { lower: 0, upper: 1 }, container, showFullPixelValueRange = false, } = props;
|
|
6703
|
+
this._colormap = colormap;
|
|
6704
|
+
this._imageRange = imageRange;
|
|
6705
|
+
this._voiRange = voiRange;
|
|
6706
|
+
this._showFullImageRange = showFullPixelValueRange;
|
|
6707
|
+
this._canvas = this._createRootElement(size);
|
|
6708
|
+
if (container) {
|
|
6709
|
+
this.appendTo(container);
|
|
6710
|
+
}
|
|
6711
|
+
}
|
|
6712
|
+
get colormap() {
|
|
6713
|
+
return this._colormap;
|
|
6714
|
+
}
|
|
6715
|
+
set colormap(colormap) {
|
|
6716
|
+
this._colormap = colormap;
|
|
6717
|
+
this.render();
|
|
6718
|
+
}
|
|
6719
|
+
get size() {
|
|
6720
|
+
const { width, height } = this._canvas;
|
|
6721
|
+
return { width, height };
|
|
6722
|
+
}
|
|
6723
|
+
set size(size) {
|
|
6724
|
+
const { _canvas: canvas } = this;
|
|
6725
|
+
if (!isColorbarSizeValid(size) || areColorbarSizesEqual(canvas, size)) {
|
|
6726
|
+
return;
|
|
6727
|
+
}
|
|
6728
|
+
this._setCanvasSize(canvas, size);
|
|
6729
|
+
this.render();
|
|
6730
|
+
}
|
|
6731
|
+
get imageRange() {
|
|
6732
|
+
return { ...this._imageRange };
|
|
6733
|
+
}
|
|
6734
|
+
set imageRange(imageRange) {
|
|
6735
|
+
if (!isRangeValid(imageRange) ||
|
|
6736
|
+
areColorbarRangesEqual(imageRange, this._imageRange)) {
|
|
6737
|
+
return;
|
|
6738
|
+
}
|
|
6739
|
+
this._imageRange = imageRange;
|
|
6740
|
+
this.render();
|
|
6741
|
+
}
|
|
6742
|
+
get voiRange() {
|
|
6743
|
+
return { ...this._voiRange };
|
|
6744
|
+
}
|
|
6745
|
+
set voiRange(voiRange) {
|
|
6746
|
+
if (!isRangeValid(voiRange) ||
|
|
6747
|
+
areColorbarRangesEqual(voiRange, this._voiRange)) {
|
|
6748
|
+
return;
|
|
6749
|
+
}
|
|
6750
|
+
this._voiRange = voiRange;
|
|
6751
|
+
this.render();
|
|
6752
|
+
}
|
|
6753
|
+
get showFullImageRange() {
|
|
6754
|
+
return this._showFullImageRange;
|
|
6755
|
+
}
|
|
6756
|
+
set showFullImageRange(showFullImageRange) {
|
|
6757
|
+
if (showFullImageRange === this._showFullImageRange) {
|
|
6758
|
+
return;
|
|
6759
|
+
}
|
|
6760
|
+
this._showFullImageRange = showFullImageRange;
|
|
6761
|
+
this.render();
|
|
6762
|
+
}
|
|
6763
|
+
appendTo(container) {
|
|
6764
|
+
container.appendChild(this._canvas);
|
|
6765
|
+
this.render();
|
|
6766
|
+
}
|
|
6767
|
+
dispose() {
|
|
6768
|
+
const { _canvas: canvas } = this;
|
|
6769
|
+
const { parentElement } = canvas;
|
|
6770
|
+
parentElement?.removeChild(canvas);
|
|
6771
|
+
}
|
|
6772
|
+
static validateProps(props) {
|
|
6773
|
+
const { size, imageRange, voiRange } = props;
|
|
6774
|
+
if (size && !isColorbarSizeValid(size)) {
|
|
6775
|
+
throw new Error('Invalid "size"');
|
|
6776
|
+
}
|
|
6777
|
+
if (imageRange && !isRangeValid(imageRange)) {
|
|
6778
|
+
throw new Error('Invalid "imageRange"');
|
|
6779
|
+
}
|
|
6780
|
+
if (voiRange && !isRangeValid(voiRange)) {
|
|
6781
|
+
throw new Error('Invalid "voiRange"');
|
|
6782
|
+
}
|
|
6783
|
+
}
|
|
6784
|
+
_setCanvasSize(canvas, size) {
|
|
6785
|
+
const { width, height } = size;
|
|
6786
|
+
canvas.width = width;
|
|
6787
|
+
canvas.height = height;
|
|
6788
|
+
Object.assign(canvas.style, {
|
|
6789
|
+
width: `${width}px`,
|
|
6790
|
+
height: `${height}px`,
|
|
6791
|
+
});
|
|
6792
|
+
}
|
|
6793
|
+
_createRootElement(size) {
|
|
6794
|
+
const canvas = document.createElement('canvas');
|
|
6795
|
+
Object.assign(canvas.style, {
|
|
6796
|
+
position: 'absolute',
|
|
6797
|
+
top: '0',
|
|
6798
|
+
left: '0',
|
|
6799
|
+
pointerEvents: 'none',
|
|
6800
|
+
boxSizing: 'border-box',
|
|
6801
|
+
});
|
|
6802
|
+
this._setCanvasSize(canvas, size);
|
|
6803
|
+
return canvas;
|
|
6804
|
+
}
|
|
6805
|
+
render() {
|
|
6806
|
+
if (!this._canvas.isConnected) {
|
|
6807
|
+
return;
|
|
6808
|
+
}
|
|
6809
|
+
const { _colormap: colormap } = this;
|
|
6810
|
+
const { RGBPoints: rgbPoints } = colormap;
|
|
6811
|
+
const colorsCount = rgbPoints.length / 4;
|
|
6812
|
+
const getColorPoint = (index) => {
|
|
6813
|
+
const offset = 4 * index;
|
|
6814
|
+
if (index < 0 || index >= colorsCount) {
|
|
6815
|
+
return;
|
|
6816
|
+
}
|
|
6817
|
+
return {
|
|
6818
|
+
index,
|
|
6819
|
+
position: rgbPoints[offset],
|
|
6820
|
+
color: [
|
|
6821
|
+
rgbPoints[offset + 1],
|
|
6822
|
+
rgbPoints[offset + 2],
|
|
6823
|
+
rgbPoints[offset + 3],
|
|
6824
|
+
],
|
|
6825
|
+
};
|
|
6826
|
+
};
|
|
6827
|
+
const { width, height } = this._canvas;
|
|
6828
|
+
const canvasContext = this._canvas.getContext('2d');
|
|
6829
|
+
const isHorizontal = width > height;
|
|
6830
|
+
const maxValue = isHorizontal ? width : height;
|
|
6831
|
+
const { _voiRange: voiRange } = this;
|
|
6832
|
+
const range = this._showFullImageRange ? this._imageRange : { ...voiRange };
|
|
6833
|
+
const { windowWidth } = dist_esm.utilities.windowLevel.toWindowLevel(voiRange.lower, voiRange.upper);
|
|
6834
|
+
let previousColorPoint = undefined;
|
|
6835
|
+
let currentColorPoint = getColorPoint(0);
|
|
6836
|
+
const incRawPixelValue = (range.upper - range.lower) / (maxValue - 1);
|
|
6837
|
+
let rawPixelValue = range.lower;
|
|
6838
|
+
for (let i = 0; i < maxValue; i++) {
|
|
6839
|
+
const tVoiRange = (rawPixelValue - voiRange.lower) / windowWidth;
|
|
6840
|
+
if (currentColorPoint) {
|
|
6841
|
+
for (let i = currentColorPoint.index; i < colorsCount; i++) {
|
|
6842
|
+
if (tVoiRange <= currentColorPoint.position) {
|
|
6843
|
+
break;
|
|
6844
|
+
}
|
|
6845
|
+
previousColorPoint = currentColorPoint;
|
|
6846
|
+
currentColorPoint = getColorPoint(i + 1);
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
6849
|
+
let normColor;
|
|
6850
|
+
if (!previousColorPoint) {
|
|
6851
|
+
normColor = [...currentColorPoint.color];
|
|
6852
|
+
}
|
|
6853
|
+
else if (!currentColorPoint) {
|
|
6854
|
+
normColor = [...previousColorPoint.color];
|
|
6855
|
+
}
|
|
6856
|
+
else {
|
|
6857
|
+
const tColorRange = (tVoiRange - previousColorPoint.position) /
|
|
6858
|
+
(currentColorPoint.position - previousColorPoint.position);
|
|
6859
|
+
normColor = interpolateVec3(previousColorPoint.color, currentColorPoint.color, tColorRange);
|
|
6860
|
+
}
|
|
6861
|
+
const color = normColor.map((color) => clamp(Math.round(color * 255), 0, 255));
|
|
6862
|
+
canvasContext.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
|
|
6863
|
+
if (isHorizontal) {
|
|
6864
|
+
canvasContext.fillRect(i, 0, 1, height);
|
|
6865
|
+
}
|
|
6866
|
+
else {
|
|
6867
|
+
canvasContext.fillRect(0, height - i - 1, width, 1);
|
|
6868
|
+
}
|
|
6869
|
+
rawPixelValue += incRawPixelValue;
|
|
6870
|
+
}
|
|
6871
|
+
}
|
|
6872
|
+
}
|
|
6873
|
+
|
|
6874
|
+
|
|
6875
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/ColorbarTicks.js
|
|
6876
|
+
|
|
6877
|
+
|
|
6663
6878
|
const DEFAULTS = {
|
|
6879
|
+
FONT: '10px Arial',
|
|
6880
|
+
COLOR: 'white',
|
|
6881
|
+
TICK_SIZE: 5,
|
|
6882
|
+
TICK_WIDTH: 1,
|
|
6883
|
+
TICK_LABEL_MARGIN: 3,
|
|
6884
|
+
MAX_NUM_TICKS: 8,
|
|
6885
|
+
TICKS_STEPS: [1, 2.5, 5, 10],
|
|
6886
|
+
};
|
|
6887
|
+
class ColorbarTicks {
|
|
6888
|
+
constructor(props) {
|
|
6889
|
+
ColorbarTicks.validateProps(props);
|
|
6890
|
+
const { top = 0, left = 0, size = { width: 20, height: 100 }, imageRange = { lower: 0, upper: 1 }, voiRange = { lower: 0, upper: 1 }, ticks: ticksProps, container, showFullPixelValueRange = false, } = props;
|
|
6891
|
+
const { style: ticksStyle, position: rangeTextPosition } = ticksProps ?? {};
|
|
6892
|
+
this._imageRange = imageRange;
|
|
6893
|
+
this._voiRange = voiRange;
|
|
6894
|
+
this._font = ticksStyle?.font ?? DEFAULTS.FONT;
|
|
6895
|
+
this._color = ticksStyle?.color ?? DEFAULTS.COLOR;
|
|
6896
|
+
this._tickSize = ticksStyle?.tickSize ?? DEFAULTS.TICK_SIZE;
|
|
6897
|
+
this._tickWidth = ticksStyle?.tickWidth ?? DEFAULTS.TICK_WIDTH;
|
|
6898
|
+
this._labelMargin = ticksStyle?.labelMargin ?? DEFAULTS.TICK_LABEL_MARGIN;
|
|
6899
|
+
this._maxNumTicks = ticksStyle?.maxNumTicks ?? DEFAULTS.MAX_NUM_TICKS;
|
|
6900
|
+
this._rangeTextPosition =
|
|
6901
|
+
rangeTextPosition ?? ColorbarRangeTextPosition/* ColorbarRangeTextPosition */.u.Right;
|
|
6902
|
+
this._showFullPixelValueRange = showFullPixelValueRange;
|
|
6903
|
+
this._canvas = this._createCanvasElement(size, top, left);
|
|
6904
|
+
if (container) {
|
|
6905
|
+
this.appendTo(container);
|
|
6906
|
+
}
|
|
6907
|
+
}
|
|
6908
|
+
get size() {
|
|
6909
|
+
const { width, height } = this._canvas;
|
|
6910
|
+
return { width, height };
|
|
6911
|
+
}
|
|
6912
|
+
set size(size) {
|
|
6913
|
+
const { _canvas: canvas } = this;
|
|
6914
|
+
if (!isColorbarSizeValid(size) || areColorbarSizesEqual(canvas, size)) {
|
|
6915
|
+
return;
|
|
6916
|
+
}
|
|
6917
|
+
this._setCanvasSize(canvas, size);
|
|
6918
|
+
this.render();
|
|
6919
|
+
}
|
|
6920
|
+
get top() {
|
|
6921
|
+
return Number.parseInt(this._canvas.style.top);
|
|
6922
|
+
}
|
|
6923
|
+
set top(top) {
|
|
6924
|
+
const { _canvas: canvas } = this;
|
|
6925
|
+
const currentTop = this.top;
|
|
6926
|
+
if (top === currentTop) {
|
|
6927
|
+
return;
|
|
6928
|
+
}
|
|
6929
|
+
canvas.style.top = `${top}px`;
|
|
6930
|
+
this.render();
|
|
6931
|
+
}
|
|
6932
|
+
get left() {
|
|
6933
|
+
return Number.parseInt(this._canvas.style.left);
|
|
6934
|
+
}
|
|
6935
|
+
set left(left) {
|
|
6936
|
+
const { _canvas: canvas } = this;
|
|
6937
|
+
const currentLeft = this.left;
|
|
6938
|
+
if (left === currentLeft) {
|
|
6939
|
+
return;
|
|
6940
|
+
}
|
|
6941
|
+
canvas.style.left = `${left}px`;
|
|
6942
|
+
this.render();
|
|
6943
|
+
}
|
|
6944
|
+
get imageRange() {
|
|
6945
|
+
return { ...this._imageRange };
|
|
6946
|
+
}
|
|
6947
|
+
set imageRange(imageRange) {
|
|
6948
|
+
if (!isRangeValid(imageRange) ||
|
|
6949
|
+
areColorbarRangesEqual(imageRange, this._imageRange)) {
|
|
6950
|
+
return;
|
|
6951
|
+
}
|
|
6952
|
+
this._imageRange = imageRange;
|
|
6953
|
+
this.render();
|
|
6954
|
+
}
|
|
6955
|
+
get voiRange() {
|
|
6956
|
+
return { ...this._voiRange };
|
|
6957
|
+
}
|
|
6958
|
+
set voiRange(voiRange) {
|
|
6959
|
+
if (!isRangeValid(voiRange) ||
|
|
6960
|
+
areColorbarRangesEqual(voiRange, this._voiRange)) {
|
|
6961
|
+
return;
|
|
6962
|
+
}
|
|
6963
|
+
this._voiRange = voiRange;
|
|
6964
|
+
this.render();
|
|
6965
|
+
}
|
|
6966
|
+
get tickSize() {
|
|
6967
|
+
return this._tickSize;
|
|
6968
|
+
}
|
|
6969
|
+
set tickSize(tickSize) {
|
|
6970
|
+
if (tickSize === this._tickSize) {
|
|
6971
|
+
return;
|
|
6972
|
+
}
|
|
6973
|
+
this._tickSize = tickSize;
|
|
6974
|
+
this.render();
|
|
6975
|
+
}
|
|
6976
|
+
get tickWidth() {
|
|
6977
|
+
return this._tickWidth;
|
|
6978
|
+
}
|
|
6979
|
+
set tickWidth(tickWidth) {
|
|
6980
|
+
if (tickWidth === this._tickWidth) {
|
|
6981
|
+
return;
|
|
6982
|
+
}
|
|
6983
|
+
this._tickWidth = tickWidth;
|
|
6984
|
+
this.render();
|
|
6985
|
+
}
|
|
6986
|
+
get color() {
|
|
6987
|
+
return this._color;
|
|
6988
|
+
}
|
|
6989
|
+
set color(color) {
|
|
6990
|
+
if (color === this._color) {
|
|
6991
|
+
return;
|
|
6992
|
+
}
|
|
6993
|
+
this._color = color;
|
|
6994
|
+
this.render();
|
|
6995
|
+
}
|
|
6996
|
+
get showFullPixelValueRange() {
|
|
6997
|
+
return this._showFullPixelValueRange;
|
|
6998
|
+
}
|
|
6999
|
+
set showFullPixelValueRange(showFullRange) {
|
|
7000
|
+
if (showFullRange === this._showFullPixelValueRange) {
|
|
7001
|
+
return;
|
|
7002
|
+
}
|
|
7003
|
+
this._showFullPixelValueRange = showFullRange;
|
|
7004
|
+
this.render();
|
|
7005
|
+
}
|
|
7006
|
+
get visible() {
|
|
7007
|
+
return this._canvas.style.display === 'block';
|
|
7008
|
+
}
|
|
7009
|
+
set visible(visible) {
|
|
7010
|
+
if (visible === this.visible) {
|
|
7011
|
+
return;
|
|
7012
|
+
}
|
|
7013
|
+
this._canvas.style.display = visible ? 'block' : 'none';
|
|
7014
|
+
if (visible) {
|
|
7015
|
+
this.render();
|
|
7016
|
+
}
|
|
7017
|
+
}
|
|
7018
|
+
appendTo(container) {
|
|
7019
|
+
container.appendChild(this._canvas);
|
|
7020
|
+
this.render();
|
|
7021
|
+
}
|
|
7022
|
+
static validateProps(props) {
|
|
7023
|
+
const { size, imageRange, voiRange } = props;
|
|
7024
|
+
if (size && !isColorbarSizeValid(size)) {
|
|
7025
|
+
throw new Error('Invalid "size"');
|
|
7026
|
+
}
|
|
7027
|
+
if (imageRange && !isRangeValid(imageRange)) {
|
|
7028
|
+
throw new Error('Invalid "imageRange"');
|
|
7029
|
+
}
|
|
7030
|
+
if (voiRange && !isRangeValid(voiRange)) {
|
|
7031
|
+
throw new Error('Invalid "voiRange"');
|
|
7032
|
+
}
|
|
7033
|
+
}
|
|
7034
|
+
_setCanvasSize(canvas, size) {
|
|
7035
|
+
const { width, height } = size;
|
|
7036
|
+
canvas.width = width;
|
|
7037
|
+
canvas.height = height;
|
|
7038
|
+
Object.assign(canvas.style, {
|
|
7039
|
+
width: `${width}px`,
|
|
7040
|
+
height: `${height}px`,
|
|
7041
|
+
});
|
|
7042
|
+
}
|
|
7043
|
+
_createCanvasElement(size, top, left) {
|
|
7044
|
+
const canvas = document.createElement('canvas');
|
|
7045
|
+
Object.assign(canvas.style, {
|
|
7046
|
+
display: 'none',
|
|
7047
|
+
position: 'absolute',
|
|
7048
|
+
boxSizing: 'border-box',
|
|
7049
|
+
top: `${top}px`,
|
|
7050
|
+
left: `${left}px`,
|
|
7051
|
+
});
|
|
7052
|
+
this._setCanvasSize(canvas, size);
|
|
7053
|
+
return canvas;
|
|
7054
|
+
}
|
|
7055
|
+
_getTicks(range) {
|
|
7056
|
+
const { lower, upper } = range;
|
|
7057
|
+
const rangeValue = upper - lower;
|
|
7058
|
+
const roughStep = rangeValue / (this._maxNumTicks - 1);
|
|
7059
|
+
const stepPower = Math.pow(10, -Math.floor(Math.log10(Math.abs(roughStep))));
|
|
7060
|
+
const roughtStepNormalized = roughStep * stepPower;
|
|
7061
|
+
const normalizedStep = DEFAULTS.TICKS_STEPS.find((n) => n >= roughtStepNormalized);
|
|
7062
|
+
const step = normalizedStep / stepPower;
|
|
7063
|
+
const scaleMax = Math.ceil(upper / step) * step;
|
|
7064
|
+
const scaleMin = Math.floor(lower / step) * step;
|
|
7065
|
+
const ticksCount = Math.round((scaleMax - scaleMin) / step) + 1;
|
|
7066
|
+
const ticks = [];
|
|
7067
|
+
for (let i = 0; i < ticksCount; i++) {
|
|
7068
|
+
ticks.push(scaleMin + i * step);
|
|
7069
|
+
}
|
|
7070
|
+
return { scaleMin, scaleMax, step, ticks };
|
|
7071
|
+
}
|
|
7072
|
+
_getLeftTickInfo({ position, labelMeasure }) {
|
|
7073
|
+
const { width } = this._canvas;
|
|
7074
|
+
const labelX = width - this.tickSize - labelMeasure.width - this._labelMargin;
|
|
7075
|
+
const labelPoint = [labelX, position];
|
|
7076
|
+
const tickPoints = {
|
|
7077
|
+
start: [width - this._tickSize, position],
|
|
7078
|
+
end: [width, position],
|
|
7079
|
+
};
|
|
7080
|
+
return { labelPoint, tickPoints };
|
|
7081
|
+
}
|
|
7082
|
+
_getRightTickInfo({ position }) {
|
|
7083
|
+
const labelPoint = [this._tickSize + this._labelMargin, position];
|
|
7084
|
+
const tickPoints = {
|
|
7085
|
+
start: [0, position],
|
|
7086
|
+
end: [this._tickSize, position],
|
|
7087
|
+
};
|
|
7088
|
+
return { labelPoint, tickPoints };
|
|
7089
|
+
}
|
|
7090
|
+
_getTopTickInfo({ position, labelMeasure }) {
|
|
7091
|
+
throw new Error('Not implemented');
|
|
7092
|
+
}
|
|
7093
|
+
_getBottomTickInfo({ position, labelMeasure }) {
|
|
7094
|
+
throw new Error('Not implemented');
|
|
7095
|
+
}
|
|
7096
|
+
render() {
|
|
7097
|
+
const { _canvas: canvas } = this;
|
|
7098
|
+
if (!canvas.isConnected || !this.visible) {
|
|
7099
|
+
return;
|
|
7100
|
+
}
|
|
7101
|
+
const { width, height } = canvas;
|
|
7102
|
+
const isHorizontal = width >= height;
|
|
7103
|
+
const maxCanvasPixelValue = isHorizontal ? width : height;
|
|
7104
|
+
const canvasContext = canvas.getContext('2d');
|
|
7105
|
+
const { _voiRange: voiRange } = this;
|
|
7106
|
+
const range = this._showFullPixelValueRange
|
|
7107
|
+
? this._imageRange
|
|
7108
|
+
: { ...voiRange };
|
|
7109
|
+
const rangeWidth = range.upper - range.lower;
|
|
7110
|
+
const { ticks } = this._getTicks(range);
|
|
7111
|
+
canvasContext.clearRect(0, 0, width, height);
|
|
7112
|
+
canvasContext.font = this._font;
|
|
7113
|
+
canvasContext.textBaseline = 'middle';
|
|
7114
|
+
canvasContext.fillStyle = this._color;
|
|
7115
|
+
canvasContext.strokeStyle = this._color;
|
|
7116
|
+
canvasContext.lineWidth = this.tickWidth;
|
|
7117
|
+
ticks.forEach((tick) => {
|
|
7118
|
+
let position = Math.round(maxCanvasPixelValue * ((tick - range.lower) / rangeWidth));
|
|
7119
|
+
if (!isHorizontal) {
|
|
7120
|
+
position = height - position;
|
|
7121
|
+
}
|
|
7122
|
+
if (position < 0 || position > maxCanvasPixelValue) {
|
|
7123
|
+
return;
|
|
7124
|
+
}
|
|
7125
|
+
const label = tick.toString();
|
|
7126
|
+
const labelMeasure = canvasContext.measureText(label);
|
|
7127
|
+
let tickInfo;
|
|
7128
|
+
if (isHorizontal) {
|
|
7129
|
+
if (this._rangeTextPosition === ColorbarRangeTextPosition/* ColorbarRangeTextPosition */.u.Top) {
|
|
7130
|
+
tickInfo = this._getTopTickInfo({ position, labelMeasure });
|
|
7131
|
+
}
|
|
7132
|
+
else {
|
|
7133
|
+
tickInfo = this._getBottomTickInfo({ position, labelMeasure });
|
|
7134
|
+
}
|
|
7135
|
+
}
|
|
7136
|
+
else {
|
|
7137
|
+
if (this._rangeTextPosition === ColorbarRangeTextPosition/* ColorbarRangeTextPosition */.u.Left) {
|
|
7138
|
+
tickInfo = this._getLeftTickInfo({ position, labelMeasure });
|
|
7139
|
+
}
|
|
7140
|
+
else {
|
|
7141
|
+
tickInfo = this._getRightTickInfo({ position });
|
|
7142
|
+
}
|
|
7143
|
+
}
|
|
7144
|
+
const { labelPoint, tickPoints } = tickInfo;
|
|
7145
|
+
const { start: tickStart, end: tickEnd } = tickPoints;
|
|
7146
|
+
canvasContext.beginPath();
|
|
7147
|
+
canvasContext.moveTo(tickStart[0], tickStart[1]);
|
|
7148
|
+
canvasContext.lineTo(tickEnd[0], tickEnd[1]);
|
|
7149
|
+
canvasContext.fillText(label, labelPoint[0], labelPoint[1]);
|
|
7150
|
+
canvasContext.stroke();
|
|
7151
|
+
return position;
|
|
7152
|
+
});
|
|
7153
|
+
}
|
|
7154
|
+
}
|
|
7155
|
+
|
|
7156
|
+
|
|
7157
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/enums/index.js
|
|
7158
|
+
var enums = __webpack_require__(57091);
|
|
7159
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/common/isRangeTextPositionValid.js
|
|
7160
|
+
|
|
7161
|
+
function isRangeTextPositionValid(colorbarWidth, colorbarHeight, rangeTextPosition) {
|
|
7162
|
+
const isHorizontal = colorbarWidth >= colorbarHeight;
|
|
7163
|
+
const validRangeTextPositions = isHorizontal
|
|
7164
|
+
? [enums.ColorbarRangeTextPosition.Top, enums.ColorbarRangeTextPosition.Bottom]
|
|
7165
|
+
: [enums.ColorbarRangeTextPosition.Left, enums.ColorbarRangeTextPosition.Right];
|
|
7166
|
+
return validRangeTextPositions.includes(rangeTextPosition);
|
|
7167
|
+
}
|
|
7168
|
+
|
|
7169
|
+
|
|
7170
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/widgets/Widget.js
|
|
7171
|
+
class Widget {
|
|
7172
|
+
constructor({ id, container }) {
|
|
7173
|
+
this._containerResizeCallback = (entries) => {
|
|
7174
|
+
let width;
|
|
7175
|
+
let height;
|
|
7176
|
+
const { contentRect, contentBoxSize } = entries[0];
|
|
7177
|
+
if (contentRect) {
|
|
7178
|
+
width = contentRect.width;
|
|
7179
|
+
height = contentRect.height;
|
|
7180
|
+
}
|
|
7181
|
+
else if (contentBoxSize?.length) {
|
|
7182
|
+
width = contentBoxSize[0].inlineSize;
|
|
7183
|
+
height = contentBoxSize[0].blockSize;
|
|
7184
|
+
}
|
|
7185
|
+
this._containerSize = { width, height };
|
|
7186
|
+
this.onContainerResize();
|
|
7187
|
+
};
|
|
7188
|
+
this._id = id;
|
|
7189
|
+
this._containerSize = { width: 0, height: 0 };
|
|
7190
|
+
this._rootElement = this.createRootElement(id);
|
|
7191
|
+
this._containerResizeObserver = new ResizeObserver(this._containerResizeCallback);
|
|
7192
|
+
if (container) {
|
|
7193
|
+
this.appendTo(container);
|
|
7194
|
+
}
|
|
7195
|
+
}
|
|
7196
|
+
get id() {
|
|
7197
|
+
return this._id;
|
|
7198
|
+
}
|
|
7199
|
+
get rootElement() {
|
|
7200
|
+
return this._rootElement;
|
|
7201
|
+
}
|
|
7202
|
+
appendTo(container) {
|
|
7203
|
+
const { _rootElement: rootElement, _containerResizeObserver: resizeObserver, } = this;
|
|
7204
|
+
const { parentElement: currentContainer } = rootElement;
|
|
7205
|
+
if (!container || container === currentContainer) {
|
|
7206
|
+
return;
|
|
7207
|
+
}
|
|
7208
|
+
if (currentContainer) {
|
|
7209
|
+
resizeObserver.unobserve(currentContainer);
|
|
7210
|
+
}
|
|
7211
|
+
container.appendChild(rootElement);
|
|
7212
|
+
resizeObserver.observe(container);
|
|
7213
|
+
}
|
|
7214
|
+
destroy() {
|
|
7215
|
+
const { _rootElement: rootElement, _containerResizeObserver: resizeObserver, } = this;
|
|
7216
|
+
const { parentElement } = rootElement;
|
|
7217
|
+
parentElement?.removeChild(rootElement);
|
|
7218
|
+
resizeObserver.disconnect();
|
|
7219
|
+
}
|
|
7220
|
+
get containerSize() {
|
|
7221
|
+
return { ...this._containerSize };
|
|
7222
|
+
}
|
|
7223
|
+
createRootElement(id) {
|
|
7224
|
+
const rootElement = document.createElement('div');
|
|
7225
|
+
rootElement.id = id;
|
|
7226
|
+
rootElement.classList.add('widget');
|
|
7227
|
+
Object.assign(rootElement.style, {
|
|
7228
|
+
width: '100%',
|
|
7229
|
+
height: '100%',
|
|
7230
|
+
});
|
|
7231
|
+
return rootElement;
|
|
7232
|
+
}
|
|
7233
|
+
onContainerResize() {
|
|
7234
|
+
}
|
|
7235
|
+
}
|
|
7236
|
+
|
|
7237
|
+
|
|
7238
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/Colorbar.js
|
|
7239
|
+
|
|
7240
|
+
|
|
7241
|
+
|
|
7242
|
+
|
|
7243
|
+
|
|
7244
|
+
|
|
7245
|
+
|
|
7246
|
+
|
|
7247
|
+
const Colorbar_DEFAULTS = {
|
|
6664
7248
|
MULTIPLIER: 1,
|
|
6665
|
-
RANGE_TEXT_POSITION:
|
|
7249
|
+
RANGE_TEXT_POSITION: ColorbarRangeTextPosition/* ColorbarRangeTextPosition */.u.Right,
|
|
6666
7250
|
TICKS_BAR_SIZE: 50,
|
|
6667
7251
|
};
|
|
6668
|
-
class Colorbar extends
|
|
7252
|
+
class Colorbar extends Widget {
|
|
6669
7253
|
constructor(props) {
|
|
6670
7254
|
super(props);
|
|
6671
7255
|
this._isMouseOver = false;
|
|
@@ -6690,17 +7274,17 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6690
7274
|
const multipliers = this.getVOIMultipliers();
|
|
6691
7275
|
const currentPoints = this._getPointsFromMouseEvent(evt);
|
|
6692
7276
|
const { points: startPoints, voiRange: startVOIRange } = initialState;
|
|
6693
|
-
const canvasDelta =
|
|
7277
|
+
const canvasDelta = esm/* vec2.sub */.K4.sub(esm/* vec2.create */.K4.create(), currentPoints.local, startPoints.local);
|
|
6694
7278
|
const wwDelta = canvasDelta[0] * multipliers[0];
|
|
6695
7279
|
const wcDelta = canvasDelta[1] * multipliers[1];
|
|
6696
7280
|
if (!wwDelta && !wcDelta) {
|
|
6697
7281
|
return;
|
|
6698
7282
|
}
|
|
6699
7283
|
const { lower: voiLower, upper: voiUpper } = startVOIRange;
|
|
6700
|
-
let { windowWidth, windowCenter } =
|
|
7284
|
+
let { windowWidth, windowCenter } = dist_esm.utilities.windowLevel.toWindowLevel(voiLower, voiUpper);
|
|
6701
7285
|
windowWidth = Math.max(windowWidth + wwDelta, 1);
|
|
6702
7286
|
windowCenter += wcDelta;
|
|
6703
|
-
const newVoiRange =
|
|
7287
|
+
const newVoiRange = dist_esm.utilities.windowLevel.toLowHighRange(windowWidth, windowCenter);
|
|
6704
7288
|
this.voiRange = newVoiRange;
|
|
6705
7289
|
evt.stopPropagation();
|
|
6706
7290
|
evt.preventDefault();
|
|
@@ -6712,13 +7296,13 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6712
7296
|
evt.stopPropagation();
|
|
6713
7297
|
};
|
|
6714
7298
|
this._eventListenersManager =
|
|
6715
|
-
new
|
|
7299
|
+
new dist_esm.utilities.eventListener.MultiTargetEventListenerManager();
|
|
6716
7300
|
this._colormaps = Colorbar.getColormapsMap(props);
|
|
6717
7301
|
this._activeColormapName = Colorbar.getInitialColormapName(props);
|
|
6718
7302
|
this._canvas = this._createCanvas(props);
|
|
6719
7303
|
this._ticksBar = this._createTicksBar(props);
|
|
6720
7304
|
this._rangeTextPosition =
|
|
6721
|
-
props.ticks?.position ??
|
|
7305
|
+
props.ticks?.position ?? Colorbar_DEFAULTS.RANGE_TEXT_POSITION;
|
|
6722
7306
|
this._canvas.appendTo(this.rootElement);
|
|
6723
7307
|
this._ticksBar.appendTo(this.rootElement);
|
|
6724
7308
|
this._addRootElementEventListeners();
|
|
@@ -6750,8 +7334,8 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6750
7334
|
}
|
|
6751
7335
|
set voiRange(voiRange) {
|
|
6752
7336
|
const { voiRange: currentVoiRange } = this._canvas;
|
|
6753
|
-
if (!
|
|
6754
|
-
|
|
7337
|
+
if (!isRangeValid(voiRange) ||
|
|
7338
|
+
areColorbarRangesEqual(voiRange, currentVoiRange)) {
|
|
6755
7339
|
return;
|
|
6756
7340
|
}
|
|
6757
7341
|
this._canvas.voiRange = voiRange;
|
|
@@ -6785,7 +7369,7 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6785
7369
|
this._canvas.size = this.containerSize;
|
|
6786
7370
|
}
|
|
6787
7371
|
getVOIMultipliers() {
|
|
6788
|
-
return [
|
|
7372
|
+
return [Colorbar_DEFAULTS.MULTIPLIER, Colorbar_DEFAULTS.MULTIPLIER];
|
|
6789
7373
|
}
|
|
6790
7374
|
onVoiChange(voiRange) {
|
|
6791
7375
|
}
|
|
@@ -6812,7 +7396,7 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6812
7396
|
_createCanvas(props) {
|
|
6813
7397
|
const { imageRange, voiRange, showFullPixelValueRange } = props;
|
|
6814
7398
|
const colormap = this._colormaps.get(this._activeColormapName);
|
|
6815
|
-
return new
|
|
7399
|
+
return new ColorbarCanvas({
|
|
6816
7400
|
colormap,
|
|
6817
7401
|
imageRange,
|
|
6818
7402
|
voiRange: voiRange,
|
|
@@ -6821,7 +7405,7 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6821
7405
|
}
|
|
6822
7406
|
_createTicksBar(props) {
|
|
6823
7407
|
const ticksProps = props.ticks;
|
|
6824
|
-
return new
|
|
7408
|
+
return new ColorbarTicks({
|
|
6825
7409
|
imageRange: props.imageRange,
|
|
6826
7410
|
voiRange: props.voiRange,
|
|
6827
7411
|
ticks: ticksProps,
|
|
@@ -6846,9 +7430,9 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6846
7430
|
}
|
|
6847
7431
|
const { _ticksBar: ticksBar, _rangeTextPosition: rangeTextPosition } = this;
|
|
6848
7432
|
const isHorizontal = containerWidth >= containerHeight;
|
|
6849
|
-
const width = isHorizontal ? containerWidth :
|
|
6850
|
-
const height = isHorizontal ?
|
|
6851
|
-
if (!(
|
|
7433
|
+
const width = isHorizontal ? containerWidth : Colorbar_DEFAULTS.TICKS_BAR_SIZE;
|
|
7434
|
+
const height = isHorizontal ? Colorbar_DEFAULTS.TICKS_BAR_SIZE : containerHeight;
|
|
7435
|
+
if (!isRangeTextPositionValid(containerWidth, containerHeight, rangeTextPosition)) {
|
|
6852
7436
|
throw new Error('Invalid rangeTextPosition value for the current colobar orientation');
|
|
6853
7437
|
}
|
|
6854
7438
|
let ticksBarTop;
|
|
@@ -6857,14 +7441,14 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6857
7441
|
if (isHorizontal) {
|
|
6858
7442
|
ticksBarLeft = 0;
|
|
6859
7443
|
ticksBarTop =
|
|
6860
|
-
rangeTextPosition ===
|
|
7444
|
+
rangeTextPosition === ColorbarRangeTextPosition/* ColorbarRangeTextPosition */.u.Top
|
|
6861
7445
|
? -height
|
|
6862
7446
|
: containerHeight;
|
|
6863
7447
|
}
|
|
6864
7448
|
else {
|
|
6865
7449
|
ticksBarTop = 0;
|
|
6866
7450
|
ticksBarLeft =
|
|
6867
|
-
rangeTextPosition ===
|
|
7451
|
+
rangeTextPosition === ColorbarRangeTextPosition/* ColorbarRangeTextPosition */.u.Left
|
|
6868
7452
|
? -width
|
|
6869
7453
|
: containerWidth;
|
|
6870
7454
|
}
|
|
@@ -6898,22 +7482,50 @@ class Colorbar extends _widgets_Widget__WEBPACK_IMPORTED_MODULE_7__/* ["default"
|
|
|
6898
7482
|
|
|
6899
7483
|
/***/ }),
|
|
6900
7484
|
|
|
6901
|
-
/***/
|
|
7485
|
+
/***/ 2091:
|
|
6902
7486
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6903
7487
|
|
|
6904
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6905
|
-
/* harmony export */ b: () => (/* binding */ ViewportColorbar)
|
|
6906
|
-
/* harmony export */ });
|
|
6907
|
-
/* unused harmony export default */
|
|
6908
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92136);
|
|
6909
|
-
/* harmony import */ var _Colorbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50112);
|
|
6910
|
-
/* harmony import */ var _getVOIMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51954);
|
|
6911
7488
|
|
|
7489
|
+
// EXPORTS
|
|
7490
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
7491
|
+
l: () => (/* binding */ ViewportColorbar)
|
|
7492
|
+
});
|
|
7493
|
+
|
|
7494
|
+
// UNUSED EXPORTS: default
|
|
7495
|
+
|
|
7496
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
7497
|
+
var esm = __webpack_require__(62709);
|
|
7498
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/Colorbar.js + 10 modules
|
|
7499
|
+
var Colorbar = __webpack_require__(53766);
|
|
7500
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewport/index.js
|
|
7501
|
+
var utilities_viewport = __webpack_require__(85217);
|
|
7502
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getVOIMultipliers.js
|
|
7503
|
+
|
|
7504
|
+
|
|
7505
|
+
const DEFAULT_MULTIPLIER = 4;
|
|
7506
|
+
function getVOIMultipliers(viewport, volumeId, options) {
|
|
7507
|
+
const modality = esm.utilities.getViewportModality(viewport, volumeId);
|
|
7508
|
+
if (modality === 'PT') {
|
|
7509
|
+
const { clientWidth, clientHeight } = viewport.element;
|
|
7510
|
+
const ptMultiplier = 5 / Math.max(clientWidth, clientHeight);
|
|
7511
|
+
const isPreScaled = (0,utilities_viewport.isViewportPreScaled)(viewport, volumeId);
|
|
7512
|
+
const { fixedPTWindowWidth = true } = options ?? {};
|
|
7513
|
+
const xMultiplier = fixedPTWindowWidth ? 0 : ptMultiplier;
|
|
7514
|
+
return isPreScaled
|
|
7515
|
+
? [xMultiplier, ptMultiplier]
|
|
7516
|
+
: [xMultiplier, DEFAULT_MULTIPLIER];
|
|
7517
|
+
}
|
|
7518
|
+
return [DEFAULT_MULTIPLIER, DEFAULT_MULTIPLIER];
|
|
7519
|
+
}
|
|
7520
|
+
|
|
7521
|
+
|
|
7522
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/ViewportColorbar.js
|
|
6912
7523
|
|
|
6913
7524
|
|
|
6914
|
-
|
|
7525
|
+
|
|
7526
|
+
const { Events } = esm.Enums;
|
|
6915
7527
|
const defaultImageRange = { lower: -1000, upper: 1000 };
|
|
6916
|
-
class ViewportColorbar extends
|
|
7528
|
+
class ViewportColorbar extends Colorbar/* Colorbar */.Y {
|
|
6917
7529
|
constructor(props) {
|
|
6918
7530
|
const { element, volumeId } = props;
|
|
6919
7531
|
const imageRange = ViewportColorbar._getImageRange(element, volumeId);
|
|
@@ -6973,30 +7585,30 @@ class ViewportColorbar extends _Colorbar__WEBPACK_IMPORTED_MODULE_1__/* .Colorba
|
|
|
6973
7585
|
return this._element;
|
|
6974
7586
|
}
|
|
6975
7587
|
get enabledElement() {
|
|
6976
|
-
return (0,
|
|
7588
|
+
return (0,esm.getEnabledElement)(this._element);
|
|
6977
7589
|
}
|
|
6978
7590
|
getVOIMultipliers() {
|
|
6979
7591
|
const { viewport } = this.enabledElement;
|
|
6980
|
-
return
|
|
7592
|
+
return getVOIMultipliers(viewport, this._volumeId);
|
|
6981
7593
|
}
|
|
6982
7594
|
onVoiChange(voiRange) {
|
|
6983
7595
|
super.onVoiChange(voiRange);
|
|
6984
7596
|
const { viewport } = this.enabledElement;
|
|
6985
|
-
if (viewport instanceof
|
|
7597
|
+
if (viewport instanceof esm.StackViewport) {
|
|
6986
7598
|
viewport.setProperties({
|
|
6987
7599
|
voiRange: voiRange,
|
|
6988
7600
|
});
|
|
6989
7601
|
viewport.render();
|
|
6990
7602
|
}
|
|
6991
|
-
else if (viewport instanceof
|
|
7603
|
+
else if (viewport instanceof esm.VolumeViewport) {
|
|
6992
7604
|
const { _volumeId: volumeId } = this;
|
|
6993
|
-
const viewportsContainingVolumeUID =
|
|
7605
|
+
const viewportsContainingVolumeUID = esm.utilities.getViewportsWithVolumeId(volumeId, viewport.renderingEngineId);
|
|
6994
7606
|
viewport.setProperties({ voiRange }, volumeId);
|
|
6995
7607
|
viewportsContainingVolumeUID.forEach((vp) => vp.render());
|
|
6996
7608
|
}
|
|
6997
7609
|
}
|
|
6998
7610
|
static _getImageRange(element, volumeId) {
|
|
6999
|
-
const enabledElement = (0,
|
|
7611
|
+
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
7000
7612
|
const { viewport } = enabledElement;
|
|
7001
7613
|
const actor = volumeId
|
|
7002
7614
|
? viewport.getActor(volumeId)
|
|
@@ -7011,12 +7623,12 @@ class ViewportColorbar extends _Colorbar__WEBPACK_IMPORTED_MODULE_1__/* .Colorba
|
|
|
7011
7623
|
: { lower: imageRange[0], upper: imageRange[1] };
|
|
7012
7624
|
}
|
|
7013
7625
|
static _getVOIRange(element, volumeId) {
|
|
7014
|
-
const enabledElement = (0,
|
|
7626
|
+
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
7015
7627
|
const { viewport } = enabledElement;
|
|
7016
7628
|
const volumeActor = volumeId
|
|
7017
7629
|
? viewport.getActor(volumeId)
|
|
7018
7630
|
: viewport.getDefaultActor();
|
|
7019
|
-
if (!volumeActor || !
|
|
7631
|
+
if (!volumeActor || !esm.utilities.isImageActor(volumeActor)) {
|
|
7020
7632
|
return defaultImageRange;
|
|
7021
7633
|
}
|
|
7022
7634
|
const voiRange = volumeActor.actor
|
|
@@ -7034,7 +7646,7 @@ class ViewportColorbar extends _Colorbar__WEBPACK_IMPORTED_MODULE_1__/* .Colorba
|
|
|
7034
7646
|
}
|
|
7035
7647
|
_addCornerstoneEventListener() {
|
|
7036
7648
|
const { _element: element } = this;
|
|
7037
|
-
|
|
7649
|
+
esm.eventTarget.addEventListener(Events.IMAGE_VOLUME_MODIFIED, this._imageVolumeModifiedCallback);
|
|
7038
7650
|
element.addEventListener(Events.STACK_NEW_IMAGE, this._stackNewImageCallback);
|
|
7039
7651
|
element.addEventListener(Events.VOI_MODIFIED, this._viewportVOIModifiedCallback);
|
|
7040
7652
|
element.addEventListener(Events.COLORMAP_MODIFIED, this._viewportColormapModifiedCallback);
|
|
@@ -7045,11 +7657,11 @@ class ViewportColorbar extends _Colorbar__WEBPACK_IMPORTED_MODULE_1__/* .Colorba
|
|
|
7045
7657
|
|
|
7046
7658
|
/***/ }),
|
|
7047
7659
|
|
|
7048
|
-
/***/
|
|
7660
|
+
/***/ 91889:
|
|
7049
7661
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7050
7662
|
|
|
7051
7663
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7052
|
-
/* harmony export */
|
|
7664
|
+
/* harmony export */ u: () => (/* binding */ ColorbarRangeTextPosition)
|
|
7053
7665
|
/* harmony export */ });
|
|
7054
7666
|
var ColorbarRangeTextPosition;
|
|
7055
7667
|
(function (ColorbarRangeTextPosition) {
|
|
@@ -7062,20 +7674,20 @@ var ColorbarRangeTextPosition;
|
|
|
7062
7674
|
|
|
7063
7675
|
/***/ }),
|
|
7064
7676
|
|
|
7065
|
-
/***/
|
|
7677
|
+
/***/ 57091:
|
|
7066
7678
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7067
7679
|
|
|
7068
7680
|
__webpack_require__.r(__webpack_exports__);
|
|
7069
7681
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7070
|
-
/* harmony export */ ColorbarRangeTextPosition: () => (/* reexport safe */ _ColorbarRangeTextPosition__WEBPACK_IMPORTED_MODULE_0__.
|
|
7682
|
+
/* harmony export */ ColorbarRangeTextPosition: () => (/* reexport safe */ _ColorbarRangeTextPosition__WEBPACK_IMPORTED_MODULE_0__.u)
|
|
7071
7683
|
/* harmony export */ });
|
|
7072
|
-
/* harmony import */ var _ColorbarRangeTextPosition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
7684
|
+
/* harmony import */ var _ColorbarRangeTextPosition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91889);
|
|
7073
7685
|
|
|
7074
7686
|
|
|
7075
7687
|
|
|
7076
7688
|
/***/ }),
|
|
7077
7689
|
|
|
7078
|
-
/***/
|
|
7690
|
+
/***/ 54166:
|
|
7079
7691
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7080
7692
|
|
|
7081
7693
|
// ESM COMPAT FLAG
|
|
@@ -7097,7 +7709,7 @@ __webpack_require__.d(windowlevel_namespaceObject, {
|
|
|
7097
7709
|
});
|
|
7098
7710
|
|
|
7099
7711
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/colorbar/index.js
|
|
7100
|
-
var colorbar = __webpack_require__(
|
|
7712
|
+
var colorbar = __webpack_require__(81659);
|
|
7101
7713
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/windowlevel/getLuminanceFromRegion.js
|
|
7102
7714
|
function getLuminanceFromRegion(imageData, x, y, width, height) {
|
|
7103
7715
|
const luminance = [];
|
|
@@ -7155,7 +7767,7 @@ function calculateMinMaxMean(pixelLuminance, globalMin, globalMax) {
|
|
|
7155
7767
|
|
|
7156
7768
|
|
|
7157
7769
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 28 modules
|
|
7158
|
-
var esm = __webpack_require__(
|
|
7770
|
+
var esm = __webpack_require__(62709);
|
|
7159
7771
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.js
|
|
7160
7772
|
|
|
7161
7773
|
function extractWindowLevelRegionToolData(viewport) {
|
|
@@ -7220,17 +7832,17 @@ function extractImageDataStack(viewport) {
|
|
|
7220
7832
|
|
|
7221
7833
|
/***/ }),
|
|
7222
7834
|
|
|
7223
|
-
/***/
|
|
7835
|
+
/***/ 60318:
|
|
7224
7836
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7225
7837
|
|
|
7226
7838
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7227
|
-
/* harmony export */
|
|
7839
|
+
/* harmony export */ ZP: () => (/* binding */ vtkImageMarchingSquares$1)
|
|
7228
7840
|
/* harmony export */ });
|
|
7229
7841
|
/* unused harmony exports extend, newInstance */
|
|
7230
|
-
/* harmony import */ var _macros2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
7231
|
-
/* harmony import */ var _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
7232
|
-
/* harmony import */ var _Common_DataModel_EdgeLocator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
7233
|
-
/* harmony import */ var _ImageMarchingSquares_caseTable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
7842
|
+
/* harmony import */ var _macros2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68470);
|
|
7843
|
+
/* harmony import */ var _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1299);
|
|
7844
|
+
/* harmony import */ var _Common_DataModel_EdgeLocator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29699);
|
|
7845
|
+
/* harmony import */ var _ImageMarchingSquares_caseTable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(87570);
|
|
7234
7846
|
|
|
7235
7847
|
|
|
7236
7848
|
|
|
@@ -7283,7 +7895,7 @@ function vtkImageMarchingSquares(publicAPI, model) {
|
|
|
7283
7895
|
const ids = [];
|
|
7284
7896
|
const pixelScalars = [];
|
|
7285
7897
|
const pixelPts = [];
|
|
7286
|
-
const edgeLocator = _Common_DataModel_EdgeLocator_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .
|
|
7898
|
+
const edgeLocator = _Common_DataModel_EdgeLocator_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.newInstance();
|
|
7287
7899
|
|
|
7288
7900
|
/**
|
|
7289
7901
|
* Retrieve scalars and pixel coordinates.
|
|
@@ -7359,7 +7971,7 @@ function vtkImageMarchingSquares(publicAPI, model) {
|
|
|
7359
7971
|
}
|
|
7360
7972
|
}
|
|
7361
7973
|
|
|
7362
|
-
const pixelLines = _ImageMarchingSquares_caseTable_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .
|
|
7974
|
+
const pixelLines = _ImageMarchingSquares_caseTable_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z.getCase(index);
|
|
7363
7975
|
if (pixelLines[0] < 0) {
|
|
7364
7976
|
return; // don't get the pixel coordinates, nothing to do
|
|
7365
7977
|
}
|
|
@@ -7369,7 +7981,7 @@ function vtkImageMarchingSquares(publicAPI, model) {
|
|
|
7369
7981
|
for (let idx = 0; pixelLines[idx] >= 0; idx += 2) {
|
|
7370
7982
|
lines.push(2);
|
|
7371
7983
|
for (let eid = 0; eid < 2; eid++) {
|
|
7372
|
-
const edgeVerts = _ImageMarchingSquares_caseTable_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .
|
|
7984
|
+
const edgeVerts = _ImageMarchingSquares_caseTable_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z.getEdge(pixelLines[idx + eid]);
|
|
7373
7985
|
pId = undefined;
|
|
7374
7986
|
if (model.mergePoints) {
|
|
7375
7987
|
pId = edgeLocator.isInsertedEdge(ids[edgeVerts[0]], ids[edgeVerts[1]])?.value;
|
|
@@ -7440,7 +8052,7 @@ function vtkImageMarchingSquares(publicAPI, model) {
|
|
|
7440
8052
|
}
|
|
7441
8053
|
|
|
7442
8054
|
// Update output
|
|
7443
|
-
const polydata = _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"].newInstance */ .
|
|
8055
|
+
const polydata = _Common_DataModel_PolyData_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"].newInstance */ .ZP.newInstance();
|
|
7444
8056
|
polydata.getPoints().setData(new Float32Array(points), 3);
|
|
7445
8057
|
polydata.getLines().setData(new Uint32Array(lines));
|
|
7446
8058
|
outData[0] = polydata;
|