feat: added useCursors, useCPURendering, and maxCacheSize config params (#2988)

This commit is contained in:
Ouwen Huang 2022-11-07 10:05:56 -05:00 committed by GitHub
parent 3d0d09e1bc
commit eb7874bd0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,16 +48,18 @@ export default async function init({
await cs3DInit();
// For debugging e2e tests that are failing on CI
//cornerstone.setUseCPURendering(true);
cornerstone.setUseCPURendering(Boolean(appConfig.useCPURendering));
// For debugging large datasets
//cornerstone.cache.setMaxCacheSize(3000000000);
const MAX_CACHE_SIZE_1GB = 1073741824;
const maxCacheSize = appConfig.maxCacheSize;
cornerstone.cache.setMaxCacheSize(
maxCacheSize ? maxCacheSize : MAX_CACHE_SIZE_1GB
);
initCornerstoneTools();
// Don't use cursors in viewports
// Todo: this should come from extension/app configuration
Settings.getRuntimeSettings().set('useCursors', false);
Settings.getRuntimeSettings().set('useCursors', Boolean(appConfig.useCursors));
const {
UserAuthenticationService,