@ohif/app 3.14.0-beta.89 → 3.14.0-beta.90

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 (59) hide show
  1. package/dist/{1153.bundle.efd8a415.js → 1153.bundle.3b9c4b75.js} +4046 -1908
  2. package/dist/{1645.bundle.a8ee81ea.js → 1645.bundle.c61d372a.js} +3 -3
  3. package/dist/{2478.bundle.e3049512.js → 2478.bundle.fc6ab30b.js} +2 -2
  4. package/dist/{2717.bundle.8f4ace99.js → 2717.bundle.d5f58443.js} +17 -26
  5. package/dist/{2991.bundle.ac7aa56c.js → 2991.bundle.f94892fb.js} +2 -2
  6. package/dist/{3004.bundle.9a8ed0cd.js → 3004.bundle.51919fdc.js} +4 -4
  7. package/dist/{3366.bundle.d2ab8b38.js → 3366.bundle.b225ae72.js} +34 -13
  8. package/dist/{3468.bundle.6a84fef1.js → 3468.bundle.f5dc5e44.js} +2 -2
  9. package/dist/{347.bundle.cfec20c2.js → 347.bundle.397bb252.js} +2 -2
  10. package/dist/{3771.bundle.6cb07c14.js → 3771.bundle.aba09bd7.js} +2 -2
  11. package/dist/{4449.bundle.3e4b07e6.js → 4449.bundle.aaa4ab92.js} +6 -6
  12. package/dist/{4606.bundle.c270beb3.js → 4606.bundle.9a3f474f.js} +33 -11
  13. package/dist/{4998.bundle.1112d4f8.js → 4998.bundle.3aedb48d.js} +66 -48
  14. package/dist/{5143.bundle.2ea0b15d.js → 5143.bundle.95aeb8c5.js} +10 -10
  15. package/dist/5154.bundle.2f460017.js +171 -0
  16. package/dist/{5320.bundle.335efd86.js → 5320.bundle.a4e386da.js} +1 -1
  17. package/dist/{5461.bundle.35119b0c.js → 5461.bundle.6ad37837.js} +1 -1
  18. package/dist/{5645.bundle.6703c7d2.js → 5645.bundle.b6b3edde.js} +1 -1
  19. package/dist/{5989.bundle.2999d206.js → 5989.bundle.2d80cbd0.js} +3 -3
  20. package/dist/{6212.bundle.62bb3701.js → 6212.bundle.e505e123.js} +2 -2
  21. package/dist/{9777.bundle.f01617e1.js → 6253.bundle.8a7c1171.js} +803 -340
  22. package/dist/{6507.bundle.1b793bf6.js → 6507.bundle.c8ac9bee.js} +4 -4
  23. package/dist/{6722.bundle.73421747.js → 6722.bundle.d09a8aad.js} +4 -4
  24. package/dist/{6847.bundle.5a087332.js → 6847.bundle.b2adb444.js} +2 -2
  25. package/dist/{6956.bundle.74258d90.js → 6956.bundle.c82fd790.js} +2 -2
  26. package/dist/{7526.bundle.aa30d7bf.js → 7526.bundle.0685dfeb.js} +62 -22
  27. package/dist/{7604.bundle.e703a54d.js → 7604.bundle.9eb317c8.js} +1 -1
  28. package/dist/{7694.bundle.8023fb8f.js → 7694.bundle.35b21d96.js} +2 -2
  29. package/dist/{6133.bundle.d4f7403f.js → 8029.bundle.40857fb6.js} +415 -2338
  30. package/dist/{8037.bundle.8b5f4114.js → 8037.bundle.d8f1add3.js} +4052 -1903
  31. package/dist/{9187.bundle.d5af8665.js → 9187.bundle.c384a9dd.js} +4 -4
  32. package/dist/{9481.bundle.6fe2a588.js → 9481.bundle.ccb81f53.js} +34 -13
  33. package/dist/{9517.bundle.951a1d06.js → 9517.bundle.1ae74db3.js} +2 -2
  34. package/dist/{9620.bundle.234737d0.js → 9620.bundle.c3d1589b.js} +39 -16
  35. package/dist/{9841.bundle.bcae6196.js → 9841.bundle.0f40f02b.js} +2 -2
  36. package/dist/{9948.bundle.b4ff610d.js → 9948.bundle.1172ebca.js} +2 -2
  37. package/dist/{app.bundle.822af85f.js → app.bundle.46f8d9cb.js} +778 -94
  38. package/dist/{compute.bundle.19cf1283.js → compute.bundle.deb7ad1f.js} +8 -8
  39. package/dist/customizations/index.html +37 -0
  40. package/dist/customizations/split/decimation.jsonc +69 -0
  41. package/dist/customizations/split/enableNewSplit.jsonc +39 -0
  42. package/dist/customizations/split/optional/byAcquisition.jsonc +31 -0
  43. package/dist/customizations/split/optional/derivedObjectVersions.jsonc +80 -0
  44. package/dist/customizations/split/optional/dwiByBValue.jsonc +63 -0
  45. package/dist/customizations/split/optional/multiEchoByEchoTime.jsonc +55 -0
  46. package/dist/customizations/split/optional/regularVolume.jsonc +54 -0
  47. package/dist/customizations/split/optional/singleImageSeriesStack.jsonc +44 -0
  48. package/dist/customizations/split/optional/usTimeClusters.jsonc +49 -0
  49. package/dist/customizations/split/optional/volumePositionOrder.jsonc +24 -0
  50. package/dist/customizations/split/regularVolume.jsonc +85 -0
  51. package/dist/customizations/split/scoutSeries.jsonc +64 -0
  52. package/dist/customizations/split/singleImagesBySize.jsonc +53 -0
  53. package/dist/customizations/split/usTimeClusters.jsonc +63 -0
  54. package/dist/index.html +1 -1
  55. package/dist/{interpolation.bundle.7b3850e6.js → interpolation.bundle.16504135.js} +8 -8
  56. package/dist/{polySeg.bundle.157e1e17.js → polySeg.bundle.7088c2eb.js} +8 -8
  57. package/dist/sw.js +1 -1
  58. package/package.json +6 -6
  59. package/dist/5154.bundle.e4a5adf0.js +0 -150
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[9777], {
2
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[6253], {
3
3
  66340(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
4
 
5
5
  // EXPORTS
@@ -169,7 +169,7 @@ __webpack_require__.d(__webpack_exports__, {
169
169
  70266(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
170
170
  /* import */ var react_compiler_runtime__rspack_import_0 = __webpack_require__(54005);
171
171
  /* import */ var react__rspack_import_1 = __webpack_require__(14041);
172
- /* import */ var _ohif_core_src__rspack_import_2 = __webpack_require__(24178);
172
+ /* import */ var _ohif_core_src__rspack_import_2 = __webpack_require__(34142);
173
173
  /* import */ var _useViewportDisplaySets__rspack_import_3 = __webpack_require__(7489);
174
174
  /* import */ var _utils_getLegacyViewportType__rspack_import_4 = __webpack_require__(28764);
175
175
 
@@ -361,7 +361,7 @@ __webpack_require__.d(__webpack_exports__, {
361
361
  /* import */ var react__rspack_import_1 = __webpack_require__(14041);
362
362
  /* import */ var lodash_debounce__rspack_import_2 = __webpack_require__(30072);
363
363
  /* import */ var lodash_debounce__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__rspack_import_2);
364
- /* import */ var _ohif_core__rspack_import_3 = __webpack_require__(24178);
364
+ /* import */ var _ohif_core__rspack_import_3 = __webpack_require__(34142);
365
365
  /* import */ var _ohif_i18n__rspack_import_4 = __webpack_require__(65778);
366
366
 
367
367
 
@@ -496,7 +496,7 @@ __webpack_require__.d(__webpack_exports__, {
496
496
  /* import */ var lodash_debounce__rspack_import_2 = __webpack_require__(30072);
497
497
  /* import */ var lodash_debounce__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__rspack_import_2);
498
498
  /* import */ var _ohif_core_src_utils__rspack_import_3 = __webpack_require__(59195);
499
- /* import */ var _ohif_core__rspack_import_4 = __webpack_require__(24178);
499
+ /* import */ var _ohif_core__rspack_import_4 = __webpack_require__(34142);
500
500
 
501
501
 
502
502
 
@@ -654,8 +654,8 @@ __webpack_require__.d(__webpack_exports__, {
654
654
  var compiler_runtime = __webpack_require__(54005);
655
655
  // EXTERNAL MODULE: ../../node_modules/react/index.js
656
656
  var react = __webpack_require__(14041);
657
- // EXTERNAL MODULE: ../core/src/index.ts + 74 modules
658
- var src = __webpack_require__(24178);
657
+ // EXTERNAL MODULE: ../core/src/index.ts + 76 modules
658
+ var src = __webpack_require__(34142);
659
659
  // EXTERNAL MODULE: ../ui-next/src/index.ts + 431 modules
660
660
  var ui_next_src = __webpack_require__(2727);
661
661
  // EXTERNAL MODULE: ../../extensions/cornerstone/src/utils/isDisplaySetOverlayable.ts
@@ -1173,7 +1173,7 @@ function _temp(item) {
1173
1173
  20311(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1174
1174
  /* import */ var react_compiler_runtime__rspack_import_0 = __webpack_require__(54005);
1175
1175
  /* import */ var react__rspack_import_1 = __webpack_require__(14041);
1176
- /* import */ var _ohif_core__rspack_import_2 = __webpack_require__(24178);
1176
+ /* import */ var _ohif_core__rspack_import_2 = __webpack_require__(34142);
1177
1177
  /* import */ var _useViewportDisplaySets__rspack_import_3 = __webpack_require__(7489);
1178
1178
  /* import */ var _cornerstonejs_core__rspack_import_4 = __webpack_require__(62721);
1179
1179
  /* import */ var _utils_getLegacyViewportType__rspack_import_5 = __webpack_require__(28764);
@@ -2153,7 +2153,7 @@ __webpack_require__.d(__webpack_exports__, {
2153
2153
  /* import */ var lodash_debounce__rspack_import_2 = __webpack_require__(30072);
2154
2154
  /* import */ var lodash_debounce__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__rspack_import_2);
2155
2155
  /* import */ var _ohif_core_src_utils__rspack_import_3 = __webpack_require__(59195);
2156
- /* import */ var _ohif_core__rspack_import_4 = __webpack_require__(24178);
2156
+ /* import */ var _ohif_core__rspack_import_4 = __webpack_require__(34142);
2157
2157
 
2158
2158
 
2159
2159
 
@@ -2404,8 +2404,8 @@ var react = __webpack_require__(14041);
2404
2404
  var esm = __webpack_require__(62721);
2405
2405
  // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/tools/dist/esm/index.js
2406
2406
  var dist_esm = __webpack_require__(17819);
2407
- // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/index.js + 29 modules
2408
- var metadata_dist_esm = __webpack_require__(86049);
2407
+ // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/index.js + 37 modules
2408
+ var metadata_dist_esm = __webpack_require__(16080);
2409
2409
  ;// CONCATENATED MODULE: ../../extensions/cornerstone/src/enums.ts
2410
2410
  const CORNERSTONE_3D_TOOLS_SOURCE_NAME = 'Cornerstone3DTools';
2411
2411
  const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';
@@ -2415,8 +2415,8 @@ const Enums = {
2415
2415
  };
2416
2416
  /* export default */ var enums = (Enums);
2417
2417
 
2418
- // EXTERNAL MODULE: ../core/src/index.ts + 74 modules
2419
- var src = __webpack_require__(24178);
2418
+ // EXTERNAL MODULE: ../core/src/index.ts + 76 modules
2419
+ var src = __webpack_require__(34142);
2420
2420
  // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/loaders/index.js
2421
2421
  var loaders = __webpack_require__(34270);
2422
2422
  // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/enums/RequestType.js
@@ -2459,8 +2459,8 @@ function destroy() {
2459
2459
  var ai_dist_esm = __webpack_require__(20623);
2460
2460
  // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/polymorphic-segmentation/dist/esm/index.js + 14 modules
2461
2461
  var polymorphic_segmentation_dist_esm = __webpack_require__(9662);
2462
- // EXTERNAL MODULE: ../../extensions/default/src/index.ts + 157 modules
2463
- var default_src = __webpack_require__(2898);
2462
+ // EXTERNAL MODULE: ../../extensions/default/src/index.ts + 162 modules
2463
+ var default_src = __webpack_require__(55422);
2464
2464
  // EXTERNAL MODULE: ../../extensions/cornerstone/src/state.ts
2465
2465
  var src_state = __webpack_require__(51898);
2466
2466
  ;// CONCATENATED MODULE: ../../extensions/cornerstone/src/utils/getViewportEnabledElement.ts
@@ -40578,12 +40578,15 @@ const { denaturalizeDataset } = dcmjs_es/* ["default"].data.DicomMetaDictionary
40578
40578
  const SOP_CLASS_UIDS = {
40579
40579
  VL_WHOLE_SLIDE_MICROSCOPY_IMAGE_STORAGE: '1.2.840.10008.5.1.4.1.1.77.1.6'
40580
40580
  };
40581
- const SOPClassHandlerId = '@ohif/extension-cornerstone.sopClassHandlerModule.DicomMicroscopySopClassHandler';
40582
- function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager) {
40583
- const dataSource = extensionManager.getActiveDataSource()[0]; // If the series has no instances, stop here
40584
- if (!instances || !instances.length) {
40585
- throw new Error('No instances were provided');
40586
- }
40581
+ const SOPClassHandlerId = '@ohif/extension-cornerstone.sopClassHandlerModule.DicomMicroscopySopClassHandler'; /**
40582
+ * Adds the whole slide fields to `displaySet`, from all of its instances (the
40583
+ * levels of the image pyramid), and registers the DICOMweb client of the
40584
+ * slide. Shared by the legacy builder and the split-rule path (the
40585
+ * `wholeSlide` handler).
40586
+ */
40587
+ function extendWholeSlideDisplaySet(displaySet, { extensionManager }) {
40588
+ const dataSource = extensionManager.getActiveDataSource()[0];
40589
+ let { instances } = displaySet;
40587
40590
  const instance = instances[0];
40588
40591
  let singleFrameInstance = instance;
40589
40592
  let currentFrames = +singleFrameInstance.NumberOfFrames || 1;
@@ -40609,12 +40612,11 @@ function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager)
40609
40612
  if (othersFrameOfReferenceUID.length > 1) {
40610
40613
  console.warn('Expected FrameOfReferenceUID of difference instances within a series to be the same, found multiple different values', othersFrameOfReferenceUID);
40611
40614
  }
40612
- const displaySet = {
40615
+ Object.assign(displaySet, {
40613
40616
  plugin: 'microscopy',
40614
40617
  Modality: 'SM',
40615
40618
  viewportType: esm.Enums.ViewportType.WHOLE_SLIDE,
40616
40619
  altImageText: 'Microscopy',
40617
- displaySetInstanceUID: getSopClassHandlerModule_utils.guid(),
40618
40620
  SOPInstanceUID,
40619
40621
  SeriesInstanceUID,
40620
40622
  StudyInstanceUID,
@@ -40630,12 +40632,11 @@ function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager)
40630
40632
  numImageFrames: 0,
40631
40633
  numInstances: 1,
40632
40634
  others: instances,
40633
- instances,
40634
40635
  othersFrameOfReferenceUID,
40635
40636
  imageIds: instances.map((instance)=>instance.imageId),
40636
40637
  getThumbnailSrc: dataSource.retrieve.getGetThumbnailSrc?.(singleFrameInstance, singleFrameInstance.imageId),
40637
40638
  label: SeriesDescription || `${i18n_src/* ["default"].t */.A.t('Series')} ${SeriesNumber} - ${i18n_src/* ["default"].t */.A.t('SM')}`
40638
- }; // The microscopy viewer directly accesses the metadata already loaded, and
40639
+ }); // The microscopy viewer directly accesses the metadata already loaded, and
40639
40640
  // uses the DICOMweb client library directly for loading, so it has to be
40640
40641
  // provided here.
40641
40642
  const dicomWebClient = dataSource.retrieve.getWadoDicomWebClient?.();
@@ -40652,6 +40653,18 @@ function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager)
40652
40653
  } else {
40653
40654
  // throw new Error('Unable to provide a DICOMWeb client library, microscopy will fail to view');
40654
40655
  }
40656
+ }
40657
+ function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager) {
40658
+ if (!instances || !instances.length) {
40659
+ throw new Error('No instances were provided');
40660
+ }
40661
+ const displaySet = {
40662
+ displaySetInstanceUID: getSopClassHandlerModule_utils.guid(),
40663
+ instances
40664
+ };
40665
+ extendWholeSlideDisplaySet(displaySet, {
40666
+ extensionManager
40667
+ });
40655
40668
  return [
40656
40669
  displaySet
40657
40670
  ];
@@ -40677,7 +40690,11 @@ function getDicomMicroscopySopClassHandler({ servicesManager, extensionManager }
40677
40690
  sopClassUids: [
40678
40691
  SOP_CLASS_UIDS.VL_WHOLE_SLIDE_MICROSCOPY_IMAGE_STORAGE
40679
40692
  ],
40680
- getDisplaySetsFromSeries
40693
+ getDisplaySetsFromSeries,
40694
+ handlerNames: [
40695
+ 'wholeSlide'
40696
+ ],
40697
+ extendDisplaySet: extendWholeSlideDisplaySet
40681
40698
  };
40682
40699
  } /**
40683
40700
  * DICOM Waveform SOP Class UIDs for ECG / cardiac electrophysiology.
@@ -40691,69 +40708,89 @@ const ECG_SOP_CLASS_UIDS = {
40691
40708
  CARDIAC_ELECTROPHYSIOLOGY_WAVEFORM_STORAGE: '1.2.840.10008.5.1.4.1.1.9.3.1'
40692
40709
  };
40693
40710
  const ecgSopClassUids = Object.values(ECG_SOP_CLASS_UIDS);
40694
- const DicomEcgSOPClassHandlerId = '@ohif/extension-cornerstone.sopClassHandlerModule.DicomEcgSopClassHandler';
40695
- function _getEcgDisplaySetsFromSeries(instances, servicesManager) {
40711
+ const DicomEcgSOPClassHandlerId = '@ohif/extension-cornerstone.sopClassHandlerModule.DicomEcgSopClassHandler'; /**
40712
+ * The ECG fields of a display set that shows `instance`, and the registration
40713
+ * of its ECG metadata. Shared by the legacy builder and
40714
+ * {@link extendEcgDisplaySet}.
40715
+ */
40716
+ function getEcgFields(instance, servicesManager) {
40696
40717
  const { userAuthenticationService } = servicesManager.services;
40697
- return instances.map((instance)=>{
40698
- const { Modality, SOPInstanceUID } = instance;
40699
- const { SeriesDescription, SeriesNumber, SeriesDate } = instance;
40700
- const { SeriesInstanceUID, StudyInstanceUID, SOPClassUID } = instance;
40701
- const imageId = instance.imageId; // Register ECG metadata in the OHIF metadata provider so that
40702
- // Cornerstone's ECGViewport can retrieve it via metaData.get('ecgModule', imageId).
40703
- if (imageId) {
40704
- const ecgModule = buildEcgModule(instance, userAuthenticationService);
40705
- if (ecgModule) {
40718
+ const { Modality, SOPInstanceUID } = instance;
40719
+ const { SeriesDescription, SeriesNumber, SeriesDate } = instance;
40720
+ const { SOPClassUID } = instance;
40721
+ const imageId = instance.imageId; // Register ECG metadata in the OHIF metadata provider so that
40722
+ // Cornerstone's ECGViewport can retrieve it via metaData.get('ecgModule', imageId).
40723
+ if (imageId) {
40724
+ const ecgModule = buildEcgModule(instance, userAuthenticationService);
40725
+ if (ecgModule) {
40726
+ esm.utilities.genericMetadataProvider.addRaw(imageId, {
40727
+ type: MetadataModules.ECG,
40728
+ metadata: ecgModule
40729
+ }); // The time and mV region, so measurement tools report physical units
40730
+ const calibration = metadata_dist_esm/* .utilities.buildEcgCalibrationFromInstance */.BF.Ts(instance);
40731
+ if (calibration) {
40706
40732
  esm.utilities.genericMetadataProvider.addRaw(imageId, {
40707
- type: MetadataModules.ECG,
40708
- metadata: ecgModule
40709
- }); // The time and mV region, so measurement tools report physical units
40710
- const calibration = metadata_dist_esm/* .utilities.buildEcgCalibrationFromInstance */.BF.Ts(instance);
40711
- if (calibration) {
40712
- esm.utilities.genericMetadataProvider.addRaw(imageId, {
40713
- type: MetadataModules.CALIBRATION,
40714
- metadata: calibration
40715
- });
40716
- }
40733
+ type: MetadataModules.CALIBRATION,
40734
+ metadata: calibration
40735
+ });
40717
40736
  }
40718
40737
  }
40738
+ }
40739
+ return {
40740
+ Modality,
40741
+ SeriesDescription,
40742
+ SeriesNumber,
40743
+ SeriesDate,
40744
+ SOPInstanceUID,
40745
+ SOPClassHandlerId: DicomEcgSOPClassHandlerId,
40746
+ SOPClassUID,
40747
+ referencedImages: null,
40748
+ measurements: null,
40749
+ viewportType: esm.Enums.ViewportType.ECG,
40750
+ instance,
40751
+ thumbnailSrc: null,
40752
+ isDerivedDisplaySet: false,
40753
+ isLoaded: false,
40754
+ sopClassUids: ecgSopClassUids,
40755
+ numImageFrames: 0,
40756
+ numInstances: 1,
40757
+ imageIds: imageId ? [
40758
+ imageId
40759
+ ] : [],
40760
+ supportsWindowLevel: false,
40761
+ label: SeriesDescription || 'ECG'
40762
+ };
40763
+ }
40764
+ function _getEcgDisplaySetsFromSeries(instances, servicesManager) {
40765
+ return instances.map((instance)=>{
40766
+ const { SeriesInstanceUID, StudyInstanceUID } = instance;
40719
40767
  return {
40720
- Modality,
40768
+ ...getEcgFields(instance, servicesManager),
40721
40769
  displaySetInstanceUID: getSopClassHandlerModule_utils.guid(),
40722
- SeriesDescription,
40723
- SeriesNumber,
40724
- SeriesDate,
40725
- SOPInstanceUID,
40726
40770
  SeriesInstanceUID,
40727
40771
  StudyInstanceUID,
40728
- SOPClassHandlerId: DicomEcgSOPClassHandlerId,
40729
- SOPClassUID,
40730
- referencedImages: null,
40731
- measurements: null,
40732
- viewportType: esm.Enums.ViewportType.ECG,
40733
40772
  instances: [
40734
40773
  instance
40735
- ],
40736
- instance,
40737
- thumbnailSrc: null,
40738
- isDerivedDisplaySet: false,
40739
- isLoaded: false,
40740
- sopClassUids: ecgSopClassUids,
40741
- numImageFrames: 0,
40742
- numInstances: 1,
40743
- imageIds: imageId ? [
40744
- imageId
40745
- ] : [],
40746
- supportsWindowLevel: false,
40747
- label: SeriesDescription || 'ECG'
40774
+ ]
40748
40775
  };
40749
40776
  });
40777
+ } /**
40778
+ * Adds the ECG fields to a display set that a split rule with the `ecg`
40779
+ * handler made. The display set shows its first instance.
40780
+ */
40781
+ function extendEcgDisplaySet(displaySet, { servicesManager }) {
40782
+ Object.assign(displaySet, getEcgFields(displaySet.instances[0], servicesManager));
40750
40783
  }
40751
40784
  function getDicomEcgSopClassHandler({ servicesManager }) {
40752
40785
  const getDisplaySetsFromSeries = (instances)=>_getEcgDisplaySetsFromSeries(instances, servicesManager);
40753
40786
  return {
40754
40787
  name: 'DicomEcgSopClassHandler',
40755
40788
  sopClassUids: ecgSopClassUids,
40756
- getDisplaySetsFromSeries
40789
+ getDisplaySetsFromSeries,
40790
+ handlerNames: [
40791
+ 'ecg'
40792
+ ],
40793
+ extendDisplaySet: extendEcgDisplaySet
40757
40794
  };
40758
40795
  }
40759
40796
  function getSopClassHandlerModule(params) {
@@ -46027,7 +46064,7 @@ __webpack_require__.d(__webpack_exports__, {
46027
46064
  /* import */ var react_compiler_runtime__rspack_import_1 = __webpack_require__(54005);
46028
46065
  /* import */ var react__rspack_import_2 = __webpack_require__(14041);
46029
46066
  /* import */ var _ohif_ui_next__rspack_import_3 = __webpack_require__(2727);
46030
- /* import */ var _ohif_core__rspack_import_4 = __webpack_require__(24178);
46067
+ /* import */ var _ohif_core__rspack_import_4 = __webpack_require__(34142);
46031
46068
 
46032
46069
 
46033
46070
 
@@ -46205,8 +46242,8 @@ var jsx_runtime = __webpack_require__(31085);
46205
46242
  var react = __webpack_require__(14041);
46206
46243
  // EXTERNAL MODULE: ../ui-next/src/index.ts + 431 modules
46207
46244
  var src = __webpack_require__(2727);
46208
- // EXTERNAL MODULE: ../core/src/index.ts + 74 modules
46209
- var core_src = __webpack_require__(24178);
46245
+ // EXTERNAL MODULE: ../core/src/index.ts + 76 modules
46246
+ var core_src = __webpack_require__(34142);
46210
46247
  // EXTERNAL MODULE: ../../node_modules/react-router-dom/dist/index.js
46211
46248
  var dist = __webpack_require__(73657);
46212
46249
  // EXTERNAL MODULE: ../../extensions/default/src/Panels/StudyBrowser/PanelStudyBrowserHeader.tsx
@@ -46990,7 +47027,7 @@ __webpack_require__.d(__webpack_exports__, {
46990
47027
  /* import */ var react_jsx_runtime__rspack_import_0 = __webpack_require__(31085);
46991
47028
  /* import */ var react_compiler_runtime__rspack_import_1 = __webpack_require__(54005);
46992
47029
  /* import */ var react__rspack_import_2 = __webpack_require__(14041);
46993
- /* import */ var _ohif_core__rspack_import_3 = __webpack_require__(24178);
47030
+ /* import */ var _ohif_core__rspack_import_3 = __webpack_require__(34142);
46994
47031
 
46995
47032
 
46996
47033
 
@@ -47082,7 +47119,7 @@ __webpack_require__.d(__webpack_exports__, {
47082
47119
 
47083
47120
 
47084
47121
  },
47085
- 2898(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
47122
+ 55422(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
47086
47123
 
47087
47124
  // EXPORTS
47088
47125
  __webpack_require__.d(__webpack_exports__, {
@@ -47116,8 +47153,8 @@ __webpack_require__.d(utils_namespaceObject, {
47116
47153
 
47117
47154
  // EXTERNAL MODULE: ../../node_modules/dicomweb-client/build/dicomweb-client.es.js
47118
47155
  var dicomweb_client_es = __webpack_require__(79159);
47119
- // EXTERNAL MODULE: ../core/src/index.ts + 74 modules
47120
- var src = __webpack_require__(24178);
47156
+ // EXTERNAL MODULE: ../core/src/index.ts + 76 modules
47157
+ var src = __webpack_require__(34142);
47121
47158
  // EXTERNAL MODULE: ../core/src/utils/sortStudy.ts
47122
47159
  var sortStudy = __webpack_require__(25361);
47123
47160
  ;// CONCATENATED MODULE: ../../extensions/default/src/DicomWebDataSource/qido.js
@@ -51745,8 +51782,65 @@ function getPanelModule({ commandsManager, extensionManager, servicesManager })
51745
51782
  }
51746
51783
  /* export default */ var src_getPanelModule = (getPanelModule);
51747
51784
 
51748
- // EXTERNAL MODULE: ../i18n/src/index.js + 287 modules
51749
- var i18n_src = __webpack_require__(65778);
51785
+ // EXTERNAL MODULE: ../core/src/classes/ImageSet.ts
51786
+ var ImageSet = __webpack_require__(88486);
51787
+ ;// CONCATENATED MODULE: ../../extensions/default/src/getDisplaySetsFromUnsupportedSeries.js
51788
+
51789
+ /** The message that names why the instances are not supported. */
51790
+ function getUnsupportedMessages(instances) {
51791
+ const messages = new src/* .DisplaySetMessageList */.WZ();
51792
+ const instance = instances[0];
51793
+ if (!instances.length) {
51794
+ messages.addMessage(src/* .DisplaySetMessage.CODES.NO_VALID_INSTANCES */.Ob.CODES.NO_VALID_INSTANCES);
51795
+ } else {
51796
+ const sopClassUid = instance.SOPClassUID;
51797
+ if (sopClassUid) {
51798
+ messages.addMessage(src/* .DisplaySetMessage.CODES.UNSUPPORTED_SOP_CLASS_UID */.Ob.CODES.UNSUPPORTED_SOP_CLASS_UID, {
51799
+ sopClassUid
51800
+ });
51801
+ } else {
51802
+ messages.addMessage(src/* .DisplaySetMessage.CODES.MISSING_SOP_CLASS_UID */.Ob.CODES.MISSING_SOP_CLASS_UID);
51803
+ }
51804
+ }
51805
+ return messages;
51806
+ } /** The fields of an unsupported display set, other than its identity. */
51807
+ const getUnsupportedFields = (instances)=>({
51808
+ unsupported: true,
51809
+ SOPClassHandlerId: 'unsupported',
51810
+ isReconstructable: false,
51811
+ messages: getUnsupportedMessages(instances)
51812
+ }); /**
51813
+ * Adds the unsupported fields to a display set that a split rule with the
51814
+ * `unsupported` handler made, or that names a handler the mode does not have.
51815
+ */
51816
+ function extendUnsupportedDisplaySet(displaySet) {
51817
+ Object.assign(displaySet, getUnsupportedFields(displaySet.instances));
51818
+ } /**
51819
+ * Default handler for a instance list with an unsupported sopClassUID
51820
+ */
51821
+ function getDisplaySetsFromUnsupportedSeries(instances) {
51822
+ const imageSet = new ImageSet/* ["default"] */.A(instances);
51823
+ const instance = instances[0];
51824
+ imageSet.setAttributes({
51825
+ displaySetInstanceUID: imageSet.uid,
51826
+ SeriesDate: instance.SeriesDate,
51827
+ SeriesTime: instance.SeriesTime,
51828
+ SeriesInstanceUID: instance.SeriesInstanceUID,
51829
+ StudyInstanceUID: instance.StudyInstanceUID,
51830
+ SeriesNumber: instance.SeriesNumber || 0,
51831
+ FrameRate: instance.FrameTime,
51832
+ SOPClassUID: instance.SOPClassUID,
51833
+ SeriesDescription: instance.SeriesDescription || '',
51834
+ Modality: instance.Modality,
51835
+ instances,
51836
+ instance: instances[instances.length - 1],
51837
+ ...getUnsupportedFields(instances)
51838
+ });
51839
+ return [
51840
+ imageSet
51841
+ ];
51842
+ }
51843
+
51750
51844
  ;// CONCATENATED MODULE: ../../extensions/default/package.json
51751
51845
  var package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/extension-default"}')
51752
51846
  ;// CONCATENATED MODULE: ../../extensions/default/src/id.js
@@ -51754,6 +51848,113 @@ var package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/extension-de
51754
51848
  const id_id = package_namespaceObject.UU;
51755
51849
 
51756
51850
 
51851
+ ;// CONCATENATED MODULE: ../../extensions/default/src/SOPClassHandlers/chartSOPClassHandler.ts
51852
+
51853
+
51854
+ const SOPClassHandlerName = 'chart';
51855
+ const CHART_MODALITY = 'CHT'; /** The private SOP class UID of chart data. */
51856
+ const ChartDataSOPClassUid = '1.9.451.13215.7.3.2.7.6.1';
51857
+ const chartSOPClassHandler_sopClassUids = [
51858
+ ChartDataSOPClassUid
51859
+ ]; /**
51860
+ * The chart fields of a display set that shows `instance`. Shared by the
51861
+ * legacy builder and {@link extendChartDisplaySet}.
51862
+ */
51863
+ const getChartFields = (instance, sopClassUids)=>{
51864
+ const { SOPInstanceUID, SeriesDescription, SeriesNumber, SOPClassUID } = instance; // The date/time of a display set is the date/time of the instance it shows,
51865
+ // chosen from all the attributes that instance carries.
51866
+ const { SeriesDate, SeriesTime } = src/* .utils.getLatestInstanceDateTime */.Wp.getLatestInstanceDateTime(instance);
51867
+ return {
51868
+ Modality: CHART_MODALITY,
51869
+ loading: false,
51870
+ isReconstructable: false,
51871
+ SeriesDescription,
51872
+ SeriesNumber,
51873
+ SeriesDate,
51874
+ SeriesTime,
51875
+ SOPInstanceUID,
51876
+ SOPClassHandlerId: `${id_id}.sopClassHandlerModule.${SOPClassHandlerName}`,
51877
+ SOPClassUID,
51878
+ isDerivedDisplaySet: true,
51879
+ isLoaded: true,
51880
+ sopClassUids,
51881
+ instance
51882
+ };
51883
+ };
51884
+ const makeChartDataDisplaySet = (instance, sopClassUids)=>{
51885
+ const { StudyInstanceUID, SeriesInstanceUID } = instance;
51886
+ return {
51887
+ ...getChartFields(instance, sopClassUids),
51888
+ displaySetInstanceUID: src/* .utils.guid */.Wp.guid(),
51889
+ SeriesInstanceUID,
51890
+ StudyInstanceUID,
51891
+ instances: [
51892
+ instance
51893
+ ],
51894
+ /**
51895
+ * Adds instances to the chart displaySet, rather than creating a new one
51896
+ * when user moves to a different workflow step and gets back to a step that
51897
+ * recreates the chart
51898
+ */ addInstances: function(instances, _displaySetService) {
51899
+ this.instances.push(...instances);
51900
+ this.instance = this.instances[this.instances.length - 1]; // The date/time shown and sorted by is that of the instance the display
51901
+ // set shows, so it moves with that instance rather than staying on the
51902
+ // one the chart was first created with.
51903
+ const { SeriesDate, SeriesTime } = src/* .utils.getLatestInstanceDateTime */.Wp.getLatestInstanceDateTime(this.instance);
51904
+ this.SeriesDate = SeriesDate;
51905
+ this.SeriesTime = SeriesTime;
51906
+ return this;
51907
+ }
51908
+ };
51909
+ }; /**
51910
+ * Adds the chart fields to a display set that a split rule with the `chart`
51911
+ * handler made. The display set holds a revision chain, and shows the instance
51912
+ * `activeSopInstanceUid` names, else the last one, as `addInstances` does for
51913
+ * the legacy display set. An update chooses again.
51914
+ */
51915
+ function extendChartDisplaySet(displaySet) {
51916
+ const { instances, activeSopInstanceUid } = displaySet;
51917
+ const active = instances.find((instance)=>instance.SOPInstanceUID === activeSopInstanceUid) ?? instances[instances.length - 1];
51918
+ Object.assign(displaySet, getChartFields(active, getSopClassUids(instances)));
51919
+ }
51920
+ function getSopClassUids(instances) {
51921
+ const uniqueSopClassUidsInSeries = new Set();
51922
+ instances.forEach((instance)=>{
51923
+ uniqueSopClassUidsInSeries.add(instance.SOPClassUID);
51924
+ });
51925
+ const sopClassUids = Array.from(uniqueSopClassUidsInSeries);
51926
+ return sopClassUids;
51927
+ }
51928
+ function _getDisplaySetsFromSeries(instances) {
51929
+ if (!instances || !instances.length) {
51930
+ throw new Error('No instances were provided');
51931
+ }
51932
+ const sopClassUids = getSopClassUids(instances);
51933
+ const displaySets = instances.map((instance)=>{
51934
+ if (instance.Modality === CHART_MODALITY) {
51935
+ return makeChartDataDisplaySet(instance, sopClassUids);
51936
+ }
51937
+ throw new Error('Unsupported modality');
51938
+ });
51939
+ return displaySets;
51940
+ }
51941
+ const chartHandler = {
51942
+ name: SOPClassHandlerName,
51943
+ sopClassUids: chartSOPClassHandler_sopClassUids,
51944
+ handlerNames: [
51945
+ 'chart'
51946
+ ],
51947
+ extendDisplaySet: extendChartDisplaySet,
51948
+ getDisplaySetsFromSeries: (instances)=>{
51949
+ return _getDisplaySetsFromSeries(instances);
51950
+ }
51951
+ };
51952
+
51953
+
51954
+ // EXTERNAL MODULE: ../i18n/src/index.js + 287 modules
51955
+ var i18n_src = __webpack_require__(65778);
51956
+ // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/index.js
51957
+ var dist_esm = __webpack_require__(62721);
51757
51958
  // EXTERNAL MODULE: ../core/src/utils/sortInstancesByPosition.ts
51758
51959
  var sortInstancesByPosition = __webpack_require__(95806);
51759
51960
  // EXTERNAL MODULE: ../core/src/utils/isDisplaySetReconstructable.js
@@ -51990,165 +52191,53 @@ function getDisplaySetMessages(instances, isReconstructable, isDynamicVolume) {
51990
52191
  return messages;
51991
52192
  }
51992
52193
 
51993
- // EXTERNAL MODULE: ../core/src/classes/ImageSet.ts
51994
- var ImageSet = __webpack_require__(88486);
51995
- ;// CONCATENATED MODULE: ../../extensions/default/src/getDisplaySetsFromUnsupportedSeries.js
51996
-
51997
- /**
51998
- * Default handler for a instance list with an unsupported sopClassUID
51999
- */
52000
- function getDisplaySetsFromUnsupportedSeries(instances) {
52001
- const imageSet = new ImageSet/* ["default"] */.A(instances);
52002
- const messages = new src/* .DisplaySetMessageList */.WZ();
52003
- const instance = instances[0];
52004
- if (!instances.length) {
52005
- messages.addMessage(src/* .DisplaySetMessage.CODES.NO_VALID_INSTANCES */.Ob.CODES.NO_VALID_INSTANCES);
52006
- } else {
52007
- const sopClassUid = instance.SOPClassUID;
52008
- if (sopClassUid) {
52009
- messages.addMessage(src/* .DisplaySetMessage.CODES.UNSUPPORTED_SOP_CLASS_UID */.Ob.CODES.UNSUPPORTED_SOP_CLASS_UID, {
52010
- sopClassUid
52011
- });
52012
- } else {
52013
- messages.addMessage(src/* .DisplaySetMessage.CODES.MISSING_SOP_CLASS_UID */.Ob.CODES.MISSING_SOP_CLASS_UID);
52014
- }
52015
- }
52016
- imageSet.setAttributes({
52017
- displaySetInstanceUID: imageSet.uid,
52018
- SeriesDate: instance.SeriesDate,
52019
- SeriesTime: instance.SeriesTime,
52020
- SeriesInstanceUID: instance.SeriesInstanceUID,
52021
- StudyInstanceUID: instance.StudyInstanceUID,
52022
- SeriesNumber: instance.SeriesNumber || 0,
52023
- FrameRate: instance.FrameTime,
52024
- SOPClassUID: instance.SOPClassUID,
52025
- SeriesDescription: instance.SeriesDescription || '',
52026
- Modality: instance.Modality,
52027
- instances,
52028
- instance: instances[instance.length - 1],
52029
- unsupported: true,
52030
- SOPClassHandlerId: 'unsupported',
52031
- isReconstructable: false,
52032
- messages
52033
- });
52034
- return [
52035
- imageSet
52036
- ];
52037
- }
52038
-
52039
- ;// CONCATENATED MODULE: ../../extensions/default/src/SOPClassHandlers/chartSOPClassHandler.ts
52040
-
52041
-
52042
- const SOPClassHandlerName = 'chart';
52043
- const CHART_MODALITY = 'CHT'; // Private SOPClassUid for chart data
52044
- const ChartDataSOPClassUid = '1.9.451.13215.7.3.2.7.6.1';
52045
- const chartSOPClassHandler_sopClassUids = [
52046
- ChartDataSOPClassUid
52047
- ];
52048
- const makeChartDataDisplaySet = (instance, sopClassUids)=>{
52049
- const { StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID, SeriesDescription, SeriesNumber, SOPClassUID } = instance; // The date/time of a display set is the date/time of the instance it shows,
52050
- // chosen from all the attributes that instance carries.
52051
- const { SeriesDate, SeriesTime } = src/* .utils.getLatestInstanceDateTime */.Wp.getLatestInstanceDateTime(instance);
52052
- return {
52053
- Modality: CHART_MODALITY,
52054
- loading: false,
52055
- isReconstructable: false,
52056
- displaySetInstanceUID: src/* .utils.guid */.Wp.guid(),
52057
- SeriesDescription,
52058
- SeriesNumber,
52059
- SeriesDate,
52060
- SeriesTime,
52061
- SOPInstanceUID,
52062
- SeriesInstanceUID,
52063
- StudyInstanceUID,
52064
- SOPClassHandlerId: `${id_id}.sopClassHandlerModule.${SOPClassHandlerName}`,
52065
- SOPClassUID,
52066
- isDerivedDisplaySet: true,
52067
- isLoaded: true,
52068
- sopClassUids,
52069
- instance,
52070
- instances: [
52071
- instance
52072
- ],
52073
- /**
52074
- * Adds instances to the chart displaySet, rather than creating a new one
52075
- * when user moves to a different workflow step and gets back to a step that
52076
- * recreates the chart
52077
- */ addInstances: function(instances, _displaySetService) {
52078
- this.instances.push(...instances);
52079
- this.instance = this.instances[this.instances.length - 1]; // The date/time shown and sorted by is that of the instance the display
52080
- // set shows, so it moves with that instance rather than staying on the
52081
- // one the chart was first created with.
52082
- const { SeriesDate, SeriesTime } = src/* .utils.getLatestInstanceDateTime */.Wp.getLatestInstanceDateTime(this.instance);
52083
- this.SeriesDate = SeriesDate;
52084
- this.SeriesTime = SeriesTime;
52085
- return this;
52086
- }
52087
- };
52088
- };
52089
- function getSopClassUids(instances) {
52090
- const uniqueSopClassUidsInSeries = new Set();
52091
- instances.forEach((instance)=>{
52092
- uniqueSopClassUidsInSeries.add(instance.SOPClassUID);
52093
- });
52094
- const sopClassUids = Array.from(uniqueSopClassUidsInSeries);
52095
- return sopClassUids;
52096
- }
52097
- function _getDisplaySetsFromSeries(instances) {
52098
- if (!instances || !instances.length) {
52099
- throw new Error('No instances were provided');
52100
- }
52101
- const sopClassUids = getSopClassUids(instances);
52102
- const displaySets = instances.map((instance)=>{
52103
- if (instance.Modality === CHART_MODALITY) {
52104
- return makeChartDataDisplaySet(instance, sopClassUids);
52105
- }
52106
- throw new Error('Unsupported modality');
52107
- });
52108
- return displaySets;
52109
- }
52110
- const chartHandler = {
52111
- name: SOPClassHandlerName,
52112
- sopClassUids: chartSOPClassHandler_sopClassUids,
52113
- getDisplaySetsFromSeries: (instances)=>{
52114
- return _getDisplaySetsFromSeries(instances);
52115
- }
52116
- };
52117
-
52118
-
52119
- // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/index.js
52120
- var dist_esm = __webpack_require__(62721);
52121
- ;// CONCATENATED MODULE: ../../extensions/default/src/getSopClassHandlerModule.js
52122
-
52123
-
52194
+ ;// CONCATENATED MODULE: ../../extensions/default/src/displaySetSplitting/makeImageSetDisplaySet.ts
52124
52195
 
52125
52196
 
52126
52197
 
52127
52198
 
52128
52199
 
52129
- const { isImage, sortStudyInstances, sopClassDictionary, isDisplaySetReconstructable: getSopClassHandlerModule_isDisplaySetReconstructable } = src/* .utils */.Wp;
52130
- const { ImageSet: getSopClassHandlerModule_ImageSet } = src/* .classes */.Ly;
52200
+ const { sortStudyInstances, isDisplaySetReconstructable: makeImageSetDisplaySet_isDisplaySetReconstructable } = src/* .utils */.Wp;
52201
+ const { ImageSet: makeImageSetDisplaySet_ImageSet } = src/* .classes */.Ly;
52131
52202
  const DEFAULT_VOLUME_LOADER_SCHEME = 'cornerstoneStreamingImageVolume';
52132
- const DYNAMIC_VOLUME_LOADER_SCHEME = 'cornerstoneStreamingDynamicImageVolume';
52133
- const sopClassHandlerName = 'stack';
52134
- let appContext = {};
52135
- const getDynamicVolumeInfo = (imageIds)=>{
52136
- const { extensionManager } = appContext;
52203
+ const DYNAMIC_VOLUME_LOADER_SCHEME = 'cornerstoneStreamingDynamicImageVolume'; /**
52204
+ * The registered module name of the stack SOP class handler, and the resulting
52205
+ * fully-qualified `SOPClassHandlerId`.
52206
+ *
52207
+ * Both live here rather than in `getSopClassHandlerModule` because that module
52208
+ * imports this one (the reverse would be a cycle). The handler imports the
52209
+ * name back for its registration so the id and the registration can never
52210
+ * disagree about what the handler is called.
52211
+ */
52212
+ const STACK_SOP_CLASS_HANDLER_NAME = 'stack';
52213
+ const STACK_SOP_CLASS_HANDLER_ID = `${id_id}.sopClassHandlerModule.${STACK_SOP_CLASS_HANDLER_NAME}`; /**
52214
+ * The application context required to build an ImageSet display set. This is
52215
+ * the same shape as the `appContext` handed to `getSopClassHandlerModule`.
52216
+ */
52217
+ const isMultiFrame = (instance)=>{
52218
+ return instance.NumberOfFrames > 1;
52219
+ };
52220
+ function getDynamicVolumeInfo(imageIds, context) {
52221
+ const { extensionManager } = context;
52137
52222
  if (!extensionManager) {
52138
52223
  throw new Error('extensionManager is not available');
52139
52224
  }
52140
52225
  const volumeLoaderUtility = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.volumeLoader');
52226
+ if (!volumeLoaderUtility?.exports) {
52227
+ throw new Error('The @ohif/extension-cornerstone volumeLoader utility module is not available');
52228
+ }
52141
52229
  const { getDynamicVolumeInfo: csGetDynamicVolumeInfo } = volumeLoaderUtility.exports;
52142
52230
  return csGetDynamicVolumeInfo(imageIds);
52143
- };
52144
- const isMultiFrame = (instance)=>{
52145
- return instance.NumberOfFrames > 1;
52146
- };
52147
- function getDisplaySetInfo(instances, imageIds) {
52148
- const dynamicVolumeInfo = getDynamicVolumeInfo(imageIds);
52231
+ } /**
52232
+ * Computes reconstructability / dynamic-volume information for a set of
52233
+ * instances. Callers go through {@link applyImageListAttributes} so creation
52234
+ * and incremental updates share one computation.
52235
+ */
52236
+ function getDisplaySetInfo(instances, imageIds, context) {
52237
+ const dynamicVolumeInfo = getDynamicVolumeInfo(imageIds, context);
52149
52238
  const { isDynamicVolume, timePoints } = dynamicVolumeInfo;
52150
52239
  let displaySetInfo;
52151
- const { appConfig } = appContext;
52240
+ const { appConfig } = context;
52152
52241
  if (isDynamicVolume) {
52153
52242
  const timePoint = timePoints[0];
52154
52243
  const instancesMap = new Map();
@@ -52166,59 +52255,122 @@ function getDisplaySetInfo(instances, imageIds) {
52166
52255
  instances.forEach((instance)=>instancesMap.set(instance.imageId, instance));
52167
52256
  firstTimePointInstances = timePoint.map((imageId)=>instancesMap.get(imageId)).filter(Boolean);
52168
52257
  }
52169
- displaySetInfo = getSopClassHandlerModule_isDisplaySetReconstructable(firstTimePointInstances, appConfig);
52258
+ displaySetInfo = makeImageSetDisplaySet_isDisplaySetReconstructable(firstTimePointInstances, appConfig);
52170
52259
  } else {
52171
- displaySetInfo = getSopClassHandlerModule_isDisplaySetReconstructable(instances, appConfig);
52260
+ displaySetInfo = makeImageSetDisplaySet_isDisplaySetReconstructable(instances, appConfig);
52172
52261
  }
52173
52262
  return {
52174
52263
  isDynamicVolume,
52175
52264
  ...displaySetInfo,
52176
52265
  dynamicVolumeInfo
52177
52266
  };
52178
- }
52179
- const makeDisplaySet = (instances, index)=>{
52267
+ } /**
52268
+ * The generic part of an OHIF display set: an ImageSet over the instances,
52269
+ * with the series identity (`displaySetInstanceUID`, the series UIDs, date,
52270
+ * number, description, `Modality`, `label`). Every display set of a split
52271
+ * rule starts here, whatever its handler.
52272
+ */
52273
+ function makeSeriesDisplaySet(instances) {
52180
52274
  sortStudyInstances(instances);
52181
52275
  const instance = instances[0];
52182
- const imageSet = new getSopClassHandlerModule_ImageSet(instances);
52183
- const { extensionManager } = appContext;
52184
- const dataSource = extensionManager.getActiveDataSource()[0]; // Data sources can use the display set's UIDs when they generate image IDs.
52185
- // Set them before asking the data source, rather than waiting for the rest of
52186
- // the display-set attributes which depend on the generated image IDs.
52276
+ const imageSet = new makeImageSetDisplaySet_ImageSet(instances); // Series-level identity: fixed for the lifetime of the display set, because
52277
+ // adding more instances of the SAME series cannot change any of it.
52187
52278
  imageSet.setAttributes({
52188
- StudyInstanceUID: instance.StudyInstanceUID,
52189
- SeriesInstanceUID: instance.SeriesInstanceUID
52190
- });
52191
- const imageIds = dataSource.getImageIdsForDisplaySet(imageSet);
52192
- const { isDynamicVolume, value: isReconstructable, averageSpacingBetweenFrames, dynamicVolumeInfo } = getDisplaySetInfo(instances, imageIds);
52193
- const volumeLoaderSchema = isDynamicVolume ? DYNAMIC_VOLUME_LOADER_SCHEME : DEFAULT_VOLUME_LOADER_SCHEME; // set appropriate attributes to image set...
52194
- const messages = getDisplaySetMessages(instances, isReconstructable, isDynamicVolume);
52195
- imageSet.setAttributes({
52196
- volumeLoaderSchema,
52197
52279
  displaySetInstanceUID: imageSet.uid,
52198
52280
  SeriesDate: instance.SeriesDate,
52199
52281
  SeriesTime: instance.SeriesTime,
52200
52282
  SeriesInstanceUID: instance.SeriesInstanceUID,
52201
52283
  StudyInstanceUID: instance.StudyInstanceUID,
52202
52284
  SeriesNumber: instance.SeriesNumber || 0,
52203
- FrameRate: instance.FrameTime,
52204
52285
  SOPClassUID: instance.SOPClassUID,
52205
52286
  SeriesDescription: instance.SeriesDescription || '',
52206
52287
  Modality: instance.Modality,
52207
- isMultiFrame: isMultiFrame(instance),
52288
+ label: instance.SeriesDescription || `${i18n_src/* ["default"].t */.A.t('Series')} ${instance.SeriesNumber} - ${i18n_src/* ["default"].t */.A.t(instance.Modality)}`
52289
+ });
52290
+ return imageSet;
52291
+ } /**
52292
+ * The image part of a display set: the stack SOP class handler id, the
52293
+ * image-list attributes (`isReconstructable`, `messages`, ...), the thumbnail
52294
+ * and, unless `skipSort`, OHIF's default instance order.
52295
+ */
52296
+ function applyImageAttributes(imageSet, context, options = {}) {
52297
+ const instance = imageSet.images[0];
52298
+ imageSet.setAttributes({
52299
+ FrameRate: instance.FrameTime,
52300
+ SOPClassHandlerId: STACK_SOP_CLASS_HANDLER_ID,
52301
+ supportsWindowLevel: true,
52302
+ FrameOfReferenceUID: instance.FrameOfReferenceUID
52303
+ }); // Everything derived from the image list. `imageSet.sort` reads
52304
+ // `isReconstructable`, so this must run before it.
52305
+ const derived = applyImageListAttributes(imageSet, context, options.isReconstructable);
52306
+ applyThumbnailSrc(imageSet, context, derived); // The legacy SOP class handler path has no rule to consult, so OHIF's default
52307
+ // order is the whole answer and is applied here. The split-rule path passes
52308
+ // `skipSort` and orders once itself, folding the matched rule's comparator in
52309
+ // over this same default - see `applyInstanceOrder`.
52310
+ if (!options.skipSort) {
52311
+ imageSet.sort(context.servicesManager.services.customizationService);
52312
+ }
52313
+ } /**
52314
+ * Builds a stack/volume ImageSet display set carrying the full OHIF attribute
52315
+ * set (`label`, `supportsWindowLevel`, `FrameOfReferenceUID`,
52316
+ * `SOPClassHandlerId`, `isReconstructable`, `messages`, ...): the generic part
52317
+ * and the image part.
52318
+ *
52319
+ * The legacy stack SOP class handler and the split-rule path share these two
52320
+ * parts, so both paths produce identical image display sets.
52321
+ */
52322
+ function makeImageSetDisplaySet(instances, context, options = {}) {
52323
+ const imageSet = makeSeriesDisplaySet(instances);
52324
+ applyImageAttributes(imageSet, context, options);
52325
+ return imageSet;
52326
+ } /**
52327
+ * Applies every attribute derived from an ImageSet's current image list.
52328
+ *
52329
+ * Shared by the initial build and the split-rule `extendInstances` growth hook
52330
+ * so the two cannot drift: whatever is recomputed here is, by construction,
52331
+ * recomputed identically when instances arrive later.
52332
+ *
52333
+ * Series-level identity (`label`, `SeriesDescription`, `Modality`, ...) is
52334
+ * deliberately NOT touched — it cannot change by adding instances to the same
52335
+ * series, and a split rule's `customAttributes` may have overridden it (e.g.
52336
+ * the SCOUT example relabels `SeriesDescription`).
52337
+ *
52338
+ * @param ruleIsReconstructable - a value that a split rule's attributes set;
52339
+ * it replaces the OHIF check.
52340
+ * @returns the intermediate values a caller needs for the thumbnail.
52341
+ */
52342
+ function applyImageListAttributes(imageSet, context, ruleIsReconstructable) {
52343
+ const dataSource = context.extensionManager.getActiveDataSource()[0];
52344
+ const imageIds = dataSource.getImageIdsForDisplaySet(imageSet);
52345
+ const { isDynamicVolume, value: checkedIsReconstructable, averageSpacingBetweenFrames, dynamicVolumeInfo } = getDisplaySetInfo(imageSet.images, imageIds, context); // `ImageSet` snapshots `instance = images[0]` in its constructor and `sort()`
52346
+ // does not refresh it, so an instance that sorts to the front would otherwise
52347
+ // leave `instance` pointing at the wrong image.
52348
+ const instance = imageSet.images[0];
52349
+ const multiFrame = isMultiFrame(instance);
52350
+ const isReconstructable = ruleIsReconstructable ?? checkedIsReconstructable;
52351
+ imageSet.setAttributes({
52352
+ instance,
52353
+ isMultiFrame: multiFrame,
52354
+ volumeLoaderSchema: isDynamicVolume ? DYNAMIC_VOLUME_LOADER_SCHEME : DEFAULT_VOLUME_LOADER_SCHEME,
52355
+ // a stack counts images.
52356
+ numImageFrames: multiFrame ? Number(instance.NumberOfFrames) : imageSet.images.length,
52208
52357
  countIcon: isReconstructable ? 'icon-mpr' : undefined,
52209
- numImageFrames: instances.length,
52210
- SOPClassHandlerId: `${id_id}.sopClassHandlerModule.${sopClassHandlerName}`,
52211
52358
  isReconstructable,
52212
- messages,
52359
+ messages: getDisplaySetMessages(imageSet.images, isReconstructable, isDynamicVolume),
52213
52360
  averageSpacingBetweenFrames: averageSpacingBetweenFrames || null,
52214
52361
  isDynamicVolume,
52215
- dynamicVolumeInfo,
52216
- supportsWindowLevel: true,
52217
- label: instance.SeriesDescription || `${i18n_src/* ["default"].t */.A.t('Series')} ${instance.SeriesNumber} - ${i18n_src/* ["default"].t */.A.t(instance.Modality)}`,
52218
- FrameOfReferenceUID: instance.FrameOfReferenceUID
52362
+ dynamicVolumeInfo
52219
52363
  });
52364
+ return {
52365
+ imageIds,
52366
+ isDynamicVolume,
52367
+ dynamicVolumeInfo
52368
+ };
52369
+ } /** Picks the middle image (middle time point when dynamic) as the thumbnail. */
52370
+ function applyThumbnailSrc(imageSet, context, { imageIds, isDynamicVolume, dynamicVolumeInfo }) {
52371
+ const dataSource = context.extensionManager.getActiveDataSource()[0];
52220
52372
  let imageId = imageIds[Math.floor(imageIds.length / 2)];
52221
- let thumbnailInstance = instances[Math.floor(instances.length / 2)];
52373
+ const thumbnailInstance = imageSet.images[Math.floor(imageSet.images.length / 2)];
52222
52374
  if (isDynamicVolume) {
52223
52375
  const timePoints = dynamicVolumeInfo.timePoints;
52224
52376
  const middleIndex = Math.floor(timePoints.length / 2);
@@ -52228,25 +52380,102 @@ const makeDisplaySet = (instances, index)=>{
52228
52380
  imageSet.setAttributes({
52229
52381
  getThumbnailSrc: dataSource.retrieve.getGetThumbnailSrc?.(thumbnailInstance, imageId)
52230
52382
  });
52231
- const { servicesManager } = appContext;
52232
- const { customizationService } = servicesManager.services;
52233
- imageSet.sort(customizationService); // Include the first image instance number (after sorted)
52234
- /*imageSet.setAttribute(
52235
- 'instanceNumber',
52236
- imageSet.getImage(0).InstanceNumber
52237
- );*/ /*const isReconstructable = isDisplaySetReconstructable(series, instances);
52238
-
52239
- imageSet.isReconstructable = isReconstructable.value;
52240
-
52241
- if (isReconstructable.missingFrames) {
52242
- // TODO -> This is currently unused, but may be used for reconstructing
52243
- // Volumes with gaps later on.
52244
- imageSet.missingFrames = isReconstructable.missingFrames;
52245
- }*/ return imageSet;
52383
+ }
52384
+
52385
+ ;// CONCATENATED MODULE: ../../extensions/default/src/displaySetSplitting/stackSopClassUids.ts
52386
+
52387
+ const { sopClassDictionary } = src/* .utils */.Wp; /** The SOP classes the stack SOP class handler claims. */
52388
+ const STACK_SOP_CLASS_UIDS = [
52389
+ sopClassDictionary.ComputedRadiographyImageStorage,
52390
+ sopClassDictionary.DigitalXRayImageStorageForPresentation,
52391
+ sopClassDictionary.DigitalXRayImageStorageForProcessing,
52392
+ sopClassDictionary.DigitalMammographyXRayImageStorageForPresentation,
52393
+ sopClassDictionary.DigitalMammographyXRayImageStorageForProcessing,
52394
+ sopClassDictionary.DigitalIntraOralXRayImageStorageForPresentation,
52395
+ sopClassDictionary.DigitalIntraOralXRayImageStorageForProcessing,
52396
+ sopClassDictionary.CTImageStorage,
52397
+ sopClassDictionary.EnhancedCTImageStorage,
52398
+ sopClassDictionary.LegacyConvertedEnhancedCTImageStorage,
52399
+ sopClassDictionary.UltrasoundMultiframeImageStorage,
52400
+ sopClassDictionary.MRImageStorage,
52401
+ sopClassDictionary.EnhancedMRImageStorage,
52402
+ sopClassDictionary.EnhancedMRColorImageStorage,
52403
+ sopClassDictionary.LegacyConvertedEnhancedMRImageStorage,
52404
+ sopClassDictionary.UltrasoundImageStorage,
52405
+ sopClassDictionary.UltrasoundImageStorageRET,
52406
+ sopClassDictionary.SecondaryCaptureImageStorage,
52407
+ sopClassDictionary.MultiframeSingleBitSecondaryCaptureImageStorage,
52408
+ sopClassDictionary.MultiframeGrayscaleByteSecondaryCaptureImageStorage,
52409
+ sopClassDictionary.MultiframeGrayscaleWordSecondaryCaptureImageStorage,
52410
+ sopClassDictionary.MultiframeTrueColorSecondaryCaptureImageStorage,
52411
+ sopClassDictionary.XRayAngiographicImageStorage,
52412
+ sopClassDictionary.EnhancedXAImageStorage,
52413
+ sopClassDictionary.XRayRadiofluoroscopicImageStorage,
52414
+ sopClassDictionary.EnhancedXRFImageStorage,
52415
+ sopClassDictionary.XRay3DAngiographicImageStorage,
52416
+ sopClassDictionary.XRay3DCraniofacialImageStorage,
52417
+ sopClassDictionary.BreastTomosynthesisImageStorage,
52418
+ sopClassDictionary.CornealTopographyMapStorage,
52419
+ sopClassDictionary.BreastProjectionXRayImageStorageForPresentation,
52420
+ sopClassDictionary.BreastProjectionXRayImageStorageForProcessing,
52421
+ sopClassDictionary.IntravascularOpticalCoherenceTomographyImageStorageForPresentation,
52422
+ sopClassDictionary.IntravascularOpticalCoherenceTomographyImageStorageForProcessing,
52423
+ sopClassDictionary.NuclearMedicineImageStorage,
52424
+ sopClassDictionary.VLEndoscopicImageStorage,
52425
+ sopClassDictionary.VideoEndoscopicImageStorage,
52426
+ sopClassDictionary.VLMicroscopicImageStorage,
52427
+ sopClassDictionary.VideoMicroscopicImageStorage,
52428
+ sopClassDictionary.VLSlideCoordinatesMicroscopicImageStorage,
52429
+ sopClassDictionary.VLPhotographicImageStorage,
52430
+ sopClassDictionary.VideoPhotographicImageStorage,
52431
+ sopClassDictionary.OphthalmicPhotography8BitImageStorage,
52432
+ sopClassDictionary.OphthalmicPhotography16BitImageStorage,
52433
+ sopClassDictionary.OphthalmicTomographyImageStorage,
52434
+ // sopClassDictionary.VLWholeSlideMicroscopyImageStorage,
52435
+ sopClassDictionary.PositronEmissionTomographyImageStorage,
52436
+ sopClassDictionary.EnhancedPETImageStorage,
52437
+ sopClassDictionary.LegacyConvertedEnhancedPETImageStorage,
52438
+ sopClassDictionary.RTImageStorage,
52439
+ sopClassDictionary.EnhancedUSVolumeStorage,
52440
+ sopClassDictionary.RTDoseStorage
52441
+ ];
52442
+
52443
+ ;// CONCATENATED MODULE: ../../extensions/default/src/getSopClassHandlerModule.js
52444
+
52445
+
52446
+
52447
+
52448
+
52449
+ const { isImage: getSopClassHandlerModule_isImage } = src/* .utils */.Wp; // Shared with the STACK_SOP_CLASS_HANDLER_ID the display set factory stamps
52450
+ // onto every display set it builds, so the two cannot drift.
52451
+ const sopClassHandlerName = (/* inlined export .STACK_SOP_CLASS_HANDLER_NAME */"stack");
52452
+ let appContext = {};
52453
+ const getSopClassHandlerModule_isMultiFrame = (instance)=>{
52454
+ return instance.NumberOfFrames > 1;
52246
52455
  };
52456
+ const makeDisplaySet = (instances)=>makeImageSetDisplaySet(instances, appContext);
52247
52457
  const isSingleImageModality = (modality)=>{
52248
52458
  return modality === 'CR' || modality === 'MG' || modality === 'DX';
52249
- };
52459
+ }; /**
52460
+ * The stack fields of a display set: the instance number and acquisition time
52461
+ * of a display set of one multi-frame or single-image instance, else the study.
52462
+ * Shared by the legacy builder and the split-rule path.
52463
+ */
52464
+ function extendStackDisplaySet(displaySet) {
52465
+ const { images } = displaySet;
52466
+ if (!images?.length) {
52467
+ return;
52468
+ }
52469
+ const [instance] = images;
52470
+ if (images.length === 1 && (getSopClassHandlerModule_isMultiFrame(instance) || isSingleImageModality(instance.Modality))) {
52471
+ displaySet.setAttributes({
52472
+ instanceNumber: instance.InstanceNumber,
52473
+ acquisitionDatetime: instance.AcquisitionDateTime
52474
+ });
52475
+ } else {
52476
+ displaySet.setAttribute('studyInstanceUid', instance.StudyInstanceUID);
52477
+ }
52478
+ }
52250
52479
  function getSopClassHandlerModule_getSopClassUids(instances) {
52251
52480
  const uniqueSopClassUidsInSeries = new Set();
52252
52481
  instances.forEach((instance)=>{
@@ -52273,38 +52502,37 @@ function getDisplaySetsFromSeries(instances) {
52273
52502
  // series into another display set.
52274
52503
  const stackableInstances = [];
52275
52504
  instances.forEach((instance, instanceIndex)=>{
52276
- if (!isImage(instance.SOPClassUID) && !instance.Rows) {
52505
+ if (!getSopClassHandlerModule_isImage(instance.SOPClassUID) && !instance.Rows) {
52277
52506
  return;
52278
52507
  }
52279
52508
  let displaySet;
52280
- if (isMultiFrame(instance)) {
52509
+ if (getSopClassHandlerModule_isMultiFrame(instance)) {
52281
52510
  displaySet = makeDisplaySet([
52282
52511
  instance
52283
- ], instanceIndex);
52512
+ ]);
52284
52513
  displaySet.setAttributes({
52285
52514
  sopClassUids,
52286
- numImageFrames: instance.NumberOfFrames,
52287
- instanceNumber: instance.InstanceNumber,
52288
- acquisitionDatetime: instance.AcquisitionDateTime
52515
+ numImageFrames: instance.NumberOfFrames
52289
52516
  });
52517
+ extendStackDisplaySet(displaySet);
52290
52518
  displaySets.push(displaySet);
52291
52519
  } else if (isSingleImageModality(instance.Modality)) {
52292
52520
  displaySet = makeDisplaySet([
52293
52521
  instance
52294
- ], instanceIndex);
52522
+ ]);
52295
52523
  displaySet.setAttributes({
52296
- sopClassUids,
52297
- instanceNumber: instance.InstanceNumber,
52298
- acquisitionDatetime: instance.AcquisitionDateTime
52524
+ sopClassUids
52299
52525
  });
52526
+ extendStackDisplaySet(displaySet);
52300
52527
  displaySets.push(displaySet);
52301
52528
  } else {
52302
52529
  stackableInstances.push(instance);
52303
52530
  }
52304
52531
  });
52305
52532
  if (stackableInstances.length) {
52306
- const displaySet = makeDisplaySet(stackableInstances, displaySets.length);
52307
- displaySet.setAttribute('studyInstanceUid', instances[0].StudyInstanceUID);
52533
+ const displaySet = makeDisplaySet(stackableInstances); // A single stackable instance is neither multi-frame nor single-image, so
52534
+ // this sets `studyInstanceUid`.
52535
+ extendStackDisplaySet(displaySet);
52308
52536
  displaySet.setAttributes({
52309
52537
  sopClassUids
52310
52538
  });
@@ -52312,77 +52540,34 @@ function getDisplaySetsFromSeries(instances) {
52312
52540
  }
52313
52541
  return displaySets;
52314
52542
  }
52315
- const getSopClassHandlerModule_sopClassUids = [
52316
- sopClassDictionary.ComputedRadiographyImageStorage,
52317
- sopClassDictionary.DigitalXRayImageStorageForPresentation,
52318
- sopClassDictionary.DigitalXRayImageStorageForProcessing,
52319
- sopClassDictionary.DigitalMammographyXRayImageStorageForPresentation,
52320
- sopClassDictionary.DigitalMammographyXRayImageStorageForProcessing,
52321
- sopClassDictionary.DigitalIntraOralXRayImageStorageForPresentation,
52322
- sopClassDictionary.DigitalIntraOralXRayImageStorageForProcessing,
52323
- sopClassDictionary.CTImageStorage,
52324
- sopClassDictionary.EnhancedCTImageStorage,
52325
- sopClassDictionary.LegacyConvertedEnhancedCTImageStorage,
52326
- sopClassDictionary.UltrasoundMultiframeImageStorage,
52327
- sopClassDictionary.MRImageStorage,
52328
- sopClassDictionary.EnhancedMRImageStorage,
52329
- sopClassDictionary.EnhancedMRColorImageStorage,
52330
- sopClassDictionary.LegacyConvertedEnhancedMRImageStorage,
52331
- sopClassDictionary.UltrasoundImageStorage,
52332
- sopClassDictionary.UltrasoundImageStorageRET,
52333
- sopClassDictionary.SecondaryCaptureImageStorage,
52334
- sopClassDictionary.MultiframeSingleBitSecondaryCaptureImageStorage,
52335
- sopClassDictionary.MultiframeGrayscaleByteSecondaryCaptureImageStorage,
52336
- sopClassDictionary.MultiframeGrayscaleWordSecondaryCaptureImageStorage,
52337
- sopClassDictionary.MultiframeTrueColorSecondaryCaptureImageStorage,
52338
- sopClassDictionary.XRayAngiographicImageStorage,
52339
- sopClassDictionary.EnhancedXAImageStorage,
52340
- sopClassDictionary.XRayRadiofluoroscopicImageStorage,
52341
- sopClassDictionary.EnhancedXRFImageStorage,
52342
- sopClassDictionary.XRay3DAngiographicImageStorage,
52343
- sopClassDictionary.XRay3DCraniofacialImageStorage,
52344
- sopClassDictionary.BreastTomosynthesisImageStorage,
52345
- sopClassDictionary.CornealTopographyMapStorage,
52346
- sopClassDictionary.BreastProjectionXRayImageStorageForPresentation,
52347
- sopClassDictionary.BreastProjectionXRayImageStorageForProcessing,
52348
- sopClassDictionary.IntravascularOpticalCoherenceTomographyImageStorageForPresentation,
52349
- sopClassDictionary.IntravascularOpticalCoherenceTomographyImageStorageForProcessing,
52350
- sopClassDictionary.NuclearMedicineImageStorage,
52351
- sopClassDictionary.VLEndoscopicImageStorage,
52352
- sopClassDictionary.VideoEndoscopicImageStorage,
52353
- sopClassDictionary.VLMicroscopicImageStorage,
52354
- sopClassDictionary.VideoMicroscopicImageStorage,
52355
- sopClassDictionary.VLSlideCoordinatesMicroscopicImageStorage,
52356
- sopClassDictionary.VLPhotographicImageStorage,
52357
- sopClassDictionary.VideoPhotographicImageStorage,
52358
- sopClassDictionary.OphthalmicPhotography8BitImageStorage,
52359
- sopClassDictionary.OphthalmicPhotography16BitImageStorage,
52360
- sopClassDictionary.OphthalmicTomographyImageStorage,
52361
- // sopClassDictionary.VLWholeSlideMicroscopyImageStorage,
52362
- sopClassDictionary.PositronEmissionTomographyImageStorage,
52363
- sopClassDictionary.EnhancedPETImageStorage,
52364
- sopClassDictionary.LegacyConvertedEnhancedPETImageStorage,
52365
- sopClassDictionary.RTImageStorage,
52366
- sopClassDictionary.EnhancedUSVolumeStorage,
52367
- sopClassDictionary.RTDoseStorage
52368
- ];
52543
+ const getSopClassHandlerModule_sopClassUids = STACK_SOP_CLASS_UIDS;
52369
52544
  function getSopClassHandlerModule(appContextParam) {
52370
52545
  appContext = appContextParam;
52371
52546
  return [
52372
52547
  {
52373
52548
  name: sopClassHandlerName,
52374
52549
  sopClassUids: getSopClassHandlerModule_sopClassUids,
52375
- getDisplaySetsFromSeries
52550
+ getDisplaySetsFromSeries,
52551
+ handlerNames: [
52552
+ 'image'
52553
+ ],
52554
+ extendDisplaySet: extendStackDisplaySet
52376
52555
  },
52377
52556
  {
52378
52557
  name: 'not-supported-display-sets-handler',
52379
52558
  sopClassUids: [],
52380
- getDisplaySetsFromSeries: getDisplaySetsFromUnsupportedSeries
52559
+ getDisplaySetsFromSeries: getDisplaySetsFromUnsupportedSeries,
52560
+ handlerNames: [
52561
+ 'unsupported'
52562
+ ],
52563
+ extendDisplaySet: extendUnsupportedDisplaySet
52381
52564
  },
52382
52565
  {
52383
52566
  name: chartHandler.name,
52384
52567
  sopClassUids: chartHandler.sopClassUids,
52385
- getDisplaySetsFromSeries: chartHandler.getDisplaySetsFromSeries
52568
+ getDisplaySetsFromSeries: chartHandler.getDisplaySetsFromSeries,
52569
+ handlerNames: chartHandler.handlerNames,
52570
+ extendDisplaySet: chartHandler.extendDisplaySet
52386
52571
  }
52387
52572
  ];
52388
52573
  }
@@ -59338,8 +59523,8 @@ function AboutModalDefault() {
59338
59523
  version = $[3];
59339
59524
  }
59340
59525
  const browser = `${t0}${t1} ${version}`;
59341
- const versionNumber = "3.14.0-beta.89";
59342
- const commitHash = "3879360d8352e2393a8d2ee32dd597065675e159";
59526
+ const versionNumber = "3.14.0-beta.90";
59527
+ const commitHash = "3ca36c000f4532e8ae8fb340d79cc86629a6a54a";
59343
59528
  let t2;
59344
59529
  if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
59345
59530
  t2 = versionNumber.split("-");
@@ -61654,6 +61839,265 @@ function getWorkListCustomization() {
61654
61839
  };
61655
61840
  }
61656
61841
 
61842
+ // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/index.js + 37 modules
61843
+ var metadata_dist_esm = __webpack_require__(16080);
61844
+ ;// CONCATENATED MODULE: ../../extensions/default/src/displaySetSplitting/makeDisplaySetFromInstanceGroup.ts
61845
+
61846
+ /**
61847
+ * The fields of the `@cornerstonejs/metadata` display set that the OHIF
61848
+ * display set does not take: the CS3D identity and image id lists, and the
61849
+ * fields that define the identity or the content of the OHIF display set.
61850
+ * The rule's custom attributes cannot set these either.
61851
+ */
61852
+ const NOT_COPIED = new Set([
61853
+ 'displaySetId',
61854
+ 'imageIds',
61855
+ 'underlyingImageIds',
61856
+ 'instances',
61857
+ 'instance',
61858
+ 'images',
61859
+ 'uid',
61860
+ 'displaySetInstanceUID',
61861
+ 'extendInstances',
61862
+ '__proto__'
61863
+ ]); /** The ordering inputs every sort of one split-rule display set uses. */ /**
61864
+ * Puts a split-rule display set's images in the order the rule asks for.
61865
+ *
61866
+ * `orderInstancesForRule` composes OHIF's default order (`ImageSet.sortInstances`)
61867
+ * with the rule's comparator and the host comparator, with the precedence the
61868
+ * split engine uses, so the result is the order the engine computed. The host
61869
+ * comparator and the group's series facts must be passed again, or the re-sort
61870
+ * discards that order.
61871
+ *
61872
+ * Sorted in place, because `imageSet.images` is a non-writable property whose
61873
+ * contents are mutable.
61874
+ */
61875
+ function applyInstanceOrder(imageSet, matchedRule, { series, compareInstances }, context) {
61876
+ const { customizationService } = context.servicesManager.services;
61877
+ const ordered = (0,metadata_dist_esm/* .orderInstancesForRule */.wU)(imageSet.images, matchedRule, {
61878
+ sortInstances: (list)=>imageSet.sortInstances(list, customizationService),
61879
+ compareInstances,
61880
+ series
61881
+ });
61882
+ imageSet.images.splice(0, imageSet.images.length, ...ordered);
61883
+ } /**
61884
+ * Orders the images, then refreshes the attributes that depend on the order.
61885
+ *
61886
+ * OHIF's default sort reads `isReconstructable`, so the image-list attributes
61887
+ * must already describe the current images. `instance`, `messages` and the
61888
+ * thumbnail depend on the order, so they are applied again from the final
61889
+ * order. The initial build and the growth hook both end here, so a display
61890
+ * set that grew is the same as one built from all of its instances.
61891
+ */
61892
+ function orderAndRefreshAttributes(imageSet, matchedRule, order, context, ruleIsReconstructable) {
61893
+ applyInstanceOrder(imageSet, matchedRule, order, context);
61894
+ const derived = applyImageListAttributes(imageSet, context, ruleIsReconstructable);
61895
+ applyThumbnailSrc(imageSet, context, derived);
61896
+ } /**
61897
+ * Step 1: the `@cornerstonejs/metadata` display set of the group, and the
61898
+ * `isReconstructable` that the rule's own attributes set, if any. The rule's
61899
+ * `customAttributes` runs once, inside `createDisplaySetFromGroup`; the
61900
+ * wrapper only reads its result.
61901
+ */
61902
+ function buildRuleDisplaySet(group, splitNumber) {
61903
+ let ruleIsReconstructable;
61904
+ const { customAttributes } = group.matchedRule;
61905
+ const matchedRule = customAttributes ? {
61906
+ ...group.matchedRule,
61907
+ customAttributes: (attributes, options)=>{
61908
+ const result = customAttributes(attributes, options);
61909
+ if (typeof result?.isReconstructable === 'boolean') {
61910
+ ruleIsReconstructable = result.isReconstructable;
61911
+ }
61912
+ return result;
61913
+ }
61914
+ } : group.matchedRule;
61915
+ const ruleDisplaySet = (0,metadata_dist_esm/* .createDisplaySetFromGroup */.EY)({
61916
+ ...group,
61917
+ matchedRule
61918
+ }, {
61919
+ splitNumber
61920
+ });
61921
+ return {
61922
+ ruleDisplaySet,
61923
+ ruleIsReconstructable
61924
+ };
61925
+ } /**
61926
+ * Copies the fields of the `@cornerstonejs/metadata` display set onto the OHIF
61927
+ * display set: `splitKey`, `splitRuleId`, `splitGroupId`, `sopClassUids`,
61928
+ * `handler` and the rule's attributes. Applied after the OHIF
61929
+ * defaults, so the rule's attributes win over them.
61930
+ *
61931
+ * An image display set keeps the OHIF `isReconstructable`: the image part
61932
+ * refines the CS3D value for display, and already applied a rule attribute.
61933
+ */
61934
+ function copyRuleDisplaySet(displaySet, ruleDisplaySet, isImage) {
61935
+ for (const [key, value] of Object.entries(ruleDisplaySet)){
61936
+ if (!NOT_COPIED.has(key) && !(isImage && key === 'isReconstructable')) {
61937
+ displaySet.setAttribute(key, value);
61938
+ }
61939
+ }
61940
+ } /**
61941
+ * Converts a `@cornerstonejs/metadata` split-rule instance group into an OHIF
61942
+ * display set. This is the default `createDisplaySetFromGroup` of the
61943
+ * `useMetadataDisplaySet` customization.
61944
+ *
61945
+ * The build has three steps (SP-PIPE-17); this function runs the first two:
61946
+ *
61947
+ * 1. CS3D `createDisplaySetFromGroup` builds the display set of the group,
61948
+ * the same one that a server builds.
61949
+ * 2. The OHIF generic step builds an ImageSet with the series identity, and
61950
+ * copies the fields of step 1. Its image part (the stack handler id, the
61951
+ * image-list attributes, the thumbnail and the instance order) runs only
61952
+ * for a rule with no `handler`, or with the `image` handler.
61953
+ * 3. DisplaySetService calls the `extendDisplaySet` of the SOP class handler
61954
+ * that declares the rule's `handler` name.
61955
+ *
61956
+ * The `extendInstances` hook repeats steps 1 and 2 for the instances that
61957
+ * arrive later. It only adds: a split-rule display set never loses an
61958
+ * instance. It is not named `addInstances` (the SOP class handler merge
61959
+ * hook), so the legacy handler loop never feeds instances into it.
61960
+ */
61961
+ function makeDisplaySetFromInstanceGroup(group, { splitNumber, compareInstances }, context) {
61962
+ const { matchedRule } = group; // What every re-sort of this display set orders with.
61963
+ const order = {
61964
+ series: group.series,
61965
+ compareInstances
61966
+ }; // Step 1. `compileSplitRules` wraps `customAttributes`, so an error here
61967
+ // names the rule and the field; DisplaySetService catches it and stops the
61968
+ // study.
61969
+ const { ruleDisplaySet, ruleIsReconstructable } = buildRuleDisplaySet(group, splitNumber);
61970
+ const { handler } = ruleDisplaySet;
61971
+ const isImage = !handler || handler === 'image'; // Step 2.
61972
+ const displaySet = makeSeriesDisplaySet([
61973
+ ...group.instances
61974
+ ]);
61975
+ if (isImage) {
61976
+ applyImageAttributes(displaySet, context, {
61977
+ skipSort: true,
61978
+ isReconstructable: ruleIsReconstructable
61979
+ });
61980
+ orderAndRefreshAttributes(displaySet, matchedRule, order, context, ruleIsReconstructable);
61981
+ }
61982
+ copyRuleDisplaySet(displaySet, ruleDisplaySet, isImage);
61983
+ displaySet.setAttribute('extendInstances', (newInstances, options = {})=>{
61984
+ const known = new Set(displaySet.images.map((instance)=>instance.SOPInstanceUID));
61985
+ const instancesToAdd = newInstances.filter((instance)=>{
61986
+ if (known.has(instance.SOPInstanceUID)) {
61987
+ return false;
61988
+ }
61989
+ known.add(instance.SOPInstanceUID);
61990
+ return true;
61991
+ });
61992
+ if (!instancesToAdd.length) {
61993
+ return undefined;
61994
+ } // The series context of the re-split, which saw the whole series
61995
+ // including the new instances.
61996
+ if (options.series) {
61997
+ order.series = options.series;
61998
+ }
61999
+ if (options.compareInstances) {
62000
+ order.compareInstances = options.compareInstances;
62001
+ } // `images` is a non-writable property, but the array contents are
62002
+ // mutable. A non-image display set keeps the new instances at the end.
62003
+ displaySet.images.push(...instancesToAdd); // The display set keeps the `splitKey` of the group that created it.
62004
+ const grown = buildRuleDisplaySet({
62005
+ ...group,
62006
+ series: order.series,
62007
+ instances: [
62008
+ ...displaySet.images
62009
+ ]
62010
+ }, splitNumber);
62011
+ if (isImage) {
62012
+ // but more slices can be. So the attributes come first for the grown
62013
+ // list, then again from the final order.
62014
+ applyImageListAttributes(displaySet, context, grown.ruleIsReconstructable);
62015
+ orderAndRefreshAttributes(displaySet, matchedRule, order, context, grown.ruleIsReconstructable);
62016
+ }
62017
+ copyRuleDisplaySet(displaySet, grown.ruleDisplaySet, isImage);
62018
+ return displaySet;
62019
+ });
62020
+ return displaySet;
62021
+ }
62022
+
62023
+ ;// CONCATENATED MODULE: ../../extensions/default/src/customizations/metadataDisplaySetCustomization.ts
62024
+
62025
+ /**
62026
+ * The `useMetadataDisplaySet` customization (default OFF).
62027
+ *
62028
+ * When enabled, DisplaySetService splits series instances into display sets
62029
+ * with the `@cornerstonejs/metadata` split-rules engine. A rule with a
62030
+ * `handler` name gives its display sets to the SOP class handler of the mode
62031
+ * that declares that name in `handlerNames`.
62032
+ *
62033
+ * Enable per mode, in the `onModeEnter` of the mode. `setCustomizations` uses
62034
+ * `CustomizationScope.Mode` by default, and `onModeExit` clears that scope:
62035
+ * ```js
62036
+ * customizationService.setCustomizations({
62037
+ * useMetadataDisplaySet: { enabled: { $set: true } },
62038
+ * });
62039
+ * ```
62040
+ * or globally via the named module entry
62041
+ * `'@ohif/extension-default.customizationModule.metadataDisplaySet'`,
62042
+ * or from the URL with `?customization=split/enableNewSplit`.
62043
+ *
62044
+ * `displaySetRules` (the registry, keyed by rule id) and `displaySetRuleOrder`
62045
+ * (the rule ids in evaluation order) are the `@cornerstonejs/metadata`
62046
+ * defaults, with no OHIF copy. A customization changes a rule by its id in the
62047
+ * registry, and adds, removes or replaces an id of the order with
62048
+ * `$spliceById`, which takes a rule id as the position:
62049
+ * ```js
62050
+ * { displaySetRuleOrder: { $spliceById: [['volume3d', 0, 'dwiByBValue']] } }
62051
+ * ```
62052
+ * DisplaySetService compiles the rules of the order with
62053
+ * `createDisplaySetSplitRules`, with the `metadataContext` customization as
62054
+ * the context.
62055
+ *
62056
+ * A rule error stops display set creation; OHIF does not drop the rule, and
62057
+ * does not fall back to the SOP class handlers. See `DisplaySetService`.
62058
+ */
62059
+ function getMetadataDisplaySetCustomization(context) {
62060
+ return {
62061
+ useMetadataDisplaySet: {
62062
+ enabled: false,
62063
+ displaySetRules: metadata_dist_esm/* .displaySetRules */._F,
62064
+ displaySetRuleOrder: metadata_dist_esm/* .displaySetRuleOrder */.p1,
62065
+ createDisplaySetFromGroup: (group, options)=>makeDisplaySetFromInstanceGroup(group, options, context)
62066
+ }
62067
+ };
62068
+ }
62069
+
62070
+ ;// CONCATENATED MODULE: ../../extensions/default/src/customizations/metadataContextCustomization.ts
62071
+
62072
+ /**
62073
+ * The `metadataContext` customization: the named lists and expressions that
62074
+ * the split rules read, for example `imageSopClassUids` and `isImage`.
62075
+ *
62076
+ * The value is the `@cornerstonejs/metadata` `defaultMetadataContext`, with
62077
+ * the OHIF private chart SOP class added to the end of `chartSopClassUids`
62078
+ * (the same result as a `$push`). It is data only, so a server that applies
62079
+ * the same customization files with `immutability-helper` gets the same
62080
+ * context. A site changes a list with a standard command:
62081
+ *
62082
+ * ```jsonc
62083
+ * { "metadataContext": { "imageSopClassUids": { "$push": ["1.2.3.4"] } } }
62084
+ * ```
62085
+ *
62086
+ * It is a customization of its own, and not a part of `useMetadataDisplaySet`,
62087
+ * so that other features can read it when the split rules are off.
62088
+ */
62089
+ function getMetadataContextCustomization() {
62090
+ return {
62091
+ metadataContext: {
62092
+ ...metadata_dist_esm/* .defaultMetadataContext */.MG,
62093
+ chartSopClassUids: [
62094
+ ...metadata_dist_esm/* .chartSopClassUids */.CH,
62095
+ ChartDataSOPClassUid
62096
+ ]
62097
+ }
62098
+ };
62099
+ }
62100
+
61657
62101
  ;// CONCATENATED MODULE: ../../extensions/default/src/ViewerLayout/useUndoRedoState.ts
61658
62102
 
61659
62103
 
@@ -62249,6 +62693,8 @@ function HeaderPatientInfo() {
62249
62693
 
62250
62694
 
62251
62695
 
62696
+
62697
+
62252
62698
 
62253
62699
 
62254
62700
 
@@ -62261,12 +62707,23 @@ function HeaderPatientInfo() {
62261
62707
  * custom page for the user to view their profile, or to add a custom
62262
62708
  * page for login etc.
62263
62709
  */
62264
- function getCustomizationModule({ servicesManager, extensionManager }) {
62710
+ function getCustomizationModule({ servicesManager, extensionManager, appConfig }) {
62265
62711
  return [
62266
62712
  {
62267
62713
  name: 'helloPage',
62268
62714
  value: helloPageCustomization
62269
62715
  },
62716
+ {
62717
+ // `appConfig.customizationService` (Global scope).
62718
+ name: 'metadataDisplaySet',
62719
+ value: {
62720
+ useMetadataDisplaySet: {
62721
+ enabled: {
62722
+ $set: true
62723
+ }
62724
+ }
62725
+ }
62726
+ },
62270
62727
  {
62271
62728
  name: 'theme',
62272
62729
  value: appearanceModalCustomization
@@ -62314,6 +62771,12 @@ function getCustomizationModule({ servicesManager, extensionManager }) {
62314
62771
  ...onboardingCustomization,
62315
62772
  ...instanceSortingCriteriaCustomization,
62316
62773
  ...getWorkListCustomization(),
62774
+ ...getMetadataDisplaySetCustomization({
62775
+ servicesManager,
62776
+ extensionManager,
62777
+ appConfig
62778
+ }),
62779
+ ...getMetadataContextCustomization(),
62317
62780
  ...headerRightSideCustomization,
62318
62781
  ...hangingProtocolsCustomization
62319
62782
  }