public class ImageCalculator extends java.lang.Object implements PlugIn
// test script imp1 = IJ.openImage("http://imagej.nih.gov/ij/images/boats.gif") imp2 = IJ.openImage("http://imagej.nih.gov/ij/images/bridge.gif") imp3 = ImageCalculator.run(imp1, imp2, "add create 32-bit"); imp3.show();
Constructor and Description |
---|
ImageCalculator() |
Modifier and Type | Method and Description |
---|---|
void |
calculate(java.lang.String operation,
ImagePlus img1,
ImagePlus img2)
Deprecated.
replaced by run(String,ImagePlus,ImagePlus)
|
static ImagePlus |
run(ImagePlus img1,
ImagePlus img2,
java.lang.String operation)
Performs arithmetic options on two images and returns the result,
where 'operation' ("add","subtract", "multiply","divide", "and",
"or", "xor", "min", "max", "average", "difference" or "copy")
specifies the operation.
|
void |
run(java.lang.String arg)
This method is called when the plugin is loaded.
|
ImagePlus |
run(java.lang.String operation,
ImagePlus img1,
ImagePlus img2) |
public void run(java.lang.String arg)
PlugIn
public static ImagePlus run(ImagePlus img1, ImagePlus img2, java.lang.String operation)
imp3 = ImageCalculator.run(imp1, imp2, "divide create 32-bit");divides 'imp1' by 'imp2' and returns the result as a new 32-bit image.