@cornerstonejs/core 1.23.1 → 1.23.3

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": "@cornerstonejs/core",
3
- "version": "1.23.1",
3
+ "version": "1.23.3",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "types": "dist/esm/index.d.ts",
@@ -46,5 +46,5 @@
46
46
  "type": "individual",
47
47
  "url": "https://ohif.org/donate"
48
48
  },
49
- "gitHead": "28ab67ba9ac513970fbd03e95e4b0cfcefca4f66"
49
+ "gitHead": "c527923a8a1afd65e76f9335ac4cc0bc3a0e924b"
50
50
  }
@@ -1134,10 +1134,7 @@ class StackViewport extends Viewport implements IStackViewport {
1134
1134
  const newVOILUTFunction = this._getValidVOILUTFunction(voiLUTFunction);
1135
1135
 
1136
1136
  let forceRecreateLUTFunction = false;
1137
- if (
1138
- this.VOILUTFunction !== VOILUTFunctionType.LINEAR &&
1139
- newVOILUTFunction === VOILUTFunctionType.LINEAR
1140
- ) {
1137
+ if (this.VOILUTFunction !== newVOILUTFunction) {
1141
1138
  forceRecreateLUTFunction = true;
1142
1139
  }
1143
1140
 
@@ -13,6 +13,10 @@ function getTransferFunctionNodes(transferFunction) {
13
13
  }
14
14
 
15
15
  function setTransferFunctionNodes(transferFunction, nodes) {
16
+ if (!nodes?.length) {
17
+ return;
18
+ }
19
+
16
20
  transferFunction.removeAllPoints();
17
21
 
18
22
  nodes.forEach((node) => {