Login  Register

Re: access R from ImageJ macro

Posted by Richard Mort-2 on Nov 18, 2014; 9:55am
URL: http://imagej.273.s1.nabble.com/access-R-from-ImageJ-macro-tp5010490p5010514.html

Sorry I'm sending this again because there was a problem with my
previous post. Apologies if you get the following twice:

I've looked into this myself - Reserve seems like the most pragmatic
approach as you have access to all the functions in R. Calling ImageJ
from R is much more limited - I don't think you can use every command
available from within ImageJ.

You can use Reserve to execute an R script. I would imagine you could
save you results to a CSV file. Then use an R script to import them, run
the tests and write the results to another file or to ij.prefs and then
open with ImageJ.

There are lovely plotting tools for R so this could be a very useful
approach. Let me know if you'd like me to dig out an example.

Good luck!
R



On 17/11/14 21:37, Bio7 wrote:

> Here is an example how to call ImageJ from within R (library rJava required):
>
> https://github.com/Bio7/Bio7/blob/master/ImageJ_Conference_2012/ImageJ_FromR/ImageJ_Example.R
>
> This is essentially what RImageJ in a similar way did (load ImageJ and then
> call the methods).
>
> Maybe this example can help you to create your own script.
>
> Another way would be to use Rserve or JRI from ImageJ, see here:
>
> https://github.com/Bio7/Bio7/tree/master/ImageJ_Conference_2012
>
>
> There are several other options.
>
> Another interesting approach would be to use Renjin (R as a JVM language) as
> an ImageJ lib:
>
> http://www.renjin.org/
>
> It is in an early stage but i guess some statistical test are already
> available:
>
> http://renjindemo.appspot.com/
>
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/access-R-from-ImageJ-macro-tp5010490p5010497.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
Dr Richard Mort
MRC Human Genetics Unit
MRC IGMM
University of Edinburgh
Western General Hospital
Crewe Road
Edinburgh.
EH4 2XU, UK

Tel: +44 (0)131 332 2471
Fax: +44 (0)131 467 8456


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html