Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] setDefaultVolumeVOI bug #1767

Open
aodong8808 opened this issue Jan 20, 2025 · 0 comments
Open

[Bug] setDefaultVolumeVOI bug #1767

aodong8808 opened this issue Jan 20, 2025 · 0 comments

Comments

@aodong8808
Copy link

Describe the Bug

getVOIFromMetadata logic error in setDefaultVolumeVOI

Steps to Reproduce

1、 const volume = await volumeLoader.createAndCacheVolume(ctVolumeId, { imageIds: [...imageIds] });
2、options.imageIds of cornerstoneStreamingImageVolumeLoader is in positive sequence,

const [middleImageIndex, lastImageIndex] = [ Math.floor(options.imageIds.length / 2), 
options.imageIds.length - 1, ];

the obtained middleImageIndex is 29, and the imageId is 'wadouri:http://~1.2.840.113619 .2.472.3.40120842.710.1685265533.1.30.dcm'
Why is the imageIds obtained in
const { imageIds, metadata } = imageVolume;
in getVOIFromMetadata in reverse order, resulting in

const imageIdIndex = Math.floor(imageIds.length / 2);
const imageId = imageIds[imageIdIndex];

The imageId obtained is 'wadouri:http://~1.2.840.113619.2.472.3.40120842.710.1685265533.1.29.dcm',
the image has not been downloaded yet,
const voiLutModule = metaData.get('voiLutModule', imageId);
voiLutModule is undefined, the voi obtained by getVOIFromMiddleSliceMinMax is incorrect and very different from the image itself. Why is the order of imageIds reversed?

The current behavior

The obtained windowWidth and windowCenter are incorrect.

The expected behavior

getVOIFromMetadata returns the correct voi

OS

windows11

Node version

16.14.0

Browser

chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant