Plugins located in ImageJ's plugins folder are automatically installed at the end of this menu. The plugins folder distributed with ImageJ comes with two sample plugins: Inverter, which inverts 8-bit images, and Red and Blue, which generates an RGB image.| Window Menu | Contents | Home |The plugins folder must be in the same folder as IJ_Props.txt and it must be in the Java classpath. You can verify that it is in the classpath by using Plugins/List System Properties and looking at the value of the "java.class.path" property. To be installed automatically in the Plugins menu, the main class file must have an underscore in its name. To install in a different menu, or to install a plugin without an underscore in its name, add an entry to IJ_Props.txt. For example, adding the line
import08="Using Jimi...[U]",Jimi_Readerinstalls the Jimi_Reader.class in the File/Import submenu, using shift-U as a keyboard shortcut. This line can go anywhere in IJ_Props.txt but the sequence number, "08" in this case, must be the next available number in the "import" sequence.To create your own plugin named "My Plugin":
Plugins listed at the top of the Plugins menu, such as the Memory Monitor, are located in the ij.jar file, not in the plugins folder. A JAR file (Java ARchive) is formatted the same as a ZIP file, so it can be opened with any ZIP utility, although you may need to change the extension from ".jar" to ".zip".
- Make a copy of either Inverter_.java or Red_and_Blue.java.
- Rename the copy "My_Plugin.java". (The name must contain an underscore or the plugin will not be automatically installed.)
- Use an editor to change the class name of the new plugin to "My_Plugin". (Java requires that the file name and class name be the same.)
- Compile the new plugin and run ImageJ using the compile.bat script in the plugins folder. (Requires JDK 1.1.x or JDK 1.2.x from java.sun.com. On the Mac, follow the instructions in the README file.)
- Run the new plugin by selecting "My Plugin" from the Plugins menu.
- Make some changes to the new plugin and repeat steps 4 and 5.
Monitor Memory...
Displays a continuously updated graph of ImageJ's memory utilization, which can be useful for detecting memory leaks. Ideally you should be able to open a several images, process them, close them, and the amount of memory used will be the same as when you started. Clicking on ImageJ's status bar, which forces the Java garbage collector run, may help reclaim unused memory. Start the memory monitor with the alt key down to have it use a 640x480 window that simulates how a frame grabber plugin would work.