ImgLib2 in Icy: generic image processing for Icy.
What is ImgLib2?
ImgLib2 is a general-purpose, multidimensional image processing library.
It provides an interface-driven design that supports numeric and non-numeric data types (8-bit unsigned integer, 32-bit floating point, complex numbers, etc.) in an extensible way. It implements several data sources and sample organizations, including one single primitive array, one array per plane, N-dimensional array "cells" cached to and from disk on demand, and planes read on demand from disk.
It offers a clever 'View' framework, that allow the manipulation of data source through many transformation without data duplication: remove a dimension, mirror, ...
Using Views, one can also generate infinitely extending images, which facilites writing core algorithms:
Core algorithms can be combined as the foundation to your own plugin.
ImgLib2 is already used in many places in the ecosystem of open-source software for Life Sciences (KNIME, Fiji, ImageJ1, ImageJ2, CellProfiler) and now Icy with this wrapper.
Why use ImgLib2 to develop your own plugin?
The learning curve for this library can be steep at first. Still it is worth the effort:
- You want to write a plugin that can be easily re-used. If you write its core using ImgLib2, it will be easier to make it available on other software platforms, because you would just have to change the front-end.
- ImgLib2 is dimension generic. It is much easier to write algorithms that operates in 1D, 2D, 3D, etc. with the same code base than with native arrays.
- ImgLib2 is type generic: The same code deals indiferrently with many numeric types (integer, signed - unsigned, real, complex, etc...) without having to copy the data.
- There are many already available core algorithms that can support your plugin.
- It's really cool and it's like doing advanced magic.
- ImgLib2 offers several storage strategies that can bypass common limitations on image sizes.
What is this Icy plugin?
This Icy plugin ships
- A wrapper, that bridges an existing Icy sequence to an ImgLib2 data structure, without data duplication. From this, you can develop a plugin using all the ImgLib2 data structures and algorithms facility.
- A wrapper that does the bridging in the other direction: given an arbitrary ImgLib2 image, you can wrap it in an Icy Sequence and display and interact with in in Icy.
- All the relevant ImgLib2 packages so that the whole library is available for you to code.
Where to start?
The best way to see ig ImgLib2 can be useful to you and to learn using it, is to read this example page.
Then you can check the code of this Icy plugin, which is just a plain example that uses it.