Weasis - Image's loading

449 views
Skip to first unread message

Rafael de Faria Scheidt

unread,
May 8, 2014, 5:36:44 PM5/8/14
to dcm...@googlegroups.com
Hello, 

I'm using the Weasis and noticed a behavior that I believe it can improve. 

If you clicking on "serie" the Weasis, loads the first frame on the screen. If I have clicked on this image, it automatically (in the background of course) loads all other images to the computer's memory (up to the memory limit setted in java). Once the Weasis reaches the memory limit of java (configured at start-Xms1024m - Xmx3072m) it resets the memory and begins to load the images again, keeping only the last loaded. 

This behavior creates a problem because the doctor will "see" the speed of loading. 

There is no way to "clear all the memory of images" when you click on the "serie"? Automatically load and start at moment, and not, click on the image? 

I know this is something very specific, but it is important to use. I'm a developer and would like to put this behavior in my version. What do you think? 

Regards,

--
-----------------------------------------------
 Rafael de Faria Scheidt, MSc, CSM
-----------------------------------------------

nicolas...@gmail.com

unread,
May 9, 2014, 6:21:23 AM5/9/14
to
See my inline comments


On Thursday, May 8, 2014 11:36:44 PM UTC+2, Rafael Scheidt wrote:
Hello, 

I'm using the Weasis and noticed a behavior that I believe it can improve. 

If you clicking on "serie" the Weasis, loads the first frame on the screen. If I have clicked on this image, it automatically (in the background of course) loads all other images to the computer's memory (up to the memory limit setted in java). Once the Weasis reaches the memory limit of java (configured at start-Xms1024m - Xmx3072m) it resets the memory and begins to load the images again, keeping only the last loaded. 
 
You cannot manage directly the memory in Java. Weasis uses two level of cache when displaying images. The first one is for keeping the image raw data and it uses the SoftReference mechanism (at a threshold value the objects which has been not access for long time are deleted). The second one is the Java Advanced Imaging tile cache for keeping in cache the final image rendered.


This behavior creates a problem because the doctor will "see" the speed of loading. 
 
If you talk about the small white progress bar, maybe the best option will be to remove it. However, I don't really understand the problem.


There is no way to "clear all the memory of images" when you click on the "serie"? Automatically load and start at moment, and not, click on the image? 
 
Preloading images when you click on the image allows to scroll faster in the series that you are manipulating. For some decoders (like new native jpeg-ls) it becomes useless to preload in memory the images. 
  

I know this is something very specific, but it is important to use. I'm a developer and would like to put this behavior in my version. What do you think? 
 
You are free to propose a better solution but remember that the current configuration is not 3072 MB of memory (not possible on 32-bit system). Changing the memory management is quite challenging. The current memory management allows to open and to manipulate more than 10 GB of image even when the maximum memory of the application is 512 MB. For instance with the MPR, It is possible to open series that is larger than the memory size available by the application.

Rafael de Faria Scheidt

unread,
May 9, 2014, 4:27:11 PM5/9/14
to dcm...@googlegroups.com
Hello Nicolas,

Firstly thank you for your very detailed explanation. 
Today I was testing another commercial viewed (in c + + on windows), and found that it has the same problem. When I move the images do not load, it crashes to get the images.

The strategy of Weasis to memory is really very good, but the 512 xmx is very poor for large studies (~500 images) :/

Where can I increase the java memory (-Xmx) for the resources-web version? 
The "portable" version I changed the weasis-win32.l4j file and it works. 

Thank you,


On Fri, May 9, 2014 at 7:20 AM, <nicolas...@gmail.com> wrote:
See my inline comments


On Thursday, May 8, 2014 11:36:44 PM UTC+2, Rafael Scheidt wrote:
Hello, 

I'm using the Weasis and noticed a behavior that I believe it can improve. 

If you clicking on "serie" the Weasis, loads the first frame on the screen. If I have clicked on this image, it automatically (in the background of course) loads all other images to the computer's memory (up to the memory limit setted in java). Once the Weasis reaches the memory limit of java (configured at start-Xms1024m - Xmx3072m) it resets the memory and begins to load the images again, keeping only the last loaded. 
You cannot manage directly the memory in Java. Weasis uses two level of cache when displaying images. The first one is for keeping the image raw data and it uses the SoftReference mechanism (at a threshold value the objects which has been not access for long time are deleted). The second one is the Java Advanced Imaging tile cache for keeping in cache the final image rendered.

This behavior creates a problem because the doctor will "see" the speed of loading. 
If you talk about the small white progress bar, maybe the best option will be to remove it. However, I don't really understand the problem.

There is no way to "clear all the memory of images" when you click on the "serie"? Automatically load and start at moment, and not, click on the image? 
Preloading images when you click on the image allows to scroll faster in the series that you are manipulating. For some decoders (like new native jpeg-ls) it becomes useless to preload in memory the images.   

I know this is something very specific, but it is important to use. I'm a developer and would like to put this behavior in my version. What do you think? 
You are free to propose a better solution but remember that the current configuration is not 3072 MB of memory (not possible on 32-bit system). Changing the memory management is quite challenging. The current memory management allows to open and to manipulate more than 10 GB of image even when the maximum memory of the application is 512 MB. For instance with the MPR, It is possible to open series that is larger than the memory size available by the application.
 

Regards,

--
-----------------------------------------------
 Rafael de Faria Scheidt, MSc, CSM
-----------------------------------------------

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at http://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.

nicolas...@gmail.com

unread,
May 10, 2014, 3:24:06 AM5/10/14
to dcm...@googlegroups.com
For the web version, you need to override the default configuration, see Configure Weasis item in this page. Edit weasis-jnlp.xml and replace the max memory values:
<j2se version="1.6.0_10+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="128m" max-heap-size="512m" />
<j2se version="1.6.0_10+" initial-heap-size="128m" max-heap-size="512m" />
by
<j2se version="1.6.0_10+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="128m" max-heap-size="1024m" />
<j2se version="1.6.0_10+" initial-heap-size="128m" max-heap-size="1024m" />

Be aware if you set 3072m that the viewer won't start in some environment. I don't know if it is still the case with Java 7 but with Java 6 on 32-bit Windows the maximum value was around 1.5 GB (with a upper value the application doesn't start).

Rafael de Faria Scheidt

unread,
May 11, 2014, 10:04:13 PM5/11/14
to dcm...@googlegroups.com

Thanks Nicolas.

Reply all
Reply to author
Forward
0 new messages