java.lang.Object
ij.plugin.ImageCalculator
- All Implemented Interfaces:
PlugIn
This plugin implements the Process/Image Calculator command.
// 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.replaced by run(String,ImagePlus,ImagePlus)static ImagePlus
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
This method is called when the plugin is loaded.
-
Constructor Details
-
ImageCalculator
public ImageCalculator()
-
-
Method Details
-
run
Description copied from interface:PlugIn
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt. -
run
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. If 'operation' does not contain 'create' or '32-bit', the result is also saved in 'imp1" and null is returned if "imp1" is displayed. The 'operation' argument can include up to three modifiers: "create" (e.g., "add create") causes the result to be returned as a new image, "32-bit" causes the result to be returned as 32-bit floating-point image and "stack" causes the entire stack to be processed. As an example,imp3 = ImageCalculator.run(imp1, imp2, "divide create 32-bit");
divides 'imp1' by 'imp2' and returns the result as a new 32-bit image. -
run
-
calculate
Deprecated.replaced by run(String,ImagePlus,ImagePlus)
-