You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I use cornerstone to display multframe and scroll to change, The memory increase very fast .
I found the reason is possMessage to worker, transfer param do not add and the type of pixelData param is Unit8, not arraybuff.
I change like this:
cornerstoneWADOImageLoader.js
processDecodeTask method 831 line
function processDecodeTask(imageFrame, transferSyntax, pixelData, options) {
let passs_pixelData = new Uint8Array(pixelData.slice(0)); //copy pixelData, pass worker not clear data ,new .. prevent .buffer error
var priority = options.priority || undefined;
// var transferList = options.transferPixelData ? [passs_pixelData.buffer] : undefined;
var transferList = [passs_pixelData.buffer]; //worker transfer
var loaderOptions = (0, _options.getOptions)();
var strict = loaderOptions.strict,
decodeConfig = loaderOptions.decodeConfig,
useWebWorkers = loaderOptions.useWebWorkers;
if (useWebWorkers === false) {
if (codecsInitialized === false) {
(0, _decodeJPEG.initializeJPEG2000)(decodeConfig);
(0, _decodeJPEGLS.initializeJPEGLS)(decodeConfig);
when I use cornerstone to display multframe and scroll to change, The memory increase very fast .
I found the reason is possMessage to worker, transfer param do not add and the type of pixelData param is Unit8, not arraybuff.
I change like this:
cornerstoneWADOImageLoader.js
processDecodeTask method 831 line
function processDecodeTask(imageFrame, transferSyntax, pixelData, options) {
let passs_pixelData = new Uint8Array(pixelData.slice(0)); //copy pixelData, pass worker not clear data ,new .. prevent .buffer error
var priority = options.priority || undefined;
// var transferList = options.transferPixelData ? [passs_pixelData.buffer] : undefined;
var transferList = [passs_pixelData.buffer]; //worker transfer
var loaderOptions = (0, _options.getOptions)();
var strict = loaderOptions.strict,
decodeConfig = loaderOptions.decodeConfig,
useWebWorkers = loaderOptions.useWebWorkers;
if (useWebWorkers === false) {
if (codecsInitialized === false) {
(0, _decodeJPEG.initializeJPEG2000)(decodeConfig);
(0, _decodeJPEGLS.initializeJPEGLS)(decodeConfig);
}
return _webWorkerManager2.default.addTask('decodeTask', {
imageFrame: imageFrame,
transferSyntax: transferSyntax,
pixelData: passs_pixelData.buffer, //pass buffer,make transfer effect
options: options
}, priority, transferList).promise;
}
The text was updated successfully, but these errors were encountered: