@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
@@ -40,7 +40,7 @@ __webpack_require__.m = __webpack_modules__;
40
40
  // the startup function
41
41
  __webpack_require__.x = () => {
42
42
  // Load entry module and return exports
43
- var __webpack_exports__ = __webpack_require__.O(undefined, ["641", "1788", "9879", "2748", "6133", "1153", "4449", "6847", "5076", "5320"], () => __webpack_require__(77911));
43
+ var __webpack_exports__ = __webpack_require__.O(undefined, ["641", "1788", "9879", "2748", "8029", "1153", "4449", "6847", "5076", "5320"], () => __webpack_require__(77911));
44
44
  __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
45
45
  return __webpack_exports__
46
46
  };
@@ -82,13 +82,13 @@ __webpack_require__.u = (chunkId) => {
82
82
  if (chunkId === 1788) return "1788.bundle.3f1349d2.js";
83
83
  if (chunkId === 9879) return "9879.bundle.67e5ccff.js";
84
84
  if (chunkId === 2748) return "2748.bundle.eaa94e2e.js";
85
- if (chunkId === 6133) return "6133.bundle.d4f7403f.js";
86
- if (chunkId === 1153) return "1153.bundle.efd8a415.js";
87
- if (chunkId === 4449) return "4449.bundle.3e4b07e6.js";
88
- if (chunkId === 6847) return "6847.bundle.5a087332.js";
85
+ if (chunkId === 8029) return "8029.bundle.40857fb6.js";
86
+ if (chunkId === 1153) return "1153.bundle.3b9c4b75.js";
87
+ if (chunkId === 4449) return "4449.bundle.aaa4ab92.js";
88
+ if (chunkId === 6847) return "6847.bundle.b2adb444.js";
89
89
  if (chunkId === 5076) return "5076.bundle.95c07142.js";
90
- if (chunkId === 5320) return "5320.bundle.335efd86.js";
91
- if (chunkId === 8547) return "compute.bundle.19cf1283.js";
90
+ if (chunkId === 5320) return "5320.bundle.a4e386da.js";
91
+ if (chunkId === 8547) return "compute.bundle.deb7ad1f.js";
92
92
  // return url for filenames based on template
93
93
  return "" + chunkId + ".javascript"
94
94
  }
@@ -180,7 +180,7 @@ __webpack_require__.p = "/";
180
180
  (() => {
181
181
  var next = __webpack_require__.x
182
182
  __webpack_require__.x = () => {
183
- return Promise.all([641,1788,9879,2748,6133,1153,4449,6847,5076,5320].map(__webpack_require__.e, __webpack_require__)).then(next);
183
+ return Promise.all([641,1788,9879,2748,8029,1153,4449,6847,5076,5320].map(__webpack_require__.e, __webpack_require__)).then(next);
184
184
  }
185
185
  })();
186
186
  // webpack/runtime/import_scripts_chunk_loading
@@ -187,6 +187,43 @@
187
187
  // Catalog of shipped URL customizations, grouped by area/folder. The
188
188
  // `value` is the `?customization=` token (folder-relative path, no `.jsonc`).
189
189
  const CATALOG = [
190
+ {
191
+ dir: 'split/',
192
+ title: 'Display set splitting',
193
+ desc: 'Metadata-driven display set splitting (the @cornerstonejs/metadata split-rules engine, `useMetadataDisplaySet`). Rules are @cornerstonejs/metadata raw selector data — custom ones are authored in JSONC with the same conditions and expressions; see split/scoutSeries.jsonc for the pattern.',
194
+ items: [
195
+ {
196
+ value: 'split/enableNewSplit',
197
+ name: 'Enable metadata split rules',
198
+ scope: 'global',
199
+ desc: 'Splits series into display sets with the @cornerstonejs/metadata default split rules. Fixes mixed-b-value DWI series. A rule with a handler name (video, wholeSlide, ecg, segmentation, rtStructureSet, parametricMap, structuredReport, encapsulatedDocument, bulkAnnotation, chart, unsupported) gives its display sets to the SOP class handler of the mode that declares that name.',
200
+ },
201
+ {
202
+ value: 'split/scoutSeries',
203
+ name: 'CT SCOUT split rule (example)',
204
+ scope: 'global',
205
+ desc: 'Example custom raw selector rule: splits the localizer images off a CT series that mixes localizer and other images, into their own "SCOUT" display set. Pulls in split/enableNewSplit via requires.',
206
+ },
207
+ {
208
+ value: 'split/optional/dwiByBValue',
209
+ name: 'DWI one display set per b-value (optional rule)',
210
+ scope: 'global',
211
+ desc: 'Optional rule of @cornerstonejs/metadata: puts each b-value of a diffusion MR series into its own stack display set ("<description> b=<value>"), in place of one display set that renders as 4D. Pulls in split/enableNewSplit via requires.',
212
+ },
213
+ {
214
+ value: 'split/singleImagesBySize',
215
+ name: 'CR/DX/MG single images by size',
216
+ scope: 'global',
217
+ desc: 'Groups the single CR, DX and MG images of a series by image size, in place of one display set for each image. Not for mammography that needs one display set for each view. Pulls in split/enableNewSplit via requires.',
218
+ },
219
+ {
220
+ value: 'split/decimation',
221
+ name: 'Decimate large series',
222
+ scope: 'global',
223
+ desc: 'Splits a series of more than decimationSize (default 1000) single-frame images into ceil(count / decimationSize) display sets, by sliceIndex modulo the count. Pulls in split/enableNewSplit via requires.',
224
+ },
225
+ ],
226
+ },
190
227
  {
191
228
  dir: 'tools/',
192
229
  title: 'Tools & presets',
@@ -0,0 +1,69 @@
1
+ // URL-loaded customization: decimation
2
+ //
3
+ // Example of a custom split rule for the metadata-driven display set splitter,
4
+ // written as @cornerstonejs/metadata rule data.
5
+ //
6
+ // Problem: a series of many thousands of single-frame images is slow to load
7
+ // and to show as one display set.
8
+ //
9
+ // Fix: a series of more than `decimationSize` images becomes
10
+ // `ceil(count / decimationSize)` display sets. Each display set takes every
11
+ // n-th slice, by `sliceIndex` modulo the count of display sets, so each one
12
+ // covers the whole volume at a larger slice spacing.
13
+ //
14
+ // How it works:
15
+ // - `requires` loads split/enableNewSplit first, turning the splitter on.
16
+ // - `$merge` adds the rule to the registry under its id, and `$unshift` puts
17
+ // the id first in the rule order, so the rule runs before every default
18
+ // rule.
19
+ // - The rule `context` sets `decimationSize` (1000 images) and computes
20
+ // `decimationCount`, the count of display sets. `decimationPart` is the
21
+ // `sliceIndex` (the lattice index of the slice, from the built-in
22
+ // `planeGeometry` group) modulo that count, and `decimationNumber` is the
23
+ // part from 1, for the description.
24
+ // - `matches` claims the single-frame images of a series with more than
25
+ // `decimationSize` images, when the image has a lattice index. The other
26
+ // images stay with the default rules.
27
+ // - `groupBy` makes one group for each part, and `sortBy` orders the slices
28
+ // of a part by their distance along the normal.
29
+ //
30
+ // Change the size with a standard command, for example
31
+ // `{ "useMetadataDisplaySet": { "displaySetRules": { "decimation": { "context":
32
+ // { "decimationSize": { "$set": 500 } } } } } }`.
33
+ //
34
+ // Load it with `?customization=split/decimation`.
35
+ {
36
+ "requires": ["split/enableNewSplit"],
37
+ "global": {
38
+ "useMetadataDisplaySet": {
39
+ "displaySetRules": {
40
+ "$merge": {
41
+ "decimation": {
42
+ "description": "A series of more than decimationSize single-frame images: ceil(count / decimationSize) display sets, by sliceIndex modulo the count.",
43
+ "context": {
44
+ "decimationSize": 1000,
45
+ "decimationCount": "ceil(seriesInstanceCount / decimationSize)",
46
+ "isDecimated": "decimationCount > 1",
47
+ "decimationPart": "sliceIndex % decimationCount",
48
+ "decimationNumber": "decimationPart + 1"
49
+ },
50
+ "matches": {
51
+ "isImage": true,
52
+ "isMultiFrame": false,
53
+ "isDecimated": true,
54
+ "sliceIndex": { "notNull": true }
55
+ },
56
+ "groupBy": ["SeriesInstanceUID", "decimationPart"],
57
+ "sortBy": ["displaySet.sliceDistance"],
58
+ "attributes": {
59
+ "SeriesDescription": {
60
+ "template": "{SeriesDescription} ({decimationNumber} of {decimationCount})"
61
+ }
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "displaySetRuleOrder": { "$unshift": ["decimation"] }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,39 @@
1
+ // URL-loaded customization: enableNewSplit
2
+ //
3
+ // Enables metadata-driven display set splitting: series instances are split
4
+ // into display sets by the @cornerstonejs/metadata split-rules engine
5
+ // (`useMetadataDisplaySet` customization), with the @cornerstonejs/metadata
6
+ // default rules. A rule with a `handler` name (video, ECG, whole slide, SEG,
7
+ // RTSTRUCT, parametric map, SR, encapsulated document, bulk annotation,
8
+ // chart, unsupported) gives its display sets to the SOP class handler of the
9
+ // mode that declares that name in `handlerNames`, so the specialized
10
+ // extensions of OHIF keep working unchanged. A handler of another extension
11
+ // for a private SOP class runs only when it declares `handlerNames` and a rule
12
+ // names it: the default `unsupported` rule takes every other instance (see
13
+ // "A SOP class handler of another extension" in displaySetSplitting.md).
14
+ //
15
+ // The default rules include `localizer`, which puts the localizer images of
16
+ // a CT, MR or PT series that also has other images into their own display set,
17
+ // and `mixedDimensionalityBValue`, which splits MR
18
+ // series mixing instances with and without DiffusionBValue into separate
19
+ // display sets (the DWI mixed-b-value issue), and `singleImageModality`, which
20
+ // makes one display set for each CR, DX or MG image, as the stack SOP class
21
+ // handler does. `split/singleImagesBySize.jsonc` groups those images by size.
22
+ //
23
+ // Load it with `?customization=split/enableNewSplit`.
24
+ //
25
+ // Custom rules are @cornerstonejs/metadata rule data (a map of name to
26
+ // test in `matches`, names in `groupBy` and `sortBy`, a rule `context`, and
27
+ // `attributes`) - see `split/scoutSeries.jsonc` for a complete example.
28
+ // `displaySetRules` is the registry, keyed by rule id: add a rule with
29
+ // `$merge`, or change a rule by its id. `displaySetRuleOrder` is the list of
30
+ // rule ids in evaluation order, with first-match-wins per instance: add,
31
+ // remove or replace an id with `$spliceById`, which takes a rule id as the
32
+ // position (`[["volume3d", 0, "myRule"]]` inserts before `volume3d`). A rule
33
+ // that the order does not name is not used. An instance that no rule claims
34
+ // goes to the SOP class handlers.
35
+ {
36
+ "global": {
37
+ "useMetadataDisplaySet": { "enabled": { "$set": true } }
38
+ }
39
+ }
@@ -0,0 +1,31 @@
1
+ {"requires":["split/enableNewSplit"],"global":{"useMetadataDisplaySet":
2
+ // Volumes: one display set for each acquisition.
3
+ //
4
+ // A CT, MR, PT or NM series that holds more than one AcquisitionNumber gives
5
+ // one display set for each AcquisitionNumber, in AcquisitionNumber order, and
6
+ // not in time order. The display set gets the attribute `acquisitionNumber`.
7
+ //
8
+ // The file changes the `groupBy` and the `attributes` of `volume3d`, and not
9
+ // its `sortBy`, so it works together with `volumePositionOrder`, in either
10
+ // order: one volume for each acquisition, with the slices in position order.
11
+ // `volume3d` has no `attributes`, so the file uses `$set` there and not
12
+ // `$merge`.
13
+ //
14
+ // A series with one AcquisitionNumber gives one display set, as without the
15
+ // file.
16
+ //
17
+ // Some CT scanners give a new AcquisitionNumber to each rotation of an axial
18
+ // (step) scan. Such a series gives one display set for each rotation.
19
+ //
20
+ // A 4D series that gives each time point its own AcquisitionNumber (for
21
+ // example MR perfusion) gives one display set for each time point.
22
+ {
23
+ "displaySetRules": {
24
+ "volume3d": {
25
+ "groupBy": { "$set": ["SeriesInstanceUID", "AcquisitionNumber"] },
26
+ "attributes": { "$set": { "acquisitionNumber": "AcquisitionNumber" } }
27
+ }
28
+ }
29
+ }
30
+
31
+ }}
@@ -0,0 +1,80 @@
1
+ {"requires":["split/enableNewSplit"],"global":{"useMetadataDisplaySet":
2
+ // SR and SEG: one display set for each version.
3
+ //
4
+ // A series of structured reports or segmentations can hold more than one
5
+ // version of the object. The default rules make one display set for each
6
+ // series. With these rules, each SR or SEG instance becomes its own display
7
+ // set. The display sets are in the order of ContentDate and ContentTime, so the
8
+ // newest version is last. `isLatestVersion` is true on the display set of the
9
+ // newest version of the series.
10
+ //
11
+ // `contentStamp` is ContentDate and ContentTime as one number,
12
+ // `YYYYMMDDhhmmss.ffffff`. `isLatestVersion` compares it with the maximum of
13
+ // the series. Each rule holds both names in its own `context`.
14
+ //
15
+ // `isLatestVersion` is correct for a split of the whole series. A host that
16
+ // adds new instances to the display sets of an earlier split (OHIF does) does
17
+ // not compute the value of an earlier display set again, so after a new
18
+ // version arrives, two display sets can have `isLatestVersion: true`.
19
+ //
20
+ // The stamp needs ContentTime in the form `hhmmss`. A time `hhmm` (for example
21
+ // `1200`) gives a smaller stamp than `090000`, so that version sorts first, and
22
+ // `isLatestVersion` can mark the wrong version. Two versions in the same second
23
+ // can also sort in the wrong order, because the split key compares the digits
24
+ // of the fraction as one number.
25
+ //
26
+ // Each rule keeps the handler of the default rule, so the host builds the
27
+ // display set with its SR or SEG code.
28
+ //
29
+ // The file puts each rule just before the default rule that it refines:
30
+ // `structuredReportVersions` before `structuredReport`, and
31
+ // `segmentationVersions` before `segmentation`. `$spliceById` needs
32
+ // `spliceById` of @cornerstonejs/metadata, registered with immutability-helper
33
+ // `extend`.
34
+ {
35
+ // New rules for the registry.
36
+ "displaySetRules": {
37
+ "$merge": {
38
+ "structuredReportVersions": {
39
+ "description": "Structured reports: one display set for each instance, in content date order, with isLatestVersion.",
40
+ "handler": "structuredReport",
41
+ "context": {
42
+ "contentStamp": "Number(ContentDate) * 1000000 + max(Number(ContentTime), 0)",
43
+ "isLatestVersion": "contentStamp == series.instances.max(contentStamp)"
44
+ },
45
+ "matches": {
46
+ "isStructuredReport": true
47
+ },
48
+ "groupBy": ["SeriesInstanceUID", "contentStamp", "SOPInstanceUID"],
49
+ "attributes": {
50
+ "Manufacturer": "Manufacturer",
51
+ "ManufacturerModelName": "ManufacturerModelName",
52
+ "isLatestVersion": "isLatestVersion"
53
+ }
54
+ },
55
+ "segmentationVersions": {
56
+ "description": "Segmentations: one display set for each instance, in content date order, with isLatestVersion.",
57
+ "handler": "segmentation",
58
+ "context": {
59
+ "contentStamp": "Number(ContentDate) * 1000000 + max(Number(ContentTime), 0)",
60
+ "isLatestVersion": "contentStamp == series.instances.max(contentStamp)"
61
+ },
62
+ "matches": {
63
+ "isSegmentation": true
64
+ },
65
+ "groupBy": ["SeriesInstanceUID", "contentStamp", "SOPInstanceUID"],
66
+ "attributes": {
67
+ "isLatestVersion": "isLatestVersion"
68
+ }
69
+ }
70
+ }
71
+ },
72
+ "displaySetRuleOrder": {
73
+ "$spliceById": [
74
+ ["structuredReport", 0, "structuredReportVersions"],
75
+ ["segmentation", 0, "segmentationVersions"]
76
+ ]
77
+ }
78
+ }
79
+
80
+ }}
@@ -0,0 +1,63 @@
1
+ {"requires":["split/enableNewSplit"],"global":{"useMetadataDisplaySet":
2
+ // Diffusion MR: one display set for each b-value.
3
+ //
4
+ // Without this rule, a DWI series is one display set, and the viewer can show
5
+ // it as 4D, with one dimension group for each b-value. This rule puts each
6
+ // b-value of the series into its own display set, with the description
7
+ // `<SeriesDescription> b=<DiffusionBValue>`.
8
+ //
9
+ // The rule is for DWI: one direction, or a trace, at each b-value. It does not
10
+ // separate the gradient directions of a DTI series, so a DTI b-value gives one
11
+ // stack with all of its directions at each position.
12
+ //
13
+ // The rule reads the standard DiffusionBValue (0018,9087) only. Images without
14
+ // a b-value (for example a trace or ADC set) go to the default
15
+ // `mixedDimensionalityBValue` rule, and form one more display set.
16
+ //
17
+ // The rule does not read localizer images (`LOCALIZER` in ImageType): they do
18
+ // not count as a b-value, and they stay with the default `localizer` rule.
19
+ // Multi-frame instances stay with the default `multiFrame` rule, which gives
20
+ // one display set for each instance.
21
+ //
22
+ // The file puts the rule just before the default `mixedDimensionalityBValue` rule, which
23
+ // would otherwise take the series.
24
+ // `$spliceById` needs `spliceById` of @cornerstonejs/metadata, registered with
25
+ // immutability-helper `extend`.
26
+ {
27
+ // New rules for the registry.
28
+ "displaySetRules": {
29
+ "$merge": {
30
+ "dwiByBValue": {
31
+ "description": "Diffusion MR: one display set for each b-value.",
32
+ "context": {
33
+ "bValue": "isLocalizer ? null : Number(DiffusionBValue)",
34
+ // Some scanners write DiffusionBValue = 0 into every MR series, so a
35
+ // series of b=0 images only is not a diffusion series.
36
+ "isDiffusion": "series.instances.max(bValue) > 0"
37
+ },
38
+ "matches": {
39
+ "Modality": "MR",
40
+ "isDiffusion": true,
41
+ "isImage": true,
42
+ "isMultiFrame": false,
43
+ "isLocalizer": false,
44
+ "DiffusionBValue": { "notNull": true }
45
+ },
46
+ "groupBy": ["SeriesInstanceUID", "bValue"],
47
+ // SliceLocation (0020,1041) is optional and has no defined direction, so
48
+ // sort by the distance along the slice normal, as volumePositionOrder does.
49
+ "sortBy": ["displaySet.sliceDistance", "InstanceNumber"],
50
+ "attributes": {
51
+ "SeriesDescription": {
52
+ "template": "{SeriesDescription} b={DiffusionBValue}"
53
+ }
54
+ }
55
+ }
56
+ }
57
+ },
58
+ "displaySetRuleOrder": {
59
+ "$spliceById": [["mixedDimensionalityBValue", 0, "dwiByBValue"]]
60
+ }
61
+ }
62
+
63
+ }}
@@ -0,0 +1,55 @@
1
+ {"requires":["split/enableNewSplit"],"global":{"useMetadataDisplaySet":
2
+ // Multi-echo MR: one display set for each echo time.
3
+ //
4
+ // A single-frame MR series that holds more than one EchoTime gives one display
5
+ // set for each EchoTime, with the description
6
+ // `<SeriesDescription> TE=<EchoTime>`. The slices of each display set are in
7
+ // the order of their position along the normal of the image plane. A series
8
+ // with one echo time keeps the default display sets.
9
+ //
10
+ // The rule does not read localizer images (`LOCALIZER` in ImageType): they do
11
+ // not count as an echo time, and they stay with the default `localizer` rule.
12
+ //
13
+ // Multi-frame instances (for example an Enhanced MR instance with more than one
14
+ // echo) stay with the default `multiFrame` rule. A split of the frames of one
15
+ // instance needs a change to the rule language.
16
+ //
17
+ // The file puts the rule just before the default `volume3d` rule, which
18
+ // would otherwise take the series.
19
+ // `$spliceById` needs `spliceById` of @cornerstonejs/metadata, registered with
20
+ // immutability-helper `extend`.
21
+ {
22
+ // New rules for the registry.
23
+ "displaySetRules": {
24
+ "$merge": {
25
+ "multiEchoByEchoTime": {
26
+ "description": "Single-frame MR with two or more echo times: one display set for each EchoTime.",
27
+ "context": {
28
+ // No value for a localizer, so the aggregates and `notNull` skip it.
29
+ "echoTime": "isLocalizer ? null : Number(EchoTime)",
30
+ // A series value: the images of the series have two or more echo times.
31
+ "isMultiEcho": "series.instances.min(echoTime) < series.instances.max(echoTime)"
32
+ },
33
+ "matches": {
34
+ "Modality": "MR",
35
+ "isImage": true,
36
+ "isMultiFrame": false,
37
+ "isMultiEcho": true,
38
+ "echoTime": { "notNull": true }
39
+ },
40
+ "groupBy": ["SeriesInstanceUID", "echoTime"],
41
+ "sortBy": ["displaySet.sliceDistance", "InstanceNumber"],
42
+ "attributes": {
43
+ "SeriesDescription": {
44
+ "template": "{SeriesDescription} TE={EchoTime}"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "displaySetRuleOrder": {
51
+ "$spliceById": [["volume3d", 0, "multiEchoByEchoTime"]]
52
+ }
53
+ }
54
+
55
+ }}
@@ -0,0 +1,54 @@
1
+ {"requires":["split/enableNewSplit"],"global":{"useMetadataDisplaySet":
2
+ // Volumes: the regular slices of a series become one volume.
3
+ //
4
+ // A CT, MR, PT or NM series can be a volume, except for some images that are
5
+ // not on the regular slice spacing: an extra slice, a slice at another angle,
6
+ // or a slice between two positions. The default `volume3d` rule puts all of
7
+ // them in one display set, which is then not reconstructable.
8
+ //
9
+ // With this rule, the regular slices become one volume display set, in
10
+ // position order. The other images stay with the default rules. A fully
11
+ // regular series, and a series with no lattice, keep the default display sets.
12
+ // Localizer images do not count as irregular images, so a regular series with
13
+ // scouts keeps the default `volume3d` display set.
14
+ //
15
+ // The file puts the rule just before the default `localizer` rule, so it runs before the
16
+ // other volume rules. A localizer is not a regular slice, so the `localizer`
17
+ // rule still takes it.
18
+ // `$spliceById` needs `spliceById` of @cornerstonejs/metadata, registered with
19
+ // immutability-helper `extend`.
20
+ {
21
+ // New rules for the registry.
22
+ "displaySetRules": {
23
+ "$merge": {
24
+ "regularVolume": {
25
+ "description": "Volume series with some irregular images: the regular slices become one volume display set.",
26
+ "context": {
27
+ // A series value: a complete regular lattice of 3 or more slices, and
28
+ // also other images. Remove `&& planeGeometry.complete` to accept a
29
+ // lattice with a missing slice.
30
+ "mixesIrregular": "planeGeometry.regularCount >= 3 && planeGeometry.irregularCount > series.instances.count(isLocalizer) && planeGeometry.complete",
31
+ "isRegularSlice": "sliceIndex != null"
32
+ },
33
+ "matches": {
34
+ "isImage": true,
35
+ "Modality": ["CT", "MR", "PT", "NM"],
36
+ "mixesIrregular": true,
37
+ "isRegularSlice": true
38
+ },
39
+ "groupBy": ["SeriesInstanceUID"],
40
+ "sortBy": ["displaySet.sliceDistance"],
41
+ "attributes": {
42
+ "SeriesDescription": {
43
+ "template": "{SeriesDescription} ({displaySet.sliceSpacing} mm)"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "displaySetRuleOrder": {
50
+ "$spliceById": [["localizer", 0, "regularVolume"]]
51
+ }
52
+ }
53
+
54
+ }}
@@ -0,0 +1,44 @@
1
+ {"requires":["split/enableNewSplit"],"global":{"useMetadataDisplaySet":
2
+ // CR, DX and MG: one stack for each series.
3
+ //
4
+ // The default `singleImageModality` rule gives each CR, DX or MG image its own
5
+ // display set. This rule puts the single-frame images of one series into one
6
+ // stack, in the order ImageLaterality, ViewPosition, InstanceNumber.
7
+ //
8
+ // Do not use this rule when a hanging protocol needs one display set for each
9
+ // mammography view.
10
+ //
11
+ // The file puts the rule just before the default `singleImageModality` rule, which
12
+ // would otherwise give one display set for each image.
13
+ // `$spliceById` needs `spliceById` of @cornerstonejs/metadata, registered with
14
+ // immutability-helper `extend`.
15
+ {
16
+ // New rules for the registry.
17
+ "displaySetRules": {
18
+ "$merge": {
19
+ "singleImageSeriesStack": {
20
+ "description": "CR / DX / MG single images: one stack for each series. CR and DX only up to singleImageSeriesMaxImages images.",
21
+ "context": {
22
+ // The limit applies to CR and DX: a larger series keeps one display set
23
+ // for each image. The limit does not apply to MG. Change the value here,
24
+ // for example with a $merge on this rule.
25
+ "singleImageSeriesMaxImages": 9,
26
+ "fitsSingleImageStack": "Modality == 'MG' || seriesInstanceCount <= singleImageSeriesMaxImages"
27
+ },
28
+ "matches": {
29
+ "Modality": ["CR", "DX", "MG"],
30
+ "isImage": true,
31
+ "isMultiFrame": false,
32
+ "fitsSingleImageStack": true
33
+ },
34
+ "groupBy": ["SeriesInstanceUID"],
35
+ "sortBy": ["ImageLaterality", "ViewPosition", "InstanceNumber"]
36
+ }
37
+ }
38
+ },
39
+ "displaySetRuleOrder": {
40
+ "$spliceById": [["singleImageModality", 0, "singleImageSeriesStack"]]
41
+ }
42
+ }
43
+
44
+ }}
@@ -0,0 +1,49 @@
1
+ {"requires":["split/enableNewSplit"],"global":{"useMetadataDisplaySet":
2
+ // Ultrasound: one display set for each sweep.
3
+ //
4
+ // An ultrasound series can hold the single images of several sweeps. The
5
+ // default rules put all of the single images in one stack. With this rule,
6
+ // each sweep becomes its own display set, in time order. A sweep is a run of
7
+ // images with no gap in time longer than `timeClustersMaxGap` seconds. The
8
+ // description gets the start of the sweep, in seconds from the first image of
9
+ // the series.
10
+ //
11
+ // The rule claims single-frame US images that have a time, and only in a series
12
+ // with two or more sweeps. Multi-frame clips stay with the default `multiFrame`
13
+ // rule.
14
+ //
15
+ // The file puts the rule just before the default `defaultImageRule` rule, which
16
+ // would otherwise take the single US images as one display set.
17
+ // `$spliceById` needs `spliceById` of @cornerstonejs/metadata, registered with
18
+ // immutability-helper `extend`.
19
+ {
20
+ // New rules for the registry.
21
+ "displaySetRules": {
22
+ "$merge": {
23
+ "usTimeClusters": {
24
+ "description": "Ultrasound single images: one display set for each sweep of contiguous acquisition time.",
25
+ // 20 s for this rule; the default context uses 30 s.
26
+ "context": { "timeClustersMaxGap": 20 },
27
+ "matches": {
28
+ "isImage": true,
29
+ "Modality": "US",
30
+ "isMultiFrame": false,
31
+ "sweepCount": { "greaterThan": 1 },
32
+ "sweepStart": { "notNull": true }
33
+ },
34
+ "groupBy": ["SeriesInstanceUID", "sweepStart"],
35
+ "sortBy": ["acquisitionSeconds"],
36
+ "attributes": {
37
+ "SeriesDescription": {
38
+ "template": "{SeriesDescription} +{sweepOffset} s"
39
+ }
40
+ }
41
+ }
42
+ }
43
+ },
44
+ "displaySetRuleOrder": {
45
+ "$spliceById": [["defaultImageRule", 0, "usTimeClusters"]]
46
+ }
47
+ }
48
+
49
+ }}
@@ -0,0 +1,24 @@
1
+ {"requires":["split/enableNewSplit"],"global":{"useMetadataDisplaySet":
2
+ // Volumes: slices in position order.
3
+ //
4
+ // The default `volume3d` rule keeps the default instance order
5
+ // (InstanceNumber). InstanceNumber does not always follow the position of the
6
+ // slice, so the stack order and the volume order can differ.
7
+ //
8
+ // This file changes the `sortBy` of `volume3d`: the slices of each display set
9
+ // are in the order of `sliceDistance`, the distance along the normal of the
10
+ // image plane, from one origin for the series. An image that is not in the main
11
+ // plane has no distance, and goes after the images that have one.
12
+ //
13
+ // The rule keeps its id and its place, so a hanging protocol that selects
14
+ // `splitRuleId` `volume3d` still finds the display sets. The file changes only
15
+ // `sortBy`, so it works together with `byAcquisition`, in either order.
16
+ {
17
+ "displaySetRules": {
18
+ "volume3d": {
19
+ "sortBy": { "$set": ["displaySet.sliceDistance", "InstanceNumber"] }
20
+ }
21
+ }
22
+ }
23
+
24
+ }}