View in #cornerstone3d on Slack
@Tuan_Nguyen: In my angular project, using CornerstoneJS V1.84, i am having this issue when convert contour to surface volume
The code point into at this packages/tools/src/stateManagement/segmentation/polyseg/registerPolySegWorker.ts:
import { getWebWorkerManager } from '@cornerstonejs/core';
let registered = false;
export function registerPolySegWorker() {
if (registered) {
return;
}
registered = true;
const workerFn = () => {
return new Worker(
// @ts-ignore
new URL('../../../workers/polySegConverters', import.meta.url),
{
name: 'polySeg',
type: 'module',
}
);
};
const workerManager = getWebWorkerManager();
const options = {
maxWorkerInstances: 1, // Todo, make this configurable
autoTerminateOnIdle: {
enabled: true,
idleTimeThreshold: 2000,
},
};
workerManager.registerWorker('polySeg', workerFn, options);
}
@Alireza_Sedghi: Angular has a bug, you can follow up with them here https://github.com/angular/angular-cli/issues/28994
1534x780px image
I don’t think they will fix it though
You can use rspack builder which i heard is out for Angular
(haven’t tried myself)
Currently they use esbuild with dev mode which has a lot of issues
Vite is moving off esbuild to rollDown
which is supposed to fix this issue
@Tuan_Nguyen: The V2 and Angular is not working , but the V1.84 is working well with my project.
@Alireza_Sedghi: I know
i linked to the issue
@Tuan_Nguyen: Yeah, it was the same issue i commented on from last year.
@Alireza_Sedghi: try the new rspack builder for angular
it might fix it until they properly move to the new vite
https://github.com/Coly010/ng-rspack-build
Coly010/ng-rspack-build
(haven’t tried it myself)
@Tuan_Nguyen: I will try it when I can. Hopefully it work