public class TLcdSLDContrastEnhancement extends TLcdDataObject
NORMALIZE
means to stretch the contrast so that
the dimmest color is stretched to black and the brightest color is stretched to white,
with all colors in between stretched out linearly. HISTOGRAM
means
to stretch the contrast based on a histogram of how many colors are at each brightness
level on input, with the goal of producing equal number of pixels in the image
at each brightness level on output. This has the effect of revealing many
subtle ground features. A GammaValue tells how much to brighten (value
greater than 1.0) or dim (value less than 1.0) an image. The default GammaValue
is 1.0 (no change). If none of Normalize, Histogram, or GammaValue are selected
in a ContrastEnhancement, then no enhancement is performed.Modifier and Type | Field and Description |
---|---|
static String |
HISTOGRAM
"Histogram" contrast enhancement type.
|
static String |
NORMALIZE
"Normalize" contrast enhancement type.
|
Constructor and Description |
---|
TLcdSLDContrastEnhancement()
Empty constructor.
|
TLcdSLDContrastEnhancement(String aContrastEnhancement,
double aGammaCorrection)
Constructor for given type of contrast enhancement and gamma value.
|
TLcdSLDContrastEnhancement(TLcdDataType aDataType)
Empty constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptContrastEnhancementType(String aContrastEnhancementType)
Checks which contrast enhancement types are acceptable.
|
String |
getContrastEnhancementType()
|
double |
getGammaValue()
Returns the value of the property that maps to the
GammaValue element. |
TLcdSLDHistogram |
getHistogram()
Returns the value of the property that maps to the
Histogram element. |
TLcdSLDNormalize |
getNormalize()
Returns the value of the property that maps to the
Normalize element. |
void |
setContrastEnhancementType(String aContrastEnhancementType)
Sets the type of contrast enhancement to apply.
|
void |
setGammaValue(double aValue)
Sets the value of the property that maps to the
GammaValue element. |
void |
setHistogram(TLcdSLDHistogram aValue)
Sets the value of the property that maps to the
Histogram element. |
void |
setNormalize(TLcdSLDNormalize aValue)
Sets the value of the property that maps to the
Normalize element. |
public static final String NORMALIZE
public static final String HISTOGRAM
public TLcdSLDContrastEnhancement()
public TLcdSLDContrastEnhancement(String aContrastEnhancement, double aGammaCorrection)
aContrastEnhancement
- the type of contrast enhancement to apply.aGammaCorrection
- the gamma value.public TLcdSLDContrastEnhancement(TLcdDataType aDataType)
public void setContrastEnhancementType(String aContrastEnhancementType)
null
.
The default value is null
.aContrastEnhancementType
- NORMALIZE
,
HISTOGRAM
or null
.acceptContrastEnhancementType(String)
public String getContrastEnhancementType()
NORMALIZE
, HISTOGRAM
or none (null
).
By default, null
is returned.public void setNormalize(TLcdSLDNormalize aValue)
Normalize
element.aValue
- the value to set for the NORMALIZE_PROPERTY
property.public void setHistogram(TLcdSLDHistogram aValue)
Histogram
element.aValue
- the value to set for the HISTOGRAM_PROPERTY
property.protected boolean acceptContrastEnhancementType(String aContrastEnhancementType)
aContrastEnhancementType
- the contrast enhancement type to apply.null
.public TLcdSLDNormalize getNormalize()
Normalize
element.NORMALIZE_PROPERTY
property.public TLcdSLDHistogram getHistogram()
Histogram
element.HISTOGRAM_PROPERTY
property.public double getGammaValue()
GammaValue
element.
A gamma correction tells how much to brighten (value greater than 1.0) or dim (value less than 1.0) an image. The default gamma value is 1.0 (no change).
GAMMA_VALUE_PROPERTY
property.public void setGammaValue(double aValue)
GammaValue
element.
A gamma correction tells how much to brighten (value greater than 1.0) or dim (value less than 1.0) an image. The default gamma value is 1.0 (no change).
aValue
- the value to set for the GAMMA_VALUE_PROPERTY
property.