Insufficient memory warnings and failure when trying to display large 3d data with volshow as blokedImage while using OverlayData
56 views (last 30 days)
Show older comments
Sebastian Bohn
on 25 Aug 2024 at 16:36
Commented: Sebastian Bohn
on 27 Aug 2024 at 12:25
Hello,
I have some biomedical 3D data that I want to display with volshow. Because some array dimensions of my data are larger than 2048 I use blockedImage.
Now I get the following warnings multiple times when I try to display this data with the OverlayData propertiy of volshow:
Warning: Insufficient memory. Viewer3D will attempt to render a downsampled version of the scene. Consider converting volumes into a 3-D
blockedImage.
The viewer opens and is working but fails to render anything. Finally, I recieve the message:
Warning: Insufficient memory. Viewer3D will attempt to render a downsampled version of the scene. Consider converting volumes into a 3-D
blockedImage.
I'm confused by this because I already use blockedImage. By trying to solve this problem, I discovered that this happens when the dimenson product of my data array reaches 2*1024³, independet of datatype (thats why I didn't write 2GB). However, I have no problems when using no OverlayData, even with volumes more than twice as large.
A simple code to reproduce this problem would be:
V = ones(2048,2048,512,'uint8');
bim = blockedImage(V,BlockSize=[512 512 512]);
volshow(bim,OverlayData=bim);
As soon I decrease the dimension by a tiny bit, I have no problems. Memory should be also no problem on my machine. 64 GB RAM that is shared with the iGPU up to 32 GB.
Another thing is that I previously had no problems with an odler version of MATLAB rendering my data last year. I think it was 2023a. I also tried it now with 2023b and my data works fine, however, when using the sample code above, the viewer doesn't even open and matlab is stuck "busy". But this seems to be another problem.
Could pls help me fixing this issue with the current MATLAB 2024a version?
Best regards,
Sebastian
0 Comments
Accepted Answer
Aravind
on 27 Aug 2024 at 11:16
Hi Sebastian,
I'm facing the same issue in R2024a, and it seems like there is a bug in the “volshow” function. I tried it out in the latest Prerelease of MATLAB R2024b, and it seems to work there. Given that it works in the Prerelease version, it's likely that MathWorks will fix the issue in the stable R2024b release. For now, you might want to try using the latest Prerelease of R2024b to run your code.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!