
Some minor Java differences to Groovy are described here. Beanshell has the greatest Java compatibility. The script for the example can be found here!Īpropos: One reason that Beanshell and Groovy are used as default scripting languages in Bio7 is that they also accept (more or less) the Java syntax by default. Here is a short video which uses the API to cluster selected images with BeanShell and creates a report of the cluster areas in the spreadsheet of Bio7:

The R commands itself can be embedded easily with the available Bio7 API or called from an external R script with the API.

ImageMethods.imageToR(“currentImage”, true, 3, imp) //The first argument is the transfer name of the image, the second argument creates a matrix if true (for datatype double and RGB transfer), the third argument determines the datatype for the transfer (byte, integer, double or RGB), the last argument expects an ImageJ image (can be opened with the ImageJ API) or if null transfers the current opened image in the Bio7 ImageJ panel ( API). to cluster image data with the available packages in R. With a simple script written in Java, Groovy or BeanShell a new Bio7 API command can be used (see below) to transfer images and e.g. With Bio7 1.6 it is possible to send multiple images from ImageJ to R without the need to open them in the Graphical User Interface of ImageJ for speed improvements.
