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 Details

  • Method Details

    • setColorInterpValue

      void setColorInterpValue(int band, String value)
      Set color interpretation value to band
      Parameters:
      band - Band
      value - 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

      String get(int i)
      Get color interpretation of band.
      Parameters:
      i - Number of band
      Returns:
      Color interpretation defined of band
    • getBand

      int getBand(String id)
      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

      void addColorInterpretation(ColorInterpretation ci)
      Adds a color interpretation to this color interpretation. The result is the addition of color interpretations.
      Parameters:
      ci -
    • copyFrom

      void copyFrom(ColorInterpretation colorInterpretation)
      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

      void setPalette(ColorTable colorTable)
      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)