Hide
IJ2 is out
15 Scripts
JavaScript scripting was introduced in ImageJ 1.41 in order to bring full access to ImageJ and Java APIs (
see Advantages and disadvantages of JavaScript↓). ImageJ uses the Mozilla Rhino interpreter built into Java 1.6 for Linux and Windows to run JavaScript. Mac users, and users of earlier versions of Java, must download
JavaScript.jar into the plugins folder. This JAR
[?] file is available on the
ImageJ website and is included with the Mac version of ImageJ in
ImageJ/plugins/jars.
Example JavaScript programs are available at
imagej.net/ij/macros/js/. Thread safe JavaScript code can be generated using the Recorder (). Scripts can be opened in the editor as any other macro. Scripts with the extension
.js can be run using otherwise (
Ctrl J) must be used.
JavaScript Programming
Resources on ImageJ JavaScript scripting include:
- The ImageJ web site, with growing documentation:
../../developer/javascript.html
- Tutorials on the Fiji webpage:
http://fiji.sc/wiki/index.php/Javascript_Scripting
- Online scripts repository:
../../macros/js/
Table 1
Advantages and disadvantages of JavaScript in ImageJ. A thorough comparison between different scripting languages is available on the
Fiji webpage.