Open Matlab MAT files from ImageJ/Fiji

Hi Matlab and ImageJ friends,

I just came across the issue that you cannot open mat files in Fiji. I couldn’t find helpful plugins online, so I made one.

I was just wondering - did anybody else hit this issue? Are there alternatives? Or shall we further develop this thing to a proper file loader? I’m not so much a matlab user - I just made this thing for a collaborator. Is there anybody else interested in loading matlab files from Fiji?



Hi Robert,
sounds great!
Does it open all versions of mat-files or there are some limitations?

Hey @Ilya_Belevich,

good question! That’s why I was opening this thread here. I’m not a Matlab user and I only had this one file. My plugin is build on that library:

The library looks like a proper piece of software compatible to many versions of matlab. But I can hardly test it - as I don’t even have matlab.

If you find time, give it a try and let us know how it works!


ok, I see.
I will check it when back to office after holidays - I really wonder how it works.

1 Like

There is a plugin called Miji that allows the transfer of images between the two. It opens an instance of IJ and has a few commands that open data in the Matlab workspace to image windows. It also takes care of the RowColumn vs x,-y coordinate systems as I recall. I don’t use it much as many of its functions don’t seem to work, but the transfer of gray level matrices and images does. I think it also opens a portal from IJ to ML via the options in ImageJ or FIJI. I also got a warning screen while on your git hub page as I typed this message and I had to shut down and restart. Is that the regular github site?

Hey @rondespain,

thanks for the Miji hint. I’ll give it a try!

What kind of warning message? I’m not aware that can make you computer shutdown?! Can you explain a bit more in detail what happened?



Please note that Miji is supposed to be superseded by the imagej-matlab project, see here:

Note that for both Miji and ImageJ-MATLAB, you’ll need a running MATLAB instance, so I’m not sure this will meet your use case.

1 Like

I got a bold red banner that filled most of the screen that said warning and some other stuff in smaller letters. The computer emitted a wank…wank…wank continuous sound at a loud volume and a womans voice came on telling me that my computer was locked and that I should call a phone number for further instructions. My keyboard and mouse did not work, so I powered down via the power button and restarted…no problems since.

I tried the imageJ-matlab recomended by imagejan and got the following


Looks good…axes not corrected …Miji adjusts the axes.

I’m not quite sure how to run Matlab from ImageJ yet.

Imagejan…I noticed that the imagej-matlab directions ask for feedback re closing the IJ window from within matlab. MIJ.exit worked for me.