fix(no sab): should work when shared array buffer is not required (#3686)
This commit is contained in:
parent
3dabee2342
commit
a67d72de85
@ -42,17 +42,7 @@ export default async function init({
|
||||
configuration,
|
||||
appConfig,
|
||||
}: Types.Extensions.ExtensionParams): Promise<void> {
|
||||
|
||||
await cs3DInit({
|
||||
rendering: {
|
||||
preferSizeOverAccuracy: Boolean(appConfig.use16BitDataType),
|
||||
useNorm16Texture: Boolean(appConfig.use16BitDataType),
|
||||
},
|
||||
});
|
||||
|
||||
// For debugging e2e tests that are failing on CI
|
||||
cornerstone.setUseCPURendering(Boolean(appConfig.useCPURendering));
|
||||
|
||||
// Note: this should run first before initializing the cornerstone
|
||||
switch (appConfig.useSharedArrayBuffer) {
|
||||
case 'AUTO':
|
||||
cornerstone.setUseSharedArrayBuffer(csEnums.SharedArrayBufferModes.AUTO);
|
||||
@ -64,6 +54,16 @@ export default async function init({
|
||||
cornerstone.setUseSharedArrayBuffer(csEnums.SharedArrayBufferModes.TRUE);
|
||||
}
|
||||
|
||||
await cs3DInit({
|
||||
rendering: {
|
||||
preferSizeOverAccuracy: Boolean(appConfig.use16BitDataType),
|
||||
useNorm16Texture: Boolean(appConfig.use16BitDataType),
|
||||
},
|
||||
});
|
||||
|
||||
// For debugging e2e tests that are failing on CI
|
||||
cornerstone.setUseCPURendering(Boolean(appConfig.useCPURendering));
|
||||
|
||||
cornerstone.setConfiguration({
|
||||
...cornerstone.getConfiguration(),
|
||||
rendering: {
|
||||
|
||||
@ -181,7 +181,7 @@ if auth headers are used, a preflight request is required.
|
||||
- `showLoadingIndicator`: (default to true), if set to false, the loading indicator will not be shown when navigating between studies.
|
||||
- `use16BitDataType`: (default to false), if set to true, it will use 16 bit data type for the image data wherever possible which has
|
||||
significant impact on reducing the memory usage. However, the 16Bit textures require EXT_texture_norm16 extension in webGL 2.0 (you can check if you have it here https://webglreport.com/?v=2). In addition to the extension, there are reported problems for Intel Macs that might cause the viewer to crash. In summary, it is great a configuration if you have support for it.
|
||||
- `useSharedArrayBuffer` (default to true), for volume loading we use sharedArrayBuffer to be able to
|
||||
- `useSharedArrayBuffer` (default to 'TRUE', options: 'AUTO', 'FALSE', 'TRUE', note that these are strings), for volume loading we use sharedArrayBuffer to be able to
|
||||
load the volume progressively as the data arrives (each webworker has the shared buffer and can write to it). However, there might be certain environments that do not support sharedArrayBuffer. In that case, you can set this flag to false and the viewer will use the regular arrayBuffer which might be slower for large volume loading.
|
||||
- `supportsWildcard`: (default to false), if set to true, the datasource will support wildcard matching for patient name and patient id.
|
||||
- `dangerouslyUseDynamicConfig`: Dynamic config allows user to pass `configUrl` query string. This allows to load config without recompiling application. If the `configUrl` query string is passed, the worklist and modes will load from the referenced json rather than the default .env config. If there is no `configUrl` path provided, the default behaviour is used and there should not be any deviation from current user experience.<br/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user