@ohif/app 3.8.0-beta.27 → 3.8.0-beta.29

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.
Files changed (42) hide show
  1. package/dist/{12.bundle.56b9d54b9c0af71af1d7.js → 12.bundle.abb6ab88fda1125f3b47.js} +9 -11
  2. package/dist/{125.bundle.253395f320b72180da63.js → 125.bundle.df666cb677e5a8982157.js} +4 -5
  3. package/dist/{170.bundle.80ad57e16afc8855b0fc.js → 170.bundle.57dff48fc09ba5fa844b.js} +50 -69
  4. package/dist/{181.bundle.87f1df4f401b8023cfd1.js → 181.bundle.ae92b8a551d041d06e90.js} +58 -70
  5. package/dist/181.css +1 -1
  6. package/dist/{185.bundle.2d7c72ca2f461d711df9.js → 185.bundle.0251703d5b77f265cc11.js} +21 -26
  7. package/dist/{19.bundle.3dd19edbc75a5aebd1de.js → 19.bundle.55796dd5a6dfecf02682.js} +112 -127
  8. package/dist/{199.bundle.30893a2f3da90d37b0d9.js → 199.bundle.f62693c1405b52bc6580.js} +18 -20
  9. package/dist/{202.bundle.a607e9ab460999d8c0c8.js → 202.bundle.0ca2f2479d2578f539b0.js} +9 -1
  10. package/dist/{220.bundle.f7e1c96c94245e70f2be.js → 223.bundle.d4ac6ef2cfe47a9c4afc.js} +4422 -3671
  11. package/dist/{23.bundle.e008ad788170f2ed5569.js → 23.bundle.9d989522a6e4fdcb9c72.js} +1 -1
  12. package/dist/{250.bundle.5634282a01bd6e15b70d.js → 250.bundle.09c69d348a5d965debc8.js} +17 -22
  13. package/dist/{281.bundle.fc5d5a58827c8ba054b0.js → 281.bundle.a934356f89499eb6ec48.js} +23 -25
  14. package/dist/{359.bundle.644102e1339a5769fe43.js → 359.bundle.1f2a03766e18f1e3cca4.js} +24 -27
  15. package/dist/{410.bundle.089c191e6500a09de5f5.js → 410.bundle.b59d9d09407856f9babc.js} +22 -26
  16. package/dist/{417.bundle.af0a207c29b109f84159.js → 417.bundle.5c66801d23d0e98c00e6.js} +2 -2
  17. package/dist/{451.bundle.57c21db5d003c75e9d61.js → 451.bundle.68a551a7d1746cf904cb.js} +26 -32
  18. package/dist/{420.bundle.208f94f15dcc2be09dc0.js → 456.bundle.475e0e878872ad61e39e.js} +1074 -645
  19. package/dist/{466.bundle.be8d38922b545c9657dd.js → 466.bundle.667b31151880a262d475.js} +101 -130
  20. package/dist/{471.bundle.49c8d281adbae4a2c4df.js → 471.bundle.5809b10f75c8fc2f7167.js} +27 -33
  21. package/dist/{483.bundle.4866c3396b19964a0010.js → 483.bundle.775438e850fbee318b63.js} +128 -170
  22. package/dist/{485.bundle.8667a696ac2eaf99e4fa.js → 485.bundle.5b6c33cc43d8f3470642.js} +1 -1
  23. package/dist/{506.bundle.9fbbe1b884e79e06a3f6.js → 506.bundle.dcae1c16f61651daa74d.js} +13 -18
  24. package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 530.bundle.f904325ef4195d69ac0e.js} +10 -3
  25. package/dist/{26.bundle.c92012465cee00a2a708.js → 566.bundle.4840518afd323372c70f.js} +1136 -442
  26. package/dist/{613.bundle.b3839caf45bff66f2667.js → 613.bundle.d080a15569910ff63fc8.js} +19 -24
  27. package/dist/{661.bundle.65dd579322b265c6e321.js → 661.bundle.28ef6d8cd035876bd8e2.js} +40 -12
  28. package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 686.bundle.62c827fe4f0d054c164e.js} +4 -5
  29. package/dist/{687.bundle.bc44675be7433cd8670b.js → 687.bundle.fc36244c7ec3b1146f13.js} +19 -35
  30. package/dist/{738.bundle.a9dd630892da1e5dcabf.js → 738.bundle.7c78f93180d8405b167c.js} +434 -596
  31. package/dist/{814.bundle.b5267cf0fefd476ea55d.js → 814.bundle.9c9805cd0d54a8ea9697.js} +9 -11
  32. package/dist/{822.bundle.775a62e1f79c403f3aed.js → 822.bundle.55759fd8e9b0b489cc6b.js} +13 -15
  33. package/dist/{886.bundle.c8dd3ecc42a4253de278.js → 886.bundle.4496fc7fb83b8c897d20.js} +18 -22
  34. package/dist/{95.bundle.db9d2d504abc5dd4fdfa.js → 95.bundle.d7a9f450bed3b770504d.js} +3 -3
  35. package/dist/{965.bundle.fc770e33fa48b72621cc.js → 965.bundle.26d8f982af77f304a038.js} +91 -115
  36. package/dist/{app.bundle.25093dca29b89b580c6b.js → app.bundle.88eb088709ac23e29da0.js} +4645 -5949
  37. package/dist/app.bundle.css +11 -11
  38. package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.a7d5060eead13771e784.js} +1 -1
  39. package/dist/index.html +1 -1
  40. package/dist/sw.js +1 -1
  41. package/package.json +17 -17
  42. /package/dist/{420.css → 456.css} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[420],{
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[456],{
3
3
 
4
- /***/ 41420:
4
+ /***/ 86456:
5
5
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
6
 
7
7
  // ESM COMPAT FLAG
@@ -35,10 +35,10 @@ __webpack_require__.r(types_namespaceObject);
35
35
 
36
36
  // EXTERNAL MODULE: ../../../node_modules/react/index.js
37
37
  var react = __webpack_require__(43001);
38
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 363 modules
39
- var esm = __webpack_require__(56959);
40
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 413 modules
41
- var dist_esm = __webpack_require__(1026);
38
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 364 modules
39
+ var esm = __webpack_require__(27968);
40
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 424 modules
41
+ var dist_esm = __webpack_require__(74566);
42
42
  // EXTERNAL MODULE: ../../core/src/index.ts + 65 modules
43
43
  var src = __webpack_require__(71771);
44
44
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/streaming-image-volume-loader/dist/esm/index.js + 13 modules
@@ -137,9 +137,7 @@ var ui_src = __webpack_require__(22582);
137
137
  * @param {string?} dialogConfig.dialogTitle - title of the input dialog
138
138
  * @param {string?} dialogConfig.inputLabel - show label above the input
139
139
  */
140
- function callInputDialog(uiDialogService, data, callback) {
141
- let isArrowAnnotateInputDialog = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
142
- let dialogConfig = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
140
+ function callInputDialog(uiDialogService, data, callback, isArrowAnnotateInputDialog = true, dialogConfig = {}) {
143
141
  const dialogId = 'dialog-enter-annotation';
144
142
  const label = data ? isArrowAnnotateInputDialog ? data.text : data.label : '';
145
143
  const {
@@ -147,11 +145,10 @@ function callInputDialog(uiDialogService, data, callback) {
147
145
  inputLabel = 'Enter your annotation',
148
146
  validateFunc = value => true
149
147
  } = dialogConfig;
150
- const onSubmitHandler = _ref => {
151
- let {
152
- action,
153
- value
154
- } = _ref;
148
+ const onSubmitHandler = ({
149
+ action,
150
+ value
151
+ }) => {
155
152
  switch (action.id) {
156
153
  case 'save':
157
154
  if (typeof validateFunc === 'function' && !validateFunc(value.label)) {
@@ -193,11 +190,10 @@ function callInputDialog(uiDialogService, data, callback) {
193
190
  type: ui_src/* ButtonEnums.type */.LZ.dt.primary
194
191
  }],
195
192
  onSubmit: onSubmitHandler,
196
- body: _ref2 => {
197
- let {
198
- value,
199
- setValue
200
- } = _ref2;
193
+ body: ({
194
+ value,
195
+ setValue
196
+ }) => {
201
197
  return /*#__PURE__*/react.createElement(ui_src/* Input */.II, {
202
198
  autoFocus: true,
203
199
  className: "border-primary-main bg-black",
@@ -257,8 +253,8 @@ const {
257
253
  * Calibration Line tool works almost the same as the
258
254
  */
259
255
  class CalibrationLineTool extends dist_esm.LengthTool {
260
- constructor() {
261
- super(...arguments);
256
+ constructor(...args) {
257
+ super(...args);
262
258
  this._renderingViewport = void 0;
263
259
  this._lengthToolRenderAnnotation = this.renderAnnotation;
264
260
  this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
@@ -407,14 +403,12 @@ esm.metaData.addProvider(OverlayPlaneModuleProvider.get, 10_000);
407
403
  * toolGroup.setToolEnabled() and toolGroup.setToolDisabled()
408
404
  */
409
405
  class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
410
- constructor() {
411
- let toolProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
412
- let defaultToolProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
413
- supportedInteractionTypes: [],
414
- configuration: {
415
- fillColor: [255, 127, 127, 255]
416
- }
417
- };
406
+ constructor(toolProps = {}, defaultToolProps = {
407
+ supportedInteractionTypes: [],
408
+ configuration: {
409
+ fillColor: [255, 127, 127, 255]
410
+ }
411
+ }) {
418
412
  super(toolProps, defaultToolProps);
419
413
  this.onSetToolDisabled = () => {};
420
414
  this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
@@ -567,11 +561,10 @@ class ImageOverlayViewerTool extends dist_esm.AnnotationDisplayTool {
567
561
  * @param color
568
562
  * @returns
569
563
  */
570
- _renderOverlayToDataUrl(_ref, color, pixelDataRaw) {
571
- let {
572
- width,
573
- height
574
- } = _ref;
564
+ _renderOverlayToDataUrl({
565
+ width,
566
+ height
567
+ }, color, pixelDataRaw) {
575
568
  const pixelDataView = new DataView(pixelDataRaw);
576
569
  const totalBits = width * height;
577
570
  const canvas = document.createElement('canvas');
@@ -613,8 +606,7 @@ ImageOverlayViewerTool.addOverlayPlaneModule = tools_OverlayPlaneModuleProvider.
613
606
 
614
607
 
615
608
 
616
- function initCornerstoneTools() {
617
- let configuration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
609
+ function initCornerstoneTools(configuration = {}) {
618
610
  dist_esm.CrosshairsTool.isAnnotation = false;
619
611
  dist_esm.ReferenceLinesTool.isAnnotation = false;
620
612
  (0,dist_esm.init)(configuration);
@@ -2684,10 +2676,9 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
2684
2676
  RAW_MEASUREMENT_ADDED
2685
2677
  } = measurementService.EVENTS;
2686
2678
  const csTools3DVer1MeasurementSource = measurementService.getSource(CORNERSTONE_3D_TOOLS_SOURCE_NAME, CORNERSTONE_3D_TOOLS_SOURCE_VERSION);
2687
- measurementService.subscribe(MEASUREMENTS_CLEARED, _ref => {
2688
- let {
2689
- measurements
2690
- } = _ref;
2679
+ measurementService.subscribe(MEASUREMENTS_CLEARED, ({
2680
+ measurements
2681
+ }) => {
2691
2682
  if (!Object.keys(measurements).length) {
2692
2683
  return;
2693
2684
  }
@@ -2702,12 +2693,11 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
2702
2693
  removeAnnotation(uid);
2703
2694
  }
2704
2695
  });
2705
- measurementService.subscribe(MEASUREMENT_UPDATED, _ref2 => {
2706
- let {
2707
- source,
2708
- measurement,
2709
- notYetUpdatedAtSource
2710
- } = _ref2;
2696
+ measurementService.subscribe(MEASUREMENT_UPDATED, ({
2697
+ source,
2698
+ measurement,
2699
+ notYetUpdatedAtSource
2700
+ }) => {
2711
2701
  if (source.name !== CORNERSTONE_3D_TOOLS_SOURCE_NAME) {
2712
2702
  return;
2713
2703
  }
@@ -2737,14 +2727,12 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
2737
2727
 
2738
2728
  // Todo: trigger render for annotation
2739
2729
  });
2740
-
2741
- measurementService.subscribe(RAW_MEASUREMENT_ADDED, _ref3 => {
2742
- let {
2743
- source,
2744
- measurement,
2745
- data,
2746
- dataSource
2747
- } = _ref3;
2730
+ measurementService.subscribe(RAW_MEASUREMENT_ADDED, ({
2731
+ source,
2732
+ measurement,
2733
+ data,
2734
+ dataSource
2735
+ }) => {
2748
2736
  if (source.name !== CORNERSTONE_3D_TOOLS_SOURCE_NAME) {
2749
2737
  return;
2750
2738
  }
@@ -2788,11 +2776,10 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
2788
2776
  }
2789
2777
  });
2790
2778
  });
2791
- measurementService.subscribe(MEASUREMENT_REMOVED, _ref4 => {
2792
- let {
2793
- source,
2794
- measurement: removedMeasurementId
2795
- } = _ref4;
2779
+ measurementService.subscribe(MEASUREMENT_REMOVED, ({
2780
+ source,
2781
+ measurement: removedMeasurementId
2782
+ }) => {
2796
2783
  if (source?.name && source.name !== CORNERSTONE_3D_TOOLS_SOURCE_NAME) {
2797
2784
  return;
2798
2785
  }
@@ -2889,15 +2876,14 @@ const viewportIdVolumeInputArrayMap = new Map();
2889
2876
  * @param {Object} props image loading properties from Cornerstone ViewportService
2890
2877
  * @returns
2891
2878
  */
2892
- function interleaveCenterLoader(_ref) {
2893
- let {
2894
- data: {
2895
- viewportId,
2896
- volumeInputArray
2897
- },
2898
- displaySetsMatchDetails,
2899
- viewportMatchDetails: matchDetails
2900
- } = _ref;
2879
+ function interleaveCenterLoader({
2880
+ data: {
2881
+ viewportId,
2882
+ volumeInputArray
2883
+ },
2884
+ displaySetsMatchDetails,
2885
+ viewportMatchDetails: matchDetails
2886
+ }) {
2901
2887
  viewportIdVolumeInputArrayMap.set(viewportId, volumeInputArray);
2902
2888
 
2903
2889
  // Based on the volumeInputs store the volumeIds and SeriesInstanceIds
@@ -2966,10 +2952,9 @@ function interleaveCenterLoader(_ref) {
2966
2952
  return request.imageId;
2967
2953
  });
2968
2954
  const imageIds = getInterleavedFrames(requestImageIds);
2969
- const reOrderedRequests = imageIds.map(_ref2 => {
2970
- let {
2971
- imageId
2972
- } = _ref2;
2955
+ const reOrderedRequests = imageIds.map(({
2956
+ imageId
2957
+ }) => {
2973
2958
  const request = requests.find(req => req.imageId === imageId);
2974
2959
  return request;
2975
2960
  });
@@ -2995,14 +2980,13 @@ function interleaveCenterLoader(_ref) {
2995
2980
  });
2996
2981
  const requestType = esm.Enums.RequestType.Prefetch;
2997
2982
  const priority = 0;
2998
- finalRequests.forEach(_ref3 => {
2999
- let {
3000
- callLoadImage,
3001
- additionalDetails,
3002
- imageId,
3003
- imageIdIndex,
3004
- options
3005
- } = _ref3;
2983
+ finalRequests.forEach(({
2984
+ callLoadImage,
2985
+ additionalDetails,
2986
+ imageId,
2987
+ imageIdIndex,
2988
+ options
2989
+ }) => {
3006
2990
  const callLoadImageBound = callLoadImage.bind(null, imageId, imageIdIndex, options);
3007
2991
  esm.imageLoadPoolManager.addRequest(callLoadImageBound, requestType, additionalDetails, priority);
3008
2992
  });
@@ -3100,14 +3084,13 @@ const nthLoader_viewportIdVolumeInputArrayMap = new Map();
3100
3084
  * visually much better.
3101
3085
  * @param {Object} props image loading properties from Cornerstone ViewportService
3102
3086
  */
3103
- function interleaveNthLoader(_ref) {
3104
- let {
3105
- data: {
3106
- viewportId,
3107
- volumeInputArray
3108
- },
3109
- displaySetsMatchDetails
3110
- } = _ref;
3087
+ function interleaveNthLoader({
3088
+ data: {
3089
+ viewportId,
3090
+ volumeInputArray
3091
+ },
3092
+ displaySetsMatchDetails
3093
+ }) {
3111
3094
  nthLoader_viewportIdVolumeInputArrayMap.set(viewportId, volumeInputArray);
3112
3095
 
3113
3096
  // Based on the volumeInputs store the volumeIds and SeriesInstanceIds
@@ -3145,14 +3128,13 @@ function interleaveNthLoader(_ref) {
3145
3128
  const finalRequests = interleave(orderedRequests);
3146
3129
  const requestType = esm.Enums.RequestType.Prefetch;
3147
3130
  const priority = 0;
3148
- finalRequests.forEach(_ref2 => {
3149
- let {
3150
- callLoadImage,
3151
- additionalDetails,
3152
- imageId,
3153
- imageIdIndex,
3154
- options
3155
- } = _ref2;
3131
+ finalRequests.forEach(({
3132
+ callLoadImage,
3133
+ additionalDetails,
3134
+ imageId,
3135
+ imageIdIndex,
3136
+ options
3137
+ }) => {
3156
3138
  const callLoadImageBound = callLoadImage.bind(null, imageId, imageIdIndex, options);
3157
3139
  esm.imageLoadPoolManager.addRequest(callLoadImageBound, requestType, additionalDetails, priority);
3158
3140
  });
@@ -3183,15 +3165,14 @@ const interleaveTopToBottom_viewportIdVolumeInputArrayMap = new Map();
3183
3165
  * @param {Object} {viewportData, displaySetMatchDetails}
3184
3166
  * @returns
3185
3167
  */
3186
- function interleaveTopToBottom(_ref) {
3187
- let {
3188
- data: {
3189
- viewportId,
3190
- volumeInputArray
3191
- },
3192
- displaySetsMatchDetails,
3193
- viewportMatchDetails: matchDetails
3194
- } = _ref;
3168
+ function interleaveTopToBottom({
3169
+ data: {
3170
+ viewportId,
3171
+ volumeInputArray
3172
+ },
3173
+ displaySetsMatchDetails,
3174
+ viewportMatchDetails: matchDetails
3175
+ }) {
3195
3176
  interleaveTopToBottom_viewportIdVolumeInputArrayMap.set(viewportId, volumeInputArray);
3196
3177
 
3197
3178
  // Based on the volumeInputs store the volumeIds and SeriesInstanceIds
@@ -3280,14 +3261,13 @@ function interleaveTopToBottom(_ref) {
3280
3261
  });
3281
3262
  const requestType = esm.Enums.RequestType.Prefetch;
3282
3263
  const priority = 0;
3283
- finalRequests.forEach(_ref2 => {
3284
- let {
3285
- callLoadImage,
3286
- additionalDetails,
3287
- imageId,
3288
- imageIdIndex,
3289
- options
3290
- } = _ref2;
3264
+ finalRequests.forEach(({
3265
+ callLoadImage,
3266
+ additionalDetails,
3267
+ imageId,
3268
+ imageIdIndex,
3269
+ options
3270
+ }) => {
3291
3271
  const callLoadImageBound = callLoadImage.bind(null, imageId, imageIdIndex, options);
3292
3272
  esm.imageLoadPoolManager.addRequest(callLoadImageBound, requestType, additionalDetails, priority);
3293
3273
  });
@@ -3369,12 +3349,11 @@ function getEventName(evt) {
3369
3349
  nameArr.push(button);
3370
3350
  return nameArr.join('');
3371
3351
  }
3372
- function initContextMenu(_ref) {
3373
- let {
3374
- cornerstoneViewportService,
3375
- customizationService,
3376
- commandsManager
3377
- } = _ref;
3352
+ function initContextMenu({
3353
+ cornerstoneViewportService,
3354
+ customizationService,
3355
+ commandsManager
3356
+ }) {
3378
3357
  /*
3379
3358
  * Run the commands associated with the given button press,
3380
3359
  * defaults on button1 and button2
@@ -3458,11 +3437,10 @@ function getDoubleClickEventName(evt) {
3458
3437
  nameArr.push('doubleClick');
3459
3438
  return nameArr.join('');
3460
3439
  }
3461
- function initDoubleClick(_ref) {
3462
- let {
3463
- customizationService,
3464
- commandsManager
3465
- } = _ref;
3440
+ function initDoubleClick({
3441
+ customizationService,
3442
+ commandsManager
3443
+ }) {
3466
3444
  const cornerstoneViewportHandleDoubleClick = evt => {
3467
3445
  // Do not allow double click on a tool.
3468
3446
  const nearbyToolData = findNearbyToolData(commandsManager, evt);
@@ -3515,10 +3493,9 @@ const imageTiming = {
3515
3493
  *
3516
3494
  */
3517
3495
 
3518
- function initViewTiming(_ref) {
3519
- let {
3520
- element
3521
- } = _ref;
3496
+ function initViewTiming({
3497
+ element
3498
+ }) {
3522
3499
  if (!IMAGE_TIMING_KEYS.find(key => src/* log */.cM.timingKeys[key])) {
3523
3500
  return;
3524
3501
  }
@@ -3563,14 +3540,13 @@ window.cornerstoneTools = dist_esm;
3563
3540
  /**
3564
3541
  *
3565
3542
  */
3566
- async function init(_ref) {
3567
- let {
3568
- servicesManager,
3569
- commandsManager,
3570
- extensionManager,
3571
- configuration,
3572
- appConfig
3573
- } = _ref;
3543
+ async function init({
3544
+ servicesManager,
3545
+ commandsManager,
3546
+ extensionManager,
3547
+ configuration,
3548
+ appConfig
3549
+ }) {
3574
3550
  // Note: this should run first before initializing the cornerstone
3575
3551
  // DO NOT CHANGE THE ORDER
3576
3552
  const value = appConfig.useSharedArrayBuffer;
@@ -3760,10 +3736,9 @@ async function init(_ref) {
3760
3736
  * Runs error handler for failed requests.
3761
3737
  * @param event
3762
3738
  */
3763
- const imageLoadFailedHandler = _ref2 => {
3764
- let {
3765
- detail
3766
- } = _ref2;
3739
+ const imageLoadFailedHandler = ({
3740
+ detail
3741
+ }) => {
3767
3742
  const handler = src/* errorHandler */.Po.getHTTPErrorHandler();
3768
3743
  handler(detail.error);
3769
3744
  };
@@ -3819,7 +3794,6 @@ async function init(_ref) {
3819
3794
  // newStackCallback
3820
3795
  // );
3821
3796
  }
3822
-
3823
3797
  esm.eventTarget.addEventListener(esm.EVENTS.ELEMENT_ENABLED, elementEnabledHandler.bind(null));
3824
3798
  esm.eventTarget.addEventListener(esm.EVENTS.ELEMENT_DISABLED, elementDisabledHandler.bind(null));
3825
3799
  viewportGridService.subscribe(viewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED, activeViewportEventListener);
@@ -4015,10 +3989,9 @@ class DicomFileUploader extends src/* PubSubService */.hC {
4015
3989
 
4016
3990
 
4017
3991
  // eslint-disable-next-line react/display-name
4018
- const DicomUploadProgressItem = /*#__PURE__*/(0,react.memo)(_ref => {
4019
- let {
4020
- dicomFileUploader
4021
- } = _ref;
3992
+ const DicomUploadProgressItem = /*#__PURE__*/(0,react.memo)(({
3993
+ dicomFileUploader
3994
+ }) => {
4022
3995
  const [percentComplete, setPercentComplete] = (0,react.useState)(dicomFileUploader.getPercentComplete());
4023
3996
  const [failedReason, setFailedReason] = (0,react.useState)('');
4024
3997
  const [status, setStatus] = (0,react.useState)(dicomFileUploader.getStatus());
@@ -4114,11 +4087,10 @@ const BASE_INTERVAL_TIME = 15000;
4114
4087
  // calculate the upload rate.
4115
4088
  const UPLOAD_RATE_THRESHOLD = 75;
4116
4089
  const NO_WRAP_ELLIPSIS_CLASS_NAMES = 'text-ellipsis whitespace-nowrap overflow-hidden';
4117
- function DicomUploadProgress(_ref) {
4118
- let {
4119
- dicomFileUploaderArr,
4120
- onComplete
4121
- } = _ref;
4090
+ function DicomUploadProgress({
4091
+ dicomFileUploaderArr,
4092
+ onComplete
4093
+ }) {
4122
4094
  const [totalUploadSize] = (0,react.useState)(dicomFileUploaderArr.reduce((acc, fileUploader) => acc + fileUploader.getFileSize(), 0));
4123
4095
  const currentUploadSizeRef = (0,react.useRef)(0);
4124
4096
  const uploadRateRef = (0,react.useRef)(0);
@@ -4383,12 +4355,11 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
4383
4355
 
4384
4356
 
4385
4357
 
4386
- function DicomUpload(_ref) {
4387
- let {
4388
- dataSource,
4389
- onComplete,
4390
- onStarted
4391
- } = _ref;
4358
+ function DicomUpload({
4359
+ dataSource,
4360
+ onComplete,
4361
+ onStarted
4362
+ }) {
4392
4363
  const baseClassNames = 'min-h-[480px] flex flex-col bg-black select-none';
4393
4364
  const [dicomFileUploaderArr, setDicomFileUploaderArr] = (0,react.useState)([]);
4394
4365
  const onDrop = (0,react.useCallback)(async acceptedFiles => {
@@ -4401,48 +4372,39 @@ function DicomUpload(_ref) {
4401
4372
  onDrop(acceptedFiles);
4402
4373
  },
4403
4374
  noClick: true
4404
- }, _ref2 => {
4405
- let {
4406
- getRootProps
4407
- } = _ref2;
4408
- return /*#__PURE__*/react.createElement("div", _extends({}, getRootProps(), {
4409
- className: "dicom-upload-drop-area-border-dash m-5 flex h-full flex-col items-center justify-center"
4410
- }), /*#__PURE__*/react.createElement("div", {
4411
- className: "flex gap-3"
4412
- }, /*#__PURE__*/react.createElement(es/* default */.Z, {
4413
- onDrop: onDrop,
4414
- noDrag: true
4415
- }, _ref3 => {
4416
- let {
4417
- getRootProps,
4418
- getInputProps
4419
- } = _ref3;
4420
- return /*#__PURE__*/react.createElement("div", getRootProps(), /*#__PURE__*/react.createElement(ui_src/* Button */.zx, {
4421
- disabled: false,
4422
- onClick: () => {}
4423
- }, 'Add files', /*#__PURE__*/react.createElement("input", getInputProps())));
4424
- }), /*#__PURE__*/react.createElement(es/* default */.Z, {
4425
- onDrop: onDrop,
4426
- noDrag: true
4427
- }, _ref4 => {
4428
- let {
4429
- getRootProps,
4430
- getInputProps
4431
- } = _ref4;
4432
- return /*#__PURE__*/react.createElement("div", getRootProps(), /*#__PURE__*/react.createElement(ui_src/* Button */.zx, {
4433
- type: ui_src/* ButtonEnums.type */.LZ.dt.secondary,
4434
- disabled: false,
4435
- onClick: () => {}
4436
- }, 'Add folder', /*#__PURE__*/react.createElement("input", _extends({}, getInputProps(), {
4437
- webkitdirectory: "true",
4438
- mozdirectory: "true"
4439
- }))));
4440
- })), /*#__PURE__*/react.createElement("div", {
4441
- className: "pt-5"
4442
- }, "or drag images or folders here"), /*#__PURE__*/react.createElement("div", {
4443
- className: "text-aqua-pale pt-3 text-lg"
4444
- }, "(DICOM files supported)"));
4445
- });
4375
+ }, ({
4376
+ getRootProps
4377
+ }) => /*#__PURE__*/react.createElement("div", _extends({}, getRootProps(), {
4378
+ className: "dicom-upload-drop-area-border-dash m-5 flex h-full flex-col items-center justify-center"
4379
+ }), /*#__PURE__*/react.createElement("div", {
4380
+ className: "flex gap-3"
4381
+ }, /*#__PURE__*/react.createElement(es/* default */.Z, {
4382
+ onDrop: onDrop,
4383
+ noDrag: true
4384
+ }, ({
4385
+ getRootProps,
4386
+ getInputProps
4387
+ }) => /*#__PURE__*/react.createElement("div", getRootProps(), /*#__PURE__*/react.createElement(ui_src/* Button */.zx, {
4388
+ disabled: false,
4389
+ onClick: () => {}
4390
+ }, 'Add files', /*#__PURE__*/react.createElement("input", getInputProps())))), /*#__PURE__*/react.createElement(es/* default */.Z, {
4391
+ onDrop: onDrop,
4392
+ noDrag: true
4393
+ }, ({
4394
+ getRootProps,
4395
+ getInputProps
4396
+ }) => /*#__PURE__*/react.createElement("div", getRootProps(), /*#__PURE__*/react.createElement(ui_src/* Button */.zx, {
4397
+ type: ui_src/* ButtonEnums.type */.LZ.dt.secondary,
4398
+ disabled: false,
4399
+ onClick: () => {}
4400
+ }, 'Add folder', /*#__PURE__*/react.createElement("input", _extends({}, getInputProps(), {
4401
+ webkitdirectory: "true",
4402
+ mozdirectory: "true"
4403
+ })))))), /*#__PURE__*/react.createElement("div", {
4404
+ className: "pt-5"
4405
+ }, "or drag images or folders here"), /*#__PURE__*/react.createElement("div", {
4406
+ className: "text-aqua-pale pt-3 text-lg"
4407
+ }, "(DICOM files supported)")));
4446
4408
  };
4447
4409
  return /*#__PURE__*/react.createElement(react.Fragment, null, dicomFileUploaderArr.length ? /*#__PURE__*/react.createElement("div", {
4448
4410
  className: classnames_default()('h-[calc(100vh-300px)]', baseClassNames)
@@ -4519,12 +4481,11 @@ const MINIMUM_SIZE = 100;
4519
4481
  const DEFAULT_SIZE = 512;
4520
4482
  const MAX_TEXTURE_SIZE = 10000;
4521
4483
  const VIEWPORT_ID = 'cornerstone-viewport-download-form';
4522
- const CornerstoneViewportDownloadForm = _ref => {
4523
- let {
4524
- onClose,
4525
- activeViewportId: activeViewportIdProp,
4526
- cornerstoneViewportService
4527
- } = _ref;
4484
+ const CornerstoneViewportDownloadForm = ({
4485
+ onClose,
4486
+ activeViewportId: activeViewportIdProp,
4487
+ cornerstoneViewportService
4488
+ }) => {
4528
4489
  const enabledElement = (0,state/* getEnabledElement */.K8)(activeViewportIdProp);
4529
4490
  const activeViewportElement = enabledElement?.element;
4530
4491
  const activeViewportEnabledElement = (0,esm.getEnabledElement)(activeViewportElement);
@@ -4737,12 +4698,11 @@ CornerstoneViewportDownloadForm.propTypes = {
4737
4698
  /* harmony default export */ const utils_CornerstoneViewportDownloadForm = (CornerstoneViewportDownloadForm);
4738
4699
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/stackSync/toggleStackImageSync.ts
4739
4700
  const STACK_SYNC_NAME = 'stackImageSync';
4740
- function toggleStackImageSync(_ref) {
4741
- let {
4742
- toggledState,
4743
- servicesManager,
4744
- viewports: providedViewports
4745
- } = _ref;
4701
+ function toggleStackImageSync({
4702
+ toggledState,
4703
+ servicesManager,
4704
+ viewports: providedViewports
4705
+ }) {
4746
4706
  if (!toggledState) {
4747
4707
  return disableSync(STACK_SYNC_NAME, servicesManager);
4748
4708
  }
@@ -4829,11 +4789,10 @@ function getReconstructableStackViewports(viewportGridService, displaySetService
4829
4789
 
4830
4790
 
4831
4791
 
4832
- function commandsModule(_ref) {
4833
- let {
4834
- servicesManager,
4835
- commandsManager
4836
- } = _ref;
4792
+ function commandsModule({
4793
+ servicesManager,
4794
+ commandsManager
4795
+ }) {
4837
4796
  const {
4838
4797
  viewportGridService,
4839
4798
  toolGroupService,
@@ -4897,19 +4856,17 @@ function commandsModule(_ref) {
4897
4856
  };
4898
4857
  commandsManager.run(options, optionsToUse);
4899
4858
  },
4900
- getNearbyToolData(_ref2) {
4901
- let {
4902
- nearbyToolData,
4903
- element,
4904
- canvasCoordinates
4905
- } = _ref2;
4859
+ getNearbyToolData({
4860
+ nearbyToolData,
4861
+ element,
4862
+ canvasCoordinates
4863
+ }) {
4906
4864
  return nearbyToolData ?? dist_esm.utilities.getAnnotationNearPoint(element, canvasCoordinates);
4907
4865
  },
4908
- getNearbyAnnotation(_ref3) {
4909
- let {
4910
- element,
4911
- canvasCoordinates
4912
- } = _ref3;
4866
+ getNearbyAnnotation({
4867
+ element,
4868
+ canvasCoordinates
4869
+ }) {
4913
4870
  const nearbyToolData = actions.getNearbyToolData({
4914
4871
  nearbyToolData: null,
4915
4872
  element,
@@ -4933,10 +4890,9 @@ function commandsModule(_ref) {
4933
4890
  // Measurement tool commands:
4934
4891
 
4935
4892
  /** Delete the given measurement */
4936
- deleteMeasurement: _ref4 => {
4937
- let {
4938
- uid
4939
- } = _ref4;
4893
+ deleteMeasurement: ({
4894
+ uid
4895
+ }) => {
4940
4896
  if (uid) {
4941
4897
  measurementServiceSource.remove(uid);
4942
4898
  }
@@ -4945,10 +4901,9 @@ function commandsModule(_ref) {
4945
4901
  * Show the measurement labelling input dialog and update the label
4946
4902
  * on the measurement with a response if not cancelled.
4947
4903
  */
4948
- setMeasurementLabel: _ref5 => {
4949
- let {
4950
- uid
4951
- } = _ref5;
4904
+ setMeasurementLabel: ({
4905
+ uid
4906
+ }) => {
4952
4907
  const measurement = measurementService.getMeasurement(uid);
4953
4908
  utils_callInputDialog(uiDialogService, measurement, (label, actionId) => {
4954
4909
  if (actionId === 'cancel') {
@@ -5023,10 +4978,9 @@ function commandsModule(_ref) {
5023
4978
  },
5024
4979
  // Retrieve value commands
5025
4980
  getActiveViewportEnabledElement: _getActiveViewportEnabledElement,
5026
- setViewportActive: _ref6 => {
5027
- let {
5028
- viewportId
5029
- } = _ref6;
4981
+ setViewportActive: ({
4982
+ viewportId
4983
+ }) => {
5030
4984
  const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);
5031
4985
  if (!viewportInfo) {
5032
4986
  console.warn('No viewport found for viewportId:', viewportId);
@@ -5034,11 +4988,10 @@ function commandsModule(_ref) {
5034
4988
  }
5035
4989
  viewportGridService.setActiveViewportId(viewportId);
5036
4990
  },
5037
- arrowTextCallback: _ref7 => {
5038
- let {
5039
- callback,
5040
- data
5041
- } = _ref7;
4991
+ arrowTextCallback: ({
4992
+ callback,
4993
+ data
4994
+ }) => {
5042
4995
  utils_callInputDialog(uiDialogService, data, callback);
5043
4996
  },
5044
4997
  cleanUpCrosshairs: () => {
@@ -5075,12 +5028,11 @@ function commandsModule(_ref) {
5075
5028
  isPlaying: false
5076
5029
  }));
5077
5030
  },
5078
- setWindowLevel(_ref8) {
5079
- let {
5080
- window,
5081
- level,
5082
- toolGroupId
5083
- } = _ref8;
5031
+ setWindowLevel({
5032
+ window,
5033
+ level,
5034
+ toolGroupId
5035
+ }) {
5084
5036
  // convert to numbers
5085
5037
  const windowWidthNum = Number(window);
5086
5038
  const windowCenterNum = Number(level);
@@ -5118,12 +5070,11 @@ function commandsModule(_ref) {
5118
5070
  setToolbarToggled: props => {
5119
5071
  toolbarService.setToggled(props.toolId, props.isActive ?? true);
5120
5072
  },
5121
- setToolActive: _ref9 => {
5122
- let {
5123
- toolName,
5124
- toolGroupId = null,
5125
- toggledState
5126
- } = _ref9;
5073
+ setToolActive: ({
5074
+ toolName,
5075
+ toolGroupId = null,
5076
+ toggledState
5077
+ }) => {
5127
5078
  if (toolName === 'Crosshairs') {
5128
5079
  const activeViewportToolGroup = toolGroupService.getToolGroup(null);
5129
5080
  if (!activeViewportToolGroup._toolInstances.Crosshairs) {
@@ -5208,10 +5159,9 @@ function commandsModule(_ref) {
5208
5159
  });
5209
5160
  }
5210
5161
  },
5211
- rotateViewport: _ref10 => {
5212
- let {
5213
- rotation
5214
- } = _ref10;
5162
+ rotateViewport: ({
5163
+ rotation
5164
+ }) => {
5215
5165
  const enabledElement = _getActiveViewportEnabledElement();
5216
5166
  if (!enabledElement) {
5217
5167
  return;
@@ -5274,10 +5224,9 @@ function commandsModule(_ref) {
5274
5224
  viewport.render();
5275
5225
  }
5276
5226
  },
5277
- invertViewport: _ref11 => {
5278
- let {
5279
- element
5280
- } = _ref11;
5227
+ invertViewport: ({
5228
+ element
5229
+ }) => {
5281
5230
  let enabledElement;
5282
5231
  if (element === undefined) {
5283
5232
  enabledElement = _getActiveViewportEnabledElement();
@@ -5310,10 +5259,9 @@ function commandsModule(_ref) {
5310
5259
  viewport.resetCamera();
5311
5260
  viewport.render();
5312
5261
  },
5313
- scaleViewport: _ref12 => {
5314
- let {
5315
- direction
5316
- } = _ref12;
5262
+ scaleViewport: ({
5263
+ direction
5264
+ }) => {
5317
5265
  const enabledElement = _getActiveViewportEnabledElement();
5318
5266
  const scaleFactor = direction > 0 ? 0.9 : 1.1;
5319
5267
  if (!enabledElement) {
@@ -5338,11 +5286,10 @@ function commandsModule(_ref) {
5338
5286
  }
5339
5287
  },
5340
5288
  /** Jumps the active viewport or the specified one to the given slice index */
5341
- jumpToImage: _ref13 => {
5342
- let {
5343
- imageIndex,
5344
- viewport: gridViewport
5345
- } = _ref13;
5289
+ jumpToImage: ({
5290
+ imageIndex,
5291
+ viewport: gridViewport
5292
+ }) => {
5346
5293
  // Get current active viewport (return if none active)
5347
5294
  let viewport;
5348
5295
  if (!gridViewport) {
@@ -5376,10 +5323,9 @@ function commandsModule(_ref) {
5376
5323
  };
5377
5324
  dist_esm.utilities.jumpToSlice(viewport.element, options);
5378
5325
  },
5379
- scroll: _ref14 => {
5380
- let {
5381
- direction
5382
- } = _ref14;
5326
+ scroll: ({
5327
+ direction
5328
+ }) => {
5383
5329
  const enabledElement = _getActiveViewportEnabledElement();
5384
5330
  if (!enabledElement) {
5385
5331
  return;
@@ -5392,13 +5338,12 @@ function commandsModule(_ref) {
5392
5338
  };
5393
5339
  dist_esm.utilities.scroll(viewport, options);
5394
5340
  },
5395
- setViewportColormap: _ref15 => {
5396
- let {
5397
- viewportId,
5398
- displaySetInstanceUID,
5399
- colormap,
5400
- immediate = false
5401
- } = _ref15;
5341
+ setViewportColormap: ({
5342
+ viewportId,
5343
+ displaySetInstanceUID,
5344
+ colormap,
5345
+ immediate = false
5346
+ }) => {
5402
5347
  const viewport = cornerstoneViewportService.getCornerstoneViewport(viewportId);
5403
5348
  const actorEntries = viewport.getActors();
5404
5349
  const actorEntry = actorEntries.find(actorEntry => {
@@ -5416,10 +5361,9 @@ function commandsModule(_ref) {
5416
5361
  viewport.render();
5417
5362
  }
5418
5363
  },
5419
- changeActiveViewport: _ref16 => {
5420
- let {
5421
- direction = 1
5422
- } = _ref16;
5364
+ changeActiveViewport: ({
5365
+ direction = 1
5366
+ }) => {
5423
5367
  const {
5424
5368
  activeViewportId,
5425
5369
  viewports
@@ -5429,20 +5373,18 @@ function commandsModule(_ref) {
5429
5373
  const nextViewportIndex = (currentIndex + direction + viewportIds.length) % viewportIds.length;
5430
5374
  viewportGridService.setActiveViewportId(viewportIds[nextViewportIndex]);
5431
5375
  },
5432
- toggleStackImageSync: _ref17 => {
5433
- let {
5434
- toggledState
5435
- } = _ref17;
5376
+ toggleStackImageSync: ({
5377
+ toggledState
5378
+ }) => {
5436
5379
  toggleStackImageSync({
5437
5380
  servicesManager,
5438
5381
  toggledState
5439
5382
  });
5440
5383
  },
5441
- setSourceViewportForReferenceLinesTool: _ref18 => {
5442
- let {
5443
- toggledState,
5444
- viewportId
5445
- } = _ref18;
5384
+ setSourceViewportForReferenceLinesTool: ({
5385
+ toggledState,
5386
+ viewportId
5387
+ }) => {
5446
5388
  if (!viewportId) {
5447
5389
  const {
5448
5390
  activeViewportId
@@ -5455,20 +5397,17 @@ function commandsModule(_ref) {
5455
5397
  }, true // overwrite
5456
5398
  );
5457
5399
  },
5458
-
5459
- storePresentation: _ref19 => {
5460
- let {
5461
- viewportId
5462
- } = _ref19;
5400
+ storePresentation: ({
5401
+ viewportId
5402
+ }) => {
5463
5403
  cornerstoneViewportService.storePresentation({
5464
5404
  viewportId
5465
5405
  });
5466
5406
  },
5467
- attachProtocolViewportDataListener: _ref20 => {
5468
- let {
5469
- protocol,
5470
- stageIndex
5471
- } = _ref20;
5407
+ attachProtocolViewportDataListener: ({
5408
+ protocol,
5409
+ stageIndex
5410
+ }) => {
5472
5411
  const EVENT = cornerstoneViewportService.EVENTS.VIEWPORT_DATA_CHANGED;
5473
5412
  const command = protocol.callbacks.onViewportDataInitialized;
5474
5413
  const numPanes = protocol.stages?.[stageIndex]?.viewports.length ?? 1;
@@ -5644,35 +5583,19 @@ function commandsModule(_ref) {
5644
5583
  };
5645
5584
  }
5646
5585
  /* harmony default export */ const src_commandsModule = (commandsModule);
5647
- ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/getHangingProtocolModule.ts
5648
- const mpr = {
5649
- id: 'mpr',
5650
- name: 'Multi-Planar Reconstruction',
5586
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/fourUp.ts
5587
+ const fourUp = {
5588
+ id: 'fourUp',
5651
5589
  locked: true,
5652
- createdDate: '2021-02-23',
5653
- modifiedDate: '2023-08-15',
5590
+ name: 'fourUp',
5591
+ createdDate: '2023-03-15T10:29:44.894Z',
5592
+ modifiedDate: '2023-03-15T10:29:44.894Z',
5654
5593
  availableTo: {},
5655
5594
  editableBy: {},
5656
- // Unknown number of priors referenced - so just match any study
5657
- numberOfPriorsReferenced: 0,
5658
5595
  protocolMatchingRules: [],
5659
- imageLoadStrategy: 'nth',
5660
- callbacks: {
5661
- // Switches out of MPR mode when the layout change button is used
5662
- onLayoutChange: [{
5663
- commandName: 'toggleHangingProtocol',
5664
- commandOptions: {
5665
- protocolId: 'mpr'
5666
- },
5667
- context: 'DEFAULT'
5668
- }],
5669
- // Turns off crosshairs when switching out of MPR mode
5670
- onProtocolExit: [{
5671
- commandName: 'cleanUpCrosshairs'
5672
- }]
5673
- },
5596
+ imageLoadStrategy: 'interleaveCenter',
5674
5597
  displaySetSelectors: {
5675
- activeDisplaySet: {
5598
+ mprDisplaySet: {
5676
5599
  seriesMatchingRules: [{
5677
5600
  weight: 1,
5678
5601
  attribute: 'isReconstructable',
@@ -5686,33 +5609,17 @@ const mpr = {
5686
5609
  }
5687
5610
  },
5688
5611
  stages: [{
5689
- name: 'MPR 1x3',
5612
+ id: 'fourUpStage',
5613
+ name: 'fourUp',
5690
5614
  viewportStructure: {
5691
5615
  layoutType: 'grid',
5692
5616
  properties: {
5693
- rows: 1,
5694
- columns: 3,
5695
- layoutOptions: [{
5696
- x: 0,
5697
- y: 0,
5698
- width: 1 / 3,
5699
- height: 1
5700
- }, {
5701
- x: 1 / 3,
5702
- y: 0,
5703
- width: 1 / 3,
5704
- height: 1
5705
- }, {
5706
- x: 2 / 3,
5707
- y: 0,
5708
- width: 1 / 3,
5709
- height: 1
5710
- }]
5617
+ rows: 2,
5618
+ columns: 2
5711
5619
  }
5712
5620
  },
5713
5621
  viewports: [{
5714
5622
  viewportOptions: {
5715
- viewportId: 'mpr-axial',
5716
5623
  toolGroupId: 'mpr',
5717
5624
  viewportType: 'volume',
5718
5625
  orientation: 'axial',
@@ -5727,14 +5634,29 @@ const mpr = {
5727
5634
  }]
5728
5635
  },
5729
5636
  displaySets: [{
5730
- id: 'activeDisplaySet'
5637
+ id: 'mprDisplaySet'
5638
+ }]
5639
+ }, {
5640
+ viewportOptions: {
5641
+ toolGroupId: 'volume3d',
5642
+ viewportType: 'volume3d',
5643
+ orientation: 'coronal',
5644
+ customViewportProps: {
5645
+ hideOverlays: true
5646
+ }
5647
+ },
5648
+ displaySets: [{
5649
+ id: 'mprDisplaySet',
5650
+ options: {
5651
+ // ToDo: choose appropriate preset
5652
+ displayPreset: 'CT-Bone'
5653
+ }
5731
5654
  }]
5732
5655
  }, {
5733
5656
  viewportOptions: {
5734
- viewportId: 'mpr-sagittal',
5735
5657
  toolGroupId: 'mpr',
5736
5658
  viewportType: 'volume',
5737
- orientation: 'sagittal',
5659
+ orientation: 'coronal',
5738
5660
  initialImageOptions: {
5739
5661
  preset: 'middle'
5740
5662
  },
@@ -5746,14 +5668,13 @@ const mpr = {
5746
5668
  }]
5747
5669
  },
5748
5670
  displaySets: [{
5749
- id: 'activeDisplaySet'
5671
+ id: 'mprDisplaySet'
5750
5672
  }]
5751
5673
  }, {
5752
5674
  viewportOptions: {
5753
- viewportId: 'mpr-coronal',
5754
5675
  toolGroupId: 'mpr',
5755
5676
  viewportType: 'volume',
5756
- orientation: 'coronal',
5677
+ orientation: 'sagittal',
5757
5678
  initialImageOptions: {
5758
5679
  preset: 'middle'
5759
5680
  },
@@ -5765,15 +5686,16 @@ const mpr = {
5765
5686
  }]
5766
5687
  },
5767
5688
  displaySets: [{
5768
- id: 'activeDisplaySet'
5689
+ id: 'mprDisplaySet'
5769
5690
  }]
5770
5691
  }]
5771
5692
  }]
5772
5693
  };
5773
- const mprAnd3DVolumeViewport = {
5774
- id: 'mprAnd3DVolumeViewport',
5694
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/main3D.ts
5695
+ const main3D = {
5696
+ id: 'main3D',
5775
5697
  locked: true,
5776
- name: 'mpr',
5698
+ name: 'main3D',
5777
5699
  createdDate: '2023-03-15T10:29:44.894Z',
5778
5700
  modifiedDate: '2023-03-15T10:29:44.894Z',
5779
5701
  availableTo: {},
@@ -5791,28 +5713,57 @@ const mprAnd3DVolumeViewport = {
5791
5713
  }
5792
5714
  },
5793
5715
  required: true
5794
- }, {
5795
- attribute: 'Modality',
5796
- constraint: {
5797
- equals: {
5798
- value: 'CT'
5799
- }
5800
- },
5801
- required: true
5802
5716
  }]
5803
5717
  }
5804
5718
  },
5805
5719
  stages: [{
5806
- id: 'mpr3Stage',
5807
- name: 'mpr',
5720
+ id: 'main3DStage',
5721
+ name: 'main3D',
5808
5722
  viewportStructure: {
5809
5723
  layoutType: 'grid',
5810
5724
  properties: {
5811
5725
  rows: 2,
5812
- columns: 2
5726
+ columns: 3,
5727
+ layoutOptions: [{
5728
+ x: 0,
5729
+ y: 0,
5730
+ width: 1,
5731
+ height: 1 / 2
5732
+ }, {
5733
+ x: 0,
5734
+ y: 1 / 2,
5735
+ width: 1 / 3,
5736
+ height: 1 / 2
5737
+ }, {
5738
+ x: 1 / 3,
5739
+ y: 1 / 2,
5740
+ width: 1 / 3,
5741
+ height: 1 / 2
5742
+ }, {
5743
+ x: 2 / 3,
5744
+ y: 1 / 2,
5745
+ width: 1 / 3,
5746
+ height: 1 / 2
5747
+ }]
5813
5748
  }
5814
5749
  },
5815
5750
  viewports: [{
5751
+ viewportOptions: {
5752
+ toolGroupId: 'volume3d',
5753
+ viewportType: 'volume3d',
5754
+ orientation: 'coronal',
5755
+ customViewportProps: {
5756
+ hideOverlays: true
5757
+ }
5758
+ },
5759
+ displaySets: [{
5760
+ id: 'mprDisplaySet',
5761
+ options: {
5762
+ // ToDo: choose appropriate preset
5763
+ displayPreset: 'CT-Bone'
5764
+ }
5765
+ }]
5766
+ }, {
5816
5767
  viewportOptions: {
5817
5768
  toolGroupId: 'mpr',
5818
5769
  viewportType: 'volume',
@@ -5830,21 +5781,6 @@ const mprAnd3DVolumeViewport = {
5830
5781
  displaySets: [{
5831
5782
  id: 'mprDisplaySet'
5832
5783
  }]
5833
- }, {
5834
- viewportOptions: {
5835
- toolGroupId: 'volume3d',
5836
- viewportType: 'volume3d',
5837
- orientation: 'coronal',
5838
- customViewportProps: {
5839
- hideOverlays: true
5840
- }
5841
- },
5842
- displaySets: [{
5843
- id: 'mprDisplaySet',
5844
- options: {
5845
- displayPreset: 'CT-Bone'
5846
- }
5847
- }]
5848
5784
  }, {
5849
5785
  viewportOptions: {
5850
5786
  toolGroupId: 'mpr',
@@ -5884,55 +5820,611 @@ const mprAnd3DVolumeViewport = {
5884
5820
  }]
5885
5821
  }]
5886
5822
  };
5887
- function getHangingProtocolModule() {
5888
- return [{
5889
- name: mpr.id,
5890
- protocol: mpr
5891
- }, {
5892
- name: mprAnd3DVolumeViewport.id,
5893
- protocol: mprAnd3DVolumeViewport
5894
- }];
5895
- }
5896
- /* harmony default export */ const src_getHangingProtocolModule = (getHangingProtocolModule);
5897
- ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/ToolGroupService/ToolGroupService.ts
5898
-
5899
-
5900
-
5901
- const ToolGroupService_EVENTS = {
5902
- VIEWPORT_ADDED: 'event::cornerstone::toolgroupservice:viewportadded',
5903
- TOOLGROUP_CREATED: 'event::cornerstone::toolgroupservice:toolgroupcreated'
5904
- };
5905
- class ToolGroupService {
5906
- constructor(serviceManager) {
5907
- this.serviceManager = void 0;
5908
- this.toolGroupIds = new Set();
5909
- /**
5910
- * Service-specific
5911
- */
5912
- this.listeners = void 0;
5913
- this.EVENTS = void 0;
5914
- const {
5915
- cornerstoneViewportService,
5916
- viewportGridService
5917
- } = serviceManager.services;
5918
- this.cornerstoneViewportService = cornerstoneViewportService;
5919
- this.viewportGridService = viewportGridService;
5920
- this.listeners = {};
5921
- this.EVENTS = ToolGroupService_EVENTS;
5922
- Object.assign(this, src/* pubSubServiceInterface */.KZ);
5923
- }
5924
- onModeExit() {
5925
- this.destroy();
5926
- }
5927
-
5928
- /**
5929
- * Retrieves a tool group from the ToolGroupManager by tool group ID.
5930
- * If no tool group ID is provided, it retrieves the tool group of the active viewport.
5931
- * @param toolGroupId - Optional ID of the tool group to retrieve.
5932
- * @returns The tool group or undefined if it is not found.
5933
- */
5934
- getToolGroup(toolGroupId) {
5935
- let toolGroupIdToUse = toolGroupId;
5823
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/mpr.ts
5824
+ const mpr = {
5825
+ id: 'mpr',
5826
+ name: 'Multi-Planar Reconstruction',
5827
+ locked: true,
5828
+ createdDate: '2021-02-23',
5829
+ modifiedDate: '2023-08-15',
5830
+ availableTo: {},
5831
+ editableBy: {},
5832
+ // Unknown number of priors referenced - so just match any study
5833
+ numberOfPriorsReferenced: 0,
5834
+ protocolMatchingRules: [],
5835
+ imageLoadStrategy: 'nth',
5836
+ callbacks: {
5837
+ // Switches out of MPR mode when the layout change button is used
5838
+ onLayoutChange: [{
5839
+ commandName: 'toggleHangingProtocol',
5840
+ commandOptions: {
5841
+ protocolId: 'mpr'
5842
+ },
5843
+ context: 'DEFAULT'
5844
+ }],
5845
+ // Turns off crosshairs when switching out of MPR mode
5846
+ onProtocolExit: [{
5847
+ commandName: 'cleanUpCrosshairs'
5848
+ }]
5849
+ },
5850
+ displaySetSelectors: {
5851
+ activeDisplaySet: {
5852
+ seriesMatchingRules: [{
5853
+ weight: 1,
5854
+ attribute: 'isReconstructable',
5855
+ constraint: {
5856
+ equals: {
5857
+ value: true
5858
+ }
5859
+ },
5860
+ required: true
5861
+ }]
5862
+ }
5863
+ },
5864
+ stages: [{
5865
+ name: 'MPR 1x3',
5866
+ viewportStructure: {
5867
+ layoutType: 'grid',
5868
+ properties: {
5869
+ rows: 1,
5870
+ columns: 3,
5871
+ layoutOptions: [{
5872
+ x: 0,
5873
+ y: 0,
5874
+ width: 1 / 3,
5875
+ height: 1
5876
+ }, {
5877
+ x: 1 / 3,
5878
+ y: 0,
5879
+ width: 1 / 3,
5880
+ height: 1
5881
+ }, {
5882
+ x: 2 / 3,
5883
+ y: 0,
5884
+ width: 1 / 3,
5885
+ height: 1
5886
+ }]
5887
+ }
5888
+ },
5889
+ viewports: [{
5890
+ viewportOptions: {
5891
+ viewportId: 'mpr-axial',
5892
+ toolGroupId: 'mpr',
5893
+ viewportType: 'volume',
5894
+ orientation: 'axial',
5895
+ initialImageOptions: {
5896
+ preset: 'middle'
5897
+ },
5898
+ syncGroups: [{
5899
+ type: 'voi',
5900
+ id: 'mpr',
5901
+ source: true,
5902
+ target: true
5903
+ }]
5904
+ },
5905
+ displaySets: [{
5906
+ id: 'activeDisplaySet'
5907
+ }]
5908
+ }, {
5909
+ viewportOptions: {
5910
+ viewportId: 'mpr-sagittal',
5911
+ toolGroupId: 'mpr',
5912
+ viewportType: 'volume',
5913
+ orientation: 'sagittal',
5914
+ initialImageOptions: {
5915
+ preset: 'middle'
5916
+ },
5917
+ syncGroups: [{
5918
+ type: 'voi',
5919
+ id: 'mpr',
5920
+ source: true,
5921
+ target: true
5922
+ }]
5923
+ },
5924
+ displaySets: [{
5925
+ id: 'activeDisplaySet'
5926
+ }]
5927
+ }, {
5928
+ viewportOptions: {
5929
+ viewportId: 'mpr-coronal',
5930
+ toolGroupId: 'mpr',
5931
+ viewportType: 'volume',
5932
+ orientation: 'coronal',
5933
+ initialImageOptions: {
5934
+ preset: 'middle'
5935
+ },
5936
+ syncGroups: [{
5937
+ type: 'voi',
5938
+ id: 'mpr',
5939
+ source: true,
5940
+ target: true
5941
+ }]
5942
+ },
5943
+ displaySets: [{
5944
+ id: 'activeDisplaySet'
5945
+ }]
5946
+ }]
5947
+ }]
5948
+ };
5949
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/mprAnd3DVolumeViewport.ts
5950
+ const mprAnd3DVolumeViewport = {
5951
+ id: 'mprAnd3DVolumeViewport',
5952
+ locked: true,
5953
+ name: 'mpr',
5954
+ createdDate: '2023-03-15T10:29:44.894Z',
5955
+ modifiedDate: '2023-03-15T10:29:44.894Z',
5956
+ availableTo: {},
5957
+ editableBy: {},
5958
+ protocolMatchingRules: [],
5959
+ imageLoadStrategy: 'interleaveCenter',
5960
+ displaySetSelectors: {
5961
+ mprDisplaySet: {
5962
+ seriesMatchingRules: [{
5963
+ weight: 1,
5964
+ attribute: 'isReconstructable',
5965
+ constraint: {
5966
+ equals: {
5967
+ value: true
5968
+ }
5969
+ },
5970
+ required: true
5971
+ }, {
5972
+ attribute: 'Modality',
5973
+ constraint: {
5974
+ equals: {
5975
+ value: 'CT'
5976
+ }
5977
+ },
5978
+ required: true
5979
+ }]
5980
+ }
5981
+ },
5982
+ stages: [{
5983
+ id: 'mpr3Stage',
5984
+ name: 'mpr',
5985
+ viewportStructure: {
5986
+ layoutType: 'grid',
5987
+ properties: {
5988
+ rows: 2,
5989
+ columns: 2
5990
+ }
5991
+ },
5992
+ viewports: [{
5993
+ viewportOptions: {
5994
+ toolGroupId: 'mpr',
5995
+ viewportType: 'volume',
5996
+ orientation: 'axial',
5997
+ initialImageOptions: {
5998
+ preset: 'middle'
5999
+ },
6000
+ syncGroups: [{
6001
+ type: 'voi',
6002
+ id: 'mpr',
6003
+ source: true,
6004
+ target: true
6005
+ }]
6006
+ },
6007
+ displaySets: [{
6008
+ id: 'mprDisplaySet'
6009
+ }]
6010
+ }, {
6011
+ viewportOptions: {
6012
+ toolGroupId: 'volume3d',
6013
+ viewportType: 'volume3d',
6014
+ orientation: 'coronal',
6015
+ customViewportProps: {
6016
+ hideOverlays: true
6017
+ }
6018
+ },
6019
+ displaySets: [{
6020
+ id: 'mprDisplaySet',
6021
+ options: {
6022
+ displayPreset: 'CT-Bone'
6023
+ }
6024
+ }]
6025
+ }, {
6026
+ viewportOptions: {
6027
+ toolGroupId: 'mpr',
6028
+ viewportType: 'volume',
6029
+ orientation: 'coronal',
6030
+ initialImageOptions: {
6031
+ preset: 'middle'
6032
+ },
6033
+ syncGroups: [{
6034
+ type: 'voi',
6035
+ id: 'mpr',
6036
+ source: true,
6037
+ target: true
6038
+ }]
6039
+ },
6040
+ displaySets: [{
6041
+ id: 'mprDisplaySet'
6042
+ }]
6043
+ }, {
6044
+ viewportOptions: {
6045
+ toolGroupId: 'mpr',
6046
+ viewportType: 'volume',
6047
+ orientation: 'sagittal',
6048
+ initialImageOptions: {
6049
+ preset: 'middle'
6050
+ },
6051
+ syncGroups: [{
6052
+ type: 'voi',
6053
+ id: 'mpr',
6054
+ source: true,
6055
+ target: true
6056
+ }]
6057
+ },
6058
+ displaySets: [{
6059
+ id: 'mprDisplaySet'
6060
+ }]
6061
+ }]
6062
+ }]
6063
+ };
6064
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/only3D.ts
6065
+ const only3D = {
6066
+ id: 'only3D',
6067
+ locked: true,
6068
+ name: 'only3D',
6069
+ createdDate: '2023-03-15T10:29:44.894Z',
6070
+ modifiedDate: '2023-03-15T10:29:44.894Z',
6071
+ availableTo: {},
6072
+ editableBy: {},
6073
+ protocolMatchingRules: [],
6074
+ imageLoadStrategy: 'interleaveCenter',
6075
+ displaySetSelectors: {
6076
+ mprDisplaySet: {
6077
+ seriesMatchingRules: [{
6078
+ weight: 1,
6079
+ attribute: 'isReconstructable',
6080
+ constraint: {
6081
+ equals: {
6082
+ value: true
6083
+ }
6084
+ },
6085
+ required: true
6086
+ }]
6087
+ }
6088
+ },
6089
+ stages: [{
6090
+ id: 'only3DStage',
6091
+ name: 'only3D',
6092
+ viewportStructure: {
6093
+ layoutType: 'grid',
6094
+ properties: {
6095
+ rows: 1,
6096
+ columns: 1
6097
+ }
6098
+ },
6099
+ viewports: [{
6100
+ viewportOptions: {
6101
+ toolGroupId: 'volume3d',
6102
+ viewportType: 'volume3d',
6103
+ orientation: 'coronal',
6104
+ customViewportProps: {
6105
+ hideOverlays: true
6106
+ }
6107
+ },
6108
+ displaySets: [{
6109
+ id: 'mprDisplaySet',
6110
+ options: {
6111
+ // ToDo: choose appropriate preset
6112
+ displayPreset: 'CT-Bone'
6113
+ }
6114
+ }]
6115
+ }]
6116
+ }]
6117
+ };
6118
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/primary3D.ts
6119
+ const primary3D = {
6120
+ id: 'primary3D',
6121
+ locked: true,
6122
+ name: 'primary3D',
6123
+ createdDate: '2023-03-15T10:29:44.894Z',
6124
+ modifiedDate: '2023-03-15T10:29:44.894Z',
6125
+ availableTo: {},
6126
+ editableBy: {},
6127
+ protocolMatchingRules: [],
6128
+ imageLoadStrategy: 'interleaveCenter',
6129
+ displaySetSelectors: {
6130
+ mprDisplaySet: {
6131
+ seriesMatchingRules: [{
6132
+ weight: 1,
6133
+ attribute: 'isReconstructable',
6134
+ constraint: {
6135
+ equals: {
6136
+ value: true
6137
+ }
6138
+ },
6139
+ required: true
6140
+ }]
6141
+ }
6142
+ },
6143
+ stages: [{
6144
+ id: 'primary3DStage',
6145
+ name: 'primary3D',
6146
+ viewportStructure: {
6147
+ layoutType: 'grid',
6148
+ properties: {
6149
+ rows: 3,
6150
+ columns: 3,
6151
+ layoutOptions: [{
6152
+ x: 0,
6153
+ y: 0,
6154
+ width: 2 / 3,
6155
+ height: 1
6156
+ }, {
6157
+ x: 2 / 3,
6158
+ y: 0,
6159
+ width: 1 / 3,
6160
+ height: 1 / 3
6161
+ }, {
6162
+ x: 2 / 3,
6163
+ y: 1 / 3,
6164
+ width: 1 / 3,
6165
+ height: 1 / 3
6166
+ }, {
6167
+ x: 2 / 3,
6168
+ y: 2 / 3,
6169
+ width: 1 / 3,
6170
+ height: 1 / 3
6171
+ }]
6172
+ }
6173
+ },
6174
+ viewports: [{
6175
+ viewportOptions: {
6176
+ toolGroupId: 'volume3d',
6177
+ viewportType: 'volume3d',
6178
+ orientation: 'coronal',
6179
+ customViewportProps: {
6180
+ hideOverlays: true
6181
+ }
6182
+ },
6183
+ displaySets: [{
6184
+ id: 'mprDisplaySet',
6185
+ options: {
6186
+ // ToDo: choose appropriate preset
6187
+ displayPreset: 'CT-Bone'
6188
+ }
6189
+ }]
6190
+ }, {
6191
+ viewportOptions: {
6192
+ toolGroupId: 'mpr',
6193
+ viewportType: 'volume',
6194
+ orientation: 'axial',
6195
+ initialImageOptions: {
6196
+ preset: 'middle'
6197
+ },
6198
+ syncGroups: [{
6199
+ type: 'voi',
6200
+ id: 'mpr',
6201
+ source: true,
6202
+ target: true
6203
+ }]
6204
+ },
6205
+ displaySets: [{
6206
+ id: 'mprDisplaySet'
6207
+ }]
6208
+ }, {
6209
+ viewportOptions: {
6210
+ toolGroupId: 'mpr',
6211
+ viewportType: 'volume',
6212
+ orientation: 'coronal',
6213
+ initialImageOptions: {
6214
+ preset: 'middle'
6215
+ },
6216
+ syncGroups: [{
6217
+ type: 'voi',
6218
+ id: 'mpr',
6219
+ source: true,
6220
+ target: true
6221
+ }]
6222
+ },
6223
+ displaySets: [{
6224
+ id: 'mprDisplaySet'
6225
+ }]
6226
+ }, {
6227
+ viewportOptions: {
6228
+ toolGroupId: 'mpr',
6229
+ viewportType: 'volume',
6230
+ orientation: 'sagittal',
6231
+ initialImageOptions: {
6232
+ preset: 'middle'
6233
+ },
6234
+ syncGroups: [{
6235
+ type: 'voi',
6236
+ id: 'mpr',
6237
+ source: true,
6238
+ target: true
6239
+ }]
6240
+ },
6241
+ displaySets: [{
6242
+ id: 'mprDisplaySet'
6243
+ }]
6244
+ }]
6245
+ }]
6246
+ };
6247
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/hps/primaryAxial.ts
6248
+ const primaryAxial = {
6249
+ id: 'primaryAxial',
6250
+ locked: true,
6251
+ name: 'primaryAxial',
6252
+ createdDate: '2023-03-15T10:29:44.894Z',
6253
+ modifiedDate: '2023-03-15T10:29:44.894Z',
6254
+ availableTo: {},
6255
+ editableBy: {},
6256
+ protocolMatchingRules: [],
6257
+ imageLoadStrategy: 'interleaveCenter',
6258
+ displaySetSelectors: {
6259
+ mprDisplaySet: {
6260
+ seriesMatchingRules: [{
6261
+ weight: 1,
6262
+ attribute: 'isReconstructable',
6263
+ constraint: {
6264
+ equals: {
6265
+ value: true
6266
+ }
6267
+ },
6268
+ required: true
6269
+ }]
6270
+ }
6271
+ },
6272
+ stages: [{
6273
+ id: 'primaryAxialStage',
6274
+ name: 'primaryAxial',
6275
+ viewportStructure: {
6276
+ layoutType: 'grid',
6277
+ properties: {
6278
+ rows: 2,
6279
+ columns: 3,
6280
+ layoutOptions: [{
6281
+ x: 0,
6282
+ y: 0,
6283
+ width: 2 / 3,
6284
+ height: 1
6285
+ }, {
6286
+ x: 2 / 3,
6287
+ y: 0,
6288
+ width: 1 / 3,
6289
+ height: 1 / 2
6290
+ }, {
6291
+ x: 2 / 3,
6292
+ y: 1 / 2,
6293
+ width: 1 / 3,
6294
+ height: 1 / 2
6295
+ }]
6296
+ }
6297
+ },
6298
+ viewports: [{
6299
+ viewportOptions: {
6300
+ toolGroupId: 'mpr',
6301
+ viewportType: 'volume',
6302
+ orientation: 'axial',
6303
+ initialImageOptions: {
6304
+ preset: 'middle'
6305
+ },
6306
+ syncGroups: [{
6307
+ type: 'voi',
6308
+ id: 'mpr',
6309
+ source: true,
6310
+ target: true
6311
+ }]
6312
+ },
6313
+ displaySets: [{
6314
+ id: 'mprDisplaySet'
6315
+ }]
6316
+ }, {
6317
+ viewportOptions: {
6318
+ toolGroupId: 'mpr',
6319
+ viewportType: 'volume',
6320
+ orientation: 'sagittal',
6321
+ initialImageOptions: {
6322
+ preset: 'middle'
6323
+ },
6324
+ syncGroups: [{
6325
+ type: 'voi',
6326
+ id: 'mpr',
6327
+ source: true,
6328
+ target: true
6329
+ }]
6330
+ },
6331
+ displaySets: [{
6332
+ id: 'mprDisplaySet'
6333
+ }]
6334
+ }, {
6335
+ viewportOptions: {
6336
+ toolGroupId: 'mpr',
6337
+ viewportType: 'volume',
6338
+ orientation: 'coronal',
6339
+ initialImageOptions: {
6340
+ preset: 'middle'
6341
+ },
6342
+ syncGroups: [{
6343
+ type: 'voi',
6344
+ id: 'mpr',
6345
+ source: true,
6346
+ target: true
6347
+ }]
6348
+ },
6349
+ displaySets: [{
6350
+ id: 'mprDisplaySet'
6351
+ }]
6352
+ }]
6353
+ }]
6354
+ };
6355
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/getHangingProtocolModule.ts
6356
+
6357
+
6358
+
6359
+
6360
+
6361
+
6362
+
6363
+ function getHangingProtocolModule() {
6364
+ return [{
6365
+ name: mpr.id,
6366
+ protocol: mpr
6367
+ }, {
6368
+ name: mprAnd3DVolumeViewport.id,
6369
+ protocol: mprAnd3DVolumeViewport
6370
+ }, {
6371
+ name: fourUp.id,
6372
+ protocol: fourUp
6373
+ }, {
6374
+ name: main3D.id,
6375
+ protocol: main3D
6376
+ }, {
6377
+ name: primaryAxial.id,
6378
+ protocol: primaryAxial
6379
+ }, {
6380
+ name: only3D.id,
6381
+ protocol: only3D
6382
+ }, {
6383
+ name: primary3D.id,
6384
+ protocol: primary3D
6385
+ }];
6386
+ }
6387
+ /* harmony default export */ const src_getHangingProtocolModule = (getHangingProtocolModule);
6388
+ ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/ToolGroupService/ToolGroupService.ts
6389
+ var _class;
6390
+
6391
+
6392
+
6393
+ const ToolGroupService_EVENTS = {
6394
+ VIEWPORT_ADDED: 'event::cornerstone::toolgroupservice:viewportadded',
6395
+ TOOLGROUP_CREATED: 'event::cornerstone::toolgroupservice:toolgroupcreated'
6396
+ };
6397
+ class ToolGroupService {
6398
+ constructor(serviceManager) {
6399
+ this.serviceManager = void 0;
6400
+ this.toolGroupIds = new Set();
6401
+ /**
6402
+ * Service-specific
6403
+ */
6404
+ this.listeners = void 0;
6405
+ this.EVENTS = void 0;
6406
+ const {
6407
+ cornerstoneViewportService,
6408
+ viewportGridService
6409
+ } = serviceManager.services;
6410
+ this.cornerstoneViewportService = cornerstoneViewportService;
6411
+ this.viewportGridService = viewportGridService;
6412
+ this.listeners = {};
6413
+ this.EVENTS = ToolGroupService_EVENTS;
6414
+ Object.assign(this, src/* pubSubServiceInterface */.KZ);
6415
+ }
6416
+ onModeExit() {
6417
+ this.destroy();
6418
+ }
6419
+
6420
+ /**
6421
+ * Retrieves a tool group from the ToolGroupManager by tool group ID.
6422
+ * If no tool group ID is provided, it retrieves the tool group of the active viewport.
6423
+ * @param toolGroupId - Optional ID of the tool group to retrieve.
6424
+ * @returns The tool group or undefined if it is not found.
6425
+ */
6426
+ getToolGroup(toolGroupId) {
6427
+ let toolGroupIdToUse = toolGroupId;
5936
6428
  if (!toolGroupIdToUse) {
5937
6429
  // Use the active viewport's tool group if no tool group id is provided
5938
6430
  const enabledElement = getActiveViewportEnabledElement(this.viewportGridService);
@@ -6018,8 +6510,7 @@ class ToolGroupService {
6018
6510
  });
6019
6511
  return toolGroup;
6020
6512
  }
6021
- addToolsToToolGroup(toolGroupId, tools) {
6022
- let configs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
6513
+ addToolsToToolGroup(toolGroupId, tools, configs = {}) {
6023
6514
  const toolGroup = dist_esm.ToolGroupManager.getToolGroup(toolGroupId);
6024
6515
  // this.changeConfigurationIfNecessary(toolGroup, volumeId);
6025
6516
  this._addTools(toolGroup, tools, configs);
@@ -6081,49 +6572,44 @@ class ToolGroupService {
6081
6572
  disabled
6082
6573
  } = tools;
6083
6574
  if (active) {
6084
- active.forEach(_ref => {
6085
- let {
6086
- toolName,
6087
- bindings
6088
- } = _ref;
6575
+ active.forEach(({
6576
+ toolName,
6577
+ bindings
6578
+ }) => {
6089
6579
  toolGroup.setToolActive(toolName, {
6090
6580
  bindings
6091
6581
  });
6092
6582
  });
6093
6583
  }
6094
6584
  if (passive) {
6095
- passive.forEach(_ref2 => {
6096
- let {
6097
- toolName
6098
- } = _ref2;
6585
+ passive.forEach(({
6586
+ toolName
6587
+ }) => {
6099
6588
  toolGroup.setToolPassive(toolName);
6100
6589
  });
6101
6590
  }
6102
6591
  if (enabled) {
6103
- enabled.forEach(_ref3 => {
6104
- let {
6105
- toolName
6106
- } = _ref3;
6592
+ enabled.forEach(({
6593
+ toolName
6594
+ }) => {
6107
6595
  toolGroup.setToolEnabled(toolName);
6108
6596
  });
6109
6597
  }
6110
6598
  if (disabled) {
6111
- disabled.forEach(_ref4 => {
6112
- let {
6113
- toolName
6114
- } = _ref4;
6599
+ disabled.forEach(({
6600
+ toolName
6601
+ }) => {
6115
6602
  toolGroup.setToolDisabled(toolName);
6116
6603
  });
6117
6604
  }
6118
6605
  }
6119
6606
  _addTools(toolGroup, tools) {
6120
6607
  const addTools = tools => {
6121
- tools.forEach(_ref5 => {
6122
- let {
6123
- toolName,
6124
- parentTool,
6125
- configuration
6126
- } = _ref5;
6608
+ tools.forEach(({
6609
+ toolName,
6610
+ parentTool,
6611
+ configuration
6612
+ }) => {
6127
6613
  if (parentTool) {
6128
6614
  toolGroup.addToolInstance(toolName, parentTool, {
6129
6615
  ...configuration
@@ -6149,20 +6635,21 @@ class ToolGroupService {
6149
6635
  }
6150
6636
  }
6151
6637
  }
6638
+ _class = ToolGroupService;
6152
6639
  ToolGroupService.REGISTRATION = {
6153
6640
  name: 'toolGroupService',
6154
6641
  altName: 'ToolGroupService',
6155
- create: _ref6 => {
6156
- let {
6157
- servicesManager
6158
- } = _ref6;
6159
- return new ToolGroupService(servicesManager);
6642
+ create: ({
6643
+ servicesManager
6644
+ }) => {
6645
+ return new _class(servicesManager);
6160
6646
  }
6161
6647
  };
6162
6648
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/ToolGroupService/index.js
6163
6649
 
6164
6650
  /* harmony default export */ const services_ToolGroupService = (ToolGroupService);
6165
6651
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/SyncGroupService/SyncGroupService.ts
6652
+ var SyncGroupService_class;
6166
6653
 
6167
6654
 
6168
6655
  const SyncGroupService_EVENTS = {
@@ -6276,14 +6763,14 @@ class SyncGroupService {
6276
6763
  });
6277
6764
  }
6278
6765
  }
6766
+ SyncGroupService_class = SyncGroupService;
6279
6767
  SyncGroupService.REGISTRATION = {
6280
6768
  name: 'syncGroupService',
6281
6769
  altName: 'SyncGroupService',
6282
- create: _ref => {
6283
- let {
6284
- servicesManager
6285
- } = _ref;
6286
- return new SyncGroupService(servicesManager);
6770
+ create: ({
6771
+ servicesManager
6772
+ }) => {
6773
+ return new SyncGroupService_class(servicesManager);
6287
6774
  }
6288
6775
  };
6289
6776
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/SyncGroupService/index.js
@@ -6343,24 +6830,21 @@ function reverseEaseInOutBell(x, baseline) {
6343
6830
  * and geometry Id
6344
6831
  */
6345
6832
  function mapROIContoursToRTStructData(structureSet, rtDisplaySetUID) {
6346
- return structureSet.ROIContours.map(_ref => {
6347
- let {
6348
- contourPoints,
6349
- ROINumber,
6350
- ROIName,
6351
- colorArray
6352
- } = _ref;
6353
- const data = contourPoints.map(_ref2 => {
6354
- let {
6355
- points,
6356
- ...rest
6357
- } = _ref2;
6358
- const newPoints = points.map(_ref3 => {
6359
- let {
6360
- x,
6361
- y,
6362
- z
6363
- } = _ref3;
6833
+ return structureSet.ROIContours.map(({
6834
+ contourPoints,
6835
+ ROINumber,
6836
+ ROIName,
6837
+ colorArray
6838
+ }) => {
6839
+ const data = contourPoints.map(({
6840
+ points,
6841
+ ...rest
6842
+ }) => {
6843
+ const newPoints = points.map(({
6844
+ x,
6845
+ y,
6846
+ z
6847
+ }) => {
6364
6848
  return [x, y, z];
6365
6849
  });
6366
6850
  return {
@@ -6379,6 +6863,7 @@ function mapROIContoursToRTStructData(structureSet, rtDisplaySetUID) {
6379
6863
  });
6380
6864
  }
6381
6865
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts
6866
+ var SegmentationService_class;
6382
6867
 
6383
6868
 
6384
6869
 
@@ -6415,13 +6900,10 @@ const SEGMENT_CONSTANT = {
6415
6900
  };
6416
6901
  const VOLUME_LOADER_SCHEME = 'cornerstoneStreamingImageVolume';
6417
6902
  class SegmentationService extends src/* PubSubService */.hC {
6418
- constructor(_ref) {
6419
- var _this;
6420
- let {
6421
- servicesManager
6422
- } = _ref;
6903
+ constructor({
6904
+ servicesManager
6905
+ }) {
6423
6906
  super(SegmentationService_EVENTS);
6424
- _this = this;
6425
6907
  this.segmentations = void 0;
6426
6908
  this.servicesManager = void 0;
6427
6909
  this.highlightIntervalId = null;
@@ -6562,7 +7044,6 @@ class SegmentationService extends src/* PubSubService */.hC {
6562
7044
  }
6563
7045
  }
6564
7046
  };
6565
-
6566
7047
  this.addOrUpdateSegmentation(segmentation);
6567
7048
  return segmentationId;
6568
7049
  };
@@ -6575,11 +7056,8 @@ class SegmentationService extends src/* PubSubService */.hC {
6575
7056
  this.toggleSegmentationVisibility = segmentationId => {
6576
7057
  this._toggleSegmentationVisibility(segmentationId, false);
6577
7058
  };
6578
- this.addSegmentationRepresentationToToolGroup = async function (toolGroupId, segmentationId) {
6579
- let hydrateSegmentation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
6580
- let representationType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : dist_esm.Enums.SegmentationRepresentations.Labelmap;
6581
- let suppressEvents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
6582
- const segmentation = _this.getSegmentation(segmentationId);
7059
+ this.addSegmentationRepresentationToToolGroup = async (toolGroupId, segmentationId, hydrateSegmentation = false, representationType = dist_esm.Enums.SegmentationRepresentations.Labelmap, suppressEvents = false) => {
7060
+ const segmentation = this.getSegmentation(segmentationId);
6583
7061
  if (!segmentation) {
6584
7062
  throw new Error(`Segmentation with segmentationId ${segmentationId} not found.`);
6585
7063
  }
@@ -6598,7 +7076,7 @@ class SegmentationService extends src/* PubSubService */.hC {
6598
7076
  }]);
6599
7077
 
6600
7078
  // set the latest segmentation representation as active one
6601
- _this._setActiveSegmentationForToolGroup(segmentationId, toolGroupId, segmentationRepresentationUIDs[0]);
7079
+ this._setActiveSegmentationForToolGroup(segmentationId, toolGroupId, segmentationRepresentationUIDs[0]);
6602
7080
  dist_esm.segmentation.config.color.setColorLUT(toolGroupId, segmentationRepresentationUIDs[0], colorLUTIndex);
6603
7081
 
6604
7082
  // add the segmentation segments properly
@@ -6615,20 +7093,20 @@ class SegmentationService extends src/* PubSubService */.hC {
6615
7093
  } = segment;
6616
7094
  const suppressEvents = true;
6617
7095
  if (color !== undefined) {
6618
- _this._setSegmentColor(segmentationId, segmentIndex, color, toolGroupId, suppressEvents);
7096
+ this._setSegmentColor(segmentationId, segmentIndex, color, toolGroupId, suppressEvents);
6619
7097
  }
6620
7098
  if (opacity !== undefined) {
6621
- _this._setSegmentOpacity(segmentationId, segmentIndex, opacity, toolGroupId, suppressEvents);
7099
+ this._setSegmentOpacity(segmentationId, segmentIndex, opacity, toolGroupId, suppressEvents);
6622
7100
  }
6623
7101
  if (visibility !== undefined) {
6624
- _this._setSegmentVisibility(segmentationId, segmentIndex, visibility, toolGroupId, suppressEvents);
7102
+ this._setSegmentVisibility(segmentationId, segmentIndex, visibility, toolGroupId, suppressEvents);
6625
7103
  }
6626
7104
  if (isLocked) {
6627
- _this._setSegmentLocked(segmentationId, segmentIndex, isLocked, suppressEvents);
7105
+ this._setSegmentLocked(segmentationId, segmentIndex, isLocked, suppressEvents);
6628
7106
  }
6629
7107
  }
6630
7108
  if (!suppressEvents) {
6631
- _this._broadcastEvent(_this.EVENTS.SEGMENTATION_UPDATED, {
7109
+ this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
6632
7110
  segmentation
6633
7111
  });
6634
7112
  }
@@ -6652,18 +7130,17 @@ class SegmentationService extends src/* PubSubService */.hC {
6652
7130
  const toolGroupIds = dist_esm.segmentation.state.getToolGroupIdsWithSegmentation(segmentationId);
6653
7131
  return toolGroupIds;
6654
7132
  };
6655
- this.hydrateSegmentation = function (segmentationId) {
6656
- let suppressEvents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
6657
- const segmentation = _this.getSegmentation(segmentationId);
7133
+ this.hydrateSegmentation = (segmentationId, suppressEvents = false) => {
7134
+ const segmentation = this.getSegmentation(segmentationId);
6658
7135
  if (!segmentation) {
6659
7136
  throw new Error(`Segmentation with segmentationId ${segmentationId} not found.`);
6660
7137
  }
6661
7138
  segmentation.hydrated = true;
6662
7139
 
6663
7140
  // Not all segmentations have dipslaysets, some of them are derived in the client
6664
- _this._setDisplaySetIsHydrated(segmentationId, true);
7141
+ this._setDisplaySetIsHydrated(segmentationId, true);
6665
7142
  if (!suppressEvents) {
6666
- _this._broadcastEvent(_this.EVENTS.SEGMENTATION_UPDATED, {
7143
+ this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
6667
7144
  segmentation
6668
7145
  });
6669
7146
  }
@@ -6721,11 +7198,10 @@ class SegmentationService extends src/* PubSubService */.hC {
6721
7198
  renderInactiveSegmentations,
6722
7199
  renderOutline
6723
7200
  } = configuration;
6724
- const setConfigValueIfDefined = function (key, value) {
6725
- let transformFn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
7201
+ const setConfigValueIfDefined = (key, value, transformFn = null) => {
6726
7202
  if (value !== undefined) {
6727
7203
  const transformedValue = transformFn ? transformFn(value) : value;
6728
- _this._setSegmentationConfig(key, transformedValue);
7204
+ this._setSegmentationConfig(key, transformedValue);
6729
7205
  }
6730
7206
  };
6731
7207
  setConfigValueIfDefined('renderOutline', renderOutline);
@@ -6772,32 +7248,30 @@ class SegmentationService extends src/* PubSubService */.hC {
6772
7248
  this.getSegmentationRepresentationsForToolGroup = toolGroupId => {
6773
7249
  return dist_esm.segmentation.state.getSegmentationRepresentations(toolGroupId);
6774
7250
  };
6775
- this._toggleSegmentationVisibility = function (segmentationId) {
6776
- let suppressEvents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
6777
- const segmentation = _this.segmentations[segmentationId];
7251
+ this._toggleSegmentationVisibility = (segmentationId, suppressEvents = false) => {
7252
+ const segmentation = this.segmentations[segmentationId];
6778
7253
  if (!segmentation) {
6779
7254
  throw new Error(`Segmentation with segmentationId ${segmentationId} not found.`);
6780
7255
  }
6781
7256
  segmentation.isVisible = !segmentation.isVisible;
6782
- _this._updateCornerstoneSegmentationVisibility(segmentationId);
7257
+ this._updateCornerstoneSegmentationVisibility(segmentationId);
6783
7258
  if (suppressEvents === false) {
6784
- _this._broadcastEvent(_this.EVENTS.SEGMENTATION_UPDATED, {
7259
+ this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
6785
7260
  segmentation
6786
7261
  });
6787
7262
  }
6788
7263
  };
6789
- this._setSegmentColor = function (segmentationId, segmentIndex, color, toolGroupId) {
6790
- let suppressEvents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
6791
- const segmentation = _this.getSegmentation(segmentationId);
7264
+ this._setSegmentColor = (segmentationId, segmentIndex, color, toolGroupId, suppressEvents = false) => {
7265
+ const segmentation = this.getSegmentation(segmentationId);
6792
7266
  if (segmentation === undefined) {
6793
7267
  throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
6794
7268
  }
6795
- const segmentInfo = _this._getSegmentInfo(segmentation, segmentIndex);
7269
+ const segmentInfo = this._getSegmentInfo(segmentation, segmentIndex);
6796
7270
  if (segmentInfo === undefined) {
6797
7271
  throw new Error(`Segment ${segmentIndex} not yet added to segmentation: ${segmentationId}`);
6798
7272
  }
6799
- toolGroupId = toolGroupId ?? _this._getApplicableToolGroupId();
6800
- const segmentationRepresentation = _this._getSegmentationRepresentation(segmentationId, toolGroupId);
7273
+ toolGroupId = toolGroupId ?? this._getApplicableToolGroupId();
7274
+ const segmentationRepresentation = this._getSegmentationRepresentation(segmentationId, toolGroupId);
6801
7275
  if (!segmentationRepresentation) {
6802
7276
  throw new Error('Must add representation to toolgroup before setting segments');
6803
7277
  }
@@ -6808,23 +7282,22 @@ class SegmentationService extends src/* PubSubService */.hC {
6808
7282
  dist_esm.segmentation.config.color.setColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex, [...color, rgbaColor[3]]);
6809
7283
  segmentInfo.color = color;
6810
7284
  if (suppressEvents === false) {
6811
- _this._broadcastEvent(_this.EVENTS.SEGMENTATION_UPDATED, {
7285
+ this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
6812
7286
  segmentation
6813
7287
  });
6814
7288
  }
6815
7289
  };
6816
- this._setSegmentOpacity = function (segmentationId, segmentIndex, opacity, toolGroupId) {
6817
- let suppressEvents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
6818
- const segmentation = _this.getSegmentation(segmentationId);
7290
+ this._setSegmentOpacity = (segmentationId, segmentIndex, opacity, toolGroupId, suppressEvents = false) => {
7291
+ const segmentation = this.getSegmentation(segmentationId);
6819
7292
  if (segmentation === undefined) {
6820
7293
  throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
6821
7294
  }
6822
- const segmentInfo = _this._getSegmentInfo(segmentation, segmentIndex);
7295
+ const segmentInfo = this._getSegmentInfo(segmentation, segmentIndex);
6823
7296
  if (segmentInfo === undefined) {
6824
7297
  throw new Error(`Segment ${segmentIndex} not yet added to segmentation: ${segmentationId}`);
6825
7298
  }
6826
- toolGroupId = toolGroupId ?? _this._getApplicableToolGroupId();
6827
- const segmentationRepresentation = _this._getSegmentationRepresentation(segmentationId, toolGroupId);
7299
+ toolGroupId = toolGroupId ?? this._getApplicableToolGroupId();
7300
+ const segmentationRepresentation = this._getSegmentationRepresentation(segmentationId, toolGroupId);
6828
7301
  if (!segmentationRepresentation) {
6829
7302
  throw new Error('Must add representation to toolgroup before setting segments');
6830
7303
  }
@@ -6835,7 +7308,7 @@ class SegmentationService extends src/* PubSubService */.hC {
6835
7308
  dist_esm.segmentation.config.color.setColorForSegmentIndex(toolGroupId, segmentationRepresentationUID, segmentIndex, [rgbaColor[0], rgbaColor[1], rgbaColor[2], opacity]);
6836
7309
  segmentInfo.opacity = opacity;
6837
7310
  if (suppressEvents === false) {
6838
- _this._broadcastEvent(_this.EVENTS.SEGMENTATION_UPDATED, {
7311
+ this._broadcastEvent(this.EVENTS.SEGMENTATION_UPDATED, {
6839
7312
  segmentation
6840
7313
  });
6841
7314
  }
@@ -6995,8 +7468,7 @@ class SegmentationService extends src/* PubSubService */.hC {
6995
7468
  * - isLocked: (optional) Whether the new segment should be locked for editing. If not provided, the segment will not be locked by default.
6996
7469
  * - 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.
6997
7470
  */
6998
- addSegment(segmentationId) {
6999
- let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7471
+ addSegment(segmentationId, config = {}) {
7000
7472
  if (config?.segmentIndex === 0) {
7001
7473
  throw new Error('Segment index 0 is reserved for "no label"');
7002
7474
  }
@@ -7110,8 +7582,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7110
7582
  segmentation
7111
7583
  });
7112
7584
  }
7113
- setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId) {
7114
- let suppressEvents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
7585
+ setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId, suppressEvents = false) {
7115
7586
  this._setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId, suppressEvents);
7116
7587
  }
7117
7588
  setSegmentLocked(segmentationId, segmentIndex, isLocked) {
@@ -7156,8 +7627,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7156
7627
  *
7157
7628
  * @return Array of segmentations
7158
7629
  */
7159
- getSegmentations() {
7160
- let filterNonHydratedSegmentations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
7630
+ getSegmentations(filterNonHydratedSegmentations = true) {
7161
7631
  const segmentations = this._getSegmentations();
7162
7632
  return segmentations && segmentations.filter(segmentation => {
7163
7633
  return !filterNonHydratedSegmentations || segmentation.hydrated;
@@ -7192,9 +7662,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7192
7662
  getSegmentation(segmentationId) {
7193
7663
  return this.segmentations[segmentationId];
7194
7664
  }
7195
- addOrUpdateSegmentation(segmentation) {
7196
- let suppressEvents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
7197
- let notYetUpdatedAtSource = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7665
+ addOrUpdateSegmentation(segmentation, suppressEvents = false, notYetUpdatedAtSource = false) {
7198
7666
  const {
7199
7667
  id: segmentationId
7200
7668
  } = segmentation;
@@ -7255,8 +7723,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7255
7723
  }
7256
7724
  return cachedSegmentation.id;
7257
7725
  }
7258
- async createSegmentationForSEGDisplaySet(segDisplaySet, segmentationId) {
7259
- let suppressEvents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7726
+ async createSegmentationForSEGDisplaySet(segDisplaySet, segmentationId, suppressEvents = false) {
7260
7727
  // Todo: we only support creating labelmap for SEG displaySets for now
7261
7728
  const representationType = LABELMAP;
7262
7729
  segmentationId = segmentationId ?? segDisplaySet.displaySetInstanceUID;
@@ -7362,8 +7829,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7362
7829
  });
7363
7830
  return this.addOrUpdateSegmentation(segmentation, suppressEvents);
7364
7831
  }
7365
- async createSegmentationForRTDisplaySet(rtDisplaySet, segmentationId) {
7366
- let suppressEvents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7832
+ async createSegmentationForRTDisplaySet(rtDisplaySet, segmentationId, suppressEvents = false) {
7367
7833
  // Todo: we currently only have support for contour representation for initial
7368
7834
  // RT display
7369
7835
  const representationType = CONTOUR;
@@ -7380,12 +7846,9 @@ class SegmentationService extends src/* PubSubService */.hC {
7380
7846
 
7381
7847
  // sort by segmentIndex
7382
7848
  allRTStructData.sort((a, b) => a.segmentIndex - b.segmentIndex);
7383
- const geometryIds = allRTStructData.map(_ref2 => {
7384
- let {
7385
- geometryId
7386
- } = _ref2;
7387
- return geometryId;
7388
- });
7849
+ const geometryIds = allRTStructData.map(({
7850
+ geometryId
7851
+ }) => geometryId);
7389
7852
  const segmentation = {
7390
7853
  ...defaultScheme,
7391
7854
  id: segmentationId,
@@ -7438,7 +7901,6 @@ class SegmentationService extends src/* PubSubService */.hC {
7438
7901
  },
7439
7902
  modifiedTime: rtDisplaySet.SeriesDate // we use the SeriesDate as the modifiedTime since this is the first time we are creating the segmentation
7440
7903
  };
7441
-
7442
7904
  segmentation.segments[segmentIndex] = {
7443
7905
  label: id,
7444
7906
  segmentIndex,
@@ -7486,12 +7948,8 @@ class SegmentationService extends src/* PubSubService */.hC {
7486
7948
  });
7487
7949
  return this.addOrUpdateSegmentation(segmentation, suppressEvents);
7488
7950
  }
7489
- jumpToSegmentCenter(segmentationId, segmentIndex, toolGroupId) {
7490
- let highlightAlpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.9;
7491
- let highlightSegment = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
7492
- let animationLength = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 750;
7493
- let highlightHideOthers = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
7494
- let highlightFunctionType = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'ease-in-out';
7951
+ jumpToSegmentCenter(segmentationId, segmentIndex, toolGroupId, highlightAlpha = 0.9, highlightSegment = true, animationLength = 750, highlightHideOthers = false, highlightFunctionType = 'ease-in-out' // todo: make animation functions configurable from outside
7952
+ ) {
7495
7953
  const {
7496
7954
  toolGroupService
7497
7955
  } = this.servicesManager.services;
@@ -7531,11 +7989,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7531
7989
  }
7532
7990
  });
7533
7991
  }
7534
- highlightSegment(segmentationId, segmentIndex, toolGroupId) {
7535
- let alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.9;
7536
- let animationLength = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 750;
7537
- let hideOthers = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
7538
- let highlightFunctionType = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'ease-in-out';
7992
+ highlightSegment(segmentationId, segmentIndex, toolGroupId, alpha = 0.9, animationLength = 750, hideOthers = true, highlightFunctionType = 'ease-in-out') {
7539
7993
  if (this.highlightIntervalId) {
7540
7994
  clearInterval(this.highlightIntervalId);
7541
7995
  }
@@ -7681,8 +8135,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7681
8135
  setSegmentLabel(segmentationId, segmentIndex, label) {
7682
8136
  this._setSegmentLabel(segmentationId, segmentIndex, label);
7683
8137
  }
7684
- _setSegmentLabel(segmentationId, segmentIndex, label) {
7685
- let suppressEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
8138
+ _setSegmentLabel(segmentationId, segmentIndex, label, suppressEvents = false) {
7686
8139
  const segmentation = this.getSegmentation(segmentationId);
7687
8140
  if (segmentation === undefined) {
7688
8141
  throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
@@ -7738,8 +8191,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7738
8191
  colorLUTIndex: 0
7739
8192
  };
7740
8193
  }
7741
- _setActiveSegmentationForToolGroup(segmentationId, toolGroupId) {
7742
- let suppressEvents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
8194
+ _setActiveSegmentationForToolGroup(segmentationId, toolGroupId, suppressEvents = false) {
7743
8195
  const segmentations = this._getSegmentations();
7744
8196
  const targetSegmentation = this.getSegmentation(segmentationId);
7745
8197
  if (targetSegmentation === undefined) {
@@ -7756,8 +8208,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7756
8208
  });
7757
8209
  }
7758
8210
  }
7759
- _setActiveSegment(segmentationId, segmentIndex) {
7760
- let suppressEvents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
8211
+ _setActiveSegment(segmentationId, segmentIndex, suppressEvents = false) {
7761
8212
  const segmentation = this.getSegmentation(segmentationId);
7762
8213
  if (segmentation === undefined) {
7763
8214
  throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
@@ -7805,8 +8256,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7805
8256
  } = segmentCenter[segmentIndex];
7806
8257
  return center;
7807
8258
  }
7808
- _setSegmentLocked(segmentationId, segmentIndex, isLocked) {
7809
- let suppressEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
8259
+ _setSegmentLocked(segmentationId, segmentIndex, isLocked, suppressEvents = false) {
7810
8260
  const segmentation = this.getSegmentation(segmentationId);
7811
8261
  if (segmentation === undefined) {
7812
8262
  throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
@@ -7823,8 +8273,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7823
8273
  });
7824
8274
  }
7825
8275
  }
7826
- _setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId) {
7827
- let suppressEvents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
8276
+ _setSegmentVisibility(segmentationId, segmentIndex, isVisible, toolGroupId, suppressEvents = false) {
7828
8277
  toolGroupId = toolGroupId ?? this._getApplicableToolGroupId();
7829
8278
  const {
7830
8279
  segmentationRepresentationUID,
@@ -7850,8 +8299,7 @@ class SegmentationService extends src/* PubSubService */.hC {
7850
8299
  });
7851
8300
  }
7852
8301
  }
7853
- _setSegmentLabel(segmentationId, segmentIndex, segmentLabel) {
7854
- let suppressEvents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
8302
+ _setSegmentLabel(segmentationId, segmentIndex, segmentLabel, suppressEvents = false) {
7855
8303
  const segmentation = this.getSegmentation(segmentationId);
7856
8304
  if (segmentation === undefined) {
7857
8305
  throw new Error(`no segmentation for segmentationId: ${segmentationId}`);
@@ -7929,11 +8377,10 @@ class SegmentationService extends src/* PubSubService */.hC {
7929
8377
  esm.cache.removeVolumeLoadObject(segmentationId);
7930
8378
  }
7931
8379
  }
7932
- _updateCornerstoneSegmentations(_ref3) {
7933
- let {
7934
- segmentationId,
7935
- notYetUpdatedAtSource
7936
- } = _ref3;
8380
+ _updateCornerstoneSegmentations({
8381
+ segmentationId,
8382
+ notYetUpdatedAtSource
8383
+ }) {
7937
8384
  if (notYetUpdatedAtSource === false) {
7938
8385
  return;
7939
8386
  }
@@ -7975,14 +8422,14 @@ class SegmentationService extends src/* PubSubService */.hC {
7975
8422
  return newColorLUT;
7976
8423
  }
7977
8424
  }
8425
+ SegmentationService_class = SegmentationService;
7978
8426
  SegmentationService.REGISTRATION = {
7979
8427
  name: 'segmentationService',
7980
8428
  altName: 'SegmentationService',
7981
- create: _ref4 => {
7982
- let {
7983
- servicesManager
7984
- } = _ref4;
7985
- return new SegmentationService({
8429
+ create: ({
8430
+ servicesManager
8431
+ }) => {
8432
+ return new SegmentationService_class({
7986
8433
  servicesManager
7987
8434
  });
7988
8435
  }
@@ -8012,6 +8459,7 @@ function getCornerstoneViewportType(viewportType) {
8012
8459
  throw new Error(`Invalid viewport type: ${viewportType}. Valid types are: stack, volume`);
8013
8460
  }
8014
8461
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/CornerstoneCacheService/CornerstoneCacheService.ts
8462
+ var CornerstoneCacheService_class;
8015
8463
 
8016
8464
 
8017
8465
  const CornerstoneCacheService_VOLUME_LOADER_SCHEME = 'cornerstoneStreamingImageVolume';
@@ -8065,12 +8513,9 @@ class CornerstoneCacheService {
8065
8513
  esm.cache.removeVolumeLoadObject(volumeId);
8066
8514
  this.volumeImageIds.delete(volumeId);
8067
8515
  }
8068
- const displaySets = viewportData.data.map(_ref => {
8069
- let {
8070
- displaySetInstanceUID
8071
- } = _ref;
8072
- return displaySetService.getDisplaySetByUID(displaySetInstanceUID);
8073
- });
8516
+ const displaySets = viewportData.data.map(({
8517
+ displaySetInstanceUID
8518
+ }) => displaySetService.getDisplaySetByUID(displaySetInstanceUID));
8074
8519
  const newViewportData = await this._getVolumeViewportData(dataSource, displaySets, viewportData.viewportType);
8075
8520
  return newViewportData;
8076
8521
  }
@@ -8157,12 +8602,9 @@ class CornerstoneCacheService {
8157
8602
  segmentationService,
8158
8603
  displaySetService
8159
8604
  } = this.servicesManager.services;
8160
- const viewportDisplaySetInstanceUIDs = displaySets.map(_ref2 => {
8161
- let {
8162
- displaySetInstanceUID
8163
- } = _ref2;
8164
- return displaySetInstanceUID;
8165
- });
8605
+ const viewportDisplaySetInstanceUIDs = displaySets.map(({
8606
+ displaySetInstanceUID
8607
+ }) => displaySetInstanceUID);
8166
8608
 
8167
8609
  // check inside segmentations if any of them are referencing the displaySets
8168
8610
  // that are about to be displayed
@@ -8185,14 +8627,14 @@ class CornerstoneCacheService {
8185
8627
  return stackImageIds;
8186
8628
  }
8187
8629
  }
8630
+ CornerstoneCacheService_class = CornerstoneCacheService;
8188
8631
  CornerstoneCacheService.REGISTRATION = {
8189
8632
  name: 'cornerstoneCacheService',
8190
8633
  altName: 'CornerstoneCacheService',
8191
- create: _ref3 => {
8192
- let {
8193
- servicesManager
8194
- } = _ref3;
8195
- return new CornerstoneCacheService(servicesManager);
8634
+ create: ({
8635
+ servicesManager
8636
+ }) => {
8637
+ return new CornerstoneCacheService_class(servicesManager);
8196
8638
  }
8197
8639
  };
8198
8640
  /* harmony default export */ const CornerstoneCacheService_CornerstoneCacheService = (CornerstoneCacheService);
@@ -8322,12 +8764,9 @@ class ViewportInfo {
8322
8764
  let viewportData = this.getViewportData();
8323
8765
  if (viewportData.viewportType === esm.Enums.ViewportType.ORTHOGRAPHIC || viewportData.viewportType === esm.Enums.ViewportType.VOLUME_3D) {
8324
8766
  viewportData = viewportData;
8325
- return viewportData.data.some(_ref => {
8326
- let {
8327
- displaySetInstanceUID: dsUID
8328
- } = _ref;
8329
- return dsUID === displaySetInstanceUID;
8330
- });
8767
+ return viewportData.data.some(({
8768
+ displaySetInstanceUID: dsUID
8769
+ }) => dsUID === displaySetInstanceUID);
8331
8770
  }
8332
8771
  viewportData = viewportData;
8333
8772
  return viewportData.data.displaySetInstanceUID === displaySetInstanceUID;
@@ -8399,8 +8838,7 @@ class ViewportInfo {
8399
8838
 
8400
8839
  // Handle incoming public display set options or a display set select
8401
8840
  // with a contained options.
8402
- mapDisplaySetOptions() {
8403
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [{}];
8841
+ mapDisplaySetOptions(options = [{}]) {
8404
8842
  const displaySetOptions = [];
8405
8843
  options.forEach(item => {
8406
8844
  let option = item?.options || item;
@@ -8440,6 +8878,7 @@ var JumpPresets = /*#__PURE__*/function (JumpPresets) {
8440
8878
  }(JumpPresets || {});
8441
8879
  /* harmony default export */ const utils_JumpPresets = (JumpPresets);
8442
8880
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts
8881
+ var CornerstoneViewportService_class;
8443
8882
 
8444
8883
 
8445
8884
 
@@ -8583,10 +9022,9 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
8583
9022
  camera
8584
9023
  };
8585
9024
  }
8586
- storePresentation(_ref) {
8587
- let {
8588
- viewportId
8589
- } = _ref;
9025
+ storePresentation({
9026
+ viewportId
9027
+ }) {
8590
9028
  const stateSyncService = this.servicesManager.services.stateSyncService;
8591
9029
  let presentation;
8592
9030
  try {
@@ -8910,11 +9348,10 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
8910
9348
  };
8911
9349
  });
8912
9350
  await viewport.setVolumes(volumeInputArray);
8913
- volumesProperties.forEach(_ref2 => {
8914
- let {
8915
- properties,
8916
- volumeId
8917
- } = _ref2;
9351
+ volumesProperties.forEach(({
9352
+ properties,
9353
+ volumeId
9354
+ }) => {
8918
9355
  viewport.setProperties(properties, volumeId);
8919
9356
  });
8920
9357
  this.setPresentations(viewport, presentations);
@@ -9014,8 +9451,7 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
9014
9451
 
9015
9452
  // Todo: keepCamera is an interim solution until we have a better solution for
9016
9453
  // keeping the camera position when the viewport data is changed
9017
- updateViewport(viewportId, viewportData) {
9018
- let keepCamera = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
9454
+ updateViewport(viewportId, viewportData, keepCamera = false) {
9019
9455
  const viewportInfo = this.getViewportInfo(viewportId);
9020
9456
  const viewport = this.getCornerstoneViewport(viewportId);
9021
9457
  const viewportCamera = viewport.getCamera();
@@ -9038,8 +9474,7 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
9038
9474
  });
9039
9475
  });
9040
9476
  }
9041
- _setDisplaySets(viewport, viewportData, viewportInfo) {
9042
- let presentations = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
9477
+ _setDisplaySets(viewport, viewportData, viewportInfo, presentations = {}) {
9043
9478
  if (viewport instanceof esm.StackViewport) {
9044
9479
  return this._setStackViewport(viewport, viewportData, viewportInfo, presentations);
9045
9480
  } else if (viewport instanceof esm.VolumeViewport || viewport instanceof esm.VolumeViewport3D) {
@@ -9131,14 +9566,14 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
9131
9566
  return [...this.viewportsById.values()].find(viewportInfo => viewportInfo.contains(displaySetInstanceUID, referencedImageId))?.viewportId ?? null;
9132
9567
  }
9133
9568
  }
9569
+ CornerstoneViewportService_class = CornerstoneViewportService;
9134
9570
  CornerstoneViewportService.REGISTRATION = {
9135
9571
  name: 'cornerstoneViewportService',
9136
9572
  altName: 'CornerstoneViewportService',
9137
- create: _ref3 => {
9138
- let {
9139
- servicesManager
9140
- } = _ref3;
9141
- return new CornerstoneViewportService(servicesManager);
9573
+ create: ({
9574
+ servicesManager
9575
+ }) => {
9576
+ return new CornerstoneViewportService_class(servicesManager);
9142
9577
  }
9143
9578
  };
9144
9579
  /* harmony default export */ const ViewportService_CornerstoneViewportService = (CornerstoneViewportService);
@@ -9187,8 +9622,7 @@ const getNonImageInstance = dataset => {
9187
9622
  const getImageInstanceId = imageInstance => {
9188
9623
  return getImageId(imageInstance);
9189
9624
  };
9190
- const fetchIt = function (url) {
9191
- let headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : src.DICOMWeb.getAuthorizationHeader();
9625
+ const fetchIt = (url, headers = src.DICOMWeb.getAuthorizationHeader()) => {
9192
9626
  return fetch(url, headers).then(response => response.arrayBuffer());
9193
9627
  };
9194
9628
  const cornerstoneRetriever = imageId => {
@@ -9196,9 +9630,7 @@ const cornerstoneRetriever = imageId => {
9196
9630
  return image && image.data && image.data.byteArray.buffer;
9197
9631
  });
9198
9632
  };
9199
- const wadorsRetriever = function (url, studyInstanceUID, seriesInstanceUID, sopInstanceUID) {
9200
- let headers = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : src.DICOMWeb.getAuthorizationHeader();
9201
- let errorInterceptor = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : src/* errorHandler */.Po.getHTTPErrorHandler();
9633
+ const wadorsRetriever = (url, studyInstanceUID, seriesInstanceUID, sopInstanceUID, headers = src.DICOMWeb.getAuthorizationHeader(), errorInterceptor = src/* errorHandler */.Po.getHTTPErrorHandler()) => {
9202
9634
  const config = {
9203
9635
  url,
9204
9636
  headers,
@@ -9395,11 +9827,10 @@ const cornerstoneExtension = {
9395
9827
  return init.call(this, props);
9396
9828
  },
9397
9829
  getHangingProtocolModule: src_getHangingProtocolModule,
9398
- getViewportModule(_ref) {
9399
- let {
9400
- servicesManager,
9401
- commandsManager
9402
- } = _ref;
9830
+ getViewportModule({
9831
+ servicesManager,
9832
+ commandsManager
9833
+ }) {
9403
9834
  const ExtendedOHIFCornerstoneViewport = props => {
9404
9835
  // const onNewImageHandler = jumpData => {
9405
9836
  // commandsManager.runCommand('jumpToImage', jumpData);
@@ -9420,10 +9851,9 @@ const cornerstoneExtension = {
9420
9851
  },
9421
9852
  getCommandsModule: src_commandsModule,
9422
9853
  getCustomizationModule: src_getCustomizationModule,
9423
- getUtilityModule(_ref2) {
9424
- let {
9425
- servicesManager
9426
- } = _ref2;
9854
+ getUtilityModule({
9855
+ servicesManager
9856
+ }) {
9427
9857
  return [{
9428
9858
  name: 'common',
9429
9859
  exports: {
@@ -9503,7 +9933,7 @@ const reset = () => {
9503
9933
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9504
9934
  /* harmony export */ Z: () => (/* binding */ getSOPInstanceAttributes)
9505
9935
  /* harmony export */ });
9506
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56959);
9936
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27968);
9507
9937
 
9508
9938
 
9509
9939
  /**
@@ -9520,7 +9950,6 @@ function getSOPInstanceAttributes(imageId) {
9520
9950
 
9521
9951
  // Todo: implement for volume viewports and use the referencedSeriesInstanceUID
9522
9952
  }
9523
-
9524
9953
  function _getUIDFromImageID(imageId) {
9525
9954
  const instance = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.metaData.get('instance', imageId);
9526
9955
  return {