Daniel Sage: MIJ: Making Interoperability Between ImageJ and Matlab Possible
D. Sage, D. Prodanov, J.-Y. Tinevez, J. Schindelin
ImageJ User & Developer Conference (IUDC'12), Mondorf-les-Bains, Grand Duchy of Luxembourg, October 24-26, 2012.
We present a software module MIJ[1] that allows to combine the powerful numerical computation of Matlab[2] and the image-analysis capabilities of ImageJ[3]. Since both ImageJ and Matlab run on multiple operating systems, MIJ is platform-independent. MIJ uses the Java Virtual Machine (JVM) of Matlab to call ImageJ methods from the Matlab console or scripts. In such way, we could bring the richness of ImageJ and of theirs plugins to the Matlab world.
MIJ contains a collection of static methods to bi-directionally exchange data between Matlab and ImageJ. MIJ has methods to convert and transpose images of ImageJ to 2D matrices and stacks of images to 3D arrays into Matlab. MIJ tries to avoid loss of accuracy by converting the image data to the closest numerical type of Matlab. The main drawback of this interoperability model is the current limitation of the heap memory in Matlab. Depending of the architecture and of the version of Matlab, the heap space can be increased, but it cannot be changed by MIJ.
Since 2011, MIJ is included in the Fiji[4] distribution of ImageJ together with a friendly startup Matlab script called Miji[5]. After calling a single function from Matlab, the full functionality of all the plugins and libraries included in Fiji can be accessed by Matlab scripts, via MIJ. Most notably, Fiji's 3D Viewer can be used to display three- or four-dimensional data in volume-rendering, iso-surface and orthoslice mode[6].
Users have found MIJ very useful even for simple daily tasks, e.g. opening proprietary image formats using the Bio-Formats[7] library or using the image viewer of ImageJ to display a 2D or 3D Matlab's matrices. Imaging professionals prefer usually ImageJ to show, control the rendering and interact with images. On the other hand, displaying plots and graphs is more convenient and flexible in Matlab. Exchanging data between the two platforms can be very valuable for iterative processes which implie image analysis, done in ImageJ, and statistical analysis done in Matlab. MIJ allows also to launch ImageJ macros from Matlab scripts and to run powerful plugins, e.g. TrackMate[8].
References
-
Matlab: http://www.mathworks.ch/
-
ImageJ: http://rsbweb.nih.gov/ij/
-
Fiji: http://fiji.sc/
-
Miji: http://fiji.sc/wiki/index.php/Miji/wiki/index.php/Miji/
-
3D viewer for Matlab: http://www.mathworks.com/matlabcentral/fileexchange/32344-hardware-accelerated-3dviewer-for-matlab/wiki/index.php/Miji/wiki/index.php/Miji/
-
Bio-Formats: http://loci.wisc.edu/software/bio-formats/wiki/index.php/Miji/wiki/index.php/Miji/
-
TrackMate: http://fiji.sc/wiki/index.php/TrackMate/wiki/index.php/Miji/wiki/index.php/Miji/
@INPROCEEDINGS(http://bigwww.epfl.ch/publications/sage1205.html, AUTHOR="Sage, D. and Prodanov, D. and Tinevez, J.-Y. and Schindelin, J.", TITLE="{D}aniel {S}age: {MIJ}: {M}aking Interoperability Between {ImageJ} and {Matlab} Possible", BOOKTITLE="{ImageJ} User \& Developer Conference ({IUDC'12})", YEAR="2012", editor="", volume="", series="", pages="", address="Mondorf-les-Bains, Grand Duchy of Luxembourg", month="October 25-26,", organization="", publisher="", note="")