Open kadeem220 opened 1 year ago
Yeah you can use stackPrefetch
in the utilities
Yeah you can use
stackPrefetch
in the utilities
Hey, i have same problem with images being all white when i use loadAndCacheImages(imageIds)
Tried to use stackPrefetch The error comes from cache being undefined Same happens when i import cornerstone as a whole from @cornerstonejs/core from my init file after init function(ignore the error):
Am i doing something wrong?
Take a peek inside the stackViewport to get a better understanding of the parameters we include in the options of the loadAndCacheImage. I think it's important to enable scaling.
Also this is related, https://github.com/cornerstonejs/cornerstone3D/issues/887 Maybe you can help us with a PR
I would like to know what is the best way to cache images without rendering them because I tried using
cornerstone3D.imageLoader.loadAndCacheImages(imageIds)
and the problem is that some of the studies end up having the wrong windowing values or they just go white. Looks like the viewport gets messed up when using loadAndCacheImages. I know that we are not supposed to use that anymore and that caching will be done automatically when I load the next imageId but I still need something to load the images in memory somehow.
Example: I load a series that has 300 images and the user wants to cine play the series at 20 frames/second. They will need to wait for a long time (up to like 20-30 seconds) until the cine is smooth because we are getting the images on demand for the first run (and the speed of this also depends on connection, PC, browser etc.). What is the move here? I want to start loading imageIds in the background so as soon as the user clicks on the play button, it will start to play smoothly. I achieve this using loadAndCacheImages(imageIds) but the images on some studies will look off, something like this:
If I don't use loadAndCacheImages then it renders correctly but it is stuttery until like 10-20 seconds, until all images were loaded once and cached by the viewport.
Any help is appreciated. Thanks.