Graphic STI
logo EPFL
text EPFL
english only
Biomedical Imaging Group
MIJ
BIG > Download Algorithms > Daniel Sage > MIJ
CONTENTS

BIG Home page

News

People

Research

Publications

Demos

Download Algorithms

Teaching

Student Projects

DOWNLOAD

mij.jar
ImageJ Distribution
Miji
Fiji Distribution

MIJ

A Java package for bi-directional communication and data exchange from Matlab to ImageJ/Fiji

Daniel Sage, Biomedical Image Group, Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland

Dimiter Prodanov, Department of Physiology and Pharmacology, Université Catholique de Louvain (UCL), Brussels, Belgium

Carlos Ortiz, North Carolina State University, USA

Jean-Yves Tivenez, France

splash image

Outline

MIJ offers the missing link between two imaging software: ImageJ/Fiji and Matlab. The goal of the package mij.jar is to provide static methods to exchange images and volumes. MIJ allows also to access to all built-in functions of ImageJ and to third-part plugins of ImageJ. MIJ is integrated in Fiji with a super-easy script to use it.

Thanks to the Fiji team, MIJ is now super-easy to use using a Matlab script Miji.m which is integrated in Fiji. ImageJ/Fiji becomes a image-processing librairie of Matlab.

Software

Matlab prerequirements

The package requires a proper installation of ImageJ and Matlab. The package was tested since Matlab 7.9.0 (R2009b) on different plateforms a Windows XP, Mac OSX 10.6, and Linux Ubuntu.

Download and install

Download mij.jar and place it into the java directory of Matlab (typically 'C:\Program Files\MATLAB\R2009b\java\'). Copy also the ij.jar of ImageJ in the java directory of Matlab.

Set up the path (with a ImageJ already installed and configured):

Set up the paths (without any ImageJ yet installed):

Set up the memory:

Source Code and Documentation

Supported methods in the version 1.3.7

MethodDescription
createColorexports RGB image
createImageexports other images
exitexists MIJ
getCurrentImagereturns a 2D array representing the current image
getImagereturns a 2D array representing the image specified by the title
getColumnimports column of the ResultsTable
getCurrentTitleimports the title of the current image
getHistogramimports the histogram of the current image
getListImagesreturns the list of opened images
getResultsTableimports the ResultsTable
getRoiimports the current ROI
setRoiexports the current ROI
setColumnexports contents to a column in the ResultsTable
setThresholdsets the threshods of the image
startstarts MIJ
runruns command or macro
versionreturn the MIJ version

Mapping the Matlab numeric type to ImageJ type

MatlabImageJ image type
uint8Grayscale 8-bit
int8Grayscale 8-bit
uint16Grayscale 16-bit
int16Grayscale 16-bit
uint32Grayscale 16-bit (Possible loss of precision)
int32Grayscale 16-bit (Possible loss of precision)
uint64Not allowed
int64Not allowed
singleGrayscale 32-bit
doubleGrayscale 32-bit (Possible loss of precision)

Script examples

Screenshot

screenshot
Enlarge the screenshot

screenshot
Enlarge the screenshot

Conditions of use

You'll be free to use this software for research purposes, but you must not transmit and distribute it without our consent. In addition, you undertake to include a citation whenever you present or publish results that are based on it. EPFL makes no warranties of any kind on this software and shall in no event be liable for damages of any kind in connection with the use and exploitation of this technology.

daniel.sage@epfl.ch • 23.09.2011