Author: Paulo Magalh„es (pamaga_A_T_bio_DOT_unipd_DOT_it)
University of Padua, Italy
History: 2003/12/04: first version
2003/12/10: added constant background subtraction; implemented "zero divided by zero equals one" feature (any other value divided by zero yields infinity)
Source: Ratio_Plus.java Installation: Download Ratio_Plus.class to the plugins folder, or subfolder, and restart ImageJ. Description: This plugin calculates the ratio between two images (single frames or stacks), as used in Fura-2 experiments, for example. The code -- heavily annotated to help beginners like myself explore the world of ImageJ -- is largely based on Image Calculator Plus. Paulo Magalh„es, 10dec03. The plugin requires two images of the same width and height, and of the same type (8-, 16-, or 32-bit); the images must be: i) two single images; ii) two stacks with the same number of frames; or iii) a stack as a first image and a single frame as a second - in this case, the single frame will be applied throughtout the complete stack. The resulting image (in 32-bit) is calculated as follows: intR = (intA - bkgA) / (int B - bkgB) * MF where intA, intB and intR are the intensities of the first, second and ratio images, respectively; bkgA and bkgB are constant background values (entered by the user) for the first and second images, respectively; MF is an arbitrary multiplication factor. If a pixel value becomes negative after background subtraction, it is set to zero before ratio calculation. In addition, the plugin can accept clipping values for either of the images: if the pixel intensity (after background subtraction) is lower than the clipping value for that image, it is set to zero before ratio calculation; the clipping values for either image are set by the user. NB: if two corresponding pixels in the first and second images are zero, their ratio is set to 1 (one); i.e., "zero by zero" division equals one. Future plans: background correction using a ROI (in one or both images).
|Plugins | Home |