@ohif/app 3.8.0-beta.5 → 3.8.0-beta.51
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/{12.bundle.1c0fcebb2e63f538b03b.js → 12.bundle.505ff8d33e3b91db6c4b.js} +9 -11
- package/dist/{125.bundle.253395f320b72180da63.js → 125.bundle.df666cb677e5a8982157.js} +4 -5
- package/dist/{663.bundle.68a67d3504dc24cccc1a.js → 170.bundle.3364dca0af95fde51ec6.js} +97 -89
- package/dist/{181.bundle.2ddc6f90740895a3949c.js → 181.bundle.aff453c348111303ceac.js} +107 -74
- package/dist/181.css +1 -1
- package/dist/{370.bundle.085badd6055e8feea84f.js → 185.bundle.892c8cbfeaaa14540821.js} +338 -209
- package/dist/{19.bundle.05ccf775cb70682dfcdf.js → 19.bundle.15ee26f7912d361e90b6.js} +127 -136
- package/dist/{99.bundle.51efd3493cd1de6bf63c.js → 199.bundle.a6fc393364e32b43a307.js} +215 -162
- package/dist/202.bundle.495cba6bbee744cf8f72.js +18239 -0
- package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/{220.bundle.f7e1c96c94245e70f2be.js → 223.bundle.d4ac6ef2cfe47a9c4afc.js} +4422 -3671
- package/dist/{23.bundle.e008ad788170f2ed5569.js → 23.bundle.9d989522a6e4fdcb9c72.js} +1 -1
- package/dist/{250.bundle.8084960e3318cda37317.js → 250.bundle.577da106dd763c7bf9d0.js} +22 -27
- package/dist/{281.bundle.64640869327edc0d2cae.js → 281.bundle.849a5e58fb2c0a9012dc.js} +23 -25
- package/dist/{82.bundle.9e269153bafc15562988.js → 290.bundle.744ac8d04daee807702f.js} +1244 -695
- package/dist/{359.bundle.e2f5680a854894c32944.js → 359.bundle.59878f46325c60f5d603.js} +27 -30
- package/dist/{410.bundle.8bb12b01e1f838340950.js → 410.bundle.ac46ff16910fa2785bcc.js} +24 -28
- package/dist/{417.bundle.af0a207c29b109f84159.js → 417.bundle.5c66801d23d0e98c00e6.js} +2 -2
- package/dist/{451.bundle.9fd36f52ff69594f0669.js → 451.bundle.311cd3be9916e08450e9.js} +28 -41
- package/dist/{221.bundle.da7732c6f158b6f2b0d8.js → 466.bundle.43f3b29a2e1665bb9a65.js} +161 -151
- package/dist/{471.bundle.b3d77b83b1593c09a504.js → 471.bundle.eeb78105b59e688832a6.js} +31 -35
- package/dist/{788.bundle.428c065311327135d817.js → 483.bundle.3a3d61f78d5f1f8ad574.js} +131 -180
- package/dist/{506.bundle.c3d01c4b6cc01096ce9e.js → 506.bundle.97b3dd0fd0f4467dc21c.js} +13 -18
- package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 530.bundle.f904325ef4195d69ac0e.js} +10 -3
- package/dist/{613.bundle.de79995392c3fd2e9637.js → 613.bundle.72d635ed76fa208309f7.js} +76 -50
- package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 661.bundle.949c984fe2f9f753b65c.js} +1851 -8944
- package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 686.bundle.62c827fe4f0d054c164e.js} +4 -5
- package/dist/{687.bundle.763e03b2624b6cc03ad2.js → 687.bundle.a0c6c77073595745e58e.js} +19 -35
- package/dist/{342.bundle.22d2df5cf6d83b24acee.js → 738.bundle.bf1d2c76e385a091999d.js} +938 -571
- package/dist/{814.bundle.d45ba7f8b856fbd4e75d.js → 814.bundle.477d51b23a2fe79a5b96.js} +9 -11
- package/dist/{822.bundle.891f2e57b1b7bc2f4cb4.js → 822.bundle.8b745e28bc9eb9afbc61.js} +14 -16
- package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 831.bundle.127a3064e8844d6d2c82.js} +1 -368
- package/dist/{886.bundle.d5116d9b8ea4964b68a0.js → 886.bundle.94a4536167d0f8cae1ae.js} +19 -23
- package/dist/95.bundle.2236101be3cc36b322e8.js +8769 -0
- package/dist/{236.bundle.09d155c6f44b5a44e4bf.js → 965.bundle.5a31aeb079b7e72cec9c.js} +104 -126
- package/dist/app.bundle.css +11 -11
- package/dist/{app.bundle.671d2bb084d88c0cf3b7.js → app.bundle.ef06991fb9bbafce36ed.js} +185194 -61390
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.a7d5060eead13771e784.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/{index.worker.e62ecca63f1a2e124230.worker.js → index.worker.64c896c4316fcd506666.worker.js} +2 -2
- package/dist/index.worker.64c896c4316fcd506666.worker.js.map +1 -0
- package/dist/serve.json +12 -0
- package/dist/sw.js +1 -1
- package/package.json +21 -21
- package/dist/202.bundle.d3490836f71e001dd30f.js +0 -6336
- package/dist/604.bundle.a51f83e64004bca5f497.js +0 -1848
- package/dist/743.bundle.489f7df3a089d4d374e1.js +0 -78007
- package/dist/75788f12450d4c5ed494.wasm +0 -0
- package/dist/775.bundle.2285e7e0e67878948c0d.js +0 -1009
- package/dist/957.bundle.9ea4506963ef8b2d84ba.js +0 -30077
- package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +0 -1
- /package/dist/{82.css → 290.css} +0 -0
- /package/dist/{221.css → 466.css} +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[290],{
|
|
2
3
|
|
|
3
|
-
/***/
|
|
4
|
+
/***/ 21290:
|
|
4
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5
6
|
|
|
6
|
-
"use strict";
|
|
7
7
|
// ESM COMPAT FLAG
|
|
8
8
|
__webpack_require__.r(__webpack_exports__);
|
|
9
9
|
|
|
10
10
|
// EXPORTS
|
|
11
11
|
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
+
ImageOverlayViewerTool: () => (/* reexport */ tools_ImageOverlayViewerTool),
|
|
12
13
|
Types: () => (/* reexport */ types_namespaceObject),
|
|
13
14
|
"default": () => (/* binding */ cornerstone_src),
|
|
14
15
|
getActiveViewportEnabledElement: () => (/* reexport */ getActiveViewportEnabledElement),
|
|
@@ -34,14 +35,14 @@ __webpack_require__.r(types_namespaceObject);
|
|
|
34
35
|
|
|
35
36
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
36
37
|
var react = __webpack_require__(43001);
|
|
37
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
38
|
-
var esm = __webpack_require__(
|
|
39
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js +
|
|
40
|
-
var dist_esm = __webpack_require__(
|
|
38
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 376 modules
|
|
39
|
+
var esm = __webpack_require__(64225);
|
|
40
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 454 modules
|
|
41
|
+
var dist_esm = __webpack_require__(76634);
|
|
41
42
|
// EXTERNAL MODULE: ../../core/src/index.ts + 65 modules
|
|
42
43
|
var src = __webpack_require__(71771);
|
|
43
44
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/streaming-image-volume-loader/dist/esm/index.js + 13 modules
|
|
44
|
-
var streaming_image_volume_loader_dist_esm = __webpack_require__(
|
|
45
|
+
var streaming_image_volume_loader_dist_esm = __webpack_require__(15793);
|
|
45
46
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js
|
|
46
47
|
var cornerstoneDICOMImageLoader_min = __webpack_require__(61539);
|
|
47
48
|
var cornerstoneDICOMImageLoader_min_default = /*#__PURE__*/__webpack_require__.n(cornerstoneDICOMImageLoader_min);
|
|
@@ -88,7 +89,7 @@ function initWADOImageLoader(userAuthenticationService, appConfig, extensionMana
|
|
|
88
89
|
// Until the default is set to true (which is the case for cornerstone3D),
|
|
89
90
|
// we should set this flag to false.
|
|
90
91
|
convertFloatPixelDataToInt: false,
|
|
91
|
-
use16BitDataType: Boolean(appConfig.
|
|
92
|
+
use16BitDataType: Boolean(appConfig.useNorm16Texture) || Boolean(appConfig.preferSizeOverAccuracy)
|
|
92
93
|
},
|
|
93
94
|
beforeSend: function (xhr) {
|
|
94
95
|
//TODO should be removed in the future and request emitted by DicomWebDataSource
|
|
@@ -118,8 +119,8 @@ function destroy() {
|
|
|
118
119
|
}
|
|
119
120
|
webWorkers.length = 0;
|
|
120
121
|
}
|
|
121
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
122
|
-
var ui_src = __webpack_require__(
|
|
122
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 487 modules
|
|
123
|
+
var ui_src = __webpack_require__(18414);
|
|
123
124
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/callInputDialog.tsx
|
|
124
125
|
|
|
125
126
|
|
|
@@ -136,9 +137,7 @@ var ui_src = __webpack_require__(71783);
|
|
|
136
137
|
* @param {string?} dialogConfig.dialogTitle - title of the input dialog
|
|
137
138
|
* @param {string?} dialogConfig.inputLabel - show label above the input
|
|
138
139
|
*/
|
|
139
|
-
function callInputDialog(uiDialogService, data, callback) {
|
|
140
|
-
let isArrowAnnotateInputDialog = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
141
|
-
let dialogConfig = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
140
|
+
function callInputDialog(uiDialogService, data, callback, isArrowAnnotateInputDialog = true, dialogConfig = {}) {
|
|
142
141
|
const dialogId = 'dialog-enter-annotation';
|
|
143
142
|
const label = data ? isArrowAnnotateInputDialog ? data.text : data.label : '';
|
|
144
143
|
const {
|
|
@@ -146,11 +145,10 @@ function callInputDialog(uiDialogService, data, callback) {
|
|
|
146
145
|
inputLabel = 'Enter your annotation',
|
|
147
146
|
validateFunc = value => true
|
|
148
147
|
} = dialogConfig;
|
|
149
|
-
const onSubmitHandler =
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
} = _ref;
|
|
148
|
+
const onSubmitHandler = ({
|
|
149
|
+
action,
|
|
150
|
+
value
|
|
151
|
+
}) => {
|
|
154
152
|
switch (action.id) {
|
|
155
153
|
case 'save':
|
|
156
154
|
if (typeof validateFunc === 'function' && !validateFunc(value.label)) {
|
|
@@ -192,11 +190,10 @@ function callInputDialog(uiDialogService, data, callback) {
|
|
|
192
190
|
type: ui_src/* ButtonEnums.type */.LZ.dt.primary
|
|
193
191
|
}],
|
|
194
192
|
onSubmit: onSubmitHandler,
|
|
195
|
-
body:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
} = _ref2;
|
|
193
|
+
body: ({
|
|
194
|
+
value,
|
|
195
|
+
setValue
|
|
196
|
+
}) => {
|
|
200
197
|
return /*#__PURE__*/react.createElement(ui_src/* Input */.II, {
|
|
201
198
|
autoFocus: true,
|
|
202
199
|
className: "border-primary-main bg-black",
|
|
@@ -256,8 +253,8 @@ const {
|
|
|
256
253
|
* Calibration Line tool works almost the same as the
|
|
257
254
|
*/
|
|
258
255
|
class CalibrationLineTool extends dist_esm.LengthTool {
|
|
259
|
-
constructor() {
|
|
260
|
-
super(...
|
|
256
|
+
constructor(...args) {
|
|
257
|
+
super(...args);
|
|
261
258
|
this._renderingViewport = void 0;
|
|
262
259
|
this._lengthToolRenderAnnotation = this.renderAnnotation;
|
|
263
260
|
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
@@ -350,8 +347,46 @@ function onCompletedCalibrationLine(servicesManager, csToolsEvent) {
|
|
|
350
347
|
});
|
|
351
348
|
});
|
|
352
349
|
}
|
|
353
|
-
// EXTERNAL MODULE: ../../core/src/utils/index.js +
|
|
354
|
-
var utils = __webpack_require__(
|
|
350
|
+
// EXTERNAL MODULE: ../../core/src/utils/index.js + 26 modules
|
|
351
|
+
var utils = __webpack_require__(3225);
|
|
352
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/tools/OverlayPlaneModuleProvider.ts
|
|
353
|
+
|
|
354
|
+
const _cachedOverlayMetadata = new Map();
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Image Overlay Viewer tool is not a traditional tool that requires user interactin.
|
|
358
|
+
* But it is used to display Pixel Overlays. And it will provide toggling capability.
|
|
359
|
+
*
|
|
360
|
+
* The documentation for Overlay Plane Module of DICOM can be found in [C.9.2 of
|
|
361
|
+
* Part-3 of DICOM standard](https://dicom.nema.org/medical/dicom/2018b/output/chtml/part03/sect_C.9.2.html)
|
|
362
|
+
*
|
|
363
|
+
* Image Overlay rendered by this tool can be toggled on and off using
|
|
364
|
+
* toolGroup.setToolEnabled() and toolGroup.setToolDisabled()
|
|
365
|
+
*/
|
|
366
|
+
const OverlayPlaneModuleProvider = {
|
|
367
|
+
/** Adds the metadata for overlayPlaneModule */
|
|
368
|
+
add: (imageId, metadata) => {
|
|
369
|
+
if (_cachedOverlayMetadata.get(imageId) === metadata) {
|
|
370
|
+
// This is a no-op here as the tool re-caches the data
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
_cachedOverlayMetadata.set(imageId, metadata);
|
|
374
|
+
},
|
|
375
|
+
/** Standard getter for metadata */
|
|
376
|
+
get: (type, query) => {
|
|
377
|
+
if (Array.isArray(query)) {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
if (type !== 'overlayPlaneModule') {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
return _cachedOverlayMetadata.get(query);
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
// Needs to be higher priority than default provider
|
|
388
|
+
esm.metaData.addProvider(OverlayPlaneModuleProvider.get, 10_000);
|
|
389
|
+
/* harmony default export */ const tools_OverlayPlaneModuleProvider = (OverlayPlaneModuleProvider);
|
|
355
390
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx
|
|
356
391
|
|
|
357
392
|
|
|
@@ -368,21 +403,14 @@ var utils = __webpack_require__(77250);
|
|
|
368
403
|
* toolGroup.setToolEnabled() and toolGroup.setToolDisabled()
|
|
369
404
|
*/
|
|
370
405
|
class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
|
|
371
|
-
constructor(
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
};
|
|
406
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
407
|
+
supportedInteractionTypes: [],
|
|
408
|
+
configuration: {
|
|
409
|
+
fillColor: [255, 127, 127, 255]
|
|
410
|
+
}
|
|
411
|
+
}) {
|
|
379
412
|
super(toolProps, defaultToolProps);
|
|
380
|
-
this.
|
|
381
|
-
this._cachedStats = {};
|
|
382
|
-
this.onSetToolDisabled = () => {
|
|
383
|
-
this._cachedStats = {};
|
|
384
|
-
this._cachedOverlayMetadata = new Map();
|
|
385
|
-
};
|
|
413
|
+
this.onSetToolDisabled = () => {};
|
|
386
414
|
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
387
415
|
const {
|
|
388
416
|
viewport
|
|
@@ -391,14 +419,23 @@ class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
|
|
|
391
419
|
if (!imageId) {
|
|
392
420
|
return;
|
|
393
421
|
}
|
|
394
|
-
const
|
|
422
|
+
const overlayMetadata = esm.metaData.get('overlayPlaneModule', imageId);
|
|
423
|
+
const overlays = overlayMetadata?.overlays;
|
|
395
424
|
|
|
396
425
|
// no overlays
|
|
397
426
|
if (!overlays?.length) {
|
|
398
427
|
return;
|
|
399
428
|
}
|
|
400
|
-
|
|
401
|
-
|
|
429
|
+
|
|
430
|
+
// Fix the x, y positions
|
|
431
|
+
overlays.forEach(overlay => {
|
|
432
|
+
overlay.x ||= 0;
|
|
433
|
+
overlay.y ||= 0;
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
// Will clear cached stat data when the overlay data changes
|
|
437
|
+
ImageOverlayViewerTool.addOverlayPlaneModule(imageId, overlayMetadata);
|
|
438
|
+
this._getCachedStat(imageId, overlayMetadata, this.configuration.fillColor).then(cachedStat => {
|
|
402
439
|
cachedStat.overlays.forEach(overlay => {
|
|
403
440
|
this._renderOverlay(enabledElement, svgDrawingHelper, overlay);
|
|
404
441
|
});
|
|
@@ -472,10 +509,11 @@ class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
|
|
|
472
509
|
return true;
|
|
473
510
|
}
|
|
474
511
|
async _getCachedStat(imageId, overlayMetadata, color) {
|
|
475
|
-
|
|
476
|
-
|
|
512
|
+
const missingOverlay = overlayMetadata.overlays.filter(overlay => overlay.pixelData && !overlay.dataUrl);
|
|
513
|
+
if (missingOverlay.length === 0) {
|
|
514
|
+
return overlayMetadata;
|
|
477
515
|
}
|
|
478
|
-
const overlays = await Promise.all(overlayMetadata.filter(overlay => overlay.pixelData).map(async (overlay, idx) => {
|
|
516
|
+
const overlays = await Promise.all(overlayMetadata.overlays.filter(overlay => overlay.pixelData).map(async (overlay, idx) => {
|
|
479
517
|
let pixelData = null;
|
|
480
518
|
if (overlay.pixelData.Value) {
|
|
481
519
|
pixelData = overlay.pixelData.Value;
|
|
@@ -483,6 +521,10 @@ class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
|
|
|
483
521
|
pixelData = overlay.pixelData[0];
|
|
484
522
|
} else if (overlay.pixelData.retrieveBulkData) {
|
|
485
523
|
pixelData = await overlay.pixelData.retrieveBulkData();
|
|
524
|
+
} else if (overlay.pixelData.InlineBinary) {
|
|
525
|
+
const blob = (0,utils/* b64toBlob */.Mi)(overlay.pixelData.InlineBinary);
|
|
526
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
527
|
+
pixelData = arrayBuffer;
|
|
486
528
|
}
|
|
487
529
|
if (!pixelData) {
|
|
488
530
|
return;
|
|
@@ -490,7 +532,7 @@ class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
|
|
|
490
532
|
const dataUrl = this._renderOverlayToDataUrl({
|
|
491
533
|
width: overlay.columns,
|
|
492
534
|
height: overlay.rows
|
|
493
|
-
}, color, pixelData);
|
|
535
|
+
}, overlay.color || color, pixelData);
|
|
494
536
|
return {
|
|
495
537
|
...overlay,
|
|
496
538
|
_id: (0,utils/* guid */.M8)(),
|
|
@@ -499,11 +541,8 @@ class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
|
|
|
499
541
|
color
|
|
500
542
|
};
|
|
501
543
|
}));
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
overlays: overlays.filter(overlay => overlay)
|
|
505
|
-
};
|
|
506
|
-
return this._cachedStats[imageId];
|
|
544
|
+
overlayMetadata.overlays = overlays;
|
|
545
|
+
return overlayMetadata;
|
|
507
546
|
}
|
|
508
547
|
|
|
509
548
|
/**
|
|
@@ -526,11 +565,10 @@ class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
|
|
|
526
565
|
* @param color
|
|
527
566
|
* @returns
|
|
528
567
|
*/
|
|
529
|
-
_renderOverlayToDataUrl(
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
} = _ref;
|
|
568
|
+
_renderOverlayToDataUrl({
|
|
569
|
+
width,
|
|
570
|
+
height
|
|
571
|
+
}, color, pixelDataRaw) {
|
|
534
572
|
const pixelDataView = new DataView(pixelDataRaw);
|
|
535
573
|
const totalBits = width * height;
|
|
536
574
|
const canvas = document.createElement('canvas');
|
|
@@ -562,13 +600,17 @@ class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
|
|
|
562
600
|
}
|
|
563
601
|
}
|
|
564
602
|
ImageOverlayViewerTool.toolName = 'ImageOverlayViewer';
|
|
603
|
+
/**
|
|
604
|
+
* The overlay plane module provider add method is exposed here to be used
|
|
605
|
+
* when updating the overlay for this tool to use for displaying data.
|
|
606
|
+
*/
|
|
607
|
+
ImageOverlayViewerTool.addOverlayPlaneModule = tools_OverlayPlaneModuleProvider.add;
|
|
565
608
|
/* harmony default export */ const tools_ImageOverlayViewerTool = (ImageOverlayViewerTool);
|
|
566
609
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/initCornerstoneTools.js
|
|
567
610
|
|
|
568
611
|
|
|
569
612
|
|
|
570
|
-
function initCornerstoneTools() {
|
|
571
|
-
let configuration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
613
|
+
function initCornerstoneTools(configuration = {}) {
|
|
572
614
|
dist_esm.CrosshairsTool.isAnnotation = false;
|
|
573
615
|
dist_esm.ReferenceLinesTool.isAnnotation = false;
|
|
574
616
|
(0,dist_esm.init)(configuration);
|
|
@@ -696,7 +738,8 @@ const Length = {
|
|
|
696
738
|
displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
697
739
|
}
|
|
698
740
|
const {
|
|
699
|
-
points
|
|
741
|
+
points,
|
|
742
|
+
textBox
|
|
700
743
|
} = data.handles;
|
|
701
744
|
const mappedAnnotations = getMappedAnnotations(annotation, displaySetService);
|
|
702
745
|
const displayText = getDisplayText(mappedAnnotations, displaySet);
|
|
@@ -706,6 +749,7 @@ const Length = {
|
|
|
706
749
|
SOPInstanceUID,
|
|
707
750
|
FrameOfReferenceUID,
|
|
708
751
|
points,
|
|
752
|
+
textBox,
|
|
709
753
|
metadata,
|
|
710
754
|
referenceSeriesUID: SeriesInstanceUID,
|
|
711
755
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -933,7 +977,8 @@ const Bidirectional = {
|
|
|
933
977
|
displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
934
978
|
}
|
|
935
979
|
const {
|
|
936
|
-
points
|
|
980
|
+
points,
|
|
981
|
+
textBox
|
|
937
982
|
} = data.handles;
|
|
938
983
|
const mappedAnnotations = Bidirectional_getMappedAnnotations(annotation, displaySetService);
|
|
939
984
|
const displayText = Bidirectional_getDisplayText(mappedAnnotations, displaySet);
|
|
@@ -943,6 +988,7 @@ const Bidirectional = {
|
|
|
943
988
|
SOPInstanceUID,
|
|
944
989
|
FrameOfReferenceUID,
|
|
945
990
|
points,
|
|
991
|
+
textBox,
|
|
946
992
|
metadata,
|
|
947
993
|
referenceSeriesUID: SeriesInstanceUID,
|
|
948
994
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -1114,7 +1160,8 @@ const EllipticalROI = {
|
|
|
1114
1160
|
displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
1115
1161
|
}
|
|
1116
1162
|
const {
|
|
1117
|
-
points
|
|
1163
|
+
points,
|
|
1164
|
+
textBox
|
|
1118
1165
|
} = data.handles;
|
|
1119
1166
|
const mappedAnnotations = EllipticalROI_getMappedAnnotations(annotation, displaySetService);
|
|
1120
1167
|
const displayText = EllipticalROI_getDisplayText(mappedAnnotations, displaySet);
|
|
@@ -1124,6 +1171,7 @@ const EllipticalROI = {
|
|
|
1124
1171
|
SOPInstanceUID,
|
|
1125
1172
|
FrameOfReferenceUID,
|
|
1126
1173
|
points,
|
|
1174
|
+
textBox,
|
|
1127
1175
|
metadata,
|
|
1128
1176
|
referenceSeriesUID: SeriesInstanceUID,
|
|
1129
1177
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -1323,7 +1371,8 @@ const CircleROI = {
|
|
|
1323
1371
|
displaySet = DisplaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
1324
1372
|
}
|
|
1325
1373
|
const {
|
|
1326
|
-
points
|
|
1374
|
+
points,
|
|
1375
|
+
textBox
|
|
1327
1376
|
} = data.handles;
|
|
1328
1377
|
const mappedAnnotations = CircleROI_getMappedAnnotations(annotation, DisplaySetService);
|
|
1329
1378
|
const displayText = CircleROI_getDisplayText(mappedAnnotations, displaySet);
|
|
@@ -1333,6 +1382,7 @@ const CircleROI = {
|
|
|
1333
1382
|
SOPInstanceUID,
|
|
1334
1383
|
FrameOfReferenceUID,
|
|
1335
1384
|
points,
|
|
1385
|
+
textBox,
|
|
1336
1386
|
metadata,
|
|
1337
1387
|
referenceSeriesUID: SeriesInstanceUID,
|
|
1338
1388
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -1538,7 +1588,8 @@ const ArrowAnnotate_Length = {
|
|
|
1538
1588
|
displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
1539
1589
|
}
|
|
1540
1590
|
const {
|
|
1541
|
-
points
|
|
1591
|
+
points,
|
|
1592
|
+
textBox
|
|
1542
1593
|
} = data.handles;
|
|
1543
1594
|
const mappedAnnotations = ArrowAnnotate_getMappedAnnotations(annotation, displaySetService);
|
|
1544
1595
|
const displayText = ArrowAnnotate_getDisplayText(mappedAnnotations, displaySet);
|
|
@@ -1547,6 +1598,7 @@ const ArrowAnnotate_Length = {
|
|
|
1547
1598
|
SOPInstanceUID,
|
|
1548
1599
|
FrameOfReferenceUID,
|
|
1549
1600
|
points,
|
|
1601
|
+
textBox,
|
|
1550
1602
|
metadata,
|
|
1551
1603
|
referenceSeriesUID: SeriesInstanceUID,
|
|
1552
1604
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -1554,7 +1606,6 @@ const ArrowAnnotate_Length = {
|
|
|
1554
1606
|
toolName: metadata.toolName,
|
|
1555
1607
|
displaySetInstanceUID: displaySet.displaySetInstanceUID,
|
|
1556
1608
|
label: data.text,
|
|
1557
|
-
text: data.text,
|
|
1558
1609
|
displayText: displayText,
|
|
1559
1610
|
data: data.cachedStats,
|
|
1560
1611
|
type: getValueTypeFromToolType(toolName),
|
|
@@ -1665,7 +1716,8 @@ const CobbAngle = {
|
|
|
1665
1716
|
displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
1666
1717
|
}
|
|
1667
1718
|
const {
|
|
1668
|
-
points
|
|
1719
|
+
points,
|
|
1720
|
+
textBox
|
|
1669
1721
|
} = data.handles;
|
|
1670
1722
|
const mappedAnnotations = CobbAngle_getMappedAnnotations(annotation, displaySetService);
|
|
1671
1723
|
const displayText = CobbAngle_getDisplayText(mappedAnnotations, displaySet);
|
|
@@ -1675,6 +1727,7 @@ const CobbAngle = {
|
|
|
1675
1727
|
SOPInstanceUID,
|
|
1676
1728
|
FrameOfReferenceUID,
|
|
1677
1729
|
points,
|
|
1730
|
+
textBox,
|
|
1678
1731
|
metadata,
|
|
1679
1732
|
referenceSeriesUID: SeriesInstanceUID,
|
|
1680
1733
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -1848,7 +1901,8 @@ const Angle = {
|
|
|
1848
1901
|
displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
1849
1902
|
}
|
|
1850
1903
|
const {
|
|
1851
|
-
points
|
|
1904
|
+
points,
|
|
1905
|
+
textBox
|
|
1852
1906
|
} = data.handles;
|
|
1853
1907
|
const mappedAnnotations = Angle_getMappedAnnotations(annotation, displaySetService);
|
|
1854
1908
|
const displayText = Angle_getDisplayText(mappedAnnotations, displaySet);
|
|
@@ -1858,6 +1912,7 @@ const Angle = {
|
|
|
1858
1912
|
SOPInstanceUID,
|
|
1859
1913
|
FrameOfReferenceUID,
|
|
1860
1914
|
points,
|
|
1915
|
+
textBox,
|
|
1861
1916
|
metadata,
|
|
1862
1917
|
referenceSeriesUID: SeriesInstanceUID,
|
|
1863
1918
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -2029,7 +2084,8 @@ const PlanarFreehandROI = {
|
|
|
2029
2084
|
displaySet = DisplaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
2030
2085
|
}
|
|
2031
2086
|
const {
|
|
2032
|
-
points
|
|
2087
|
+
points,
|
|
2088
|
+
textBox
|
|
2033
2089
|
} = data.handles;
|
|
2034
2090
|
const mappedAnnotations = PlanarFreehandROI_getMappedAnnotations(annotation, DisplaySetService);
|
|
2035
2091
|
const displayText = PlanarFreehandROI_getDisplayText(mappedAnnotations);
|
|
@@ -2039,6 +2095,7 @@ const PlanarFreehandROI = {
|
|
|
2039
2095
|
SOPInstanceUID,
|
|
2040
2096
|
FrameOfReferenceUID,
|
|
2041
2097
|
points,
|
|
2098
|
+
textBox,
|
|
2042
2099
|
metadata,
|
|
2043
2100
|
referenceSeriesUID: SeriesInstanceUID,
|
|
2044
2101
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -2159,7 +2216,8 @@ const RectangleROI = {
|
|
|
2159
2216
|
displaySet = DisplaySetService.getDisplaySetsForSeries(SeriesInstanceUID);
|
|
2160
2217
|
}
|
|
2161
2218
|
const {
|
|
2162
|
-
points
|
|
2219
|
+
points,
|
|
2220
|
+
textBox
|
|
2163
2221
|
} = data.handles;
|
|
2164
2222
|
const mappedAnnotations = RectangleROI_getMappedAnnotations(annotation, DisplaySetService);
|
|
2165
2223
|
const displayText = RectangleROI_getDisplayText(mappedAnnotations, displaySet);
|
|
@@ -2169,6 +2227,7 @@ const RectangleROI = {
|
|
|
2169
2227
|
SOPInstanceUID,
|
|
2170
2228
|
FrameOfReferenceUID,
|
|
2171
2229
|
points,
|
|
2230
|
+
textBox,
|
|
2172
2231
|
metadata,
|
|
2173
2232
|
referenceSeriesUID: SeriesInstanceUID,
|
|
2174
2233
|
referenceStudyUID: StudyInstanceUID,
|
|
@@ -2639,10 +2698,9 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
|
|
|
2639
2698
|
RAW_MEASUREMENT_ADDED
|
|
2640
2699
|
} = measurementService.EVENTS;
|
|
2641
2700
|
const csTools3DVer1MeasurementSource = measurementService.getSource(CORNERSTONE_3D_TOOLS_SOURCE_NAME, CORNERSTONE_3D_TOOLS_SOURCE_VERSION);
|
|
2642
|
-
measurementService.subscribe(MEASUREMENTS_CLEARED,
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
} = _ref;
|
|
2701
|
+
measurementService.subscribe(MEASUREMENTS_CLEARED, ({
|
|
2702
|
+
measurements
|
|
2703
|
+
}) => {
|
|
2646
2704
|
if (!Object.keys(measurements).length) {
|
|
2647
2705
|
return;
|
|
2648
2706
|
}
|
|
@@ -2657,12 +2715,11 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
|
|
|
2657
2715
|
removeAnnotation(uid);
|
|
2658
2716
|
}
|
|
2659
2717
|
});
|
|
2660
|
-
measurementService.subscribe(MEASUREMENT_UPDATED,
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
} = _ref2;
|
|
2718
|
+
measurementService.subscribe(MEASUREMENT_UPDATED, ({
|
|
2719
|
+
source,
|
|
2720
|
+
measurement,
|
|
2721
|
+
notYetUpdatedAtSource
|
|
2722
|
+
}) => {
|
|
2666
2723
|
if (source.name !== CORNERSTONE_3D_TOOLS_SOURCE_NAME) {
|
|
2667
2724
|
return;
|
|
2668
2725
|
}
|
|
@@ -2692,14 +2749,12 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
|
|
|
2692
2749
|
|
|
2693
2750
|
// Todo: trigger render for annotation
|
|
2694
2751
|
});
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
dataSource
|
|
2702
|
-
} = _ref3;
|
|
2752
|
+
measurementService.subscribe(RAW_MEASUREMENT_ADDED, ({
|
|
2753
|
+
source,
|
|
2754
|
+
measurement,
|
|
2755
|
+
data,
|
|
2756
|
+
dataSource
|
|
2757
|
+
}) => {
|
|
2703
2758
|
if (source.name !== CORNERSTONE_3D_TOOLS_SOURCE_NAME) {
|
|
2704
2759
|
return;
|
|
2705
2760
|
}
|
|
@@ -2743,11 +2798,10 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
|
|
|
2743
2798
|
}
|
|
2744
2799
|
});
|
|
2745
2800
|
});
|
|
2746
|
-
measurementService.subscribe(MEASUREMENT_REMOVED,
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
} = _ref4;
|
|
2801
|
+
measurementService.subscribe(MEASUREMENT_REMOVED, ({
|
|
2802
|
+
source,
|
|
2803
|
+
measurement: removedMeasurementId
|
|
2804
|
+
}) => {
|
|
2751
2805
|
if (source?.name && source.name !== CORNERSTONE_3D_TOOLS_SOURCE_NAME) {
|
|
2752
2806
|
return;
|
|
2753
2807
|
}
|
|
@@ -2844,15 +2898,14 @@ const viewportIdVolumeInputArrayMap = new Map();
|
|
|
2844
2898
|
* @param {Object} props image loading properties from Cornerstone ViewportService
|
|
2845
2899
|
* @returns
|
|
2846
2900
|
*/
|
|
2847
|
-
function interleaveCenterLoader(
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
} = _ref;
|
|
2901
|
+
function interleaveCenterLoader({
|
|
2902
|
+
data: {
|
|
2903
|
+
viewportId,
|
|
2904
|
+
volumeInputArray
|
|
2905
|
+
},
|
|
2906
|
+
displaySetsMatchDetails,
|
|
2907
|
+
viewportMatchDetails: matchDetails
|
|
2908
|
+
}) {
|
|
2856
2909
|
viewportIdVolumeInputArrayMap.set(viewportId, volumeInputArray);
|
|
2857
2910
|
|
|
2858
2911
|
// Based on the volumeInputs store the volumeIds and SeriesInstanceIds
|
|
@@ -2921,10 +2974,9 @@ function interleaveCenterLoader(_ref) {
|
|
|
2921
2974
|
return request.imageId;
|
|
2922
2975
|
});
|
|
2923
2976
|
const imageIds = getInterleavedFrames(requestImageIds);
|
|
2924
|
-
const reOrderedRequests = imageIds.map(
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
} = _ref2;
|
|
2977
|
+
const reOrderedRequests = imageIds.map(({
|
|
2978
|
+
imageId
|
|
2979
|
+
}) => {
|
|
2928
2980
|
const request = requests.find(req => req.imageId === imageId);
|
|
2929
2981
|
return request;
|
|
2930
2982
|
});
|
|
@@ -2950,14 +3002,13 @@ function interleaveCenterLoader(_ref) {
|
|
|
2950
3002
|
});
|
|
2951
3003
|
const requestType = esm.Enums.RequestType.Prefetch;
|
|
2952
3004
|
const priority = 0;
|
|
2953
|
-
finalRequests.forEach(
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
} = _ref3;
|
|
3005
|
+
finalRequests.forEach(({
|
|
3006
|
+
callLoadImage,
|
|
3007
|
+
additionalDetails,
|
|
3008
|
+
imageId,
|
|
3009
|
+
imageIdIndex,
|
|
3010
|
+
options
|
|
3011
|
+
}) => {
|
|
2961
3012
|
const callLoadImageBound = callLoadImage.bind(null, imageId, imageIdIndex, options);
|
|
2962
3013
|
esm.imageLoadPoolManager.addRequest(callLoadImageBound, requestType, additionalDetails, priority);
|
|
2963
3014
|
});
|
|
@@ -3055,14 +3106,13 @@ const nthLoader_viewportIdVolumeInputArrayMap = new Map();
|
|
|
3055
3106
|
* visually much better.
|
|
3056
3107
|
* @param {Object} props image loading properties from Cornerstone ViewportService
|
|
3057
3108
|
*/
|
|
3058
|
-
function interleaveNthLoader(
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
} = _ref;
|
|
3109
|
+
function interleaveNthLoader({
|
|
3110
|
+
data: {
|
|
3111
|
+
viewportId,
|
|
3112
|
+
volumeInputArray
|
|
3113
|
+
},
|
|
3114
|
+
displaySetsMatchDetails
|
|
3115
|
+
}) {
|
|
3066
3116
|
nthLoader_viewportIdVolumeInputArrayMap.set(viewportId, volumeInputArray);
|
|
3067
3117
|
|
|
3068
3118
|
// Based on the volumeInputs store the volumeIds and SeriesInstanceIds
|
|
@@ -3100,14 +3150,13 @@ function interleaveNthLoader(_ref) {
|
|
|
3100
3150
|
const finalRequests = interleave(orderedRequests);
|
|
3101
3151
|
const requestType = esm.Enums.RequestType.Prefetch;
|
|
3102
3152
|
const priority = 0;
|
|
3103
|
-
finalRequests.forEach(
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
} = _ref2;
|
|
3153
|
+
finalRequests.forEach(({
|
|
3154
|
+
callLoadImage,
|
|
3155
|
+
additionalDetails,
|
|
3156
|
+
imageId,
|
|
3157
|
+
imageIdIndex,
|
|
3158
|
+
options
|
|
3159
|
+
}) => {
|
|
3111
3160
|
const callLoadImageBound = callLoadImage.bind(null, imageId, imageIdIndex, options);
|
|
3112
3161
|
esm.imageLoadPoolManager.addRequest(callLoadImageBound, requestType, additionalDetails, priority);
|
|
3113
3162
|
});
|
|
@@ -3138,15 +3187,14 @@ const interleaveTopToBottom_viewportIdVolumeInputArrayMap = new Map();
|
|
|
3138
3187
|
* @param {Object} {viewportData, displaySetMatchDetails}
|
|
3139
3188
|
* @returns
|
|
3140
3189
|
*/
|
|
3141
|
-
function interleaveTopToBottom(
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
} = _ref;
|
|
3190
|
+
function interleaveTopToBottom({
|
|
3191
|
+
data: {
|
|
3192
|
+
viewportId,
|
|
3193
|
+
volumeInputArray
|
|
3194
|
+
},
|
|
3195
|
+
displaySetsMatchDetails,
|
|
3196
|
+
viewportMatchDetails: matchDetails
|
|
3197
|
+
}) {
|
|
3150
3198
|
interleaveTopToBottom_viewportIdVolumeInputArrayMap.set(viewportId, volumeInputArray);
|
|
3151
3199
|
|
|
3152
3200
|
// Based on the volumeInputs store the volumeIds and SeriesInstanceIds
|
|
@@ -3235,14 +3283,13 @@ function interleaveTopToBottom(_ref) {
|
|
|
3235
3283
|
});
|
|
3236
3284
|
const requestType = esm.Enums.RequestType.Prefetch;
|
|
3237
3285
|
const priority = 0;
|
|
3238
|
-
finalRequests.forEach(
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
} = _ref2;
|
|
3286
|
+
finalRequests.forEach(({
|
|
3287
|
+
callLoadImage,
|
|
3288
|
+
additionalDetails,
|
|
3289
|
+
imageId,
|
|
3290
|
+
imageIdIndex,
|
|
3291
|
+
options
|
|
3292
|
+
}) => {
|
|
3246
3293
|
const callLoadImageBound = callLoadImage.bind(null, imageId, imageIdIndex, options);
|
|
3247
3294
|
esm.imageLoadPoolManager.addRequest(callLoadImageBound, requestType, additionalDetails, priority);
|
|
3248
3295
|
});
|
|
@@ -3324,12 +3371,11 @@ function getEventName(evt) {
|
|
|
3324
3371
|
nameArr.push(button);
|
|
3325
3372
|
return nameArr.join('');
|
|
3326
3373
|
}
|
|
3327
|
-
function initContextMenu(
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
} = _ref;
|
|
3374
|
+
function initContextMenu({
|
|
3375
|
+
cornerstoneViewportService,
|
|
3376
|
+
customizationService,
|
|
3377
|
+
commandsManager
|
|
3378
|
+
}) {
|
|
3333
3379
|
/*
|
|
3334
3380
|
* Run the commands associated with the given button press,
|
|
3335
3381
|
* defaults on button1 and button2
|
|
@@ -3413,11 +3459,10 @@ function getDoubleClickEventName(evt) {
|
|
|
3413
3459
|
nameArr.push('doubleClick');
|
|
3414
3460
|
return nameArr.join('');
|
|
3415
3461
|
}
|
|
3416
|
-
function initDoubleClick(
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
} = _ref;
|
|
3462
|
+
function initDoubleClick({
|
|
3463
|
+
customizationService,
|
|
3464
|
+
commandsManager
|
|
3465
|
+
}) {
|
|
3421
3466
|
const cornerstoneViewportHandleDoubleClick = evt => {
|
|
3422
3467
|
// Do not allow double click on a tool.
|
|
3423
3468
|
const nearbyToolData = findNearbyToolData(commandsManager, evt);
|
|
@@ -3470,10 +3515,9 @@ const imageTiming = {
|
|
|
3470
3515
|
*
|
|
3471
3516
|
*/
|
|
3472
3517
|
|
|
3473
|
-
function initViewTiming(
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
} = _ref;
|
|
3518
|
+
function initViewTiming({
|
|
3519
|
+
element
|
|
3520
|
+
}) {
|
|
3477
3521
|
if (!IMAGE_TIMING_KEYS.find(key => src/* log */.cM.timingKeys[key])) {
|
|
3478
3522
|
return;
|
|
3479
3523
|
}
|
|
@@ -3518,14 +3562,13 @@ window.cornerstoneTools = dist_esm;
|
|
|
3518
3562
|
/**
|
|
3519
3563
|
*
|
|
3520
3564
|
*/
|
|
3521
|
-
async function init(
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
} = _ref;
|
|
3565
|
+
async function init({
|
|
3566
|
+
servicesManager,
|
|
3567
|
+
commandsManager,
|
|
3568
|
+
extensionManager,
|
|
3569
|
+
configuration,
|
|
3570
|
+
appConfig
|
|
3571
|
+
}) {
|
|
3529
3572
|
// Note: this should run first before initializing the cornerstone
|
|
3530
3573
|
// DO NOT CHANGE THE ORDER
|
|
3531
3574
|
const value = appConfig.useSharedArrayBuffer;
|
|
@@ -3540,8 +3583,8 @@ async function init(_ref) {
|
|
|
3540
3583
|
}
|
|
3541
3584
|
await (0,esm.init)({
|
|
3542
3585
|
rendering: {
|
|
3543
|
-
preferSizeOverAccuracy: Boolean(appConfig.
|
|
3544
|
-
useNorm16Texture: Boolean(appConfig.
|
|
3586
|
+
preferSizeOverAccuracy: Boolean(appConfig.preferSizeOverAccuracy),
|
|
3587
|
+
useNorm16Texture: Boolean(appConfig.useNorm16Texture)
|
|
3545
3588
|
}
|
|
3546
3589
|
});
|
|
3547
3590
|
|
|
@@ -3575,7 +3618,8 @@ async function init(_ref) {
|
|
|
3575
3618
|
toolGroupService,
|
|
3576
3619
|
toolbarService,
|
|
3577
3620
|
viewportGridService,
|
|
3578
|
-
stateSyncService
|
|
3621
|
+
stateSyncService,
|
|
3622
|
+
syncGroupService
|
|
3579
3623
|
} = servicesManager.services;
|
|
3580
3624
|
window.services = servicesManager.services;
|
|
3581
3625
|
window.extensionManager = extensionManager;
|
|
@@ -3597,6 +3641,11 @@ async function init(_ref) {
|
|
|
3597
3641
|
clearOnModeExit: true
|
|
3598
3642
|
});
|
|
3599
3643
|
|
|
3644
|
+
// Stores synchronizers state to be restored
|
|
3645
|
+
stateSyncService.register('synchronizersStore', {
|
|
3646
|
+
clearOnModeExit: true
|
|
3647
|
+
});
|
|
3648
|
+
|
|
3600
3649
|
// Stores a map from `positionPresentationId` to a Presentation object so that
|
|
3601
3650
|
// an OHIFCornerstoneViewport can be redisplayed with the same position
|
|
3602
3651
|
stateSyncService.register('positionPresentationStore', {
|
|
@@ -3710,6 +3759,17 @@ async function init(_ref) {
|
|
|
3710
3759
|
});
|
|
3711
3760
|
});
|
|
3712
3761
|
};
|
|
3762
|
+
|
|
3763
|
+
/**
|
|
3764
|
+
* Runs error handler for failed requests.
|
|
3765
|
+
* @param event
|
|
3766
|
+
*/
|
|
3767
|
+
const imageLoadFailedHandler = ({
|
|
3768
|
+
detail
|
|
3769
|
+
}) => {
|
|
3770
|
+
const handler = src/* errorHandler */.Po.getHTTPErrorHandler();
|
|
3771
|
+
handler(detail.error);
|
|
3772
|
+
};
|
|
3713
3773
|
const resetCrosshairs = evt => {
|
|
3714
3774
|
const {
|
|
3715
3775
|
element
|
|
@@ -3737,6 +3797,8 @@ async function init(_ref) {
|
|
|
3737
3797
|
} = evt.detail;
|
|
3738
3798
|
dist_esm.utilities.stackContextPrefetch.enable(element);
|
|
3739
3799
|
});
|
|
3800
|
+
esm.eventTarget.addEventListener(esm.EVENTS.IMAGE_LOAD_FAILED, imageLoadFailedHandler);
|
|
3801
|
+
esm.eventTarget.addEventListener(esm.EVENTS.IMAGE_LOAD_ERROR, imageLoadFailedHandler);
|
|
3740
3802
|
function elementEnabledHandler(evt) {
|
|
3741
3803
|
const {
|
|
3742
3804
|
element
|
|
@@ -3760,7 +3822,6 @@ async function init(_ref) {
|
|
|
3760
3822
|
// newStackCallback
|
|
3761
3823
|
// );
|
|
3762
3824
|
}
|
|
3763
|
-
|
|
3764
3825
|
esm.eventTarget.addEventListener(esm.EVENTS.ELEMENT_ENABLED, elementEnabledHandler.bind(null));
|
|
3765
3826
|
esm.eventTarget.addEventListener(esm.EVENTS.ELEMENT_DISABLED, elementDisabledHandler.bind(null));
|
|
3766
3827
|
viewportGridService.subscribe(viewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED, activeViewportEventListener);
|
|
@@ -3793,7 +3854,7 @@ var es = __webpack_require__(74834);
|
|
|
3793
3854
|
var prop_types = __webpack_require__(3827);
|
|
3794
3855
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
3795
3856
|
// EXTERNAL MODULE: ../../../node_modules/classnames/index.js
|
|
3796
|
-
var classnames = __webpack_require__(
|
|
3857
|
+
var classnames = __webpack_require__(33901);
|
|
3797
3858
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
3798
3859
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/DicomFileUploader.ts
|
|
3799
3860
|
|
|
@@ -3956,10 +4017,9 @@ class DicomFileUploader extends src/* PubSubService */.hC {
|
|
|
3956
4017
|
|
|
3957
4018
|
|
|
3958
4019
|
// eslint-disable-next-line react/display-name
|
|
3959
|
-
const DicomUploadProgressItem = /*#__PURE__*/(0,react.memo)(
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
} = _ref;
|
|
4020
|
+
const DicomUploadProgressItem = /*#__PURE__*/(0,react.memo)(({
|
|
4021
|
+
dicomFileUploader
|
|
4022
|
+
}) => {
|
|
3963
4023
|
const [percentComplete, setPercentComplete] = (0,react.useState)(dicomFileUploader.getPercentComplete());
|
|
3964
4024
|
const [failedReason, setFailedReason] = (0,react.useState)('');
|
|
3965
4025
|
const [status, setStatus] = (0,react.useState)(dicomFileUploader.getStatus());
|
|
@@ -4055,11 +4115,10 @@ const BASE_INTERVAL_TIME = 15000;
|
|
|
4055
4115
|
// calculate the upload rate.
|
|
4056
4116
|
const UPLOAD_RATE_THRESHOLD = 75;
|
|
4057
4117
|
const NO_WRAP_ELLIPSIS_CLASS_NAMES = 'text-ellipsis whitespace-nowrap overflow-hidden';
|
|
4058
|
-
function DicomUploadProgress(
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
} = _ref;
|
|
4118
|
+
function DicomUploadProgress({
|
|
4119
|
+
dicomFileUploaderArr,
|
|
4120
|
+
onComplete
|
|
4121
|
+
}) {
|
|
4063
4122
|
const [totalUploadSize] = (0,react.useState)(dicomFileUploaderArr.reduce((acc, fileUploader) => acc + fileUploader.getFileSize(), 0));
|
|
4064
4123
|
const currentUploadSizeRef = (0,react.useRef)(0);
|
|
4065
4124
|
const uploadRateRef = (0,react.useRef)(0);
|
|
@@ -4324,12 +4383,11 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
4324
4383
|
|
|
4325
4384
|
|
|
4326
4385
|
|
|
4327
|
-
function DicomUpload(
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
} = _ref;
|
|
4386
|
+
function DicomUpload({
|
|
4387
|
+
dataSource,
|
|
4388
|
+
onComplete,
|
|
4389
|
+
onStarted
|
|
4390
|
+
}) {
|
|
4333
4391
|
const baseClassNames = 'min-h-[480px] flex flex-col bg-black select-none';
|
|
4334
4392
|
const [dicomFileUploaderArr, setDicomFileUploaderArr] = (0,react.useState)([]);
|
|
4335
4393
|
const onDrop = (0,react.useCallback)(async acceptedFiles => {
|
|
@@ -4342,48 +4400,39 @@ function DicomUpload(_ref) {
|
|
|
4342
4400
|
onDrop(acceptedFiles);
|
|
4343
4401
|
},
|
|
4344
4402
|
noClick: true
|
|
4345
|
-
},
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
webkitdirectory: "true",
|
|
4379
|
-
mozdirectory: "true"
|
|
4380
|
-
}))));
|
|
4381
|
-
})), /*#__PURE__*/react.createElement("div", {
|
|
4382
|
-
className: "pt-5"
|
|
4383
|
-
}, "or drag images or folders here"), /*#__PURE__*/react.createElement("div", {
|
|
4384
|
-
className: "text-aqua-pale pt-3 text-lg"
|
|
4385
|
-
}, "(DICOM files supported)"));
|
|
4386
|
-
});
|
|
4403
|
+
}, ({
|
|
4404
|
+
getRootProps
|
|
4405
|
+
}) => /*#__PURE__*/react.createElement("div", _extends({}, getRootProps(), {
|
|
4406
|
+
className: "dicom-upload-drop-area-border-dash m-5 flex h-full flex-col items-center justify-center"
|
|
4407
|
+
}), /*#__PURE__*/react.createElement("div", {
|
|
4408
|
+
className: "flex gap-3"
|
|
4409
|
+
}, /*#__PURE__*/react.createElement(es/* default */.Z, {
|
|
4410
|
+
onDrop: onDrop,
|
|
4411
|
+
noDrag: true
|
|
4412
|
+
}, ({
|
|
4413
|
+
getRootProps,
|
|
4414
|
+
getInputProps
|
|
4415
|
+
}) => /*#__PURE__*/react.createElement("div", getRootProps(), /*#__PURE__*/react.createElement(ui_src/* Button */.zx, {
|
|
4416
|
+
disabled: false,
|
|
4417
|
+
onClick: () => {}
|
|
4418
|
+
}, 'Add files', /*#__PURE__*/react.createElement("input", getInputProps())))), /*#__PURE__*/react.createElement(es/* default */.Z, {
|
|
4419
|
+
onDrop: onDrop,
|
|
4420
|
+
noDrag: true
|
|
4421
|
+
}, ({
|
|
4422
|
+
getRootProps,
|
|
4423
|
+
getInputProps
|
|
4424
|
+
}) => /*#__PURE__*/react.createElement("div", getRootProps(), /*#__PURE__*/react.createElement(ui_src/* Button */.zx, {
|
|
4425
|
+
type: ui_src/* ButtonEnums.type */.LZ.dt.secondary,
|
|
4426
|
+
disabled: false,
|
|
4427
|
+
onClick: () => {}
|
|
4428
|
+
}, 'Add folder', /*#__PURE__*/react.createElement("input", _extends({}, getInputProps(), {
|
|
4429
|
+
webkitdirectory: "true",
|
|
4430
|
+
mozdirectory: "true"
|
|
4431
|
+
})))))), /*#__PURE__*/react.createElement("div", {
|
|
4432
|
+
className: "pt-5"
|
|
4433
|
+
}, "or drag images or folders here"), /*#__PURE__*/react.createElement("div", {
|
|
4434
|
+
className: "text-aqua-pale pt-3 text-lg"
|
|
4435
|
+
}, "(DICOM files supported)")));
|
|
4387
4436
|
};
|
|
4388
4437
|
return /*#__PURE__*/react.createElement(react.Fragment, null, dicomFileUploaderArr.length ? /*#__PURE__*/react.createElement("div", {
|
|
4389
4438
|
className: classnames_default()('h-[calc(100vh-300px)]', baseClassNames)
|
|
@@ -4444,6 +4493,8 @@ function getCustomizationModule() {
|
|
|
4444
4493
|
}];
|
|
4445
4494
|
}
|
|
4446
4495
|
/* harmony default export */ const src_getCustomizationModule = (getCustomizationModule);
|
|
4496
|
+
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 10 modules
|
|
4497
|
+
var gl_matrix_esm = __webpack_require__(45451);
|
|
4447
4498
|
// EXTERNAL MODULE: ../../../node_modules/html2canvas/dist/html2canvas.esm.js
|
|
4448
4499
|
var html2canvas_esm = __webpack_require__(76010);
|
|
4449
4500
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/CornerstoneViewportDownloadForm.tsx
|
|
@@ -4458,12 +4509,11 @@ const MINIMUM_SIZE = 100;
|
|
|
4458
4509
|
const DEFAULT_SIZE = 512;
|
|
4459
4510
|
const MAX_TEXTURE_SIZE = 10000;
|
|
4460
4511
|
const VIEWPORT_ID = 'cornerstone-viewport-download-form';
|
|
4461
|
-
const CornerstoneViewportDownloadForm =
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
} = _ref;
|
|
4512
|
+
const CornerstoneViewportDownloadForm = ({
|
|
4513
|
+
onClose,
|
|
4514
|
+
activeViewportId: activeViewportIdProp,
|
|
4515
|
+
cornerstoneViewportService
|
|
4516
|
+
}) => {
|
|
4467
4517
|
const enabledElement = (0,state/* getEnabledElement */.K8)(activeViewportIdProp);
|
|
4468
4518
|
const activeViewportElement = enabledElement?.element;
|
|
4469
4519
|
const activeViewportEnabledElement = (0,esm.getEnabledElement)(activeViewportElement);
|
|
@@ -4674,16 +4724,15 @@ CornerstoneViewportDownloadForm.propTypes = {
|
|
|
4674
4724
|
activeViewportId: (prop_types_default()).string.isRequired
|
|
4675
4725
|
};
|
|
4676
4726
|
/* harmony default export */ const utils_CornerstoneViewportDownloadForm = (CornerstoneViewportDownloadForm);
|
|
4677
|
-
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/
|
|
4678
|
-
const
|
|
4679
|
-
function
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
} = _ref;
|
|
4727
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/imageSliceSync/toggleImageSliceSync.ts
|
|
4728
|
+
const IMAGE_SLICE_SYNC_NAME = 'IMAGE_SLICE_SYNC';
|
|
4729
|
+
function toggleImageSliceSync({
|
|
4730
|
+
toggledState,
|
|
4731
|
+
servicesManager,
|
|
4732
|
+
viewports: providedViewports
|
|
4733
|
+
}) {
|
|
4685
4734
|
if (!toggledState) {
|
|
4686
|
-
return disableSync(
|
|
4735
|
+
return disableSync(IMAGE_SLICE_SYNC_NAME, servicesManager);
|
|
4687
4736
|
}
|
|
4688
4737
|
const {
|
|
4689
4738
|
syncGroupService,
|
|
@@ -4704,7 +4753,7 @@ function toggleStackImageSync(_ref) {
|
|
|
4704
4753
|
}
|
|
4705
4754
|
syncGroupService.addViewportToSyncGroup(viewportId, viewport.getRenderingEngine().id, {
|
|
4706
4755
|
type: 'stackimage',
|
|
4707
|
-
id:
|
|
4756
|
+
id: IMAGE_SLICE_SYNC_NAME,
|
|
4708
4757
|
source: true,
|
|
4709
4758
|
target: true
|
|
4710
4759
|
});
|
|
@@ -4767,11 +4816,11 @@ function getReconstructableStackViewports(viewportGridService, displaySetService
|
|
|
4767
4816
|
|
|
4768
4817
|
|
|
4769
4818
|
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4819
|
+
|
|
4820
|
+
function commandsModule({
|
|
4821
|
+
servicesManager,
|
|
4822
|
+
commandsManager
|
|
4823
|
+
}) {
|
|
4775
4824
|
const {
|
|
4776
4825
|
viewportGridService,
|
|
4777
4826
|
toolGroupService,
|
|
@@ -4835,19 +4884,17 @@ function commandsModule(_ref) {
|
|
|
4835
4884
|
};
|
|
4836
4885
|
commandsManager.run(options, optionsToUse);
|
|
4837
4886
|
},
|
|
4838
|
-
getNearbyToolData(
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
} = _ref2;
|
|
4887
|
+
getNearbyToolData({
|
|
4888
|
+
nearbyToolData,
|
|
4889
|
+
element,
|
|
4890
|
+
canvasCoordinates
|
|
4891
|
+
}) {
|
|
4844
4892
|
return nearbyToolData ?? dist_esm.utilities.getAnnotationNearPoint(element, canvasCoordinates);
|
|
4845
4893
|
},
|
|
4846
|
-
getNearbyAnnotation(
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
} = _ref3;
|
|
4894
|
+
getNearbyAnnotation({
|
|
4895
|
+
element,
|
|
4896
|
+
canvasCoordinates
|
|
4897
|
+
}) {
|
|
4851
4898
|
const nearbyToolData = actions.getNearbyToolData({
|
|
4852
4899
|
nearbyToolData: null,
|
|
4853
4900
|
element,
|
|
@@ -4871,10 +4918,9 @@ function commandsModule(_ref) {
|
|
|
4871
4918
|
// Measurement tool commands:
|
|
4872
4919
|
|
|
4873
4920
|
/** Delete the given measurement */
|
|
4874
|
-
deleteMeasurement:
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
} = _ref4;
|
|
4921
|
+
deleteMeasurement: ({
|
|
4922
|
+
uid
|
|
4923
|
+
}) => {
|
|
4878
4924
|
if (uid) {
|
|
4879
4925
|
measurementServiceSource.remove(uid);
|
|
4880
4926
|
}
|
|
@@ -4883,10 +4929,9 @@ function commandsModule(_ref) {
|
|
|
4883
4929
|
* Show the measurement labelling input dialog and update the label
|
|
4884
4930
|
* on the measurement with a response if not cancelled.
|
|
4885
4931
|
*/
|
|
4886
|
-
setMeasurementLabel:
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
} = _ref5;
|
|
4932
|
+
setMeasurementLabel: ({
|
|
4933
|
+
uid
|
|
4934
|
+
}) => {
|
|
4890
4935
|
const measurement = measurementService.getMeasurement(uid);
|
|
4891
4936
|
utils_callInputDialog(uiDialogService, measurement, (label, actionId) => {
|
|
4892
4937
|
if (actionId === 'cancel') {
|
|
@@ -4961,10 +5006,9 @@ function commandsModule(_ref) {
|
|
|
4961
5006
|
},
|
|
4962
5007
|
// Retrieve value commands
|
|
4963
5008
|
getActiveViewportEnabledElement: _getActiveViewportEnabledElement,
|
|
4964
|
-
setViewportActive:
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
} = _ref6;
|
|
5009
|
+
setViewportActive: ({
|
|
5010
|
+
viewportId
|
|
5011
|
+
}) => {
|
|
4968
5012
|
const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);
|
|
4969
5013
|
if (!viewportInfo) {
|
|
4970
5014
|
console.warn('No viewport found for viewportId:', viewportId);
|
|
@@ -4972,11 +5016,10 @@ function commandsModule(_ref) {
|
|
|
4972
5016
|
}
|
|
4973
5017
|
viewportGridService.setActiveViewportId(viewportId);
|
|
4974
5018
|
},
|
|
4975
|
-
arrowTextCallback:
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
} = _ref7;
|
|
5019
|
+
arrowTextCallback: ({
|
|
5020
|
+
callback,
|
|
5021
|
+
data
|
|
5022
|
+
}) => {
|
|
4980
5023
|
utils_callInputDialog(uiDialogService, data, callback);
|
|
4981
5024
|
},
|
|
4982
5025
|
cleanUpCrosshairs: () => {
|
|
@@ -5013,12 +5056,11 @@ function commandsModule(_ref) {
|
|
|
5013
5056
|
isPlaying: false
|
|
5014
5057
|
}));
|
|
5015
5058
|
},
|
|
5016
|
-
setWindowLevel(
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
} = _ref8;
|
|
5059
|
+
setWindowLevel({
|
|
5060
|
+
window,
|
|
5061
|
+
level,
|
|
5062
|
+
toolGroupId
|
|
5063
|
+
}) {
|
|
5022
5064
|
// convert to numbers
|
|
5023
5065
|
const windowWidthNum = Number(window);
|
|
5024
5066
|
const windowCenterNum = Number(level);
|
|
@@ -5056,12 +5098,11 @@ function commandsModule(_ref) {
|
|
|
5056
5098
|
setToolbarToggled: props => {
|
|
5057
5099
|
toolbarService.setToggled(props.toolId, props.isActive ?? true);
|
|
5058
5100
|
},
|
|
5059
|
-
setToolActive:
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
} = _ref9;
|
|
5101
|
+
setToolActive: ({
|
|
5102
|
+
toolName,
|
|
5103
|
+
toolGroupId = null,
|
|
5104
|
+
toggledState
|
|
5105
|
+
}) => {
|
|
5065
5106
|
if (toolName === 'Crosshairs') {
|
|
5066
5107
|
const activeViewportToolGroup = toolGroupService.getToolGroup(null);
|
|
5067
5108
|
if (!activeViewportToolGroup._toolInstances.Crosshairs) {
|
|
@@ -5146,10 +5187,9 @@ function commandsModule(_ref) {
|
|
|
5146
5187
|
});
|
|
5147
5188
|
}
|
|
5148
5189
|
},
|
|
5149
|
-
rotateViewport:
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
} = _ref10;
|
|
5190
|
+
rotateViewport: ({
|
|
5191
|
+
rotation
|
|
5192
|
+
}) => {
|
|
5153
5193
|
const enabledElement = _getActiveViewportEnabledElement();
|
|
5154
5194
|
if (!enabledElement) {
|
|
5155
5195
|
return;
|
|
@@ -5157,10 +5197,18 @@ function commandsModule(_ref) {
|
|
|
5157
5197
|
const {
|
|
5158
5198
|
viewport
|
|
5159
5199
|
} = enabledElement;
|
|
5160
|
-
if (viewport instanceof esm.
|
|
5161
|
-
const
|
|
5162
|
-
|
|
5163
|
-
|
|
5200
|
+
if (viewport instanceof esm.BaseVolumeViewport) {
|
|
5201
|
+
const camera = viewport.getCamera();
|
|
5202
|
+
const rotAngle = rotation * Math.PI / 180;
|
|
5203
|
+
const rotMat = gl_matrix_esm/* mat4.identity */._E.identity(new Float32Array(16));
|
|
5204
|
+
gl_matrix_esm/* mat4.rotate */._E.rotate(rotMat, rotMat, rotAngle, camera.viewPlaneNormal);
|
|
5205
|
+
const rotatedViewUp = gl_matrix_esm/* vec3.transformMat4 */.R3.transformMat4(gl_matrix_esm/* vec3.create */.R3.create(), camera.viewUp, rotMat);
|
|
5206
|
+
viewport.setCamera({
|
|
5207
|
+
viewUp: rotatedViewUp
|
|
5208
|
+
});
|
|
5209
|
+
viewport.render();
|
|
5210
|
+
} else if (viewport.getRotation !== undefined) {
|
|
5211
|
+
const currentRotation = viewport.getRotation();
|
|
5164
5212
|
const newRotation = (currentRotation + rotation) % 360;
|
|
5165
5213
|
viewport.setProperties({
|
|
5166
5214
|
rotation: newRotation
|
|
@@ -5204,10 +5252,9 @@ function commandsModule(_ref) {
|
|
|
5204
5252
|
viewport.render();
|
|
5205
5253
|
}
|
|
5206
5254
|
},
|
|
5207
|
-
invertViewport:
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
} = _ref11;
|
|
5255
|
+
invertViewport: ({
|
|
5256
|
+
element
|
|
5257
|
+
}) => {
|
|
5211
5258
|
let enabledElement;
|
|
5212
5259
|
if (element === undefined) {
|
|
5213
5260
|
enabledElement = _getActiveViewportEnabledElement();
|
|
@@ -5236,19 +5283,13 @@ function commandsModule(_ref) {
|
|
|
5236
5283
|
const {
|
|
5237
5284
|
viewport
|
|
5238
5285
|
} = enabledElement;
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
viewport.resetCamera();
|
|
5242
|
-
} else {
|
|
5243
|
-
viewport.resetProperties();
|
|
5244
|
-
viewport.resetCamera();
|
|
5245
|
-
}
|
|
5286
|
+
viewport.resetProperties?.();
|
|
5287
|
+
viewport.resetCamera();
|
|
5246
5288
|
viewport.render();
|
|
5247
5289
|
},
|
|
5248
|
-
scaleViewport:
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
} = _ref12;
|
|
5290
|
+
scaleViewport: ({
|
|
5291
|
+
direction
|
|
5292
|
+
}) => {
|
|
5252
5293
|
const enabledElement = _getActiveViewportEnabledElement();
|
|
5253
5294
|
const scaleFactor = direction > 0 ? 0.9 : 1.1;
|
|
5254
5295
|
if (!enabledElement) {
|
|
@@ -5273,11 +5314,10 @@ function commandsModule(_ref) {
|
|
|
5273
5314
|
}
|
|
5274
5315
|
},
|
|
5275
5316
|
/** Jumps the active viewport or the specified one to the given slice index */
|
|
5276
|
-
jumpToImage:
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
} = _ref13;
|
|
5317
|
+
jumpToImage: ({
|
|
5318
|
+
imageIndex,
|
|
5319
|
+
viewport: gridViewport
|
|
5320
|
+
}) => {
|
|
5281
5321
|
// Get current active viewport (return if none active)
|
|
5282
5322
|
let viewport;
|
|
5283
5323
|
if (!gridViewport) {
|
|
@@ -5311,10 +5351,9 @@ function commandsModule(_ref) {
|
|
|
5311
5351
|
};
|
|
5312
5352
|
dist_esm.utilities.jumpToSlice(viewport.element, options);
|
|
5313
5353
|
},
|
|
5314
|
-
scroll:
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
} = _ref14;
|
|
5354
|
+
scroll: ({
|
|
5355
|
+
direction
|
|
5356
|
+
}) => {
|
|
5318
5357
|
const enabledElement = _getActiveViewportEnabledElement();
|
|
5319
5358
|
if (!enabledElement) {
|
|
5320
5359
|
return;
|
|
@@ -5327,13 +5366,12 @@ function commandsModule(_ref) {
|
|
|
5327
5366
|
};
|
|
5328
5367
|
dist_esm.utilities.scroll(viewport, options);
|
|
5329
5368
|
},
|
|
5330
|
-
setViewportColormap:
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
} = _ref15;
|
|
5369
|
+
setViewportColormap: ({
|
|
5370
|
+
viewportId,
|
|
5371
|
+
displaySetInstanceUID,
|
|
5372
|
+
colormap,
|
|
5373
|
+
immediate = false
|
|
5374
|
+
}) => {
|
|
5337
5375
|
const viewport = cornerstoneViewportService.getCornerstoneViewport(viewportId);
|
|
5338
5376
|
const actorEntries = viewport.getActors();
|
|
5339
5377
|
const actorEntry = actorEntries.find(actorEntry => {
|
|
@@ -5351,10 +5389,9 @@ function commandsModule(_ref) {
|
|
|
5351
5389
|
viewport.render();
|
|
5352
5390
|
}
|
|
5353
5391
|
},
|
|
5354
|
-
changeActiveViewport:
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
} = _ref16;
|
|
5392
|
+
changeActiveViewport: ({
|
|
5393
|
+
direction = 1
|
|
5394
|
+
}) => {
|
|
5358
5395
|
const {
|
|
5359
5396
|
activeViewportId,
|
|
5360
5397
|
viewports
|
|
@@ -5364,20 +5401,18 @@ function commandsModule(_ref) {
|
|
|
5364
5401
|
const nextViewportIndex = (currentIndex + direction + viewportIds.length) % viewportIds.length;
|
|
5365
5402
|
viewportGridService.setActiveViewportId(viewportIds[nextViewportIndex]);
|
|
5366
5403
|
},
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
toggleStackImageSync({
|
|
5404
|
+
toggleImageSliceSync: ({
|
|
5405
|
+
toggledState
|
|
5406
|
+
}) => {
|
|
5407
|
+
toggleImageSliceSync({
|
|
5372
5408
|
servicesManager,
|
|
5373
5409
|
toggledState
|
|
5374
5410
|
});
|
|
5375
5411
|
},
|
|
5376
|
-
setSourceViewportForReferenceLinesTool:
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
} = _ref18;
|
|
5412
|
+
setSourceViewportForReferenceLinesTool: ({
|
|
5413
|
+
toggledState,
|
|
5414
|
+
viewportId
|
|
5415
|
+
}) => {
|
|
5381
5416
|
if (!viewportId) {
|
|
5382
5417
|
const {
|
|
5383
5418
|
activeViewportId
|
|
@@ -5390,14 +5425,32 @@ function commandsModule(_ref) {
|
|
|
5390
5425
|
}, true // overwrite
|
|
5391
5426
|
);
|
|
5392
5427
|
},
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
viewportId
|
|
5397
|
-
} = _ref19;
|
|
5428
|
+
storePresentation: ({
|
|
5429
|
+
viewportId
|
|
5430
|
+
}) => {
|
|
5398
5431
|
cornerstoneViewportService.storePresentation({
|
|
5399
5432
|
viewportId
|
|
5400
5433
|
});
|
|
5434
|
+
},
|
|
5435
|
+
attachProtocolViewportDataListener: ({
|
|
5436
|
+
protocol,
|
|
5437
|
+
stageIndex
|
|
5438
|
+
}) => {
|
|
5439
|
+
const EVENT = cornerstoneViewportService.EVENTS.VIEWPORT_DATA_CHANGED;
|
|
5440
|
+
const command = protocol.callbacks.onViewportDataInitialized;
|
|
5441
|
+
const numPanes = protocol.stages?.[stageIndex]?.viewports.length ?? 1;
|
|
5442
|
+
let numPanesWithData = 0;
|
|
5443
|
+
const {
|
|
5444
|
+
unsubscribe
|
|
5445
|
+
} = cornerstoneViewportService.subscribe(EVENT, evt => {
|
|
5446
|
+
numPanesWithData++;
|
|
5447
|
+
if (numPanesWithData === numPanes) {
|
|
5448
|
+
commandsManager.run(...command);
|
|
5449
|
+
|
|
5450
|
+
// Unsubscribe from the event
|
|
5451
|
+
unsubscribe(EVENT);
|
|
5452
|
+
}
|
|
5453
|
+
});
|
|
5401
5454
|
}
|
|
5402
5455
|
};
|
|
5403
5456
|
const definitions = {
|
|
@@ -5532,8 +5585,8 @@ function commandsModule(_ref) {
|
|
|
5532
5585
|
setViewportColormap: {
|
|
5533
5586
|
commandFn: actions.setViewportColormap
|
|
5534
5587
|
},
|
|
5535
|
-
|
|
5536
|
-
commandFn: actions.
|
|
5588
|
+
toggleImageSliceSync: {
|
|
5589
|
+
commandFn: actions.toggleImageSliceSync
|
|
5537
5590
|
},
|
|
5538
5591
|
setSourceViewportForReferenceLinesTool: {
|
|
5539
5592
|
commandFn: actions.setSourceViewportForReferenceLinesTool
|
|
@@ -5546,6 +5599,9 @@ function commandsModule(_ref) {
|
|
|
5546
5599
|
},
|
|
5547
5600
|
cleanUpCrosshairs: {
|
|
5548
5601
|
commandFn: actions.cleanUpCrosshairs
|
|
5602
|
+
},
|
|
5603
|
+
attachProtocolViewportDataListener: {
|
|
5604
|
+
commandFn: actions.attachProtocolViewportDataListener
|
|
5549
5605
|
}
|
|
5550
5606
|
};
|
|
5551
5607
|
return {
|
|
@@ -5555,35 +5611,19 @@ function commandsModule(_ref) {
|
|
|
5555
5611
|
};
|
|
5556
5612
|
}
|
|
5557
5613
|
/* harmony default export */ const src_commandsModule = (commandsModule);
|
|
5558
|
-
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/
|
|
5559
|
-
const
|
|
5560
|
-
id: '
|
|
5561
|
-
name: 'Multi-Planar Reconstruction',
|
|
5614
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/fourUp.ts
|
|
5615
|
+
const fourUp = {
|
|
5616
|
+
id: 'fourUp',
|
|
5562
5617
|
locked: true,
|
|
5563
|
-
|
|
5564
|
-
|
|
5618
|
+
name: 'fourUp',
|
|
5619
|
+
createdDate: '2023-03-15T10:29:44.894Z',
|
|
5620
|
+
modifiedDate: '2023-03-15T10:29:44.894Z',
|
|
5565
5621
|
availableTo: {},
|
|
5566
5622
|
editableBy: {},
|
|
5567
|
-
// Unknown number of priors referenced - so just match any study
|
|
5568
|
-
numberOfPriorsReferenced: 0,
|
|
5569
5623
|
protocolMatchingRules: [],
|
|
5570
|
-
imageLoadStrategy: '
|
|
5571
|
-
callbacks: {
|
|
5572
|
-
// Switches out of MPR mode when the layout change button is used
|
|
5573
|
-
onLayoutChange: [{
|
|
5574
|
-
commandName: 'toggleHangingProtocol',
|
|
5575
|
-
commandOptions: {
|
|
5576
|
-
protocolId: 'mpr'
|
|
5577
|
-
},
|
|
5578
|
-
context: 'DEFAULT'
|
|
5579
|
-
}],
|
|
5580
|
-
// Turns off crosshairs when switching out of MPR mode
|
|
5581
|
-
onProtocolExit: [{
|
|
5582
|
-
commandName: 'cleanUpCrosshairs'
|
|
5583
|
-
}]
|
|
5584
|
-
},
|
|
5624
|
+
imageLoadStrategy: 'interleaveCenter',
|
|
5585
5625
|
displaySetSelectors: {
|
|
5586
|
-
|
|
5626
|
+
mprDisplaySet: {
|
|
5587
5627
|
seriesMatchingRules: [{
|
|
5588
5628
|
weight: 1,
|
|
5589
5629
|
attribute: 'isReconstructable',
|
|
@@ -5597,33 +5637,17 @@ const mpr = {
|
|
|
5597
5637
|
}
|
|
5598
5638
|
},
|
|
5599
5639
|
stages: [{
|
|
5600
|
-
|
|
5640
|
+
id: 'fourUpStage',
|
|
5641
|
+
name: 'fourUp',
|
|
5601
5642
|
viewportStructure: {
|
|
5602
5643
|
layoutType: 'grid',
|
|
5603
5644
|
properties: {
|
|
5604
|
-
rows:
|
|
5605
|
-
columns:
|
|
5606
|
-
layoutOptions: [{
|
|
5607
|
-
x: 0,
|
|
5608
|
-
y: 0,
|
|
5609
|
-
width: 1 / 3,
|
|
5610
|
-
height: 1
|
|
5611
|
-
}, {
|
|
5612
|
-
x: 1 / 3,
|
|
5613
|
-
y: 0,
|
|
5614
|
-
width: 1 / 3,
|
|
5615
|
-
height: 1
|
|
5616
|
-
}, {
|
|
5617
|
-
x: 2 / 3,
|
|
5618
|
-
y: 0,
|
|
5619
|
-
width: 1 / 3,
|
|
5620
|
-
height: 1
|
|
5621
|
-
}]
|
|
5645
|
+
rows: 2,
|
|
5646
|
+
columns: 2
|
|
5622
5647
|
}
|
|
5623
5648
|
},
|
|
5624
5649
|
viewports: [{
|
|
5625
5650
|
viewportOptions: {
|
|
5626
|
-
viewportId: 'mpr-axial',
|
|
5627
5651
|
toolGroupId: 'mpr',
|
|
5628
5652
|
viewportType: 'volume',
|
|
5629
5653
|
orientation: 'axial',
|
|
@@ -5638,14 +5662,29 @@ const mpr = {
|
|
|
5638
5662
|
}]
|
|
5639
5663
|
},
|
|
5640
5664
|
displaySets: [{
|
|
5641
|
-
id: '
|
|
5665
|
+
id: 'mprDisplaySet'
|
|
5666
|
+
}]
|
|
5667
|
+
}, {
|
|
5668
|
+
viewportOptions: {
|
|
5669
|
+
toolGroupId: 'volume3d',
|
|
5670
|
+
viewportType: 'volume3d',
|
|
5671
|
+
orientation: 'coronal',
|
|
5672
|
+
customViewportProps: {
|
|
5673
|
+
hideOverlays: true
|
|
5674
|
+
}
|
|
5675
|
+
},
|
|
5676
|
+
displaySets: [{
|
|
5677
|
+
id: 'mprDisplaySet',
|
|
5678
|
+
options: {
|
|
5679
|
+
// ToDo: choose appropriate preset
|
|
5680
|
+
displayPreset: 'CT-Bone'
|
|
5681
|
+
}
|
|
5642
5682
|
}]
|
|
5643
5683
|
}, {
|
|
5644
5684
|
viewportOptions: {
|
|
5645
|
-
viewportId: 'mpr-sagittal',
|
|
5646
5685
|
toolGroupId: 'mpr',
|
|
5647
5686
|
viewportType: 'volume',
|
|
5648
|
-
orientation: '
|
|
5687
|
+
orientation: 'coronal',
|
|
5649
5688
|
initialImageOptions: {
|
|
5650
5689
|
preset: 'middle'
|
|
5651
5690
|
},
|
|
@@ -5657,14 +5696,13 @@ const mpr = {
|
|
|
5657
5696
|
}]
|
|
5658
5697
|
},
|
|
5659
5698
|
displaySets: [{
|
|
5660
|
-
id: '
|
|
5699
|
+
id: 'mprDisplaySet'
|
|
5661
5700
|
}]
|
|
5662
5701
|
}, {
|
|
5663
5702
|
viewportOptions: {
|
|
5664
|
-
viewportId: 'mpr-coronal',
|
|
5665
5703
|
toolGroupId: 'mpr',
|
|
5666
5704
|
viewportType: 'volume',
|
|
5667
|
-
orientation: '
|
|
5705
|
+
orientation: 'sagittal',
|
|
5668
5706
|
initialImageOptions: {
|
|
5669
5707
|
preset: 'middle'
|
|
5670
5708
|
},
|
|
@@ -5676,15 +5714,16 @@ const mpr = {
|
|
|
5676
5714
|
}]
|
|
5677
5715
|
},
|
|
5678
5716
|
displaySets: [{
|
|
5679
|
-
id: '
|
|
5717
|
+
id: 'mprDisplaySet'
|
|
5680
5718
|
}]
|
|
5681
5719
|
}]
|
|
5682
5720
|
}]
|
|
5683
5721
|
};
|
|
5684
|
-
|
|
5685
|
-
|
|
5722
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/main3D.ts
|
|
5723
|
+
const main3D = {
|
|
5724
|
+
id: 'main3D',
|
|
5686
5725
|
locked: true,
|
|
5687
|
-
name: '
|
|
5726
|
+
name: 'main3D',
|
|
5688
5727
|
createdDate: '2023-03-15T10:29:44.894Z',
|
|
5689
5728
|
modifiedDate: '2023-03-15T10:29:44.894Z',
|
|
5690
5729
|
availableTo: {},
|
|
@@ -5702,28 +5741,57 @@ const mprAnd3DVolumeViewport = {
|
|
|
5702
5741
|
}
|
|
5703
5742
|
},
|
|
5704
5743
|
required: true
|
|
5705
|
-
}, {
|
|
5706
|
-
attribute: 'Modality',
|
|
5707
|
-
constraint: {
|
|
5708
|
-
equals: {
|
|
5709
|
-
value: 'CT'
|
|
5710
|
-
}
|
|
5711
|
-
},
|
|
5712
|
-
required: true
|
|
5713
5744
|
}]
|
|
5714
5745
|
}
|
|
5715
5746
|
},
|
|
5716
5747
|
stages: [{
|
|
5717
|
-
id: '
|
|
5718
|
-
name: '
|
|
5748
|
+
id: 'main3DStage',
|
|
5749
|
+
name: 'main3D',
|
|
5719
5750
|
viewportStructure: {
|
|
5720
5751
|
layoutType: 'grid',
|
|
5721
5752
|
properties: {
|
|
5722
5753
|
rows: 2,
|
|
5723
|
-
columns:
|
|
5754
|
+
columns: 3,
|
|
5755
|
+
layoutOptions: [{
|
|
5756
|
+
x: 0,
|
|
5757
|
+
y: 0,
|
|
5758
|
+
width: 1,
|
|
5759
|
+
height: 1 / 2
|
|
5760
|
+
}, {
|
|
5761
|
+
x: 0,
|
|
5762
|
+
y: 1 / 2,
|
|
5763
|
+
width: 1 / 3,
|
|
5764
|
+
height: 1 / 2
|
|
5765
|
+
}, {
|
|
5766
|
+
x: 1 / 3,
|
|
5767
|
+
y: 1 / 2,
|
|
5768
|
+
width: 1 / 3,
|
|
5769
|
+
height: 1 / 2
|
|
5770
|
+
}, {
|
|
5771
|
+
x: 2 / 3,
|
|
5772
|
+
y: 1 / 2,
|
|
5773
|
+
width: 1 / 3,
|
|
5774
|
+
height: 1 / 2
|
|
5775
|
+
}]
|
|
5724
5776
|
}
|
|
5725
5777
|
},
|
|
5726
5778
|
viewports: [{
|
|
5779
|
+
viewportOptions: {
|
|
5780
|
+
toolGroupId: 'volume3d',
|
|
5781
|
+
viewportType: 'volume3d',
|
|
5782
|
+
orientation: 'coronal',
|
|
5783
|
+
customViewportProps: {
|
|
5784
|
+
hideOverlays: true
|
|
5785
|
+
}
|
|
5786
|
+
},
|
|
5787
|
+
displaySets: [{
|
|
5788
|
+
id: 'mprDisplaySet',
|
|
5789
|
+
options: {
|
|
5790
|
+
// ToDo: choose appropriate preset
|
|
5791
|
+
displayPreset: 'CT-Bone'
|
|
5792
|
+
}
|
|
5793
|
+
}]
|
|
5794
|
+
}, {
|
|
5727
5795
|
viewportOptions: {
|
|
5728
5796
|
toolGroupId: 'mpr',
|
|
5729
5797
|
viewportType: 'volume',
|
|
@@ -5743,9 +5811,399 @@ const mprAnd3DVolumeViewport = {
|
|
|
5743
5811
|
}]
|
|
5744
5812
|
}, {
|
|
5745
5813
|
viewportOptions: {
|
|
5746
|
-
toolGroupId: '
|
|
5747
|
-
viewportType: '
|
|
5748
|
-
orientation: 'coronal',
|
|
5814
|
+
toolGroupId: 'mpr',
|
|
5815
|
+
viewportType: 'volume',
|
|
5816
|
+
orientation: 'coronal',
|
|
5817
|
+
initialImageOptions: {
|
|
5818
|
+
preset: 'middle'
|
|
5819
|
+
},
|
|
5820
|
+
syncGroups: [{
|
|
5821
|
+
type: 'voi',
|
|
5822
|
+
id: 'mpr',
|
|
5823
|
+
source: true,
|
|
5824
|
+
target: true
|
|
5825
|
+
}]
|
|
5826
|
+
},
|
|
5827
|
+
displaySets: [{
|
|
5828
|
+
id: 'mprDisplaySet'
|
|
5829
|
+
}]
|
|
5830
|
+
}, {
|
|
5831
|
+
viewportOptions: {
|
|
5832
|
+
toolGroupId: 'mpr',
|
|
5833
|
+
viewportType: 'volume',
|
|
5834
|
+
orientation: 'sagittal',
|
|
5835
|
+
initialImageOptions: {
|
|
5836
|
+
preset: 'middle'
|
|
5837
|
+
},
|
|
5838
|
+
syncGroups: [{
|
|
5839
|
+
type: 'voi',
|
|
5840
|
+
id: 'mpr',
|
|
5841
|
+
source: true,
|
|
5842
|
+
target: true
|
|
5843
|
+
}]
|
|
5844
|
+
},
|
|
5845
|
+
displaySets: [{
|
|
5846
|
+
id: 'mprDisplaySet'
|
|
5847
|
+
}]
|
|
5848
|
+
}]
|
|
5849
|
+
}]
|
|
5850
|
+
};
|
|
5851
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/mpr.ts
|
|
5852
|
+
const mpr = {
|
|
5853
|
+
id: 'mpr',
|
|
5854
|
+
name: 'Multi-Planar Reconstruction',
|
|
5855
|
+
locked: true,
|
|
5856
|
+
createdDate: '2021-02-23',
|
|
5857
|
+
modifiedDate: '2023-08-15',
|
|
5858
|
+
availableTo: {},
|
|
5859
|
+
editableBy: {},
|
|
5860
|
+
// Unknown number of priors referenced - so just match any study
|
|
5861
|
+
numberOfPriorsReferenced: 0,
|
|
5862
|
+
protocolMatchingRules: [],
|
|
5863
|
+
imageLoadStrategy: 'nth',
|
|
5864
|
+
callbacks: {
|
|
5865
|
+
// Switches out of MPR mode when the layout change button is used
|
|
5866
|
+
onLayoutChange: [{
|
|
5867
|
+
commandName: 'toggleHangingProtocol',
|
|
5868
|
+
commandOptions: {
|
|
5869
|
+
protocolId: 'mpr'
|
|
5870
|
+
},
|
|
5871
|
+
context: 'DEFAULT'
|
|
5872
|
+
}],
|
|
5873
|
+
// Turns off crosshairs when switching out of MPR mode
|
|
5874
|
+
onProtocolExit: [{
|
|
5875
|
+
commandName: 'cleanUpCrosshairs'
|
|
5876
|
+
}]
|
|
5877
|
+
},
|
|
5878
|
+
displaySetSelectors: {
|
|
5879
|
+
activeDisplaySet: {
|
|
5880
|
+
seriesMatchingRules: [{
|
|
5881
|
+
weight: 1,
|
|
5882
|
+
attribute: 'isReconstructable',
|
|
5883
|
+
constraint: {
|
|
5884
|
+
equals: {
|
|
5885
|
+
value: true
|
|
5886
|
+
}
|
|
5887
|
+
},
|
|
5888
|
+
required: true
|
|
5889
|
+
}]
|
|
5890
|
+
}
|
|
5891
|
+
},
|
|
5892
|
+
stages: [{
|
|
5893
|
+
name: 'MPR 1x3',
|
|
5894
|
+
viewportStructure: {
|
|
5895
|
+
layoutType: 'grid',
|
|
5896
|
+
properties: {
|
|
5897
|
+
rows: 1,
|
|
5898
|
+
columns: 3,
|
|
5899
|
+
layoutOptions: [{
|
|
5900
|
+
x: 0,
|
|
5901
|
+
y: 0,
|
|
5902
|
+
width: 1 / 3,
|
|
5903
|
+
height: 1
|
|
5904
|
+
}, {
|
|
5905
|
+
x: 1 / 3,
|
|
5906
|
+
y: 0,
|
|
5907
|
+
width: 1 / 3,
|
|
5908
|
+
height: 1
|
|
5909
|
+
}, {
|
|
5910
|
+
x: 2 / 3,
|
|
5911
|
+
y: 0,
|
|
5912
|
+
width: 1 / 3,
|
|
5913
|
+
height: 1
|
|
5914
|
+
}]
|
|
5915
|
+
}
|
|
5916
|
+
},
|
|
5917
|
+
viewports: [{
|
|
5918
|
+
viewportOptions: {
|
|
5919
|
+
viewportId: 'mpr-axial',
|
|
5920
|
+
toolGroupId: 'mpr',
|
|
5921
|
+
viewportType: 'volume',
|
|
5922
|
+
orientation: 'axial',
|
|
5923
|
+
initialImageOptions: {
|
|
5924
|
+
preset: 'middle'
|
|
5925
|
+
},
|
|
5926
|
+
syncGroups: [{
|
|
5927
|
+
type: 'voi',
|
|
5928
|
+
id: 'mpr',
|
|
5929
|
+
source: true,
|
|
5930
|
+
target: true
|
|
5931
|
+
}]
|
|
5932
|
+
},
|
|
5933
|
+
displaySets: [{
|
|
5934
|
+
id: 'activeDisplaySet'
|
|
5935
|
+
}]
|
|
5936
|
+
}, {
|
|
5937
|
+
viewportOptions: {
|
|
5938
|
+
viewportId: 'mpr-sagittal',
|
|
5939
|
+
toolGroupId: 'mpr',
|
|
5940
|
+
viewportType: 'volume',
|
|
5941
|
+
orientation: 'sagittal',
|
|
5942
|
+
initialImageOptions: {
|
|
5943
|
+
preset: 'middle'
|
|
5944
|
+
},
|
|
5945
|
+
syncGroups: [{
|
|
5946
|
+
type: 'voi',
|
|
5947
|
+
id: 'mpr',
|
|
5948
|
+
source: true,
|
|
5949
|
+
target: true
|
|
5950
|
+
}]
|
|
5951
|
+
},
|
|
5952
|
+
displaySets: [{
|
|
5953
|
+
id: 'activeDisplaySet'
|
|
5954
|
+
}]
|
|
5955
|
+
}, {
|
|
5956
|
+
viewportOptions: {
|
|
5957
|
+
viewportId: 'mpr-coronal',
|
|
5958
|
+
toolGroupId: 'mpr',
|
|
5959
|
+
viewportType: 'volume',
|
|
5960
|
+
orientation: 'coronal',
|
|
5961
|
+
initialImageOptions: {
|
|
5962
|
+
preset: 'middle'
|
|
5963
|
+
},
|
|
5964
|
+
syncGroups: [{
|
|
5965
|
+
type: 'voi',
|
|
5966
|
+
id: 'mpr',
|
|
5967
|
+
source: true,
|
|
5968
|
+
target: true
|
|
5969
|
+
}]
|
|
5970
|
+
},
|
|
5971
|
+
displaySets: [{
|
|
5972
|
+
id: 'activeDisplaySet'
|
|
5973
|
+
}]
|
|
5974
|
+
}]
|
|
5975
|
+
}]
|
|
5976
|
+
};
|
|
5977
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/mprAnd3DVolumeViewport.ts
|
|
5978
|
+
const mprAnd3DVolumeViewport = {
|
|
5979
|
+
id: 'mprAnd3DVolumeViewport',
|
|
5980
|
+
locked: true,
|
|
5981
|
+
name: 'mpr',
|
|
5982
|
+
createdDate: '2023-03-15T10:29:44.894Z',
|
|
5983
|
+
modifiedDate: '2023-03-15T10:29:44.894Z',
|
|
5984
|
+
availableTo: {},
|
|
5985
|
+
editableBy: {},
|
|
5986
|
+
protocolMatchingRules: [],
|
|
5987
|
+
imageLoadStrategy: 'interleaveCenter',
|
|
5988
|
+
displaySetSelectors: {
|
|
5989
|
+
mprDisplaySet: {
|
|
5990
|
+
seriesMatchingRules: [{
|
|
5991
|
+
weight: 1,
|
|
5992
|
+
attribute: 'isReconstructable',
|
|
5993
|
+
constraint: {
|
|
5994
|
+
equals: {
|
|
5995
|
+
value: true
|
|
5996
|
+
}
|
|
5997
|
+
},
|
|
5998
|
+
required: true
|
|
5999
|
+
}, {
|
|
6000
|
+
attribute: 'Modality',
|
|
6001
|
+
constraint: {
|
|
6002
|
+
equals: {
|
|
6003
|
+
value: 'CT'
|
|
6004
|
+
}
|
|
6005
|
+
},
|
|
6006
|
+
required: true
|
|
6007
|
+
}]
|
|
6008
|
+
}
|
|
6009
|
+
},
|
|
6010
|
+
stages: [{
|
|
6011
|
+
id: 'mpr3Stage',
|
|
6012
|
+
name: 'mpr',
|
|
6013
|
+
viewportStructure: {
|
|
6014
|
+
layoutType: 'grid',
|
|
6015
|
+
properties: {
|
|
6016
|
+
rows: 2,
|
|
6017
|
+
columns: 2
|
|
6018
|
+
}
|
|
6019
|
+
},
|
|
6020
|
+
viewports: [{
|
|
6021
|
+
viewportOptions: {
|
|
6022
|
+
toolGroupId: 'mpr',
|
|
6023
|
+
viewportType: 'volume',
|
|
6024
|
+
orientation: 'axial',
|
|
6025
|
+
initialImageOptions: {
|
|
6026
|
+
preset: 'middle'
|
|
6027
|
+
},
|
|
6028
|
+
syncGroups: [{
|
|
6029
|
+
type: 'voi',
|
|
6030
|
+
id: 'mpr',
|
|
6031
|
+
source: true,
|
|
6032
|
+
target: true
|
|
6033
|
+
}]
|
|
6034
|
+
},
|
|
6035
|
+
displaySets: [{
|
|
6036
|
+
id: 'mprDisplaySet'
|
|
6037
|
+
}]
|
|
6038
|
+
}, {
|
|
6039
|
+
viewportOptions: {
|
|
6040
|
+
toolGroupId: 'volume3d',
|
|
6041
|
+
viewportType: 'volume3d',
|
|
6042
|
+
orientation: 'coronal',
|
|
6043
|
+
customViewportProps: {
|
|
6044
|
+
hideOverlays: true
|
|
6045
|
+
}
|
|
6046
|
+
},
|
|
6047
|
+
displaySets: [{
|
|
6048
|
+
id: 'mprDisplaySet',
|
|
6049
|
+
options: {
|
|
6050
|
+
displayPreset: 'CT-Bone'
|
|
6051
|
+
}
|
|
6052
|
+
}]
|
|
6053
|
+
}, {
|
|
6054
|
+
viewportOptions: {
|
|
6055
|
+
toolGroupId: 'mpr',
|
|
6056
|
+
viewportType: 'volume',
|
|
6057
|
+
orientation: 'coronal',
|
|
6058
|
+
initialImageOptions: {
|
|
6059
|
+
preset: 'middle'
|
|
6060
|
+
},
|
|
6061
|
+
syncGroups: [{
|
|
6062
|
+
type: 'voi',
|
|
6063
|
+
id: 'mpr',
|
|
6064
|
+
source: true,
|
|
6065
|
+
target: true
|
|
6066
|
+
}]
|
|
6067
|
+
},
|
|
6068
|
+
displaySets: [{
|
|
6069
|
+
id: 'mprDisplaySet'
|
|
6070
|
+
}]
|
|
6071
|
+
}, {
|
|
6072
|
+
viewportOptions: {
|
|
6073
|
+
toolGroupId: 'mpr',
|
|
6074
|
+
viewportType: 'volume',
|
|
6075
|
+
orientation: 'sagittal',
|
|
6076
|
+
initialImageOptions: {
|
|
6077
|
+
preset: 'middle'
|
|
6078
|
+
},
|
|
6079
|
+
syncGroups: [{
|
|
6080
|
+
type: 'voi',
|
|
6081
|
+
id: 'mpr',
|
|
6082
|
+
source: true,
|
|
6083
|
+
target: true
|
|
6084
|
+
}]
|
|
6085
|
+
},
|
|
6086
|
+
displaySets: [{
|
|
6087
|
+
id: 'mprDisplaySet'
|
|
6088
|
+
}]
|
|
6089
|
+
}]
|
|
6090
|
+
}]
|
|
6091
|
+
};
|
|
6092
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/only3D.ts
|
|
6093
|
+
const only3D = {
|
|
6094
|
+
id: 'only3D',
|
|
6095
|
+
locked: true,
|
|
6096
|
+
name: 'only3D',
|
|
6097
|
+
createdDate: '2023-03-15T10:29:44.894Z',
|
|
6098
|
+
modifiedDate: '2023-03-15T10:29:44.894Z',
|
|
6099
|
+
availableTo: {},
|
|
6100
|
+
editableBy: {},
|
|
6101
|
+
protocolMatchingRules: [],
|
|
6102
|
+
imageLoadStrategy: 'interleaveCenter',
|
|
6103
|
+
displaySetSelectors: {
|
|
6104
|
+
mprDisplaySet: {
|
|
6105
|
+
seriesMatchingRules: [{
|
|
6106
|
+
weight: 1,
|
|
6107
|
+
attribute: 'isReconstructable',
|
|
6108
|
+
constraint: {
|
|
6109
|
+
equals: {
|
|
6110
|
+
value: true
|
|
6111
|
+
}
|
|
6112
|
+
},
|
|
6113
|
+
required: true
|
|
6114
|
+
}]
|
|
6115
|
+
}
|
|
6116
|
+
},
|
|
6117
|
+
stages: [{
|
|
6118
|
+
id: 'only3DStage',
|
|
6119
|
+
name: 'only3D',
|
|
6120
|
+
viewportStructure: {
|
|
6121
|
+
layoutType: 'grid',
|
|
6122
|
+
properties: {
|
|
6123
|
+
rows: 1,
|
|
6124
|
+
columns: 1
|
|
6125
|
+
}
|
|
6126
|
+
},
|
|
6127
|
+
viewports: [{
|
|
6128
|
+
viewportOptions: {
|
|
6129
|
+
toolGroupId: 'volume3d',
|
|
6130
|
+
viewportType: 'volume3d',
|
|
6131
|
+
orientation: 'coronal',
|
|
6132
|
+
customViewportProps: {
|
|
6133
|
+
hideOverlays: true
|
|
6134
|
+
}
|
|
6135
|
+
},
|
|
6136
|
+
displaySets: [{
|
|
6137
|
+
id: 'mprDisplaySet',
|
|
6138
|
+
options: {
|
|
6139
|
+
// ToDo: choose appropriate preset
|
|
6140
|
+
displayPreset: 'CT-Bone'
|
|
6141
|
+
}
|
|
6142
|
+
}]
|
|
6143
|
+
}]
|
|
6144
|
+
}]
|
|
6145
|
+
};
|
|
6146
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/primary3D.ts
|
|
6147
|
+
const primary3D = {
|
|
6148
|
+
id: 'primary3D',
|
|
6149
|
+
locked: true,
|
|
6150
|
+
name: 'primary3D',
|
|
6151
|
+
createdDate: '2023-03-15T10:29:44.894Z',
|
|
6152
|
+
modifiedDate: '2023-03-15T10:29:44.894Z',
|
|
6153
|
+
availableTo: {},
|
|
6154
|
+
editableBy: {},
|
|
6155
|
+
protocolMatchingRules: [],
|
|
6156
|
+
imageLoadStrategy: 'interleaveCenter',
|
|
6157
|
+
displaySetSelectors: {
|
|
6158
|
+
mprDisplaySet: {
|
|
6159
|
+
seriesMatchingRules: [{
|
|
6160
|
+
weight: 1,
|
|
6161
|
+
attribute: 'isReconstructable',
|
|
6162
|
+
constraint: {
|
|
6163
|
+
equals: {
|
|
6164
|
+
value: true
|
|
6165
|
+
}
|
|
6166
|
+
},
|
|
6167
|
+
required: true
|
|
6168
|
+
}]
|
|
6169
|
+
}
|
|
6170
|
+
},
|
|
6171
|
+
stages: [{
|
|
6172
|
+
id: 'primary3DStage',
|
|
6173
|
+
name: 'primary3D',
|
|
6174
|
+
viewportStructure: {
|
|
6175
|
+
layoutType: 'grid',
|
|
6176
|
+
properties: {
|
|
6177
|
+
rows: 3,
|
|
6178
|
+
columns: 3,
|
|
6179
|
+
layoutOptions: [{
|
|
6180
|
+
x: 0,
|
|
6181
|
+
y: 0,
|
|
6182
|
+
width: 2 / 3,
|
|
6183
|
+
height: 1
|
|
6184
|
+
}, {
|
|
6185
|
+
x: 2 / 3,
|
|
6186
|
+
y: 0,
|
|
6187
|
+
width: 1 / 3,
|
|
6188
|
+
height: 1 / 3
|
|
6189
|
+
}, {
|
|
6190
|
+
x: 2 / 3,
|
|
6191
|
+
y: 1 / 3,
|
|
6192
|
+
width: 1 / 3,
|
|
6193
|
+
height: 1 / 3
|
|
6194
|
+
}, {
|
|
6195
|
+
x: 2 / 3,
|
|
6196
|
+
y: 2 / 3,
|
|
6197
|
+
width: 1 / 3,
|
|
6198
|
+
height: 1 / 3
|
|
6199
|
+
}]
|
|
6200
|
+
}
|
|
6201
|
+
},
|
|
6202
|
+
viewports: [{
|
|
6203
|
+
viewportOptions: {
|
|
6204
|
+
toolGroupId: 'volume3d',
|
|
6205
|
+
viewportType: 'volume3d',
|
|
6206
|
+
orientation: 'coronal',
|
|
5749
6207
|
customViewportProps: {
|
|
5750
6208
|
hideOverlays: true
|
|
5751
6209
|
}
|
|
@@ -5753,9 +6211,28 @@ const mprAnd3DVolumeViewport = {
|
|
|
5753
6211
|
displaySets: [{
|
|
5754
6212
|
id: 'mprDisplaySet',
|
|
5755
6213
|
options: {
|
|
6214
|
+
// ToDo: choose appropriate preset
|
|
5756
6215
|
displayPreset: 'CT-Bone'
|
|
5757
6216
|
}
|
|
5758
6217
|
}]
|
|
6218
|
+
}, {
|
|
6219
|
+
viewportOptions: {
|
|
6220
|
+
toolGroupId: 'mpr',
|
|
6221
|
+
viewportType: 'volume',
|
|
6222
|
+
orientation: 'axial',
|
|
6223
|
+
initialImageOptions: {
|
|
6224
|
+
preset: 'middle'
|
|
6225
|
+
},
|
|
6226
|
+
syncGroups: [{
|
|
6227
|
+
type: 'voi',
|
|
6228
|
+
id: 'mpr',
|
|
6229
|
+
source: true,
|
|
6230
|
+
target: true
|
|
6231
|
+
}]
|
|
6232
|
+
},
|
|
6233
|
+
displaySets: [{
|
|
6234
|
+
id: 'mprDisplaySet'
|
|
6235
|
+
}]
|
|
5759
6236
|
}, {
|
|
5760
6237
|
viewportOptions: {
|
|
5761
6238
|
toolGroupId: 'mpr',
|
|
@@ -5795,6 +6272,122 @@ const mprAnd3DVolumeViewport = {
|
|
|
5795
6272
|
}]
|
|
5796
6273
|
}]
|
|
5797
6274
|
};
|
|
6275
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/primaryAxial.ts
|
|
6276
|
+
const primaryAxial = {
|
|
6277
|
+
id: 'primaryAxial',
|
|
6278
|
+
locked: true,
|
|
6279
|
+
name: 'primaryAxial',
|
|
6280
|
+
createdDate: '2023-03-15T10:29:44.894Z',
|
|
6281
|
+
modifiedDate: '2023-03-15T10:29:44.894Z',
|
|
6282
|
+
availableTo: {},
|
|
6283
|
+
editableBy: {},
|
|
6284
|
+
protocolMatchingRules: [],
|
|
6285
|
+
imageLoadStrategy: 'interleaveCenter',
|
|
6286
|
+
displaySetSelectors: {
|
|
6287
|
+
mprDisplaySet: {
|
|
6288
|
+
seriesMatchingRules: [{
|
|
6289
|
+
weight: 1,
|
|
6290
|
+
attribute: 'isReconstructable',
|
|
6291
|
+
constraint: {
|
|
6292
|
+
equals: {
|
|
6293
|
+
value: true
|
|
6294
|
+
}
|
|
6295
|
+
},
|
|
6296
|
+
required: true
|
|
6297
|
+
}]
|
|
6298
|
+
}
|
|
6299
|
+
},
|
|
6300
|
+
stages: [{
|
|
6301
|
+
id: 'primaryAxialStage',
|
|
6302
|
+
name: 'primaryAxial',
|
|
6303
|
+
viewportStructure: {
|
|
6304
|
+
layoutType: 'grid',
|
|
6305
|
+
properties: {
|
|
6306
|
+
rows: 2,
|
|
6307
|
+
columns: 3,
|
|
6308
|
+
layoutOptions: [{
|
|
6309
|
+
x: 0,
|
|
6310
|
+
y: 0,
|
|
6311
|
+
width: 2 / 3,
|
|
6312
|
+
height: 1
|
|
6313
|
+
}, {
|
|
6314
|
+
x: 2 / 3,
|
|
6315
|
+
y: 0,
|
|
6316
|
+
width: 1 / 3,
|
|
6317
|
+
height: 1 / 2
|
|
6318
|
+
}, {
|
|
6319
|
+
x: 2 / 3,
|
|
6320
|
+
y: 1 / 2,
|
|
6321
|
+
width: 1 / 3,
|
|
6322
|
+
height: 1 / 2
|
|
6323
|
+
}]
|
|
6324
|
+
}
|
|
6325
|
+
},
|
|
6326
|
+
viewports: [{
|
|
6327
|
+
viewportOptions: {
|
|
6328
|
+
toolGroupId: 'mpr',
|
|
6329
|
+
viewportType: 'volume',
|
|
6330
|
+
orientation: 'axial',
|
|
6331
|
+
initialImageOptions: {
|
|
6332
|
+
preset: 'middle'
|
|
6333
|
+
},
|
|
6334
|
+
syncGroups: [{
|
|
6335
|
+
type: 'voi',
|
|
6336
|
+
id: 'mpr',
|
|
6337
|
+
source: true,
|
|
6338
|
+
target: true
|
|
6339
|
+
}]
|
|
6340
|
+
},
|
|
6341
|
+
displaySets: [{
|
|
6342
|
+
id: 'mprDisplaySet'
|
|
6343
|
+
}]
|
|
6344
|
+
}, {
|
|
6345
|
+
viewportOptions: {
|
|
6346
|
+
toolGroupId: 'mpr',
|
|
6347
|
+
viewportType: 'volume',
|
|
6348
|
+
orientation: 'sagittal',
|
|
6349
|
+
initialImageOptions: {
|
|
6350
|
+
preset: 'middle'
|
|
6351
|
+
},
|
|
6352
|
+
syncGroups: [{
|
|
6353
|
+
type: 'voi',
|
|
6354
|
+
id: 'mpr',
|
|
6355
|
+
source: true,
|
|
6356
|
+
target: true
|
|
6357
|
+
}]
|
|
6358
|
+
},
|
|
6359
|
+
displaySets: [{
|
|
6360
|
+
id: 'mprDisplaySet'
|
|
6361
|
+
}]
|
|
6362
|
+
}, {
|
|
6363
|
+
viewportOptions: {
|
|
6364
|
+
toolGroupId: 'mpr',
|
|
6365
|
+
viewportType: 'volume',
|
|
6366
|
+
orientation: 'coronal',
|
|
6367
|
+
initialImageOptions: {
|
|
6368
|
+
preset: 'middle'
|
|
6369
|
+
},
|
|
6370
|
+
syncGroups: [{
|
|
6371
|
+
type: 'voi',
|
|
6372
|
+
id: 'mpr',
|
|
6373
|
+
source: true,
|
|
6374
|
+
target: true
|
|
6375
|
+
}]
|
|
6376
|
+
},
|
|
6377
|
+
displaySets: [{
|
|
6378
|
+
id: 'mprDisplaySet'
|
|
6379
|
+
}]
|
|
6380
|
+
}]
|
|
6381
|
+
}]
|
|
6382
|
+
};
|
|
6383
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/getHangingProtocolModule.ts
|
|
6384
|
+
|
|
6385
|
+
|
|
6386
|
+
|
|
6387
|
+
|
|
6388
|
+
|
|
6389
|
+
|
|
6390
|
+
|
|
5798
6391
|
function getHangingProtocolModule() {
|
|
5799
6392
|
return [{
|
|
5800
6393
|
name: mpr.id,
|
|
@@ -5802,10 +6395,26 @@ function getHangingProtocolModule() {
|
|
|
5802
6395
|
}, {
|
|
5803
6396
|
name: mprAnd3DVolumeViewport.id,
|
|
5804
6397
|
protocol: mprAnd3DVolumeViewport
|
|
6398
|
+
}, {
|
|
6399
|
+
name: fourUp.id,
|
|
6400
|
+
protocol: fourUp
|
|
6401
|
+
}, {
|
|
6402
|
+
name: main3D.id,
|
|
6403
|
+
protocol: main3D
|
|
6404
|
+
}, {
|
|
6405
|
+
name: primaryAxial.id,
|
|
6406
|
+
protocol: primaryAxial
|
|
6407
|
+
}, {
|
|
6408
|
+
name: only3D.id,
|
|
6409
|
+
protocol: only3D
|
|
6410
|
+
}, {
|
|
6411
|
+
name: primary3D.id,
|
|
6412
|
+
protocol: primary3D
|
|
5805
6413
|
}];
|
|
5806
6414
|
}
|
|
5807
6415
|
/* harmony default export */ const src_getHangingProtocolModule = (getHangingProtocolModule);
|
|
5808
6416
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/ToolGroupService/ToolGroupService.ts
|
|
6417
|
+
var _class;
|
|
5809
6418
|
|
|
5810
6419
|
|
|
5811
6420
|
|
|
@@ -5929,8 +6538,7 @@ class ToolGroupService {
|
|
|
5929
6538
|
});
|
|
5930
6539
|
return toolGroup;
|
|
5931
6540
|
}
|
|
5932
|
-
addToolsToToolGroup(toolGroupId, tools) {
|
|
5933
|
-
let configs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
6541
|
+
addToolsToToolGroup(toolGroupId, tools, configs = {}) {
|
|
5934
6542
|
const toolGroup = dist_esm.ToolGroupManager.getToolGroup(toolGroupId);
|
|
5935
6543
|
// this.changeConfigurationIfNecessary(toolGroup, volumeId);
|
|
5936
6544
|
this._addTools(toolGroup, tools, configs);
|
|
@@ -5992,49 +6600,44 @@ class ToolGroupService {
|
|
|
5992
6600
|
disabled
|
|
5993
6601
|
} = tools;
|
|
5994
6602
|
if (active) {
|
|
5995
|
-
active.forEach(
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
} = _ref;
|
|
6603
|
+
active.forEach(({
|
|
6604
|
+
toolName,
|
|
6605
|
+
bindings
|
|
6606
|
+
}) => {
|
|
6000
6607
|
toolGroup.setToolActive(toolName, {
|
|
6001
6608
|
bindings
|
|
6002
6609
|
});
|
|
6003
6610
|
});
|
|
6004
6611
|
}
|
|
6005
6612
|
if (passive) {
|
|
6006
|
-
passive.forEach(
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
} = _ref2;
|
|
6613
|
+
passive.forEach(({
|
|
6614
|
+
toolName
|
|
6615
|
+
}) => {
|
|
6010
6616
|
toolGroup.setToolPassive(toolName);
|
|
6011
6617
|
});
|
|
6012
6618
|
}
|
|
6013
6619
|
if (enabled) {
|
|
6014
|
-
enabled.forEach(
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
} = _ref3;
|
|
6620
|
+
enabled.forEach(({
|
|
6621
|
+
toolName
|
|
6622
|
+
}) => {
|
|
6018
6623
|
toolGroup.setToolEnabled(toolName);
|
|
6019
6624
|
});
|
|
6020
6625
|
}
|
|
6021
6626
|
if (disabled) {
|
|
6022
|
-
disabled.forEach(
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
} = _ref4;
|
|
6627
|
+
disabled.forEach(({
|
|
6628
|
+
toolName
|
|
6629
|
+
}) => {
|
|
6026
6630
|
toolGroup.setToolDisabled(toolName);
|
|
6027
6631
|
});
|
|
6028
6632
|
}
|
|
6029
6633
|
}
|
|
6030
6634
|
_addTools(toolGroup, tools) {
|
|
6031
6635
|
const addTools = tools => {
|
|
6032
|
-
tools.forEach(
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
} = _ref5;
|
|
6636
|
+
tools.forEach(({
|
|
6637
|
+
toolName,
|
|
6638
|
+
parentTool,
|
|
6639
|
+
configuration
|
|
6640
|
+
}) => {
|
|
6038
6641
|
if (parentTool) {
|
|
6039
6642
|
toolGroup.addToolInstance(toolName, parentTool, {
|
|
6040
6643
|
...configuration
|
|
@@ -6060,20 +6663,21 @@ class ToolGroupService {
|
|
|
6060
6663
|
}
|
|
6061
6664
|
}
|
|
6062
6665
|
}
|
|
6666
|
+
_class = ToolGroupService;
|
|
6063
6667
|
ToolGroupService.REGISTRATION = {
|
|
6064
6668
|
name: 'toolGroupService',
|
|
6065
6669
|
altName: 'ToolGroupService',
|
|
6066
|
-
create:
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
return new ToolGroupService(servicesManager);
|
|
6670
|
+
create: ({
|
|
6671
|
+
servicesManager
|
|
6672
|
+
}) => {
|
|
6673
|
+
return new _class(servicesManager);
|
|
6071
6674
|
}
|
|
6072
6675
|
};
|
|
6073
6676
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/ToolGroupService/index.js
|
|
6074
6677
|
|
|
6075
6678
|
/* harmony default export */ const services_ToolGroupService = (ToolGroupService);
|
|
6076
6679
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/SyncGroupService/SyncGroupService.ts
|
|
6680
|
+
var SyncGroupService_class;
|
|
6077
6681
|
|
|
6078
6682
|
|
|
6079
6683
|
const SyncGroupService_EVENTS = {
|
|
@@ -6101,7 +6705,7 @@ class SyncGroupService {
|
|
|
6101
6705
|
[POSITION]: dist_esm.synchronizers.createCameraPositionSynchronizer,
|
|
6102
6706
|
[VOI]: dist_esm.synchronizers.createVOISynchronizer,
|
|
6103
6707
|
[ZOOMPAN]: dist_esm.synchronizers.createZoomPanSynchronizer,
|
|
6104
|
-
[STACKIMAGE]: dist_esm.synchronizers.
|
|
6708
|
+
[STACKIMAGE]: dist_esm.synchronizers.createImageSliceSynchronizer
|
|
6105
6709
|
};
|
|
6106
6710
|
this.servicesManager = serviceManager;
|
|
6107
6711
|
this.listeners = {};
|
|
@@ -6126,6 +6730,9 @@ class SyncGroupService {
|
|
|
6126
6730
|
addSynchronizerType(type, creator) {
|
|
6127
6731
|
this.synchronizerCreators[type.toLowerCase()] = creator;
|
|
6128
6732
|
}
|
|
6733
|
+
getSynchronizer(id) {
|
|
6734
|
+
return dist_esm.SynchronizerManager.getSynchronizer(id);
|
|
6735
|
+
}
|
|
6129
6736
|
_getOrCreateSynchronizer(type, id, options) {
|
|
6130
6737
|
let synchronizer = dist_esm.SynchronizerManager.getSynchronizer(id);
|
|
6131
6738
|
if (!synchronizer) {
|
|
@@ -6166,6 +6773,9 @@ class SyncGroupService {
|
|
|
6166
6773
|
destroy() {
|
|
6167
6774
|
dist_esm.SynchronizerManager.destroy();
|
|
6168
6775
|
}
|
|
6776
|
+
getSynchronizersForViewport(viewportId, renderingEngineId) {
|
|
6777
|
+
return dist_esm.SynchronizerManager.getAllSynchronizers().filter(s => s.hasSourceViewport(renderingEngineId, viewportId) || s.hasTargetViewport(renderingEngineId, viewportId));
|
|
6778
|
+
}
|
|
6169
6779
|
removeViewportFromSyncGroup(viewportId, renderingEngineId, syncGroupId) {
|
|
6170
6780
|
const synchronizers = dist_esm.SynchronizerManager.getAllSynchronizers();
|
|
6171
6781
|
const filteredSynchronizers = syncGroupId ? synchronizers.filter(s => s.id === syncGroupId) : synchronizers;
|
|
@@ -6187,22 +6797,19 @@ class SyncGroupService {
|
|
|
6187
6797
|
});
|
|
6188
6798
|
}
|
|
6189
6799
|
}
|
|
6800
|
+
SyncGroupService_class = SyncGroupService;
|
|
6190
6801
|
SyncGroupService.REGISTRATION = {
|
|
6191
6802
|
name: 'syncGroupService',
|
|
6192
6803
|
altName: 'SyncGroupService',
|
|
6193
|
-
create:
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
return new SyncGroupService(servicesManager);
|
|
6804
|
+
create: ({
|
|
6805
|
+
servicesManager
|
|
6806
|
+
}) => {
|
|
6807
|
+
return new SyncGroupService_class(servicesManager);
|
|
6198
6808
|
}
|
|
6199
6809
|
};
|
|
6200
6810
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/SyncGroupService/index.js
|
|
6201
6811
|
|
|
6202
6812
|
/* harmony default export */ const services_SyncGroupService = (SyncGroupService);
|
|
6203
|
-
// EXTERNAL MODULE: ../../../node_modules/lodash.clonedeep/index.js
|
|
6204
|
-
var lodash_clonedeep = __webpack_require__(11677);
|
|
6205
|
-
var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);
|
|
6206
6813
|
// EXTERNAL MODULE: ../../../node_modules/lodash.isequal/index.js
|
|
6207
6814
|
var lodash_isequal = __webpack_require__(10311);
|
|
6208
6815
|
var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal);
|
|
@@ -6254,24 +6861,21 @@ function reverseEaseInOutBell(x, baseline) {
|
|
|
6254
6861
|
* and geometry Id
|
|
6255
6862
|
*/
|
|
6256
6863
|
function mapROIContoursToRTStructData(structureSet, rtDisplaySetUID) {
|
|
6257
|
-
return structureSet.ROIContours.map(
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
y,
|
|
6273
|
-
z
|
|
6274
|
-
} = _ref3;
|
|
6864
|
+
return structureSet.ROIContours.map(({
|
|
6865
|
+
contourPoints,
|
|
6866
|
+
ROINumber,
|
|
6867
|
+
ROIName,
|
|
6868
|
+
colorArray
|
|
6869
|
+
}) => {
|
|
6870
|
+
const data = contourPoints.map(({
|
|
6871
|
+
points,
|
|
6872
|
+
...rest
|
|
6873
|
+
}) => {
|
|
6874
|
+
const newPoints = points.map(({
|
|
6875
|
+
x,
|
|
6876
|
+
y,
|
|
6877
|
+
z
|
|
6878
|
+
}) => {
|
|
6275
6879
|
return [x, y, z];
|
|
6276
6880
|
});
|
|
6277
6881
|
return {
|
|
@@ -6290,16 +6894,13 @@ function mapROIContoursToRTStructData(structureSet, rtDisplaySetUID) {
|
|
|
6290
6894
|
});
|
|
6291
6895
|
}
|
|
6292
6896
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts
|
|
6897
|
+
var SegmentationService_class;
|
|
6293
6898
|
|
|
6294
6899
|
|
|
6295
6900
|
|
|
6296
6901
|
|
|
6297
6902
|
|
|
6298
6903
|
|
|
6299
|
-
|
|
6300
|
-
const {
|
|
6301
|
-
COLOR_LUT
|
|
6302
|
-
} = dist_esm.CONSTANTS;
|
|
6303
6904
|
const LABELMAP = dist_esm.Enums.SegmentationRepresentations.Labelmap;
|
|
6304
6905
|
const CONTOUR = dist_esm.Enums.SegmentationRepresentations.Contour;
|
|
6305
6906
|
const SegmentationService_EVENTS = {
|
|
@@ -6326,13 +6927,10 @@ const SEGMENT_CONSTANT = {
|
|
|
6326
6927
|
};
|
|
6327
6928
|
const VOLUME_LOADER_SCHEME = 'cornerstoneStreamingImageVolume';
|
|
6328
6929
|
class SegmentationService extends src/* PubSubService */.hC {
|
|
6329
|
-
constructor(
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
servicesManager
|
|
6333
|
-
} = _ref;
|
|
6930
|
+
constructor({
|
|
6931
|
+
servicesManager
|
|
6932
|
+
}) {
|
|
6334
6933
|
super(SegmentationService_EVENTS);
|
|
6335
|
-
_this = this;
|
|
6336
6934
|
this.segmentations = void 0;
|
|
6337
6935
|
this.servicesManager = void 0;
|
|
6338
6936
|
this.highlightIntervalId = null;
|
|
@@ -6473,7 +7071,6 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6473
7071
|
}
|
|
6474
7072
|
}
|
|
6475
7073
|
};
|
|
6476
|
-
|
|
6477
7074
|
this.addOrUpdateSegmentation(segmentation);
|
|
6478
7075
|
return segmentationId;
|
|
6479
7076
|
};
|
|
@@ -6486,11 +7083,8 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6486
7083
|
this.toggleSegmentationVisibility = segmentationId => {
|
|
6487
7084
|
this._toggleSegmentationVisibility(segmentationId, false);
|
|
6488
7085
|
};
|
|
6489
|
-
this.addSegmentationRepresentationToToolGroup = async
|
|
6490
|
-
|
|
6491
|
-
let representationType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : dist_esm.Enums.SegmentationRepresentations.Labelmap;
|
|
6492
|
-
let suppressEvents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6493
|
-
const segmentation = _this.getSegmentation(segmentationId);
|
|
7086
|
+
this.addSegmentationRepresentationToToolGroup = async (toolGroupId, segmentationId, hydrateSegmentation = false, representationType = dist_esm.Enums.SegmentationRepresentations.Labelmap, suppressEvents = false) => {
|
|
7087
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
6494
7088
|
if (!segmentation) {
|
|
6495
7089
|
throw new Error(`Segmentation with segmentationId ${segmentationId} not found.`);
|
|
6496
7090
|
}
|
|
@@ -6498,9 +7092,6 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6498
7092
|
// hydrate the segmentation if it's not hydrated yet
|
|
6499
7093
|
segmentation.hydrated = true;
|
|
6500
7094
|
}
|
|
6501
|
-
const {
|
|
6502
|
-
colorLUTIndex
|
|
6503
|
-
} = segmentation;
|
|
6504
7095
|
|
|
6505
7096
|
// Based on the segmentationId, set the colorLUTIndex.
|
|
6506
7097
|
const segmentationRepresentationUIDs = await dist_esm.segmentation.addSegmentationRepresentations(toolGroupId, [{
|
|
@@ -6509,8 +7100,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6509
7100
|
}]);
|
|
6510
7101
|
|
|
6511
7102
|
// set the latest segmentation representation as active one
|
|
6512
|
-
|
|
6513
|
-
dist_esm.segmentation.config.color.setColorLUT(toolGroupId, segmentationRepresentationUIDs[0], colorLUTIndex);
|
|
7103
|
+
this._setActiveSegmentationForToolGroup(segmentationId, toolGroupId, segmentationRepresentationUIDs[0]);
|
|
6514
7104
|
|
|
6515
7105
|
// add the segmentation segments properly
|
|
6516
7106
|
for (const segment of segmentation.segments) {
|
|
@@ -6526,20 +7116,20 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6526
7116
|
} = segment;
|
|
6527
7117
|
const suppressEvents = true;
|
|
6528
7118
|
if (color !== undefined) {
|
|
6529
|
-
|
|
7119
|
+
this._setSegmentColor(segmentationId, segmentIndex, color, toolGroupId, suppressEvents);
|
|
6530
7120
|
}
|
|
6531
7121
|
if (opacity !== undefined) {
|
|
6532
|
-
|
|
7122
|
+
this._setSegmentOpacity(segmentationId, segmentIndex, opacity, toolGroupId, suppressEvents);
|
|
6533
7123
|
}
|
|
6534
7124
|
if (visibility !== undefined) {
|
|
6535
|
-
|
|
7125
|
+
this._setSegmentVisibility(segmentationId, segmentIndex, visibility, toolGroupId, suppressEvents);
|
|
6536
7126
|
}
|
|
6537
7127
|
if (isLocked) {
|
|
6538
|
-
|
|
7128
|
+
this._setSegmentLocked(segmentationId, segmentIndex, isLocked, suppressEvents);
|
|
6539
7129
|
}
|
|
6540
7130
|
}
|
|
6541
7131
|
if (!suppressEvents) {
|
|
6542
|
-
|
|
7132
|
+
this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
|
|
6543
7133
|
segmentation
|
|
6544
7134
|
});
|
|
6545
7135
|
}
|
|
@@ -6563,18 +7153,17 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6563
7153
|
const toolGroupIds = dist_esm.segmentation.state.getToolGroupIdsWithSegmentation(segmentationId);
|
|
6564
7154
|
return toolGroupIds;
|
|
6565
7155
|
};
|
|
6566
|
-
this.hydrateSegmentation =
|
|
6567
|
-
|
|
6568
|
-
const segmentation = _this.getSegmentation(segmentationId);
|
|
7156
|
+
this.hydrateSegmentation = (segmentationId, suppressEvents = false) => {
|
|
7157
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
6569
7158
|
if (!segmentation) {
|
|
6570
7159
|
throw new Error(`Segmentation with segmentationId ${segmentationId} not found.`);
|
|
6571
7160
|
}
|
|
6572
7161
|
segmentation.hydrated = true;
|
|
6573
7162
|
|
|
6574
7163
|
// Not all segmentations have dipslaysets, some of them are derived in the client
|
|
6575
|
-
|
|
7164
|
+
this._setDisplaySetIsHydrated(segmentationId, true);
|
|
6576
7165
|
if (!suppressEvents) {
|
|
6577
|
-
|
|
7166
|
+
this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
|
|
6578
7167
|
segmentation
|
|
6579
7168
|
});
|
|
6580
7169
|
}
|
|
@@ -6632,11 +7221,10 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6632
7221
|
renderInactiveSegmentations,
|
|
6633
7222
|
renderOutline
|
|
6634
7223
|
} = configuration;
|
|
6635
|
-
const setConfigValueIfDefined =
|
|
6636
|
-
let transformFn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
7224
|
+
const setConfigValueIfDefined = (key, value, transformFn = null) => {
|
|
6637
7225
|
if (value !== undefined) {
|
|
6638
7226
|
const transformedValue = transformFn ? transformFn(value) : value;
|
|
6639
|
-
|
|
7227
|
+
this._setSegmentationConfig(key, transformedValue);
|
|
6640
7228
|
}
|
|
6641
7229
|
};
|
|
6642
7230
|
setConfigValueIfDefined('renderOutline', renderOutline);
|
|
@@ -6683,32 +7271,30 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6683
7271
|
this.getSegmentationRepresentationsForToolGroup = toolGroupId => {
|
|
6684
7272
|
return dist_esm.segmentation.state.getSegmentationRepresentations(toolGroupId);
|
|
6685
7273
|
};
|
|
6686
|
-
this._toggleSegmentationVisibility =
|
|
6687
|
-
|
|
6688
|
-
const segmentation = _this.segmentations[segmentationId];
|
|
7274
|
+
this._toggleSegmentationVisibility = (segmentationId, suppressEvents = false) => {
|
|
7275
|
+
const segmentation = this.segmentations[segmentationId];
|
|
6689
7276
|
if (!segmentation) {
|
|
6690
7277
|
throw new Error(`Segmentation with segmentationId ${segmentationId} not found.`);
|
|
6691
7278
|
}
|
|
6692
7279
|
segmentation.isVisible = !segmentation.isVisible;
|
|
6693
|
-
|
|
7280
|
+
this._updateCornerstoneSegmentationVisibility(segmentationId);
|
|
6694
7281
|
if (suppressEvents === false) {
|
|
6695
|
-
|
|
7282
|
+
this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
|
|
6696
7283
|
segmentation
|
|
6697
7284
|
});
|
|
6698
7285
|
}
|
|
6699
7286
|
};
|
|
6700
|
-
this._setSegmentColor =
|
|
6701
|
-
|
|
6702
|
-
const segmentation = _this.getSegmentation(segmentationId);
|
|
7287
|
+
this._setSegmentColor = (segmentationId, segmentIndex, color, toolGroupId, suppressEvents = false) => {
|
|
7288
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
6703
7289
|
if (segmentation === undefined) {
|
|
6704
7290
|
throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
|
|
6705
7291
|
}
|
|
6706
|
-
const segmentInfo =
|
|
7292
|
+
const segmentInfo = this._getSegmentInfo(segmentation, segmentIndex);
|
|
6707
7293
|
if (segmentInfo === undefined) {
|
|
6708
7294
|
throw new Error(`Segment ${segmentIndex} not yet added to segmentation: ${segmentationId}`);
|
|
6709
7295
|
}
|
|
6710
|
-
toolGroupId = toolGroupId ??
|
|
6711
|
-
const segmentationRepresentation =
|
|
7296
|
+
toolGroupId = toolGroupId ?? this._getApplicableToolGroupId();
|
|
7297
|
+
const segmentationRepresentation = this._getSegmentationRepresentation(segmentationId, toolGroupId);
|
|
6712
7298
|
if (!segmentationRepresentation) {
|
|
6713
7299
|
throw new Error('Must add representation to toolgroup before setting segments');
|
|
6714
7300
|
}
|
|
@@ -6719,23 +7305,22 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6719
7305
|
dist_esm.segmentation.config.color.setColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex, [...color, rgbaColor[3]]);
|
|
6720
7306
|
segmentInfo.color = color;
|
|
6721
7307
|
if (suppressEvents === false) {
|
|
6722
|
-
|
|
7308
|
+
this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
|
|
6723
7309
|
segmentation
|
|
6724
7310
|
});
|
|
6725
7311
|
}
|
|
6726
7312
|
};
|
|
6727
|
-
this._setSegmentOpacity =
|
|
6728
|
-
|
|
6729
|
-
const segmentation = _this.getSegmentation(segmentationId);
|
|
7313
|
+
this._setSegmentOpacity = (segmentationId, segmentIndex, opacity, toolGroupId, suppressEvents = false) => {
|
|
7314
|
+
const segmentation = this.getSegmentation(segmentationId);
|
|
6730
7315
|
if (segmentation === undefined) {
|
|
6731
7316
|
throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
|
|
6732
7317
|
}
|
|
6733
|
-
const segmentInfo =
|
|
7318
|
+
const segmentInfo = this._getSegmentInfo(segmentation, segmentIndex);
|
|
6734
7319
|
if (segmentInfo === undefined) {
|
|
6735
7320
|
throw new Error(`Segment ${segmentIndex} not yet added to segmentation: ${segmentationId}`);
|
|
6736
7321
|
}
|
|
6737
|
-
toolGroupId = toolGroupId ??
|
|
6738
|
-
const segmentationRepresentation =
|
|
7322
|
+
toolGroupId = toolGroupId ?? this._getApplicableToolGroupId();
|
|
7323
|
+
const segmentationRepresentation = this._getSegmentationRepresentation(segmentationId, toolGroupId);
|
|
6739
7324
|
if (!segmentationRepresentation) {
|
|
6740
7325
|
throw new Error('Must add representation to toolgroup before setting segments');
|
|
6741
7326
|
}
|
|
@@ -6746,7 +7331,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6746
7331
|
dist_esm.segmentation.config.color.setColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex, [rgbaColor[0], rgbaColor[1], rgbaColor[2], opacity]);
|
|
6747
7332
|
segmentInfo.opacity = opacity;
|
|
6748
7333
|
if (suppressEvents === false) {
|
|
6749
|
-
|
|
7334
|
+
this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
|
|
6750
7335
|
segmentation
|
|
6751
7336
|
});
|
|
6752
7337
|
}
|
|
@@ -6869,15 +7454,6 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6869
7454
|
}
|
|
6870
7455
|
return viewportInfo.getToolGroupId();
|
|
6871
7456
|
};
|
|
6872
|
-
this.getNextColorLUTIndex = () => {
|
|
6873
|
-
let i = 0;
|
|
6874
|
-
while (true) {
|
|
6875
|
-
if (dist_esm.segmentation.state.getColorLUT(i) === undefined) {
|
|
6876
|
-
return i;
|
|
6877
|
-
}
|
|
6878
|
-
i++;
|
|
6879
|
-
}
|
|
6880
|
-
};
|
|
6881
7457
|
/**
|
|
6882
7458
|
* Converts object of objects to array.
|
|
6883
7459
|
*
|
|
@@ -6906,8 +7482,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
6906
7482
|
* - isLocked: (optional) Whether the new segment should be locked for editing. If not provided, the segment will not be locked by default.
|
|
6907
7483
|
* - active: (optional) Whether the new segment should be the active segment to be edited. If not provided, the segment will not be active by default.
|
|
6908
7484
|
*/
|
|
6909
|
-
addSegment(segmentationId) {
|
|
6910
|
-
let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7485
|
+
addSegment(segmentationId, config = {}) {
|
|
6911
7486
|
if (config?.segmentIndex === 0) {
|
|
6912
7487
|
throw new Error('Segment index 0 is reserved for "no label"');
|
|
6913
7488
|
}
|
|
@@ -7021,8 +7596,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7021
7596
|
segmentation
|
|
7022
7597
|
});
|
|
7023
7598
|
}
|
|
7024
|
-
setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId) {
|
|
7025
|
-
let suppressEvents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
7599
|
+
setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId, suppressEvents = false) {
|
|
7026
7600
|
this._setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId, suppressEvents);
|
|
7027
7601
|
}
|
|
7028
7602
|
setSegmentLocked(segmentationId, segmentIndex, isLocked) {
|
|
@@ -7067,8 +7641,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7067
7641
|
*
|
|
7068
7642
|
* @return Array of segmentations
|
|
7069
7643
|
*/
|
|
7070
|
-
getSegmentations() {
|
|
7071
|
-
let filterNonHydratedSegmentations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
7644
|
+
getSegmentations(filterNonHydratedSegmentations = true) {
|
|
7072
7645
|
const segmentations = this._getSegmentations();
|
|
7073
7646
|
return segmentations && segmentations.filter(segmentation => {
|
|
7074
7647
|
return !filterNonHydratedSegmentations || segmentation.hydrated;
|
|
@@ -7103,9 +7676,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7103
7676
|
getSegmentation(segmentationId) {
|
|
7104
7677
|
return this.segmentations[segmentationId];
|
|
7105
7678
|
}
|
|
7106
|
-
addOrUpdateSegmentation(segmentation) {
|
|
7107
|
-
let suppressEvents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7108
|
-
let notYetUpdatedAtSource = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7679
|
+
addOrUpdateSegmentation(segmentation, suppressEvents = false, notYetUpdatedAtSource = false) {
|
|
7109
7680
|
const {
|
|
7110
7681
|
id: segmentationId
|
|
7111
7682
|
} = segmentation;
|
|
@@ -7135,15 +7706,6 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7135
7706
|
}
|
|
7136
7707
|
}
|
|
7137
7708
|
}]);
|
|
7138
|
-
|
|
7139
|
-
// if first segmentation, we can use the default colorLUT, otherwise
|
|
7140
|
-
// we need to generate a new one and use a new colorLUT
|
|
7141
|
-
const colorLUTIndex = 0;
|
|
7142
|
-
if (Object.keys(this.segmentations).length !== 0) {
|
|
7143
|
-
const newColorLUT = this.generateNewColorLUT();
|
|
7144
|
-
const colorLUTIndex = this.getNextColorLUTIndex();
|
|
7145
|
-
dist_esm.segmentation.config.color.addColorLUT(newColorLUT, colorLUTIndex);
|
|
7146
|
-
}
|
|
7147
7709
|
this.segmentations[segmentationId] = {
|
|
7148
7710
|
...segmentation,
|
|
7149
7711
|
label: segmentation.label || '',
|
|
@@ -7151,8 +7713,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7151
7713
|
activeSegmentIndex: segmentation.activeSegmentIndex ?? null,
|
|
7152
7714
|
segmentCount: segmentation.segmentCount ?? 0,
|
|
7153
7715
|
isActive: false,
|
|
7154
|
-
isVisible: true
|
|
7155
|
-
colorLUTIndex
|
|
7716
|
+
isVisible: true
|
|
7156
7717
|
};
|
|
7157
7718
|
cachedSegmentation = this.segmentations[segmentationId];
|
|
7158
7719
|
this._updateCornerstoneSegmentations({
|
|
@@ -7166,8 +7727,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7166
7727
|
}
|
|
7167
7728
|
return cachedSegmentation.id;
|
|
7168
7729
|
}
|
|
7169
|
-
async createSegmentationForSEGDisplaySet(segDisplaySet, segmentationId) {
|
|
7170
|
-
let suppressEvents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7730
|
+
async createSegmentationForSEGDisplaySet(segDisplaySet, segmentationId, suppressEvents = false) {
|
|
7171
7731
|
// Todo: we only support creating labelmap for SEG displaySets for now
|
|
7172
7732
|
const representationType = LABELMAP;
|
|
7173
7733
|
segmentationId = segmentationId ?? segDisplaySet.displaySetInstanceUID;
|
|
@@ -7273,8 +7833,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7273
7833
|
});
|
|
7274
7834
|
return this.addOrUpdateSegmentation(segmentation, suppressEvents);
|
|
7275
7835
|
}
|
|
7276
|
-
async createSegmentationForRTDisplaySet(rtDisplaySet, segmentationId) {
|
|
7277
|
-
let suppressEvents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7836
|
+
async createSegmentationForRTDisplaySet(rtDisplaySet, segmentationId, suppressEvents = false) {
|
|
7278
7837
|
// Todo: we currently only have support for contour representation for initial
|
|
7279
7838
|
// RT display
|
|
7280
7839
|
const representationType = CONTOUR;
|
|
@@ -7291,12 +7850,9 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7291
7850
|
|
|
7292
7851
|
// sort by segmentIndex
|
|
7293
7852
|
allRTStructData.sort((a, b) => a.segmentIndex - b.segmentIndex);
|
|
7294
|
-
const geometryIds = allRTStructData.map(
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
} = _ref2;
|
|
7298
|
-
return geometryId;
|
|
7299
|
-
});
|
|
7853
|
+
const geometryIds = allRTStructData.map(({
|
|
7854
|
+
geometryId
|
|
7855
|
+
}) => geometryId);
|
|
7300
7856
|
const segmentation = {
|
|
7301
7857
|
...defaultScheme,
|
|
7302
7858
|
id: segmentationId,
|
|
@@ -7349,7 +7905,6 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7349
7905
|
},
|
|
7350
7906
|
modifiedTime: rtDisplaySet.SeriesDate // we use the SeriesDate as the modifiedTime since this is the first time we are creating the segmentation
|
|
7351
7907
|
};
|
|
7352
|
-
|
|
7353
7908
|
segmentation.segments[segmentIndex] = {
|
|
7354
7909
|
label: id,
|
|
7355
7910
|
segmentIndex,
|
|
@@ -7397,12 +7952,8 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7397
7952
|
});
|
|
7398
7953
|
return this.addOrUpdateSegmentation(segmentation, suppressEvents);
|
|
7399
7954
|
}
|
|
7400
|
-
jumpToSegmentCenter(segmentationId, segmentIndex, toolGroupId
|
|
7401
|
-
|
|
7402
|
-
let highlightSegment = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
7403
|
-
let animationLength = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 750;
|
|
7404
|
-
let highlightHideOthers = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
7405
|
-
let highlightFunctionType = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'ease-in-out';
|
|
7955
|
+
jumpToSegmentCenter(segmentationId, segmentIndex, toolGroupId, highlightAlpha = 0.9, highlightSegment = true, animationLength = 750, highlightHideOthers = false, highlightFunctionType = 'ease-in-out' // todo: make animation functions configurable from outside
|
|
7956
|
+
) {
|
|
7406
7957
|
const {
|
|
7407
7958
|
toolGroupService
|
|
7408
7959
|
} = this.servicesManager.services;
|
|
@@ -7442,11 +7993,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7442
7993
|
}
|
|
7443
7994
|
});
|
|
7444
7995
|
}
|
|
7445
|
-
highlightSegment(segmentationId, segmentIndex, toolGroupId) {
|
|
7446
|
-
let alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.9;
|
|
7447
|
-
let animationLength = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 750;
|
|
7448
|
-
let hideOthers = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
7449
|
-
let highlightFunctionType = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'ease-in-out';
|
|
7996
|
+
highlightSegment(segmentationId, segmentIndex, toolGroupId, alpha = 0.9, animationLength = 750, hideOthers = true, highlightFunctionType = 'ease-in-out') {
|
|
7450
7997
|
if (this.highlightIntervalId) {
|
|
7451
7998
|
clearInterval(this.highlightIntervalId);
|
|
7452
7999
|
}
|
|
@@ -7592,8 +8139,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7592
8139
|
setSegmentLabel(segmentationId, segmentIndex, label) {
|
|
7593
8140
|
this._setSegmentLabel(segmentationId, segmentIndex, label);
|
|
7594
8141
|
}
|
|
7595
|
-
_setSegmentLabel(segmentationId, segmentIndex, label) {
|
|
7596
|
-
let suppressEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
8142
|
+
_setSegmentLabel(segmentationId, segmentIndex, label, suppressEvents = false) {
|
|
7597
8143
|
const segmentation = this.getSegmentation(segmentationId);
|
|
7598
8144
|
if (segmentation === undefined) {
|
|
7599
8145
|
throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
|
|
@@ -7645,12 +8191,10 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7645
8191
|
segmentCount: 0,
|
|
7646
8192
|
segments: [],
|
|
7647
8193
|
isVisible: true,
|
|
7648
|
-
isActive: false
|
|
7649
|
-
colorLUTIndex: 0
|
|
8194
|
+
isActive: false
|
|
7650
8195
|
};
|
|
7651
8196
|
}
|
|
7652
|
-
_setActiveSegmentationForToolGroup(segmentationId, toolGroupId) {
|
|
7653
|
-
let suppressEvents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
8197
|
+
_setActiveSegmentationForToolGroup(segmentationId, toolGroupId, suppressEvents = false) {
|
|
7654
8198
|
const segmentations = this._getSegmentations();
|
|
7655
8199
|
const targetSegmentation = this.getSegmentation(segmentationId);
|
|
7656
8200
|
if (targetSegmentation === undefined) {
|
|
@@ -7667,8 +8211,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7667
8211
|
});
|
|
7668
8212
|
}
|
|
7669
8213
|
}
|
|
7670
|
-
_setActiveSegment(segmentationId, segmentIndex) {
|
|
7671
|
-
let suppressEvents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
8214
|
+
_setActiveSegment(segmentationId, segmentIndex, suppressEvents = false) {
|
|
7672
8215
|
const segmentation = this.getSegmentation(segmentationId);
|
|
7673
8216
|
if (segmentation === undefined) {
|
|
7674
8217
|
throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
|
|
@@ -7716,8 +8259,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7716
8259
|
} = segmentCenter[segmentIndex];
|
|
7717
8260
|
return center;
|
|
7718
8261
|
}
|
|
7719
|
-
_setSegmentLocked(segmentationId, segmentIndex, isLocked) {
|
|
7720
|
-
let suppressEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
8262
|
+
_setSegmentLocked(segmentationId, segmentIndex, isLocked, suppressEvents = false) {
|
|
7721
8263
|
const segmentation = this.getSegmentation(segmentationId);
|
|
7722
8264
|
if (segmentation === undefined) {
|
|
7723
8265
|
throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
|
|
@@ -7734,8 +8276,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7734
8276
|
});
|
|
7735
8277
|
}
|
|
7736
8278
|
}
|
|
7737
|
-
_setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId) {
|
|
7738
|
-
let suppressEvents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
8279
|
+
_setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId, suppressEvents = false) {
|
|
7739
8280
|
toolGroupId = toolGroupId ?? this._getApplicableToolGroupId();
|
|
7740
8281
|
const {
|
|
7741
8282
|
segmentationRepresentationUID,
|
|
@@ -7761,8 +8302,7 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7761
8302
|
});
|
|
7762
8303
|
}
|
|
7763
8304
|
}
|
|
7764
|
-
_setSegmentLabel(segmentationId, segmentIndex, segmentLabel) {
|
|
7765
|
-
let suppressEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
8305
|
+
_setSegmentLabel(segmentationId, segmentIndex, segmentLabel, suppressEvents = false) {
|
|
7766
8306
|
const segmentation = this.getSegmentation(segmentationId);
|
|
7767
8307
|
if (segmentation === undefined) {
|
|
7768
8308
|
throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
|
|
@@ -7840,11 +8380,10 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7840
8380
|
esm.cache.removeVolumeLoadObject(segmentationId);
|
|
7841
8381
|
}
|
|
7842
8382
|
}
|
|
7843
|
-
_updateCornerstoneSegmentations(
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
} = _ref3;
|
|
8383
|
+
_updateCornerstoneSegmentations({
|
|
8384
|
+
segmentationId,
|
|
8385
|
+
notYetUpdatedAtSource
|
|
8386
|
+
}) {
|
|
7848
8387
|
if (notYetUpdatedAtSource === false) {
|
|
7849
8388
|
return;
|
|
7850
8389
|
}
|
|
@@ -7881,19 +8420,15 @@ class SegmentationService extends src/* PubSubService */.hC {
|
|
|
7881
8420
|
return referencedFrameOfReferenceSequence.FrameOfReferenceUID;
|
|
7882
8421
|
}
|
|
7883
8422
|
}
|
|
7884
|
-
generateNewColorLUT() {
|
|
7885
|
-
const newColorLUT = lodash_clonedeep_default()(COLOR_LUT);
|
|
7886
|
-
return newColorLUT;
|
|
7887
|
-
}
|
|
7888
8423
|
}
|
|
8424
|
+
SegmentationService_class = SegmentationService;
|
|
7889
8425
|
SegmentationService.REGISTRATION = {
|
|
7890
8426
|
name: 'segmentationService',
|
|
7891
8427
|
altName: 'SegmentationService',
|
|
7892
|
-
create:
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
return new SegmentationService({
|
|
8428
|
+
create: ({
|
|
8429
|
+
servicesManager
|
|
8430
|
+
}) => {
|
|
8431
|
+
return new SegmentationService_class({
|
|
7897
8432
|
servicesManager
|
|
7898
8433
|
});
|
|
7899
8434
|
}
|
|
@@ -7923,6 +8458,7 @@ function getCornerstoneViewportType(viewportType) {
|
|
|
7923
8458
|
throw new Error(`Invalid viewport type: ${viewportType}. Valid types are: stack, volume`);
|
|
7924
8459
|
}
|
|
7925
8460
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/CornerstoneCacheService/CornerstoneCacheService.ts
|
|
8461
|
+
var CornerstoneCacheService_class;
|
|
7926
8462
|
|
|
7927
8463
|
|
|
7928
8464
|
const CornerstoneCacheService_VOLUME_LOADER_SCHEME = 'cornerstoneStreamingImageVolume';
|
|
@@ -7976,12 +8512,9 @@ class CornerstoneCacheService {
|
|
|
7976
8512
|
esm.cache.removeVolumeLoadObject(volumeId);
|
|
7977
8513
|
this.volumeImageIds.delete(volumeId);
|
|
7978
8514
|
}
|
|
7979
|
-
const displaySets = viewportData.data.map(
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
} = _ref;
|
|
7983
|
-
return displaySetService.getDisplaySetByUID(displaySetInstanceUID);
|
|
7984
|
-
});
|
|
8515
|
+
const displaySets = viewportData.data.map(({
|
|
8516
|
+
displaySetInstanceUID
|
|
8517
|
+
}) => displaySetService.getDisplaySetByUID(displaySetInstanceUID));
|
|
7985
8518
|
const newViewportData = await this._getVolumeViewportData(dataSource, displaySets, viewportData.viewportType);
|
|
7986
8519
|
return newViewportData;
|
|
7987
8520
|
}
|
|
@@ -8068,12 +8601,9 @@ class CornerstoneCacheService {
|
|
|
8068
8601
|
segmentationService,
|
|
8069
8602
|
displaySetService
|
|
8070
8603
|
} = this.servicesManager.services;
|
|
8071
|
-
const viewportDisplaySetInstanceUIDs = displaySets.map(
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
} = _ref2;
|
|
8075
|
-
return displaySetInstanceUID;
|
|
8076
|
-
});
|
|
8604
|
+
const viewportDisplaySetInstanceUIDs = displaySets.map(({
|
|
8605
|
+
displaySetInstanceUID
|
|
8606
|
+
}) => displaySetInstanceUID);
|
|
8077
8607
|
|
|
8078
8608
|
// check inside segmentations if any of them are referencing the displaySets
|
|
8079
8609
|
// that are about to be displayed
|
|
@@ -8096,14 +8626,14 @@ class CornerstoneCacheService {
|
|
|
8096
8626
|
return stackImageIds;
|
|
8097
8627
|
}
|
|
8098
8628
|
}
|
|
8629
|
+
CornerstoneCacheService_class = CornerstoneCacheService;
|
|
8099
8630
|
CornerstoneCacheService.REGISTRATION = {
|
|
8100
8631
|
name: 'cornerstoneCacheService',
|
|
8101
8632
|
altName: 'CornerstoneCacheService',
|
|
8102
|
-
create:
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
return new CornerstoneCacheService(servicesManager);
|
|
8633
|
+
create: ({
|
|
8634
|
+
servicesManager
|
|
8635
|
+
}) => {
|
|
8636
|
+
return new CornerstoneCacheService_class(servicesManager);
|
|
8107
8637
|
}
|
|
8108
8638
|
};
|
|
8109
8639
|
/* harmony default export */ const CornerstoneCacheService_CornerstoneCacheService = (CornerstoneCacheService);
|
|
@@ -8233,12 +8763,9 @@ class ViewportInfo {
|
|
|
8233
8763
|
let viewportData = this.getViewportData();
|
|
8234
8764
|
if (viewportData.viewportType === esm.Enums.ViewportType.ORTHOGRAPHIC || viewportData.viewportType === esm.Enums.ViewportType.VOLUME_3D) {
|
|
8235
8765
|
viewportData = viewportData;
|
|
8236
|
-
return viewportData.data.some(
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
} = _ref;
|
|
8240
|
-
return dsUID === displaySetInstanceUID;
|
|
8241
|
-
});
|
|
8766
|
+
return viewportData.data.some(({
|
|
8767
|
+
displaySetInstanceUID: dsUID
|
|
8768
|
+
}) => dsUID === displaySetInstanceUID);
|
|
8242
8769
|
}
|
|
8243
8770
|
viewportData = viewportData;
|
|
8244
8771
|
return viewportData.data.displaySetInstanceUID === displaySetInstanceUID;
|
|
@@ -8310,8 +8837,7 @@ class ViewportInfo {
|
|
|
8310
8837
|
|
|
8311
8838
|
// Handle incoming public display set options or a display set select
|
|
8312
8839
|
// with a contained options.
|
|
8313
|
-
mapDisplaySetOptions() {
|
|
8314
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [{}];
|
|
8840
|
+
mapDisplaySetOptions(options = [{}]) {
|
|
8315
8841
|
const displaySetOptions = [];
|
|
8316
8842
|
options.forEach(item => {
|
|
8317
8843
|
let option = item?.options || item;
|
|
@@ -8351,6 +8877,7 @@ var JumpPresets = /*#__PURE__*/function (JumpPresets) {
|
|
|
8351
8877
|
}(JumpPresets || {});
|
|
8352
8878
|
/* harmony default export */ const utils_JumpPresets = (JumpPresets);
|
|
8353
8879
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts
|
|
8880
|
+
var CornerstoneViewportService_class;
|
|
8354
8881
|
|
|
8355
8882
|
|
|
8356
8883
|
|
|
@@ -8494,11 +9021,13 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8494
9021
|
camera
|
|
8495
9022
|
};
|
|
8496
9023
|
}
|
|
8497
|
-
storePresentation(
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
9024
|
+
storePresentation({
|
|
9025
|
+
viewportId
|
|
9026
|
+
}) {
|
|
9027
|
+
const {
|
|
9028
|
+
stateSyncService,
|
|
9029
|
+
syncGroupService
|
|
9030
|
+
} = this.servicesManager.services;
|
|
8502
9031
|
let presentation;
|
|
8503
9032
|
try {
|
|
8504
9033
|
presentation = this.getPresentation(viewportId);
|
|
@@ -8508,9 +9037,11 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8508
9037
|
if (!presentation || !presentation.presentationIds) {
|
|
8509
9038
|
return;
|
|
8510
9039
|
}
|
|
9040
|
+
const synchronizers = syncGroupService.getSynchronizersForViewport(viewportId, this.renderingEngine.id);
|
|
8511
9041
|
const {
|
|
8512
9042
|
lutPresentationStore,
|
|
8513
|
-
positionPresentationStore
|
|
9043
|
+
positionPresentationStore,
|
|
9044
|
+
synchronizersStore
|
|
8514
9045
|
} = stateSyncService.getState();
|
|
8515
9046
|
const {
|
|
8516
9047
|
presentationIds
|
|
@@ -8532,6 +9063,20 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8532
9063
|
[positionPresentationId]: presentation
|
|
8533
9064
|
};
|
|
8534
9065
|
}
|
|
9066
|
+
if (synchronizers?.length) {
|
|
9067
|
+
storeState.synchronizersStore = {
|
|
9068
|
+
...synchronizersStore,
|
|
9069
|
+
[viewportId]: synchronizers.map(synchronizer => {
|
|
9070
|
+
const sourceViewports = synchronizer.getSourceViewports();
|
|
9071
|
+
const targetViewports = synchronizer.getTargetViewports();
|
|
9072
|
+
return {
|
|
9073
|
+
id: synchronizer.id,
|
|
9074
|
+
sourceViewports: [...sourceViewports],
|
|
9075
|
+
targetViewports: [...targetViewports]
|
|
9076
|
+
};
|
|
9077
|
+
})
|
|
9078
|
+
};
|
|
9079
|
+
}
|
|
8535
9080
|
stateSyncService.store(storeState);
|
|
8536
9081
|
}
|
|
8537
9082
|
|
|
@@ -8600,14 +9145,16 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8600
9145
|
viewportInfo.setViewportId(viewportId);
|
|
8601
9146
|
this.viewportsById.set(viewportId, viewportInfo);
|
|
8602
9147
|
const viewport = renderingEngine.getViewport(viewportId);
|
|
8603
|
-
this._setDisplaySets(viewport, viewportData, viewportInfo, presentations);
|
|
9148
|
+
const displaySetPromise = this._setDisplaySets(viewport, viewportData, viewportInfo, presentations);
|
|
8604
9149
|
|
|
8605
9150
|
// The broadcast event here ensures that listeners have a valid, up to date
|
|
8606
9151
|
// viewport to access. Doing it too early can result in exceptions or
|
|
8607
9152
|
// invalid data.
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
9153
|
+
displaySetPromise.then(() => {
|
|
9154
|
+
this._broadcastEvent(this.EVENTS.VIEWPORT_DATA_CHANGED, {
|
|
9155
|
+
viewportData,
|
|
9156
|
+
viewportId
|
|
9157
|
+
});
|
|
8611
9158
|
});
|
|
8612
9159
|
}
|
|
8613
9160
|
getCornerstoneViewport(viewportId) {
|
|
@@ -8621,7 +9168,7 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8621
9168
|
getViewportInfo(viewportId) {
|
|
8622
9169
|
return this.viewportsById.get(viewportId);
|
|
8623
9170
|
}
|
|
8624
|
-
_setStackViewport(viewport, viewportData, viewportInfo, presentations) {
|
|
9171
|
+
async _setStackViewport(viewport, viewportData, viewportInfo, presentations) {
|
|
8625
9172
|
const displaySetOptions = viewportInfo.getDisplaySetOptions();
|
|
8626
9173
|
const {
|
|
8627
9174
|
imageIds,
|
|
@@ -8639,7 +9186,8 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8639
9186
|
if (!presentations.lutPresentation?.properties) {
|
|
8640
9187
|
const {
|
|
8641
9188
|
voi,
|
|
8642
|
-
voiInverted
|
|
9189
|
+
voiInverted,
|
|
9190
|
+
colormap
|
|
8643
9191
|
} = displaySetOptions[0];
|
|
8644
9192
|
if (voi && (voi.windowWidth || voi.windowCenter)) {
|
|
8645
9193
|
const {
|
|
@@ -8654,8 +9202,11 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8654
9202
|
if (voiInverted !== undefined) {
|
|
8655
9203
|
properties.invert = voiInverted;
|
|
8656
9204
|
}
|
|
9205
|
+
if (colormap !== undefined) {
|
|
9206
|
+
properties.colormap = colormap;
|
|
9207
|
+
}
|
|
8657
9208
|
}
|
|
8658
|
-
viewport.setStack(imageIds, initialImageIndexToUse).then(() => {
|
|
9209
|
+
return viewport.setStack(imageIds, initialImageIndexToUse).then(() => {
|
|
8659
9210
|
viewport.setProperties({
|
|
8660
9211
|
...properties
|
|
8661
9212
|
});
|
|
@@ -8819,11 +9370,10 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8819
9370
|
};
|
|
8820
9371
|
});
|
|
8821
9372
|
await viewport.setVolumes(volumeInputArray);
|
|
8822
|
-
volumesProperties.forEach(
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
} = _ref2;
|
|
9373
|
+
volumesProperties.forEach(({
|
|
9374
|
+
properties,
|
|
9375
|
+
volumeId
|
|
9376
|
+
}) => {
|
|
8827
9377
|
viewport.setProperties(properties, volumeId);
|
|
8828
9378
|
});
|
|
8829
9379
|
this.setPresentations(viewport, presentations);
|
|
@@ -8923,31 +9473,34 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
8923
9473
|
|
|
8924
9474
|
// Todo: keepCamera is an interim solution until we have a better solution for
|
|
8925
9475
|
// keeping the camera position when the viewport data is changed
|
|
8926
|
-
updateViewport(viewportId, viewportData) {
|
|
8927
|
-
let keepCamera = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
9476
|
+
updateViewport(viewportId, viewportData, keepCamera = false) {
|
|
8928
9477
|
const viewportInfo = this.getViewportInfo(viewportId);
|
|
8929
9478
|
const viewport = this.getCornerstoneViewport(viewportId);
|
|
8930
9479
|
const viewportCamera = viewport.getCamera();
|
|
9480
|
+
let displaySetPromise;
|
|
8931
9481
|
if (viewport instanceof esm.VolumeViewport || viewport instanceof esm.VolumeViewport3D) {
|
|
8932
|
-
this._setVolumeViewport(viewport, viewportData, viewportInfo).then(() => {
|
|
9482
|
+
displaySetPromise = this._setVolumeViewport(viewport, viewportData, viewportInfo).then(() => {
|
|
8933
9483
|
if (keepCamera) {
|
|
8934
9484
|
viewport.setCamera(viewportCamera);
|
|
8935
9485
|
viewport.render();
|
|
8936
9486
|
}
|
|
8937
9487
|
});
|
|
8938
|
-
return;
|
|
8939
9488
|
}
|
|
8940
9489
|
if (viewport instanceof esm.StackViewport) {
|
|
8941
|
-
this._setStackViewport(viewport, viewportData, viewportInfo);
|
|
8942
|
-
return;
|
|
9490
|
+
displaySetPromise = this._setStackViewport(viewport, viewportData, viewportInfo);
|
|
8943
9491
|
}
|
|
9492
|
+
displaySetPromise.then(() => {
|
|
9493
|
+
this._broadcastEvent(this.EVENTS.VIEWPORT_DATA_CHANGED, {
|
|
9494
|
+
viewportData,
|
|
9495
|
+
viewportId
|
|
9496
|
+
});
|
|
9497
|
+
});
|
|
8944
9498
|
}
|
|
8945
|
-
_setDisplaySets(viewport, viewportData, viewportInfo) {
|
|
8946
|
-
let presentations = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
9499
|
+
_setDisplaySets(viewport, viewportData, viewportInfo, presentations = {}) {
|
|
8947
9500
|
if (viewport instanceof esm.StackViewport) {
|
|
8948
|
-
this._setStackViewport(viewport, viewportData, viewportInfo, presentations);
|
|
9501
|
+
return this._setStackViewport(viewport, viewportData, viewportInfo, presentations);
|
|
8949
9502
|
} else if (viewport instanceof esm.VolumeViewport || viewport instanceof esm.VolumeViewport3D) {
|
|
8950
|
-
this._setVolumeViewport(viewport, viewportData, viewportInfo, presentations);
|
|
9503
|
+
return this._setVolumeViewport(viewport, viewportData, viewportInfo, presentations);
|
|
8951
9504
|
} else {
|
|
8952
9505
|
throw new Error('Unknown viewport type');
|
|
8953
9506
|
}
|
|
@@ -9035,14 +9588,14 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
|
|
|
9035
9588
|
return [...this.viewportsById.values()].find(viewportInfo => viewportInfo.contains(displaySetInstanceUID, referencedImageId))?.viewportId ?? null;
|
|
9036
9589
|
}
|
|
9037
9590
|
}
|
|
9591
|
+
CornerstoneViewportService_class = CornerstoneViewportService;
|
|
9038
9592
|
CornerstoneViewportService.REGISTRATION = {
|
|
9039
9593
|
name: 'cornerstoneViewportService',
|
|
9040
9594
|
altName: 'CornerstoneViewportService',
|
|
9041
|
-
create:
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
return new CornerstoneViewportService(servicesManager);
|
|
9595
|
+
create: ({
|
|
9596
|
+
servicesManager
|
|
9597
|
+
}) => {
|
|
9598
|
+
return new CornerstoneViewportService_class(servicesManager);
|
|
9046
9599
|
}
|
|
9047
9600
|
};
|
|
9048
9601
|
/* harmony default export */ const ViewportService_CornerstoneViewportService = (CornerstoneViewportService);
|
|
@@ -9091,8 +9644,7 @@ const getNonImageInstance = dataset => {
|
|
|
9091
9644
|
const getImageInstanceId = imageInstance => {
|
|
9092
9645
|
return getImageId(imageInstance);
|
|
9093
9646
|
};
|
|
9094
|
-
const fetchIt =
|
|
9095
|
-
let headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : src.DICOMWeb.getAuthorizationHeader();
|
|
9647
|
+
const fetchIt = (url, headers = src.DICOMWeb.getAuthorizationHeader()) => {
|
|
9096
9648
|
return fetch(url, headers).then(response => response.arrayBuffer());
|
|
9097
9649
|
};
|
|
9098
9650
|
const cornerstoneRetriever = imageId => {
|
|
@@ -9100,9 +9652,7 @@ const cornerstoneRetriever = imageId => {
|
|
|
9100
9652
|
return image && image.data && image.data.byteArray.buffer;
|
|
9101
9653
|
});
|
|
9102
9654
|
};
|
|
9103
|
-
const wadorsRetriever =
|
|
9104
|
-
let headers = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : src.DICOMWeb.getAuthorizationHeader();
|
|
9105
|
-
let errorInterceptor = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : src/* errorHandler */.Po.getHTTPErrorHandler();
|
|
9655
|
+
const wadorsRetriever = (url, studyInstanceUID, seriesInstanceUID, sopInstanceUID, headers = src.DICOMWeb.getAuthorizationHeader(), errorInterceptor = src/* errorHandler */.Po.getHTTPErrorHandler()) => {
|
|
9106
9656
|
const config = {
|
|
9107
9657
|
url,
|
|
9108
9658
|
headers,
|
|
@@ -9181,7 +9731,8 @@ class DicomLoaderService {
|
|
|
9181
9731
|
SOPInstanceUID,
|
|
9182
9732
|
authorizationHeaders,
|
|
9183
9733
|
wadoRoot,
|
|
9184
|
-
wadoUri
|
|
9734
|
+
wadoUri,
|
|
9735
|
+
instance
|
|
9185
9736
|
} = dataset;
|
|
9186
9737
|
// Retrieve wadors or just try to fetch wadouri
|
|
9187
9738
|
if (!someInvalidStrings(wadoRoot)) {
|
|
@@ -9190,6 +9741,15 @@ class DicomLoaderService {
|
|
|
9190
9741
|
return fetchIt(wadoUri, {
|
|
9191
9742
|
headers: authorizationHeaders
|
|
9192
9743
|
});
|
|
9744
|
+
} else if (!someInvalidStrings(instance?.url)) {
|
|
9745
|
+
// make sure the url is absolute, remove the scope
|
|
9746
|
+
// from it if it is not absolute. For instance it might be dicomweb:http://....
|
|
9747
|
+
// and we need to remove the dicomweb: part
|
|
9748
|
+
const url = instance.url;
|
|
9749
|
+
const absoluteUrl = url.startsWith('http') ? url : url.substring(url.indexOf(':') + 1);
|
|
9750
|
+
return fetchIt(absoluteUrl, {
|
|
9751
|
+
headers: authorizationHeaders
|
|
9752
|
+
});
|
|
9193
9753
|
}
|
|
9194
9754
|
}
|
|
9195
9755
|
*getLoaderIterator(dataset, studies, headers) {
|
|
@@ -9243,6 +9803,7 @@ function src_extends() { src_extends = Object.assign ? Object.assign.bind() : fu
|
|
|
9243
9803
|
|
|
9244
9804
|
|
|
9245
9805
|
|
|
9806
|
+
|
|
9246
9807
|
|
|
9247
9808
|
|
|
9248
9809
|
const Component = /*#__PURE__*/react.lazy(() => {
|
|
@@ -9288,11 +9849,10 @@ const cornerstoneExtension = {
|
|
|
9288
9849
|
return init.call(this, props);
|
|
9289
9850
|
},
|
|
9290
9851
|
getHangingProtocolModule: src_getHangingProtocolModule,
|
|
9291
|
-
getViewportModule(
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
} = _ref;
|
|
9852
|
+
getViewportModule({
|
|
9853
|
+
servicesManager,
|
|
9854
|
+
commandsManager
|
|
9855
|
+
}) {
|
|
9296
9856
|
const ExtendedOHIFCornerstoneViewport = props => {
|
|
9297
9857
|
// const onNewImageHandler = jumpData => {
|
|
9298
9858
|
// commandsManager.runCommand('jumpToImage', jumpData);
|
|
@@ -9313,10 +9873,9 @@ const cornerstoneExtension = {
|
|
|
9313
9873
|
},
|
|
9314
9874
|
getCommandsModule: src_commandsModule,
|
|
9315
9875
|
getCustomizationModule: src_getCustomizationModule,
|
|
9316
|
-
getUtilityModule(
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
} = _ref2;
|
|
9876
|
+
getUtilityModule({
|
|
9877
|
+
servicesManager
|
|
9878
|
+
}) {
|
|
9320
9879
|
return [{
|
|
9321
9880
|
name: 'common',
|
|
9322
9881
|
exports: {
|
|
@@ -9351,7 +9910,6 @@ const cornerstoneExtension = {
|
|
|
9351
9910
|
/***/ 73704:
|
|
9352
9911
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9353
9912
|
|
|
9354
|
-
"use strict";
|
|
9355
9913
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9356
9914
|
/* harmony export */ K8: () => (/* binding */ getEnabledElement),
|
|
9357
9915
|
/* harmony export */ Yc: () => (/* binding */ setEnabledElement),
|
|
@@ -9394,11 +9952,10 @@ const reset = () => {
|
|
|
9394
9952
|
/***/ 87172:
|
|
9395
9953
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9396
9954
|
|
|
9397
|
-
"use strict";
|
|
9398
9955
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9399
9956
|
/* harmony export */ Z: () => (/* binding */ getSOPInstanceAttributes)
|
|
9400
9957
|
/* harmony export */ });
|
|
9401
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
9958
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64225);
|
|
9402
9959
|
|
|
9403
9960
|
|
|
9404
9961
|
/**
|
|
@@ -9415,7 +9972,6 @@ function getSOPInstanceAttributes(imageId) {
|
|
|
9415
9972
|
|
|
9416
9973
|
// Todo: implement for volume viewports and use the referencedSeriesInstanceUID
|
|
9417
9974
|
}
|
|
9418
|
-
|
|
9419
9975
|
function _getUIDFromImageID(imageId) {
|
|
9420
9976
|
const instance = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.metaData.get('instance', imageId);
|
|
9421
9977
|
return {
|
|
@@ -9426,13 +9982,6 @@ function _getUIDFromImageID(imageId) {
|
|
|
9426
9982
|
};
|
|
9427
9983
|
}
|
|
9428
9984
|
|
|
9429
|
-
/***/ }),
|
|
9430
|
-
|
|
9431
|
-
/***/ 78753:
|
|
9432
|
-
/***/ (() => {
|
|
9433
|
-
|
|
9434
|
-
/* (ignored) */
|
|
9435
|
-
|
|
9436
9985
|
/***/ })
|
|
9437
9986
|
|
|
9438
9987
|
}]);
|