Class Palette

java.lang.Object
com.flir.thermalsdk.image.Palette

public final class Palette extends Object
Defines a palette representation, which can be applied to the ThermalImage in order to display it in specified colors. The palette is a set of colors applied to the temperature or signal data stored in the ThermalImage. Thanks to that each temperature / signal value can be displayed in specific color. This creates a visual representation of the ThermalImage. Palette object is immutable, although you can get a copy of the palette with inverted colors using getInverted(). Note that such copy of the palette needs to be re-applied to the ThermalImage using ThermalImage.setPalette(Palette) in order to make effect.

A Palette's object cannot be created directly. It can be obtained from ThermalImage by calling ThermalImage.getPalette() method. This method will always return an Palette instance. A ThermalImage has to have palette set in order to be presented to the User.

The Palette for ThermalImage can be changed. In order to get the other palettes a PaletteManager class should be used. It can provide the list of predefined palettes and allows to load more palettes as well from a user-defined location.

  • Field Details

    • name

      public final String name
      The name of the palette displayed to the user.
    • inverted

      public final boolean inverted
      The flag determining if the palette is inverted. Inverted palette has switched colors, i.e. warm colors are shown as cold.
      See Also:
  • Method Details

    • getInverted

      public Palette getInverted()
      Gets a copy of this palette with inverted colors, i.e. warm colors are shown as cold. Note that such copy of the palette needs to be re-applied to the ThermalImage using ThermalImage.setPalette(Palette) in order to make effect.
      Returns:
      Returns a copy of this palette with inverted colors.
    • toString

      public String toString()
      Overrides:
      toString in class Object