Weasis: Preloading Images into RAM for Smoother Scrolling?

104 views
Skip to first unread message

Yunus eşme

unread,
Feb 4, 2025, 6:11:58 AMFeb 4
to dcm4che

Hi,
In Weasis, after downloading a patient's images, they are only loaded into RAM when I start scrolling. Before scrolling, there is no noticeable resource usage.

For example, in an HRCT scan or an angiography study with 16,000 slices, the initial RAM usage remains around 3 GB. However, once I start scrolling through the images, RAM usage exceeds 10 GB.

Since images are loaded into RAM during scrolling, I experience stuttering, and the transitions are not smooth.

Is there a solution to preload the patient's images into RAM before scrolling to ensure smoother navigation?

weasisram.jpg

Nicolas Roduit

unread,
Feb 6, 2025, 3:11:42 AMFeb 6
to dcm4che
You're correct that in Weasis, patient images are only loaded into RAM on demand, typically when you begin scrolling through them. This approach helps conserve system resources by not preloading large datasets all at once, which can be advantageous for systems with limited RAM.

However, it's not easy to summarize RAM usage, as it can differ between systems, and there can be more than one level of cache. There's a cache controller in Weasis that limits memory usage for loaded images according to a percentage of allocated memory (also defined by a percentage of available system memory). So, in an extreme case with a series of many images, the size of the allocated cache may be less than the size of the series. This means having to reload images when scrolling. A computer with more RAM will increase the size of the cache. A system like Linux keeps read files in memory as long as memory is available, so images can be reloaded more quickly.

In conclusion, a computer with more resources can take advantage of this, but also allows older computers with fewer resources (such as a Raspberry Pi) to consult large datasets, but with less fluidity. Many viewers need to load the entire series into memory.

Yunus eşme

unread,
Feb 24, 2025, 7:16:16 AMFeb 24
to dcm4che

Yes, having a higher RAM capacity can lead to increased initial RAM usage. However, on the hardware I’m using (64GB RAM), resource usage does not occur until I start scrolling through the patient images. This prevents the system from utilizing its full capacity efficiently when scrolling rapidly.

To prevent stuttering while scrolling, is it possible to:

  1. Preload upcoming images – When a series is opened (image number = 1), can the next 1000 images be loaded into RAM before scrolling starts? This way, if RAM capacity allows, for a 3000-slice dataset, image 1500 could already be loaded when reaching slice 500.
  2. Load all images into RAM – When a study is opened in the DICOM Explorer, can all images linked to that study be preloaded into RAM?
  3. Optimize CPU usage – Is there a way to improve CPU utilization while loading images into RAM?

Would love to hear your thoughts on these possibilities.


6 Şubat 2025 Perşembe tarihinde saat 11:11:42 UTC+3 itibarıyla Nicolas Roduit şunları yazdı:

Nicolas Roduit

unread,
Mar 13, 2025, 4:11:33 AMMar 13
to dcm4che
In the past, images were pre-loaded. This change was made because it was unsuitable in several contexts where there was still more intensive use of the processor.
Reply all
Reply to author
Forward
0 new messages