Class Normalize_

java.lang.Object
  |
  +--Normalize_
All Implemented Interfaces:
ij.plugin.filter.PlugInFilter

public class Normalize_
extends java.lang.Object
implements ij.plugin.filter.PlugInFilter

This plugin simplifies the task of background subtraction and image normalization given a brightfield image and/or a background image. This plugin is currently limited to 16-bit images, but could easily be extended to 8-bit, 32-bit, or even color images.

Possible normalization methods:

If both BRIGHT and DARK images are specified

IMAGE = scale * (IMAGE - DARK) / (BRIGHT - DARK)

If only BRIGHT image is specified

IMAGE = scale * IMAGE / BRIGHT

If only DARK image is specified

IMAGE = IMAGE - DARK

Author:
Jeffrey Kuhn, The University of Texas at Austin, jkuhn@ccwf.cc.utexas.edu

Field Summary
private static double dScale
          Number to scale resulting image by after division by BRIGHT
private  int iBrightID
          ImageJ ID of bright image
private  int iDarkID
          ImageJ ID of dark image
private  ij.ImagePlus impImage
          The image window to work on
private static java.lang.String strBrightName
          Name of bright image
private static java.lang.String strDarkName
          Name of dark image
private static java.lang.String strNONE
          If "none" is selected, then that image is not used in the calculation
 
Fields inherited from interface ij.plugin.filter.PlugInFilter
DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, ROI_REQUIRED, STACK_REQUIRED, SUPPORTS_MASKING
 
Constructor Summary
Normalize_()
           
 
Method Summary
 boolean getArguments()
          Request the user to specify the bright and dark images
(package private)  void processGray16Unsigned(double dScale, ij.ImagePlus impImage, ij.ImagePlus impBright, ij.ImagePlus impDark, int iLen)
          Normalize a 16-bit unsigned image
 void run(ij.process.ImageProcessor ip)
          Normalize the current image.
 int setup(java.lang.String arg, ij.ImagePlus imp)
          Report what kind of images this plugin can handle to ImageJ
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

strNONE

private static final java.lang.String strNONE
If "none" is selected, then that image is not used in the calculation

strBrightName

private static java.lang.String strBrightName
Name of bright image

strDarkName

private static java.lang.String strDarkName
Name of dark image

dScale

private static double dScale
Number to scale resulting image by after division by BRIGHT

iBrightID

private int iBrightID
ImageJ ID of bright image

iDarkID

private int iDarkID
ImageJ ID of dark image

impImage

private ij.ImagePlus impImage
The image window to work on
Constructor Detail

Normalize_

public Normalize_()
Method Detail

setup

public int setup(java.lang.String arg,
                 ij.ImagePlus imp)
Report what kind of images this plugin can handle to ImageJ
Specified by:
setup in interface ij.plugin.filter.PlugInFilter

getArguments

public boolean getArguments()
Request the user to specify the bright and dark images

run

public void run(ij.process.ImageProcessor ip)
Normalize the current image.
Specified by:
run in interface ij.plugin.filter.PlugInFilter

processGray16Unsigned

void processGray16Unsigned(double dScale,
                           ij.ImagePlus impImage,
                           ij.ImagePlus impBright,
                           ij.ImagePlus impDark,
                           int iLen)
Normalize a 16-bit unsigned image