It took sometime but we are pleased to finally announce Icy 2.0 along the new website !
This new version bring a lot of changes but the major one is the new image cache system that enable visualization and processing of large sequences (time-laps and 3D stacks) which doesn’t fit into the system memory. That was a real limitation in previous versions of Icy and we are happy to finally provide a solution for that.
This feature is enabled through the new Icy’s Virtual Mode but it will be automatically enabled for Sequences which doesn’t fit into memory:
Note that this feature is still experimental and so some plugins may not work properly when using Icy in Virtual Mode. Also the Virtual mode can dramatically impact the performance as the disk is used as temporary memory so use Virtual Mode only when needed.
Important technical note for Icy plugins developers
This new feature is a major change in how image data is handled in Icy and may bring some issues with your plugin. When a Sequence is in Virtual mode (using setVolatile(true) or setVirtual(true) methods) then the image data is volatile and can be flushed from RAM and be temporary stored on disk. Because of that, you may loss the modified image data depending the way you are processing your images. The basic idea to avoid any data loss is to set back modified image data into the image, but an example is better than thousands words…
Before if you wanted to quickly normalize image data (for double data type image) you could do that:
final IcyBufferedImage image = sequence.getImage(z, t); // retrieve direct reference of the native data array final Object imageData = image.getDataXY(c); // processing / modifying image data final double max = ArrayMath.max(imageData, sequence.isSignedDataType()); ArrayMath.divide(imageData, max, imageData);
imageData is a direct reference to the native data array storing image pixels value so modifying this array was enough to modify the image itself. This is still true but the difference is that this array is now volatile so it can be released as soon you don’t reference it anymore and so your modifications can be lost. To avoid that, you need to change your code like this:
final IcyBufferedImage image = sequence.getImage(z, t); // retrieve direct reference of the native data array final Object imageData = image.getDataXY(c); // processing / modifying image data final double max = ArrayMath.max(imageData, sequence.isSignedDataType()); ArrayMath.divide(imageData, max, imageData); // set back image data (so the image know that we modified its data) image.setDataXY(c, imageData);
You can see that we added this part at the end: image.setDataXY(c, imageData);
This is important as it let the image know that we (potentially) modified its data and so correctly update the disk cache. If you take care of this in your plugin, you should be fully compatible with the new Virtual Mode of Icy 🙂