@cornerstonejs/tools 2.14.11 → 2.15.0

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.
@@ -139,13 +139,13 @@ class ColorbarCanvas {
139
139
  const maxValue = isHorizontal ? width : height;
140
140
  const { _voiRange: voiRange } = this;
141
141
  const range = this._showFullImageRange ? this._imageRange : { ...voiRange };
142
- const { windowWidth } = utilities.windowLevel.toWindowLevel(voiRange.lower, voiRange.upper);
143
142
  let previousColorPoint = undefined;
144
143
  let currentColorPoint = getColorPoint(0);
145
144
  const incRawPixelValue = (range.upper - range.lower) / (maxValue - 1);
146
145
  let rawPixelValue = range.lower;
147
146
  for (let i = 0; i < maxValue; i++) {
148
- const tVoiRange = (rawPixelValue - voiRange.lower) / windowWidth;
147
+ const tVoiRange = (rawPixelValue - voiRange.lower) /
148
+ Math.abs(voiRange.upper - voiRange.lower);
149
149
  if (currentColorPoint) {
150
150
  for (let i = currentColorPoint.index; i < colorsCount; i++) {
151
151
  if (tVoiRange <= currentColorPoint.position) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "2.14.11",
3
+ "version": "2.15.0",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -104,8 +104,8 @@
104
104
  "canvas": "^2.11.2"
105
105
  },
106
106
  "peerDependencies": {
107
- "@cornerstonejs/core": "^2.14.11",
108
- "@kitware/vtk.js": "32.1.1",
107
+ "@cornerstonejs/core": "^2.15.0",
108
+ "@kitware/vtk.js": "32.9.0",
109
109
  "@types/d3-array": "^3.0.4",
110
110
  "@types/d3-interpolate": "^3.0.1",
111
111
  "d3-array": "^3.2.3",
@@ -123,5 +123,5 @@
123
123
  "type": "individual",
124
124
  "url": "https://ohif.org/donate"
125
125
  },
126
- "gitHead": "160d80fa89bdcb57b0607352086b5b8bc392ab13"
126
+ "gitHead": "e49b1eae91853b14b91a5e22e9af95282abb85fb"
127
127
  }