Class Color
- java.lang.Object
-
- science.aist.imaging.api.domain.color.Color
-
-
Field Summary
Fields Modifier and Type Field Description protected @lombok.NonNull double[]
channels
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
double
getChannel(int c)
double[]
getChannels()
short[]
getChannelsShort()
int
getNumberOfChannels()
int
hashCode()
boolean
isCompatibleWithType(ChannelType channelType)
Checks if color is compatible with channel type
-
-
-
Method Detail
-
isCompatibleWithType
public boolean isCompatibleWithType(ChannelType channelType)
Checks if color is compatible with channel type- Parameters:
channelType
- to be checked- Returns:
- true iff compatible
-
getNumberOfChannels
public int getNumberOfChannels()
- Returns:
- of channels of this color value
-
getChannel
public double getChannel(int c)
- Parameters:
c
- channel to be accessed- Returns:
- channel value
-
getChannels
public double[] getChannels()
- Returns:
- a copy of the color's channels
-
getChannelsShort
public short[] getChannelsShort()
- Returns:
- a copy of the color's channels casted to short
-
-