From 358894ac63eb4e1270fe5865e65a636a42a60423 Mon Sep 17 00:00:00 2001 From: Alireza Date: Wed, 21 Dec 2022 15:46:28 -0500 Subject: [PATCH] update cswil --- packages/core/src/utilities/createUInt16SharedArray.ts | 2 +- packages/core/src/utilities/createUint8SharedArray.ts | 2 +- packages/docs/package.json | 2 +- packages/streaming-image-volume-loader/package.json | 4 ++-- .../src/sharedArrayBufferImageLoader.ts | 3 ++- yarn.lock | 8 ++++---- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/core/src/utilities/createUInt16SharedArray.ts b/packages/core/src/utilities/createUInt16SharedArray.ts index 0dbe461906..6f2ae8c154 100644 --- a/packages/core/src/utilities/createUInt16SharedArray.ts +++ b/packages/core/src/utilities/createUInt16SharedArray.ts @@ -35,7 +35,7 @@ function createUint16SharedArray(length: number): Uint16Array { ); } - const sharedArrayBuffer = new SharedArrayBuffer(length); + const sharedArrayBuffer = new SharedArrayBuffer(length * 2); return new Uint16Array(sharedArrayBuffer); } diff --git a/packages/core/src/utilities/createUint8SharedArray.ts b/packages/core/src/utilities/createUint8SharedArray.ts index c7052ec1d9..2394693c85 100644 --- a/packages/core/src/utilities/createUint8SharedArray.ts +++ b/packages/core/src/utilities/createUint8SharedArray.ts @@ -35,7 +35,7 @@ function createUint8SharedArray(length: number): Uint8Array { ); } - const sharedArrayBuffer = new SharedArrayBuffer(length * 2); + const sharedArrayBuffer = new SharedArrayBuffer(length); return new Uint8Array(sharedArrayBuffer); } diff --git a/packages/docs/package.json b/packages/docs/package.json index b7c35dae57..35753427bc 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -38,7 +38,7 @@ "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^6.2.1", "clsx": "^1.1.1", - "cornerstone-wado-image-loader": "^4.5.1", + "cornerstone-wado-image-loader": "^4.5.2", "dcmjs": "0.19.2", "detect-gpu": "^4.0.45", "dicom-parser": "^1.8.11", diff --git a/packages/streaming-image-volume-loader/package.json b/packages/streaming-image-volume-loader/package.json index 7894bbc545..6d3033ed3c 100644 --- a/packages/streaming-image-volume-loader/package.json +++ b/packages/streaming-image-volume-loader/package.json @@ -27,14 +27,14 @@ }, "dependencies": { "@cornerstonejs/core": "^0.23.0", - "cornerstone-wado-image-loader": "^4.5.1" + "cornerstone-wado-image-loader": "^4.5.2" }, "peerDependencies": { "@cornerstonejs/calculate-suv": "1.0.2" }, "devDependencies": { "@cornerstonejs/calculate-suv": "1.0.2", - "cornerstone-wado-image-loader": "^4.5.1" + "cornerstone-wado-image-loader": "^4.5.2" }, "contributors": [ { diff --git a/packages/streaming-image-volume-loader/src/sharedArrayBufferImageLoader.ts b/packages/streaming-image-volume-loader/src/sharedArrayBufferImageLoader.ts index de45a0fe4f..e49e6150ed 100644 --- a/packages/streaming-image-volume-loader/src/sharedArrayBufferImageLoader.ts +++ b/packages/streaming-image-volume-loader/src/sharedArrayBufferImageLoader.ts @@ -59,7 +59,8 @@ function sharedArrayBufferImageLoader( transferSyntax, pixelData, canvas, - options + options, + { convertFloatPixelDataToInt: false, use16BitDataType: true } ); decodePromise.then(() => { diff --git a/yarn.lock b/yarn.lock index 415a4c5140..dfb468813a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8199,10 +8199,10 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cornerstone-wado-image-loader@^4.5.1: - version "4.5.1" - resolved "https://registry.npmjs.org/cornerstone-wado-image-loader/-/cornerstone-wado-image-loader-4.5.1.tgz#dc1b353ef3658e65e340da1c26ef919b1a4d14c3" - integrity sha512-/+bmzUSeTb5Hm/5STB0fgKHFe6wN7+zNngYSPefPHhkpEo5zVboBv57UvwJBaga8Cobyg7aEzTCxh3OCbyMcSA== +cornerstone-wado-image-loader@^4.5.2: + version "4.5.2" + resolved "https://registry.npmjs.org/cornerstone-wado-image-loader/-/cornerstone-wado-image-loader-4.5.2.tgz#a29cf9e8a05f49429054ea7dbd2e8bff5a3b54bb" + integrity sha512-rnTK1RrYcpJtf9GOKN8CnzzJHDZyS8wReKt79SrryIXqX7ZNApcKj56RQyFG1r9w8JYgOW08zzBoeUOLI3X50g== dependencies: "@babel/eslint-parser" "^7.19.1" "@cornerstonejs/codec-charls" "^0.1.1"