ij.plugin
Class ContrastEnhancer

java.lang.Object
  extended by ij.plugin.ContrastEnhancer
All Implemented Interfaces:
ij.measure.Measurements, PlugIn

public class ContrastEnhancer
extends java.lang.Object
implements PlugIn, ij.measure.Measurements

Implements ImageJ's Process/Enhance Contrast command.


Field Summary
(package private)  boolean classicEqualization
           
(package private) static boolean entireImage
           
(package private) static boolean equalize
           
(package private)  int max
           
(package private) static boolean normalize
           
(package private) static boolean processStack
           
(package private)  int range
           
(package private) static double saturated
           
(package private)  int stackSize
           
(package private)  boolean updateSelectionOnly
           
(package private) static boolean useStackHistogram
           
 
Fields inherited from interface ij.measure.Measurements
AREA, AREA_FRACTION, CENTER_OF_MASS, CENTROID, CIRCULARITY, ELLIPSE, FERET, INTEGRATED_DENSITY, INVERT_Y, KURTOSIS, LABELS, LIMIT, MAX_STANDARDS, MEAN, MEDIAN, MIN_MAX, MODE, PERIMETER, RECT, SKEWNESS, SLICE, STD_DEV
 
Constructor Summary
ContrastEnhancer()
           
 
Method Summary
(package private)  void applyTable(ImageProcessor ip, int[] lut)
           
 void equalize(ImagePlus imp)
           
 void equalize(ImageProcessor ip)
          Changes the tone curves of images.
(package private)  void normalize(ImageProcessor ip, double min, double max)
           
(package private)  void normalizeFloat(ImageProcessor ip, double min, double max)
           
 void run(java.lang.String arg)
          This method is called when the plugin is loaded.
(package private)  boolean showDialog(ImagePlus imp)
           
 void stretchHistogram(ImagePlus imp, double saturated)
           
 void stretchHistogram(ImageProcessor ip, double saturated)
           
 void stretchHistogram(ImageProcessor ip, double saturated, ImageStatistics stats)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

max

int max

range

int range

classicEqualization

boolean classicEqualization

stackSize

int stackSize

updateSelectionOnly

boolean updateSelectionOnly

equalize

static boolean equalize

normalize

static boolean normalize

processStack

static boolean processStack

useStackHistogram

static boolean useStackHistogram

entireImage

static boolean entireImage

saturated

static double saturated
Constructor Detail

ContrastEnhancer

public ContrastEnhancer()
Method Detail

run

public void run(java.lang.String arg)
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.

Specified by:
run in interface PlugIn

showDialog

boolean showDialog(ImagePlus imp)

stretchHistogram

public void stretchHistogram(ImagePlus imp,
                             double saturated)

stretchHistogram

public void stretchHistogram(ImageProcessor ip,
                             double saturated)

stretchHistogram

public void stretchHistogram(ImageProcessor ip,
                             double saturated,
                             ImageStatistics stats)

normalize

void normalize(ImageProcessor ip,
               double min,
               double max)

applyTable

void applyTable(ImageProcessor ip,
                int[] lut)

normalizeFloat

void normalizeFloat(ImageProcessor ip,
                    double min,
                    double max)

equalize

public void equalize(ImagePlus imp)

equalize

public void equalize(ImageProcessor ip)
Changes the tone curves of images. It should bring up the detail in the flat regions of your image. Histogram Equalization can enhance meaningless detail and hide important but small high-contrast features. This method uses a similar algorithm, but uses the square root of the histogram values, so its effects are less extreme. Hold the alt key down to use the standard histogram equalization algorithm. This code was contributed by Richard Kirk (rak@cre.canon.co.uk).