public class HueSaturationValue extends ImageToImageOperation implements RGBIndex
Supported image types: RGBIntegerImage
, Paletted8Image
.
Modifier and Type | Field and Description |
---|---|
private float |
hue |
private boolean |
modifyHue |
private float |
sMult |
private boolean |
sNegative |
private float |
vMult |
private boolean |
vNegative |
INDEX_BLUE, INDEX_GREEN, INDEX_RED
Constructor and Description |
---|
HueSaturationValue() |
Modifier and Type | Method and Description |
---|---|
private void |
adjust(int[] orig,
int[] adjusted,
float maxSample) |
void |
process()
This method does the actual work of the operation.
|
private void |
process(Paletted8Image in,
Paletted8Image out) |
private void |
process(RGBIntegerImage in,
RGBIntegerImage out) |
void |
setHueSaturationValue(int hue,
int saturation,
int value)
Set the values for the adjustment of hue, saturation and value (brightness).
|
void |
setSaturationValue(int saturation,
int value)
Set the amount of change to saturation and value (brightness) for this operation,
between -100 and 100.
|
private void |
setSv(int saturation,
int value) |
canInputAndOutputBeEqual, ensureImagesHaveSameResolution, ensureInputImageIsAvailable, ensureOutputImageResolution, getInputImage, getOutputImage, setCanInputAndOutputBeEqual, setInputImage, setOutputImage
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress
private float hue
private boolean modifyHue
private float sMult
private boolean sNegative
private float vMult
private boolean vNegative
private final void adjust(int[] orig, int[] adjusted, float maxSample)
private void process(Paletted8Image in, Paletted8Image out)
private void process(RGBIntegerImage in, RGBIntegerImage out)
public void process() throws MissingParameterException, WrongParameterException
Operation
process
in class Operation
MissingParameterException
- if any mandatory parameter was not given to the operationWrongParameterException
- if at least one of the input parameters was
not initialized appropriately (values out of the valid interval, etc.)public void setHueSaturationValue(int hue, int saturation, int value)
setSaturationValue(int, int)
).
Hue must be from the interval 0 to 359.hue
- the hue to be used for the complete image, between 0 and 359saturation
- change of saturation, between -100 and 100value
- change of saturation, between -100 and 100java.lang.IllegalArgumentException
- if one of the arguments does not stay within
the valid intervalpublic void setSaturationValue(int saturation, int value)
saturation
- change of saturation, between -100 and 100value
- change of saturation, between -100 and 100java.lang.IllegalArgumentException
- if one of the two arguments does not stay within
the -100 .. 100 intervalprivate void setSv(int saturation, int value)