Call the imageJ plugin with Matlab

Hi, I have the matlab 2017b and the Fiji, how can I call the Plugins with matlab? I am using the MIJ package, and the examples can work well. I have tried to use the NanoJ_Core plugin to registrate my images using matlab:
img = net.imglib2.img.array.ArrayImgs.unsignedBytes(I(:), size(I)); nanoj.core.java.gui.registration.ChannelRealignment_Estimate_(img,img2) this type does not work.
Thank you!

Hi Weisong,
if you need to run Fiji commands from matlab you can try that from MIB (mib.helsinki.fi); we have connection to Fiji that might help you.
http://mib.helsinki.fi/help/main2/ug_panel_fiji_connect.html

Best regards,
Ilya

2 Likes

I have solved this problem myself and share it to everyone!

imp = ij.IJ.openImage("img1.bmp");imp.show()
imp = ij.IJ.openImage("img2.bmp");imp.show()
MIJ.run("Merge Channels...", "c1=img1.bmp c2=img2.bmp create");
MIJ.run("Register Channels - Estimate", "  reference=1 number=2 max=0 blocks=5 min=0.50 gaussian=0 apply");
1 Like