Interface ColorInterpretation
- All Superinterfaces:
Cloneable,org.gvsig.tools.lang.Cloneable,org.gvsig.tools.observer.Observable,org.gvsig.tools.observer.Observer,org.gvsig.tools.persistence.Persistent,org.gvsig.tools.observer.WeakReferencingObservable
public interface ColorInterpretation
extends org.gvsig.tools.observer.WeakReferencingObservable, org.gvsig.tools.persistence.Persistent, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.observer.Observer
- Author:
- fdiaz
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a color interpretation to this color interpretation.voidcopyFrom(ColorInterpretation colorInterpretation) Copy from the color interpretation received as parameterget(int i) Get color interpretation of band.intintGets the band position defined with color interpretation received as parameter.intIf there are not color table, return -1String[]Gets color interpretation of all bandsbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisAlphaInterpretation(int band) booleanisBGR()booleanisCMYK()booleanisColorInterpretation(int band) booleanisGray()booleanisGrayInterpretation(int band) booleanisHSL()booleanbooleanisPaletteInterpretation(int band) booleanisRGB()booleanisRGBA()booleanGets if color interpretation is definedbooleanisYCBCR()intlength()voidsetColorInterpValue(int band, String value) Set color interpretation value to bandvoidsetPalette(ColorTable colorTable) Sets the colorTable.voidsetPaletteBand(int band) Sets the band which will apply the color tableMethods inherited from interface org.gvsig.tools.lang.Cloneable
cloneMethods inherited from interface org.gvsig.tools.observer.Observable
addObserver, deleteObserver, deleteObserversMethods inherited from interface org.gvsig.tools.observer.Observer
updateMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToState
-
Field Details
-
RED_BAND
- See Also:
-
GREEN_BAND
- See Also:
-
BLUE_BAND
- See Also:
-
ALPHA_BAND
- See Also:
-
GRAY_BAND
- See Also:
-
HUE_BAND
- See Also:
-
SATURATION_BAND
- See Also:
-
LIGHTNESS_BAND
- See Also:
-
CYAN_BAND
- See Also:
-
MAGENTA_BAND
- See Also:
-
YELLOW_BAND
- See Also:
-
BLACK_BAND
- See Also:
-
YCBCR_Y_BAND
- See Also:
-
YCBCR_CB_BAND
- See Also:
-
YCBCR_CR_BAND
- See Also:
-
PALETTE_BAND
- See Also:
-
UNDEFINED_BAND
- See Also:
-
RGB
- See Also:
-
BGR
- See Also:
-
ARGB
- See Also:
-
GRAYSCALE
- See Also:
-
PALETTE
- See Also:
-
HSL
- See Also:
-
CMYK
- See Also:
-
YCBCR
- See Also:
-
-
Method Details
-
setColorInterpValue
Set color interpretation value to band- Parameters:
band- Bandvalue- Color interpretation value
-
length
int length()- Returns:
- Returns the number of assigned color interpretation values
-
hasInterpretation
boolean hasInterpretation()- Returns:
- Returns true if the color values are assigned to any band of the image or the values Gray or Palette are assigned.
-
isBGR
boolean isBGR()- Returns:
- Returns true if the color interpretation is BGR, that is, the three first bands of the image are Blue, Green and Red.
-
isRGB
boolean isRGB()- Returns:
- Returns true if the color interpretation is RGB, that is, the three first bands of the image are Red, Green and Blue.
-
isRGBA
boolean isRGBA()- Returns:
- Returns true if the color interpretation is ARGB, that is, the four first bands of the image are Red, Green, Blue and Alpha.
-
hasAnyRGBBand
boolean hasAnyRGBBand()- Returns:
- Returns true if the color interpretation has at least one RED band, one GREEN band and one BLUE band.
-
isGray
boolean isGray()- Returns:
- Returns true if the color interpretation is Gray
-
isHSL
boolean isHSL()- Returns:
- Returns true if the color interpretation is HSL
-
isCMYK
boolean isCMYK()- Returns:
- Returns true if the color interpretation is CMYK
-
isYCBCR
boolean isYCBCR()- Returns:
- Returns true if the color interpretation YCBCR
-
isColorInterpretation
boolean isColorInterpretation(int band) - Parameters:
band-- Returns:
- Returns true if the selected band has color interpretation and false otherwise
-
isGrayInterpretation
boolean isGrayInterpretation(int band) - Parameters:
band-- Returns:
- Returns true if the selected band has gray interpretation and false otherwise
-
isPaletteInterpretation
boolean isPaletteInterpretation(int band) - Parameters:
band-- Returns:
- Returns true if the selected band has palette interpretation and false otherwise
-
isAlphaInterpretation
boolean isAlphaInterpretation(int band) - Parameters:
band-- Returns:
- Returns true if the selected band has alpha interpretation and false otherwise
-
get
Get color interpretation of band.- Parameters:
i- Number of band- Returns:
- Color interpretation defined of band
-
getBand
Gets the band position defined with color interpretation received as parameter.- Parameters:
id- Color interpretation definition- Returns:
- Index of band
-
isUndefined
boolean isUndefined()Gets if color interpretation is defined- Returns:
- True if color interpretation is defined, false if it is undefined
-
getValues
String[] getValues()Gets color interpretation of all bands- Returns:
- Array with color interpretation
-
hasAlphaBand
boolean hasAlphaBand()- Returns:
- Returns true if one band has the "Alpha" label
-
getAlphaBand
int getAlphaBand()- Returns:
- Returns the number of band with the label "Alpha"
-
addColorInterpretation
Adds a color interpretation to this color interpretation. The result is the addition of color interpretations.- Parameters:
ci-
-
copyFrom
Copy from the color interpretation received as parameter- Parameters:
colorInterpretation-
-
hasAnyGrayBand
boolean hasAnyGrayBand()- Returns:
- Returns true if the color interpretation has at least one Gray band.
-
hasAnyPaletteBand
boolean hasAnyPaletteBand()- Returns:
- Returns true if the color interpretation has at least one Palette band.
-
hasAnyHSLBand
boolean hasAnyHSLBand()- Returns:
- Returns true if the color interpretation has at least one HUE band, one SATURATION band or one LIGHTNESS band.
-
hasAnyCMYKBand
boolean hasAnyCMYKBand()- Returns:
- Returns true if the color interpretation has at least one HUE band, one SATURATION band or one LIGHTNESS band.
-
hasAnyYCBCRBand
boolean hasAnyYCBCRBand()- Returns:
- Returns true if the color interpretation has at least one YCBCR-CB band, one YCBCR-CR band or one YCBCR-Y band.
-
setPalette
Sets the colorTable.- Parameters:
colorTable-
-
setPaletteBand
void setPaletteBand(int band) Sets the band which will apply the color table- Parameters:
band-
-
getPaletteBand
int getPaletteBand()If there are not color table, return -1- Returns:
- the band in which will apply the color table
-
getPalette
ColorTable getPalette()- Returns:
- the color table
-
isPalette
boolean isPalette()- Returns:
- true if paletteBand and colorTable are not null.
-
hasAnyColorInterpretationBand
boolean hasAnyColorInterpretationBand()- Returns:
- Returns true if the color interpretation has at least one Color band (not Gray, Palette nor Alpha)
-