How can I extract data from external software and save it as a data file?

1 view (last 30 days)
I am currently using imageJ to measure spherical nanoparticles. In that program, there's a way to automate batch processing of images to calculate various parameters. I'm interested in diameter but the software only calculates the area.
What I've been currently doing is copy pasting charts that are generated within ImageJ onto excel and then using one formula to get diameter from area. However, I'd really like to automate this since I work with a lot of images.
How can I extract the data from one program and save it as a data file? Once I have the code for that, it would be relatively easy to write code to import data and apply a formula.
  3 Comments
dpb
dpb on 24 Aug 2019
But, reading doc at NIH I find--
"MIJ — Matlab–ImageJ bi-directional communicationA Java package for bi-directionaldata exchange between Matlab and ImageJ, allowing to exchange images between the twoimaging software. MIJ also allows MATLAB to access all built-in functions of ImageJas well as third-party ImageJ plugins. The developers provide more information on theMIJ and Matlab File Exchange websites. Fiji featuresMiji.m, which makes even moreconvenient to use the libraries and functions provided by Fiji’s components from within Matlab."
So, it may be even easier to interact than saving files just by driving the whole thing from Matlab.
But also see Section 22 on the Results Table that describes File>SaveAs and how to set file names. Undoubtedly all that can also be driven by the macro language
Naxhije Berisha
Naxhije Berisha on 26 Aug 2019
Thanks for both of your comments! I'll read more about MIJ for this particular script. I'm interested in generalizing a script if bidirectional communication isn't possible. But I'm not sure how I'd check the how the program generates output. I'm just starting with matlab and am inexperienced with that

Sign in to comment.

Answers (1)

Chidvi Modala
Chidvi Modala on 26 Aug 2019
ImageJ Datasets can be converted to the MATLAB supported NumericArray types using the ConvertService. These arrays can then be passed to a running MATLAB instance as a matrix. Appropriate formula can be applied on matrix.
You can make use of MIJ (MATLAB - ImageJ) which provides an extensible and bidirectional bridge for mutual exchange of data between these two environments.

Community Treasure Hunt

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

Start Hunting!