public class IHSColorSpaceJAIExt extends ColorSpaceJAIExt
The RGB-to-IHS transformation is defined by the equations:
PI
- h, where
When H
is in [2PI/3, 4PI/3]
, R
should be the smallest. Then, there exists
R = (1-S)I
and
where c1 = 3I-R
and c2 = sqrt(3)(R-I)tg(H)
when H
is in [4PI/3, 2PI]
,
G = (1-S)I
and
where c1 = 3I-G and c2 = sqrt(3)(G-I)tg(H-2PI/3)
when H
is in [0, 2PI/3]
,
B = (1-S)I
and
where c1 = 3I-B
and c2 = sqrt(3)(B-I)tg(H-4PI/3)
Methods defined in the superclasses are not commented extensively.
Modifier and Type | Field and Description |
---|---|
static boolean |
ARRAY_CALC
Constant indicating that the inner random iterators must pre-calculate an array of the image positions
|
static boolean |
TILE_CACHED
Constant indicating that the inner random iterators must cache the current tile position
|
POWER1
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
Constructor and Description |
---|
IHSColorSpaceJAIExt()
Constructs an instance of this class with
type ColorSpace.TYPE_HSV , 3 components, and preferred intermediary space
sRGB. |
Modifier and Type | Method and Description |
---|---|
float[] |
fromCIEXYZ(float[] colorValue)
Converts a single color value from CIEXYZ to IHS.
|
WritableRaster |
fromCIEXYZ(Raster src,
int[] srcComponentSize,
WritableRaster dest,
int[] destComponentSize,
ROI roi,
Range nodata,
float[] destNodata)
Converts a
Raster of colors represented as pixels from CIEXYZ to IHS. |
float[] |
fromRGB(float[] rgbValue)
Converts a single color value from sRGB to IHS.
|
WritableRaster |
fromRGB(Raster src,
int[] srcComponentSize,
WritableRaster dest,
int[] destComponentSize,
ROI roi,
Range nodata,
float[] destNodata)
Converts a
Raster of colors represented as pixels from sRGB to IHS. |
static IHSColorSpaceJAIExt |
getInstance()
Retrieves the unique instance of this class the construction of which is deferred until the first invocation of this method.
|
float[] |
toCIEXYZ(float[] colorValue)
Converts a single color value from IHS to CIEXYZ.
|
WritableRaster |
toCIEXYZ(Raster src,
int[] srcComponentSize,
WritableRaster dest,
int[] destComponentSize,
ROI roi,
Range nodata,
float[] destNodata)
Converts a
Raster of colors represented as pixels from IHS to CIEXYZ. |
float[] |
toRGB(float[] colorValue)
Converts a single color value from IHS to sRGB.
|
WritableRaster |
toRGB(Raster src,
int[] srcComponentSize,
WritableRaster dest,
int[] destComponentSize,
ROI roi,
Range nodata,
float[] destNodata)
Converts a
Raster of colors represented as pixels from IHS to sRGB. |
CIEXYZToRGB, convertToSigned, fromCIEXYZ, fromRGB, getIHSColorSpaceJAIEXT, RGB2XYZ, RGBToCIEXYZ, toCIEXYZ, toRGB, XYZ2RGB
checkParameters, CIEXYZToRGB, isRGBPreferredIntermediary, RGBToCIEXYZ
getInstance, getMaxValue, getMinValue, getName, getNumComponents, getType, isCS_sRGB
public static final boolean ARRAY_CALC
public static final boolean TILE_CACHED
public IHSColorSpaceJAIExt()
type
ColorSpace.TYPE_HSV
, 3 components, and preferred intermediary space
sRGB.public static IHSColorSpaceJAIExt getInstance()
public float[] fromCIEXYZ(float[] colorValue)
fromCIEXYZ
in class ColorSpace
public float[] fromRGB(float[] rgbValue)
fromRGB
in class ColorSpace
public float[] toCIEXYZ(float[] colorValue)
toCIEXYZ
in class ColorSpace
public float[] toRGB(float[] colorValue)
toRGB
in class ColorSpace
public WritableRaster fromCIEXYZ(Raster src, int[] srcComponentSize, WritableRaster dest, int[] destComponentSize, ROI roi, Range nodata, float[] destNodata)
Raster
of colors represented as pixels from CIEXYZ to IHS.fromCIEXYZ
in class ColorSpaceJAIExt
WritableRaster
with destination data valuespublic WritableRaster fromRGB(Raster src, int[] srcComponentSize, WritableRaster dest, int[] destComponentSize, ROI roi, Range nodata, float[] destNodata)
Raster
of colors represented as pixels from sRGB to IHS.fromRGB
in class ColorSpaceJAIExt
WritableRaster
with destination data valuespublic WritableRaster toCIEXYZ(Raster src, int[] srcComponentSize, WritableRaster dest, int[] destComponentSize, ROI roi, Range nodata, float[] destNodata)
Raster
of colors represented as pixels from IHS to CIEXYZ.toCIEXYZ
in class ColorSpaceJAIExt
WritableRaster
with destination data valuespublic WritableRaster toRGB(Raster src, int[] srcComponentSize, WritableRaster dest, int[] destComponentSize, ROI roi, Range nodata, float[] destNodata)
Raster
of colors represented as pixels from IHS to sRGB.toRGB
in class ColorSpaceJAIExt
WritableRaster
with destination data valuesCopyright © 2006–2018 GeoSolutions. All rights reserved.