Hide
IJ2 is out
25 Customizing the ImageJ Interface
Most settings determining the look and feel of ImageJ are listed in , namely and (
see also Settings and Preferences↑). However, other aspects of the ImageJ interface can also be personalized.
25.1 Floating Behavior of Main Window
It is possible to place the
Main ImageJ window↑ above all other windows at all time using a simple JavaScript instruction:
IJ.getInstance().setAlwaysOnTop(true);
At startup, ImageJ will search for a GIF image named crosshair-cursor.gif in the ImageJ/images/ directory. If present, it will be used to replace the default crosshair cursor. The pointer can also be changed to an arrow by toggling Use pointer cursor on
Table 2 Examples of modified crosshair pointers, more visible on grayscale images. The default crosshair cursor can be replaced by any image saved as crosshair-cursor.gif in ImageJ/images/.
Customizing the Float Behavior of IJ’s Main Window
// These macros can be added to the ImageJ/macros/StartupMacros.txt file in order to set
// the floating behavior of the ImageJ main window
// option 1) Run ImageJ/plugins/Always_on_Top.js command at launch, by adding it to the "AutoRun" macro
macro "AutoRun" {
run("Always on Top");
}
// option 2) Execute the script at launch, by adding it to "AutoRun"
macro "AutoRun" {
eval("script", "IJ.getInstance().setAlwaysOnTop(true)");
}
// option 3) Toggle the setAlwaysOnTop option using a shortcut, e.g., F1
var afloat;
macro "Toggle AlwaysOnTop [F1]" {
booleans = newArray("true", "false");
eval("script","IJ.getInstance().setAlwaysOnTop("+ booleans[afloat] +")");
afloat = !afloat;
}