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
A potential bug in updateVTKImageDataWithCornerstoneImage of packages/core/src/utilities/updateVTKImageDataWithCornerstoneImage.ts
if the length of pixelData is bigger then the length of scalarData, then the below code aborts.
scalarData.set(pixelData);
Possible solution:
Add lenth check in _checkVTKImageDataMatchesCornerstoneImage of packages/core/src/RenderingEngine/StackViewport.ts
const pixelData = image.voxelManager.getScalarData();
const scalarData = imageData.getPointData().getScalars().getData() as PixelDataTypedArray;
if (pixelData.length > scalarData.length) {
return false;
}
Steps to Reproduce
lack this stack of image from the below dicom series dicomseries.zip
Scroll through all these images, a exception is thrown while new pixel data length is bigger than scalar data's length
The current behavior
the initial scalardata length is 90966 at line 33 while pixel data length is 86900 at line 8.
the scalar can contains the new pixel data
The expected behavior
the initial scalardata length is 90966 at line 33 while pixel data length is 93610 at line 8.
the scalar can't contains the new pixel data, a exception is thrown
OS
Ubuntu 24.04.1 LTS
Node version
v20.17.0
Browser
Version 131.0.6778.139 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered:
Describe the Bug
A potential bug in updateVTKImageDataWithCornerstoneImage of packages/core/src/utilities/updateVTKImageDataWithCornerstoneImage.ts
if the length of pixelData is bigger then the length of scalarData, then the below code aborts.
scalarData.set(pixelData);
Possible solution:
Add lenth check in _checkVTKImageDataMatchesCornerstoneImage of packages/core/src/RenderingEngine/StackViewport.ts
Steps to Reproduce
lack this stack of image from the below dicom series
dicomseries.zip
Scroll through all these images, a exception is thrown while new pixel data length is bigger than scalar data's length
The current behavior
the initial scalardata length is 90966 at line 33 while pixel data length is 86900 at line 8.
the scalar can contains the new pixel data
The expected behavior
the initial scalardata length is 90966 at line 33 while pixel data length is 93610 at line 8.
the scalar can't contains the new pixel data, a exception is thrown
OS
Ubuntu 24.04.1 LTS
Node version
v20.17.0
Browser
Version 131.0.6778.139 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: