Enum ContrastEnhancementType
- Object
-
- Enum<ContrastEnhancementType>
-
- ContrastEnhancementType
-
- All Implemented Interfaces:
Serializable
,Comparable<ContrastEnhancementType>
public enum ContrastEnhancementType extends Enum<ContrastEnhancementType>
Starting with version 14.x,ContrastEnhancement
can be customized to support differentContrastMethod
s algorithm and parameters.This class contains implementations from previously defined algorithm, as well as new ones.
Define a new Type for a newly defined Method-Algorithm and implements the {@link ContrastEnhancementType#process(ImageWorker, Hints, Map))} method.
- Author:
- Daniele Romagnoli, GeoSolutions SAS
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EXPONENTIAL
HISTOGRAM
LOGARITHMIC
NORMALIZE_CLIP_TO_MINMAX
NORMALIZE_CLIP_TO_ZERO
NORMALIZE_DEFAULT
NORMALIZE_STRETCH_TO_MINMAX
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_CORRECTION_FACTOR
Parameter Key used to refer to the correctionFactor valuestatic String
KEY_DATATYPE
Parameter Key used to refer to the maximim valuestatic String
KEY_HISTOGRAM
Parameter Key used to refer to the histogram instancestatic String
KEY_MAX
Parameter Key used to refer to the maximim valuestatic String
KEY_MIN
Parameter Key used to refer to the minimim valuestatic String
KEY_NORMALIZATION_FACTOR
Parameter Key used to refer to the normalizationFactor valuestatic String
NORMALIZE_CLIP_TO_MINMAX_NAME
static String
NORMALIZE_CLIP_TO_ZERO_NAME
static String
NORMALIZE_STRETCH_TO_MINMAX_NAME
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
areEqual(double a, double b)
Simple utility method to check Double values equality.static PiecewiseTransform1D<DefaultPiecewiseTransform1DElement>
generateGammaCorrectedPiecewise(double minimum, double maximum, double gammaValue)
Generate piecewise transformation for gamma correctionstatic ContrastEnhancementType
getType(AbstractContrastMethodStrategy method)
Return a properContrastEnhancementType
instance depending on the providedAbstractContrastMethodStrategy
.static ContrastEnhancementType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ContrastEnhancementType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXPONENTIAL
public static final ContrastEnhancementType EXPONENTIAL
-
LOGARITHMIC
public static final ContrastEnhancementType LOGARITHMIC
-
HISTOGRAM
public static final ContrastEnhancementType HISTOGRAM
-
NORMALIZE_DEFAULT
public static final ContrastEnhancementType NORMALIZE_DEFAULT
-
NORMALIZE_STRETCH_TO_MINMAX
public static final ContrastEnhancementType NORMALIZE_STRETCH_TO_MINMAX
-
NORMALIZE_CLIP_TO_MINMAX
public static final ContrastEnhancementType NORMALIZE_CLIP_TO_MINMAX
-
NORMALIZE_CLIP_TO_ZERO
public static final ContrastEnhancementType NORMALIZE_CLIP_TO_ZERO
-
-
Field Detail
-
KEY_MIN
public static final String KEY_MIN
Parameter Key used to refer to the minimim value- See Also:
- Constant Field Values
-
KEY_MAX
public static final String KEY_MAX
Parameter Key used to refer to the maximim value- See Also:
- Constant Field Values
-
KEY_DATATYPE
public static final String KEY_DATATYPE
Parameter Key used to refer to the maximim value- See Also:
- Constant Field Values
-
KEY_HISTOGRAM
public static final String KEY_HISTOGRAM
Parameter Key used to refer to the histogram instance- See Also:
- Constant Field Values
-
KEY_CORRECTION_FACTOR
public static final String KEY_CORRECTION_FACTOR
Parameter Key used to refer to the correctionFactor value- See Also:
- Constant Field Values
-
KEY_NORMALIZATION_FACTOR
public static final String KEY_NORMALIZATION_FACTOR
Parameter Key used to refer to the normalizationFactor value- See Also:
- Constant Field Values
-
NORMALIZE_STRETCH_TO_MINMAX_NAME
public static final String NORMALIZE_STRETCH_TO_MINMAX_NAME
- See Also:
- Constant Field Values
-
NORMALIZE_CLIP_TO_MINMAX_NAME
public static final String NORMALIZE_CLIP_TO_MINMAX_NAME
- See Also:
- Constant Field Values
-
NORMALIZE_CLIP_TO_ZERO_NAME
public static final String NORMALIZE_CLIP_TO_ZERO_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static ContrastEnhancementType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ContrastEnhancementType c : ContrastEnhancementType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ContrastEnhancementType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
areEqual
public static boolean areEqual(double a, double b)
Simple utility method to check Double values equality.
-
generateGammaCorrectedPiecewise
public static PiecewiseTransform1D<DefaultPiecewiseTransform1DElement> generateGammaCorrectedPiecewise(double minimum, double maximum, double gammaValue)
Generate piecewise transformation for gamma correction
-
getType
public static ContrastEnhancementType getType(AbstractContrastMethodStrategy method)
Return a properContrastEnhancementType
instance depending on the providedAbstractContrastMethodStrategy
.
-
-