Suppress printing of MIJ output

1 view (last 30 days)
JWall
JWall on 1 May 2017
Answered: Kevin Gleason on 4 May 2017
I am using MIJ so that I can call ImageJ plugins from Matlab. At some point in my code, I open images, use the plugin and then use the line: pixel_translation = MIJ.getResultsTable; This does save the results table into my desired variable, but it also for some reason prints the result to the Matlab command window, which is really annoying as the results table has hundreds of lines of numbers. Any way to prevent this?
Related, I have called Miji(false) in order to open ImageJ functionality without the gui. However, when I open images with Matlab (MIJ.run('Open...', image_name), the images still open. I am just trying to run an ImageJ plugin and get the numbers out of it into Matlab, so it would be ideal if I could do this without anything printing or opening at all!

Accepted Answer

Kevin Gleason
Kevin Gleason on 4 May 2017
One possible solution is wrapping the call in an "evalc" to capture all output. You can then suppress the output of the evalc call:
It might also be worth it to reach out to the author of the MIJ library.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!