Class HSVColor
- java.lang.Object
-
- science.aist.imaging.api.domain.color.Color
-
- science.aist.imaging.api.domain.color.HSVColor
-
- All Implemented Interfaces:
Serializable
,ThreeChannelColor
public class HSVColor extends Color implements ThreeChannelColor
Class representing a HSVColor
- Since:
- 1.0
- Author:
- Christoph Praschl
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getChannel1()
double
getChannel2()
double
getChannel3()
double
getHue()
double
getSaturation()
double
getValue()
boolean
isCompatibleWithType(ChannelType channelType)
Checks if color is compatible with channel typevoid
setChannel1(double channel)
void
setChannel2(double channel)
void
setChannel3(double channel)
void
setHue(double hue)
void
setSaturation(double saturation)
void
setValue(double value)
-
Methods inherited from class science.aist.imaging.api.domain.color.Color
equals, getChannel, getChannels, getChannelsShort, getNumberOfChannels, hashCode
-
-
-
-
Field Detail
-
WHITE
public static final transient HSVColor WHITE
White HSV Color
-
BLACK
public static final transient HSVColor BLACK
Black HSV Color
-
RED
public static final transient HSVColor RED
Red HSV Color
-
GREEN
public static final transient HSVColor GREEN
Green HSV Color
-
BLUE
public static final transient HSVColor BLUE
Blue HSV Color
-
-
Method Detail
-
getHue
public double getHue()
-
setHue
public void setHue(double hue)
- Parameters:
hue
- to be set- Throws:
IllegalArgumentException
- if hue is smaller than 0.0 or greater than 360.0
-
getSaturation
public double getSaturation()
-
setSaturation
public void setSaturation(double saturation)
- Parameters:
saturation
- The Saturation of the HSV-Color- Throws:
IllegalArgumentException
- if saturation is smaller than 0.0 or greater than 1.0
-
getValue
public double getValue()
-
setValue
public void setValue(double value)
- Parameters:
value
- The Value of the HSV-Color- Throws:
IllegalArgumentException
- if value is smaller than 0.0 or greater than 1.0
-
getChannel1
public double getChannel1()
- Specified by:
getChannel1
in interfaceThreeChannelColor
- Returns:
- The first channel for the represented color
-
setChannel1
public void setChannel1(double channel)
- Specified by:
setChannel1
in interfaceThreeChannelColor
- Parameters:
channel
- The first channel for the represented color
-
getChannel2
public double getChannel2()
- Specified by:
getChannel2
in interfaceThreeChannelColor
- Returns:
- The second channel for the represented color
-
setChannel2
public void setChannel2(double channel)
- Specified by:
setChannel2
in interfaceThreeChannelColor
- Parameters:
channel
- The second channel for the represented color
-
getChannel3
public double getChannel3()
- Specified by:
getChannel3
in interfaceThreeChannelColor
- Returns:
- The third channel for the represented color
-
setChannel3
public void setChannel3(double channel)
- Specified by:
setChannel3
in interfaceThreeChannelColor
- Parameters:
channel
- The third channel for the represented color
-
isCompatibleWithType
public boolean isCompatibleWithType(ChannelType channelType)
Description copied from class:Color
Checks if color is compatible with channel type- Overrides:
isCompatibleWithType
in classColor
- Parameters:
channelType
- to be checked- Returns:
- true iff compatible
-
-