Module ij
Package ij.plugin

# Class ContrastEnhancer

java.lang.Object
ij.plugin.ContrastEnhancer

All Implemented Interfaces:
  `Measurements`, `PlugIn`

public class ContrastEnhancer extends Object implements PlugIn, Measurements
Implements ImageJ's Process/Enhance Contrast command.

## Field Summary

### Fields inherited from interface ij.measure.Measurements

`ADD_TO_OVERLAY, ALL_STATS, AREA, AREA_FRACTION, CENTER_OF_MASS, CENTROID, CIRCULARITY, ELLIPSE, FERET, INTEGRATED_DENSITY, INVERT_Y, KURTOSIS, LABELS, LIMIT, MAX_STANDARDS, MEAN, MEDIAN, MIN_MAX, MODE, NaN_EMPTY_CELLS, PERIMETER, RECT, SCIENTIFIC_NOTATION, SHAPE_DESCRIPTORS, SKEWNESS, SLICE, STACK_POSITION, STD_DEV`

## Constructor Summary

Constructors
Constructor
Description
`ContrastEnhancer()`

## Method Summary

Modifier and Type
Method
Description
`void`
`equalize(ImagePlus imp)`
`void`
`equalize(ImageProcessor ip)`
Changes the tone curves of images.
`void`
`run(String arg)`
This method is called when the plugin is loaded.
`void`
`setNormalize(boolean normalize)`
`void`
`setProcessStack(boolean processStack)`
`void`
`setUseStackHistogram(boolean useStackHistogram)`
`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`

## Constructor Details

### ContrastEnhancer

public ContrastEnhancer()

## Method Details

### run

public void run(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`

### 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)

### 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).

### setNormalize

public void setNormalize(boolean normalize)

### setProcessStack

public void setProcessStack(boolean processStack)

### setUseStackHistogram

public void setUseStackHistogram(boolean useStackHistogram)