Package ij

Class ImageJ

All Implemented Interfaces:
ActionListener, ItemListener, KeyListener, MouseListener, WindowListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible

This frame is the main ImageJ class.

ImageJ is a work of the United States Government. It is in the public domain and open source. There is no copyright. You are free to do anything you want with this source but I like to get credit for my work and I would like you to offer your changes to me so I can possibly add them to the "official" version.

The following command line options are recognized by ImageJ:

  "file-name"
     Opens a file
     Example 1: blobs.tif
     Example 2: /Users/wayne/images/blobs.tif
     Example 3: e81*.tif

  -macro path [arg]
     Runs a macro or script (JavaScript, BeanShell or Python), passing an
     optional string argument, which the macro or script can be retrieve
     using the getArgument() function. The macro or script is assumed to 
     be in the ImageJ/macros folder if 'path' is not a full directory path.
     Example 1: -macro analyze.ijm
     Example 2: -macro script.js /Users/wayne/images/stack1
     Example 2: -macro script.py '1.2 2.4 3.8'

  -batch path [arg]
    Runs a macro or script (JavaScript, BeanShell or Python) in
    batch (no GUI) mode, passing it an optional argument.
    ImageJ exits when the macro finishes.

  -eval "macro code"
     Evaluates macro code
     Example 1: -eval "print('Hello, world');"
     Example 2: -eval "return getVersion();"

  -run command
     Runs an ImageJ menu command
     Example: -run "About ImageJ..."
     
  -ijpath path
     Specifies the path to the directory containing the plugins directory
     Example: -ijpath /Applications/ImageJ

  -port
     Specifies the port ImageJ uses to determine if another instance is running
     Example 1: -port1 (use default port address + 1)
     Example 2: -port2 (use default port address + 2)
     Example 3: -port0 (don't check for another instance)

  -debug
     Runs ImageJ in debug mode
Author:
Wayne Rasband (wsr@nih.gov)
See Also:
  • Field Details

    • VERSION

      public static final String VERSION
      Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string.
      See Also:
    • BUILD

      public static final String BUILD
      See Also:
    • backgroundColor

      public static Color backgroundColor
    • SansSerif12

      public static final Font SansSerif12
      SansSerif, 12-point, plain font.
    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      Address of socket where Image accepts commands
      See Also:
    • STANDALONE

      public static final int STANDALONE
      Run as normal application.
      See Also:
    • EMBEDDED

      public static final int EMBEDDED
      Run embedded in another application.
      See Also:
    • NO_SHOW

      public static final int NO_SHOW
      Run embedded and invisible in another application.
      See Also:
    • DEBUG

      public static final int DEBUG
      Run ImageJ in debug mode.
      See Also:
  • Constructor Details

    • ImageJ

      public ImageJ()
      Creates a new ImageJ frame that runs as an application.
    • ImageJ

      public ImageJ(int mode)
      Creates a new ImageJ frame that runs as an application in the specified mode.
    • ImageJ

      public ImageJ(Applet applet)
      Creates a new ImageJ frame that runs as an applet.
    • ImageJ

      public ImageJ(Applet applet, int mode)
      If 'applet' is not null, creates a new ImageJ frame that runs as an applet. If 'mode' is ImageJ.EMBEDDED and 'applet is null, creates an embedded (non-standalone) version of ImageJ.
  • Method Details