@ohif/extension-cornerstone 3.14.0-beta.127 → 3.14.0-beta.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohif/extension-cornerstone",
3
- "version": "3.14.0-beta.127",
3
+ "version": "3.14.0-beta.129",
4
4
  "description": "OHIF extension for Cornerstone",
5
5
  "author": "OHIF",
6
6
  "license": "MIT",
@@ -35,10 +35,10 @@
35
35
  "@cornerstonejs/codec-libjpeg-turbo-8bit": "1.2.4",
36
36
  "@cornerstonejs/codec-openjpeg": "1.3.2",
37
37
  "@cornerstonejs/codec-openjph": "2.4.9",
38
- "@cornerstonejs/dicom-image-loader": "5.27.2",
39
- "@ohif/core": "3.14.0-beta.127",
40
- "@ohif/extension-default": "3.14.0-beta.127",
41
- "@ohif/ui-next": "3.14.0-beta.127",
38
+ "@cornerstonejs/dicom-image-loader": "5.27.4",
39
+ "@ohif/core": "3.14.0-beta.129",
40
+ "@ohif/extension-default": "3.14.0-beta.129",
41
+ "@ohif/ui-next": "3.14.0-beta.129",
42
42
  "dcmjs": "1.1.0",
43
43
  "dicom-parser": "1.8.21",
44
44
  "hammerjs": "2.0.8",
@@ -47,14 +47,14 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@babel/runtime": "7.29.7",
50
- "@cornerstonejs/adapters": "5.27.2",
51
- "@cornerstonejs/ai": "5.27.2",
52
- "@cornerstonejs/core": "5.27.2",
53
- "@cornerstonejs/labelmap-interpolation": "5.27.2",
54
- "@cornerstonejs/metadata": "5.27.2",
55
- "@cornerstonejs/polymorphic-segmentation": "5.27.2",
56
- "@cornerstonejs/tools": "5.27.2",
57
- "@cornerstonejs/utils": "5.27.2",
50
+ "@cornerstonejs/adapters": "5.27.4",
51
+ "@cornerstonejs/ai": "5.27.4",
52
+ "@cornerstonejs/core": "5.27.4",
53
+ "@cornerstonejs/labelmap-interpolation": "5.27.4",
54
+ "@cornerstonejs/metadata": "5.27.4",
55
+ "@cornerstonejs/polymorphic-segmentation": "5.27.4",
56
+ "@cornerstonejs/tools": "5.27.4",
57
+ "@cornerstonejs/utils": "5.27.4",
58
58
  "@icr/polyseg-wasm": "0.4.0",
59
59
  "@itk-wasm/morphological-contour-interpolation": "1.1.0",
60
60
  "@kitware/vtk.js": "36.4.1",
@@ -0,0 +1,16 @@
1
+ import viewportOverlayCustomization from './viewportOverlayCustomization';
2
+
3
+ // SP-FIX-3: the overlay shows the series description that a split rule sets on the display set.
4
+ describe('viewportOverlay.topLeft SeriesDescription', () => {
5
+ const item = viewportOverlayCustomization['viewportOverlay.topLeft'].find(
6
+ ({ id }) => id === 'SeriesDescription'
7
+ );
8
+ const referenceInstance = { SeriesDescription: 'DWI' };
9
+
10
+ it('shows the description of the display set, and falls back to the instance', () => {
11
+ const split = { displaySet: { SeriesDescription: 'DWI b=800' }, referenceInstance };
12
+ expect(item.contentF(split)).toBe('DWI b=800');
13
+ expect(item.contentF({ displaySet: {}, referenceInstance })).toBe('DWI');
14
+ expect(item.contentF({ displaySet: {}, referenceInstance: {} })).toBeFalsy();
15
+ });
16
+ });
@@ -14,10 +14,10 @@ export default {
14
14
  inheritsFrom: 'ohif.overlayItem',
15
15
  label: '',
16
16
  title: 'Series description',
17
- condition: ({ referenceInstance }) => {
18
- return referenceInstance && referenceInstance.SeriesDescription;
19
- },
20
- contentF: ({ referenceInstance }) => referenceInstance.SeriesDescription,
17
+ // A split rule sets its description on the display set, not on the instance.
18
+ // No condition: OverlayItem renders nothing for an empty value.
19
+ contentF: ({ displaySet, referenceInstance }) =>
20
+ displaySet?.SeriesDescription || referenceInstance?.SeriesDescription,
21
21
  },
22
22
  ],
23
23
  'viewportOverlay.topRight': [],