Re: access R from ImageJ macro
Posted by
Tiago Ferreira-2 on
Nov 17, 2014; 8:48pm
URL: http://imagej.273.s1.nabble.com/access-R-from-ImageJ-macro-tp5010490p5010496.html
Neil,
On Nov 17, 2014, at 12:19, Neil Fazel <
[hidden email]> wrote:
> Is there a way to do statistical analysis, such as ANOVA, in ImageJ macros? The ImageJ User Guide refers to "RImageJ — R bindings for ImageJ"; this would have been perfect but apparently it no longer exists.
I'm sorry to hear RImageJ is no longer maintained.
I've added a note on the guide repository so it is not forgotten[1].
> The use case is this: I have two samples of image pixels and I would like to do Student's T test on them to see if the average pixel values from the samples can be considered equal within a level of confidence, i.e. the samples come from the same population. I could write the formulas for the test statistics and degrees of freedom in an ImageJ macro, but I would still need table of values for T distribution for different degrees of freedom.
AFAIK it would be extremely cumbersome to use the ImageJ macro language to perform such t-tests.
But it becomes rather simple to use the commons math library[2], that is part of Fiji.
To use it you would have to use Java or one the Fiji scripting languages[3].
To get you started, here is a BeanShell example that you can run from the Fiji Script Editor
(or the IJ1 built-in one if you have manually installed commons-math3.jar):
https://gist.github.com/tferr/2490bf1c4028fbbbddea[1]
https://github.com/tferr/IJ-guide/issues/10[2]
http://commons.apache.org/proper/commons-math/index.html[3]
http://fiji.sc/Scripting_Help--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html