@cornerstonejs/tools 1.70.7 → 1.70.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.
- package/dist/cjs/utilities/stackPrefetch/stackContextPrefetch.js +4 -2
- package/dist/cjs/utilities/stackPrefetch/stackContextPrefetch.js.map +1 -1
- package/dist/cjs/utilities/stackPrefetch/stackPrefetch.js +4 -2
- package/dist/cjs/utilities/stackPrefetch/stackPrefetch.js.map +1 -1
- package/dist/esm/utilities/stackPrefetch/stackContextPrefetch.js +4 -2
- package/dist/esm/utilities/stackPrefetch/stackContextPrefetch.js.map +1 -1
- package/dist/esm/utilities/stackPrefetch/stackPrefetch.js +4 -2
- package/dist/esm/utilities/stackPrefetch/stackPrefetch.js.map +1 -1
- package/dist/types/utilities/stackPrefetch/stackContextPrefetch.d.ts.map +1 -1
- package/dist/types/utilities/stackPrefetch/stackPrefetch.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
- package/src/utilities/stackPrefetch/stackContextPrefetch.ts +6 -2
- package/src/utilities/stackPrefetch/stackPrefetch.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.70.
|
|
3
|
+
"version": "1.70.8",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cornerstonejs/core": "^1.70.
|
|
32
|
+
"@cornerstonejs/core": "^1.70.8",
|
|
33
33
|
"@icr/polyseg-wasm": "0.4.0",
|
|
34
34
|
"@types/offscreencanvas": "2019.7.3",
|
|
35
35
|
"comlink": "^4.4.1",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"type": "individual",
|
|
60
60
|
"url": "https://ohif.org/donate"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "5a76e12669c559dbfae16854f17687f6705d6397"
|
|
63
63
|
}
|
|
@@ -217,7 +217,10 @@ function prefetch(element) {
|
|
|
217
217
|
.loadAndCacheImage(imageId, options)
|
|
218
218
|
.then(() => doneCallback(imageId));
|
|
219
219
|
|
|
220
|
-
const { useNorm16Texture } =
|
|
220
|
+
const { useNorm16Texture, preferSizeOverAccuracy } =
|
|
221
|
+
getCoreConfiguration().rendering;
|
|
222
|
+
|
|
223
|
+
const useNativeDataType = useNorm16Texture || preferSizeOverAccuracy;
|
|
221
224
|
|
|
222
225
|
indicesToRequestCopy.forEach((imageIdIndex) => {
|
|
223
226
|
const imageId = stack.imageIds[imageIdIndex];
|
|
@@ -225,11 +228,12 @@ function prefetch(element) {
|
|
|
225
228
|
// highest priority will be used for the request type in the imageRetrievalPool
|
|
226
229
|
const options = {
|
|
227
230
|
targetBuffer: {
|
|
228
|
-
type:
|
|
231
|
+
type: useNativeDataType ? undefined : 'Float32Array',
|
|
229
232
|
},
|
|
230
233
|
preScale: {
|
|
231
234
|
enabled: true,
|
|
232
235
|
},
|
|
236
|
+
useNativeDataType,
|
|
233
237
|
requestType,
|
|
234
238
|
};
|
|
235
239
|
|
|
@@ -166,18 +166,22 @@ function prefetch(element) {
|
|
|
166
166
|
const requestFn = (imageId, options) =>
|
|
167
167
|
imageLoader.loadAndCacheImage(imageId, options);
|
|
168
168
|
|
|
169
|
-
const { useNorm16Texture } =
|
|
169
|
+
const { useNorm16Texture, preferSizeOverAccuracy } =
|
|
170
|
+
getCoreConfiguration().rendering;
|
|
171
|
+
|
|
172
|
+
const useNativeDataType = useNorm16Texture || preferSizeOverAccuracy;
|
|
170
173
|
|
|
171
174
|
imageIdsToPrefetch.forEach((imageId) => {
|
|
172
175
|
// IMPORTANT: Request type should be passed if not the 'interaction'
|
|
173
176
|
// highest priority will be used for the request type in the imageRetrievalPool
|
|
174
177
|
const options = {
|
|
175
178
|
targetBuffer: {
|
|
176
|
-
type:
|
|
179
|
+
type: useNativeDataType ? undefined : 'Float32Array',
|
|
177
180
|
},
|
|
178
181
|
preScale: {
|
|
179
182
|
enabled: true,
|
|
180
183
|
},
|
|
184
|
+
useNativeDataType,
|
|
181
185
|
requestType,
|
|
182
186
|
};
|
|
183
187
|
|