@cornerstonejs/tools 4.10.1 → 4.10.2

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.
@@ -21,6 +21,9 @@ class SegmentationStyle {
21
21
  else if (merge) {
22
22
  updatedStyles = this.copyActiveToInactiveIfNotProvided(mergedStyles, type);
23
23
  }
24
+ else {
25
+ updatedStyles = mergedStyles;
26
+ }
24
27
  if (!type) {
25
28
  throw new Error('Type is required to set a style');
26
29
  }
@@ -13,6 +13,7 @@ export function getSVGStyleForSegment({ segmentationId, segmentIndex, viewportId
13
13
  });
14
14
  const activeSegmentation = getActiveSegmentation(viewportId);
15
15
  const isActive = activeSegmentation?.segmentationId === segmentationId;
16
+ const inactiveSegmentationVisibility = segmentationStyle.getRenderInactiveSegmentations(viewportId);
16
17
  const style = segmentationStyle.getStyle({
17
18
  viewportId,
18
19
  segmentationId,
@@ -24,6 +25,7 @@ export function getSVGStyleForSegment({ segmentationId, segmentIndex, viewportId
24
25
  let lineDash = undefined;
25
26
  let lineOpacity = 1;
26
27
  let fillOpacity = 0;
28
+ let renderFill = mergedConfig.renderFill ?? true;
27
29
  if (autoGenerated) {
28
30
  lineWidth = mergedConfig.outlineWidthAutoGenerated ?? lineWidth;
29
31
  lineDash = mergedConfig.outlineDashAutoGenerated ?? lineDash;
@@ -41,12 +43,13 @@ export function getSVGStyleForSegment({ segmentationId, segmentIndex, viewportId
41
43
  lineDash = mergedConfig.outlineDashInactive ?? lineDash;
42
44
  lineOpacity = mergedConfig.outlineOpacityInactive ?? lineOpacity;
43
45
  fillOpacity = mergedConfig.fillAlphaInactive ?? fillOpacity;
46
+ renderFill = mergedConfig.renderFillInactive ?? renderFill;
44
47
  }
45
48
  if (getActiveSegmentIndex(segmentationId) === segmentIndex) {
46
49
  lineWidth += mergedConfig.activeSegmentOutlineWidthDelta;
47
50
  }
48
51
  lineWidth = mergedConfig.renderOutline ? lineWidth : 0;
49
- fillOpacity = mergedConfig.renderFill ? fillOpacity : 0;
52
+ fillOpacity = renderFill ? fillOpacity : 0;
50
53
  const color = `rgba(${segmentColor[0]}, ${segmentColor[1]}, ${segmentColor[2]}, ${lineOpacity})`;
51
54
  const fillColor = `rgb(${segmentColor[0]}, ${segmentColor[1]}, ${segmentColor[2]})`;
52
55
  const hiddenSegments = internalGetHiddenSegmentIndices(viewportId, {
@@ -63,6 +66,8 @@ export function getSVGStyleForSegment({ segmentationId, segmentIndex, viewportId
63
66
  textbox: {
64
67
  color,
65
68
  },
66
- visibility: segmentationVisible && isVisible,
69
+ visibility: isActive
70
+ ? segmentationVisible && isVisible
71
+ : inactiveSegmentationVisibility,
67
72
  };
68
73
  }
@@ -1 +1 @@
1
- export declare const version = "4.10.1";
1
+ export declare const version = "4.10.2";
@@ -1 +1 @@
1
- export const version = '4.10.1';
1
+ export const version = '4.10.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "4.10.1",
3
+ "version": "4.10.2",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -108,7 +108,7 @@
108
108
  "canvas": "3.2.0"
109
109
  },
110
110
  "peerDependencies": {
111
- "@cornerstonejs/core": "4.10.1",
111
+ "@cornerstonejs/core": "4.10.2",
112
112
  "@kitware/vtk.js": "32.12.1",
113
113
  "@types/d3-array": "3.2.1",
114
114
  "@types/d3-interpolate": "3.0.4",
@@ -127,5 +127,5 @@
127
127
  "type": "individual",
128
128
  "url": "https://ohif.org/donate"
129
129
  },
130
- "gitHead": "9a5d8930fb15228a16b6cd216a6b840a0f8b6d9a"
130
+ "gitHead": "3eb4109c2c32ccaacca9391792a98e18604b2e32"
131
131
  }