@cornerstonejs/core 2.1.16 → 2.1.17
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.
|
@@ -84,26 +84,23 @@ class BaseVolumeViewport extends Viewport {
|
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
const { colormap: latestColormap, VOILUTFunction, interpolationType, invert, slabThickness, preset, } = this.viewportProperties;
|
|
87
|
-
|
|
87
|
+
volumeId ||= this.getVolumeId();
|
|
88
|
+
const volume = cache.getVolume(volumeId);
|
|
88
89
|
if (!volume) {
|
|
89
90
|
return null;
|
|
90
91
|
}
|
|
91
|
-
const
|
|
92
|
-
.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
.filter(Boolean);
|
|
104
|
-
const voiRange = volumeId
|
|
105
|
-
? voiRanges.find((range) => range.volumeId === volumeId)?.voiRange
|
|
106
|
-
: voiRanges[0]?.voiRange;
|
|
92
|
+
const volumeActorEntry = this.getActors().find((actorEntry) => {
|
|
93
|
+
return actorEntry.referencedId === volumeId;
|
|
94
|
+
});
|
|
95
|
+
if (!volumeActorEntry) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const volumeActor = volumeActorEntry.actor;
|
|
99
|
+
const cfun = volumeActor.getProperty().getRGBTransferFunction(0);
|
|
100
|
+
const [lower, upper] = this.viewportProperties?.VOILUTFunction === 'SIGMOID'
|
|
101
|
+
? getVoiFromSigmoidRGBTransferFunction(cfun)
|
|
102
|
+
: cfun.getRange();
|
|
103
|
+
const voiRange = { lower, upper };
|
|
107
104
|
const volumeColormap = this.getColormap(volumeId);
|
|
108
105
|
const colormap = volumeId && volumeColormap ? volumeColormap : latestColormap;
|
|
109
106
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"type": "individual",
|
|
84
84
|
"url": "https://ohif.org/donate"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "b5d10ad761e36b40c53de1bf3cbbf751bf6e8a87"
|
|
87
87
|
}
|