@cornerstonejs/nifti-volume-loader 2.2.6 → 2.2.8

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.
@@ -106,6 +106,17 @@ function createImage(imageId, sliceIndex, imagePixelModule, imagePlaneModule) {
106
106
  numberOfComponents: 1,
107
107
  scalarData: pixelData,
108
108
  });
109
+ let minPixelValue = pixelData[0];
110
+ let maxPixelValue = pixelData[0];
111
+ for (let i = 1; i < pixelData.length; i++) {
112
+ const pixelValue = pixelData[i];
113
+ if (pixelValue < minPixelValue) {
114
+ minPixelValue = pixelValue;
115
+ }
116
+ if (pixelValue > maxPixelValue) {
117
+ maxPixelValue = pixelValue;
118
+ }
119
+ }
109
120
  return {
110
121
  imageId,
111
122
  dataType: niftiScalarData.constructor
@@ -122,5 +133,7 @@ function createImage(imageId, sliceIndex, imagePixelModule, imagePlaneModule) {
122
133
  getCanvas: undefined,
123
134
  numberOfComponents: undefined,
124
135
  voxelManager,
136
+ minPixelValue,
137
+ maxPixelValue,
125
138
  };
126
139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/nifti-volume-loader",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "description": "Nifti Image Loader for Cornerstone3D",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -62,7 +62,7 @@
62
62
  "nifti-reader-js": "^0.6.8"
63
63
  },
64
64
  "peerDependencies": {
65
- "@cornerstonejs/core": "^2.2.6"
65
+ "@cornerstonejs/core": "^2.2.8"
66
66
  },
67
67
  "contributors": [
68
68
  {
@@ -75,5 +75,5 @@
75
75
  "type": "individual",
76
76
  "url": "https://ohif.org/donate"
77
77
  },
78
- "gitHead": "3734bc4e5c0b8033fa9e9db789d0c5d07c889dfa"
78
+ "gitHead": "9d190e98431221e60c802e308621404455d3eb5a"
79
79
  }