MIJ offers the missing link between imaging software: ImageJ, Fiji and Matlab. MIJ is a Java package mij.jar that provides static methods to convert images (2D) and volumes (3D) in Matlab arrays. MIJ allows also to access to all built-in functions of ImageJ and to third-part plugins of ImageJ. Thanks to the Fiji team, MIJ is now super-easy to use with a Matlab script Miji.m which is integrated in Fiji. With MIJ, ImageJ acts as an image-processing library of Matlab.
Daniel Sage, Dimiter Prodanov, Jean-Yves Tinevez and Johannes Schindelin, "MIJ: Making Interoperability Between ImageJ and Matlab Possible", ImageJ User & Developer Conference, 24-26 October 2012, Luxembourg.
1) Put mij.jar into the java directory of Matlab (e.g for Window Machine 'C:\Program Files\MATLAB\R2009b\java\').
2) Copy also ij.jar (ImageJ) in the java directory of Matlab. Get this file from the ImageJ website: http://rsb.info.nih.gov/ij/
3) Extend the java classpath to mij.jar, e.g using the Matlab command: javaaddpath 'C:\Program Files\MATLAB\R2009b\java\mij.jar'.
4) Extend the java classpath to ij.jar, e.g using the Matlab command: javaaddpath 'C:\Program Files\MATLAB\R2009b\java\ij.jar'.
5) Start MIJ by running the Matlab command: MIJ.start; or MIJ.start("imagej-path");
Java Source Code
Sage (2023). MIJ: Running ImageJ and Fiji within Matlab (https://www.mathworks.com/matlabcentral/fileexchange/47545-mij-running-imagej-and-fiji-within-matlab), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!