All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ij.ImageJApplet Maven / Gradle / Ivy

Go to download

ImageJ is an open source Java image processing program inspired by NIH Image for the Macintosh.

There is a newer version: 1.54m
Show newest version
package ij;
import java.applet.Applet;

/**
	Runs ImageJ as an applet and optionally opens up to 
	nine images using URLs passed as a parameters.
	

Here is an example applet tag that launches ImageJ as an applet and passes it the URLs of two images:

	<applet archive="../ij.jar" code="ij.ImageJApplet.class" width=0 height=0>
	<param name=url1 value="http://imagej.nih.gov/ij/images/FluorescentCells.jpg">
	<param name=url2 value="http://imagej.nih.gov/ij/images/blobs.gif">
	</applet>
	
To use plugins, add them to ij.jar and add entries to IJ_Props.txt file (in ij.jar) that will create commands for them in the Plugins menu, or a submenu. There are examples of such entries in IJ.Props.txt, in the "Plugins installed in the Plugins menu" section.

Macros contained in a file named "StartupMacros.txt", in the same directory as the HTML file containing the applet tag, will be installed on startup. */ public class ImageJApplet extends Applet { /** Starts ImageJ if it's not already running. */ public void init() { ImageJ ij = IJ.getInstance(); if (ij==null || (ij!=null && !ij.isShowing())) new ImageJ(this); for (int i=1; i<=9; i++) { String url = getParameter("url"+i); if (url==null) break; ImagePlus imp = new ImagePlus(url); if (imp!=null) imp.show(); } } public void destroy() { ImageJ ij = IJ.getInstance(); if (ij!=null) ij.quit(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy