Using ImageJ functions within Matlab

The ImageJ-Matlab tutorial page, https://imagej.net/MATLAB_Scripting#Creating_MATLAB_scripts_inside_ImageJ
says " The startup process automatically injects the ImageJ classpath into the MATLAB classpath, merging the two. At this point, you’ll have a working ImageJ and can now run MATLAB scripts as normal with access to the full unified classpath."

I’ve opened an ImageJ instance inside of Matlab but the only functions I seem to be able to use are those which convert data from Matlab matrices to ImageJ datatypes. I want to be able to use ImageJ’s Java classes such as histograms, binning, etc within a Matlab script.
Is this possible?

Thank you,
LS

1 Like

Hello @lsiroit,
you should probablu use IJ.run command, please check this recent thread:

A simpler and direct question: I’ve tried using the \ escape character to get MIJ.run(“selectWindow(“window_title”)”); as MIJ.run(“selectWindow(“window_title”)”); to work, but it didn’t. I’ve tried many combinations of ’ and " to no avail. The selectWindow function is in the MIJ users manual, but doesn’t show in the Matlab command window as a function.
How does one select one of many windows/images open in FIJI (other than the one currently in front) from a matlab m file?.

Thanks for your help
Ron