feat(tmtv-mode): Add Brush tools and move SUV peak calculation to web worker (#4053)
This commit is contained in:
1 parent
8c5ab942b9
commit
8192e348ec
27 files changed
+593
-212
No files matched your search
+8
-6
@@ -2,10 +2,12 @@ import { getWebWorkerManager } from '@cornerstonejs/core';
|
||||
|
||||
const workerManager = getWebWorkerManager();
|
||||
|
||||
const options = {
|
||||
// maxWorkerInstances: 1,
|
||||
// overwrite: false
|
||||
autoTerminationOnIdle: 1000,
|
||||
const WorkerOptions = {
|
||||
maxWorkerInstances: 1,
|
||||
autoTerminateOnIdle: {
|
||||
enabled: true,
|
||||
idleTimeThreshold: 1000,
|
||||
},
|
||||
};
|
||||
|
||||
// Register the task
|
||||
@@ -15,9 +17,9 @@ const workerFn = () => {
|
||||
});
|
||||
};
|
||||
|
||||
workerManager.registerWorker('histogram-worker', workerFn, options);
|
||||
|
||||
const getViewportVolumeHistogram = async (viewport, volume, options?) => {
|
||||
workerManager.registerWorker('histogram-worker', workerFn, WorkerOptions);
|
||||
|
||||
if (!volume?.loadStatus.loaded) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user