Class ImageBase

java.lang.Object
com.flir.thermalsdk.image.ImageBase
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
ThermalImage

public abstract class ImageBase extends Object implements Closeable
A base definition for all FLIR images. Provides basic, common interface to handle the images within Atlas Android SDK regardless of their source.
  • Method Details

    • getImage

      @Deprecated public abstract JavaImageBuffer getImage()
      Deprecated.
      For live streaming use ThermalStreamer.getImage() API instead, for still images use ImageColorizer.getImage() API instead.
      Gets a JavaImageBuffer object, which represents an image's colorized pixels data depending on selected FusionMode. Rendered/colorized image, which size, appearance etc. heavily depends on the FusionMode and ColorDistributionSettings.
      Note: raw IR and DC pixels are used to generate this image (depending on fusion mode), and DC image will be aligned even in FusionMode.VISUAL_ONLY mode.
      Returns:
      an image buffer as a JavaImageBuffer containing image's colorized pixels data depending on selected FusionMode.
      Throws:
      RuntimeException - if image can't be retrieved due to internal error
      See Also:
    • getHeight

      public int getHeight()
      Get the height "raw IR pixels", as stored in the thermal image.
      Returns:
      image height.
      Throws:
      RuntimeException - if image can't be retrieved due to an internal error
    • getWidth

      public int getWidth()
      Get the width "raw IR pixels", as stored in the thermal image.
      Returns:
      image width.
      Throws:
      RuntimeException - if image can't be retrieved due to an internal error
    • getGpsInformation

      public GpsInformation getGpsInformation()
      Gets a GpsInformation object with GPS details embedded in the image.
      Note: GpsInformation object is mutable, however in order to apply GpsInformation changes to the ThermalImage, it is required to call setGpsInformation(GpsInformation).
      Returns:
      a GpsInformation object with GPS details embedded in the image.
      See Also:
    • setGpsInformation

      public void setGpsInformation(GpsInformation gpsInformation)
      Sets a GpsInformation object with GPS details into the image, overriding any existing data.
      Parameters:
      gpsInformation - a GpsInformation object with GPS details to be set for the image.
      See Also:
    • getCompassInformation

      public CompassInformation getCompassInformation()
      Gets a CompassInformation object with compass details embedded in the image.
      Note: CompassInformation object is mutable, however in order to apply CompassInformation changes to the ThermalImage, it is required to call setCompassInformation(CompassInformation).
      Returns:
      a CompassInformation object with compass details embedded in the image.
    • setCompassInformation

      public void setCompassInformation(CompassInformation compassInformation)
      Sets a CompassInformation object with compass details into the image, overriding any existing data.
      Parameters:
      compassInformation - a CompassInformation object with compass details to be set for the image.
      See Also:
    • getDescription

      public String getDescription()
      Gets an opened file's description/note.
      Returns:
      an opened file's description/note. or null, if description could not be obtained.
    • setDescription

      public void setDescription(String description)
      Sets a file's description/note.
      Parameters:
      description - the description/note to be set for the file.
    • rotate

      public void rotate(RotationAngle angle)
      Rotates the image by a certain angle. Only rotation by angle defined in RotationAngle is supported.
      Note: This is relative rotation, meaning that RotationAngle.ROTATION_ANGLE_0_DEGREES is always a no-op.
      Note: The image pixels will be rotated instantly, so this function may incur heavy computation.
      Note: this image rotation feature is intended to be used for still images (a file-based ThermalImage). For live streaming stream rotation is currently undefined and may give unexpected results. Especially when used with enabled measurements or other ThermalImage tools.
      If you want to rotate a live stream we recommend rotating the colorized pixels (JavaImageBuffer), which can be acquired i.e. by using ThermalImage.getImage() function.
      Important: When rotating the colorized pixels (JavaImageBuffer) any existing ThermalImage tools (i.e. measurements) are not rotated. This means that when using measurements with rotated colorized pixels you are required to handle the difference in the displayed image and the actual ThermalImage i.e. calculate the correct positions and redraw measurements when the image is rotated/flipped. This can became quite complicated and has to be addresses carefully.
      Parameters:
      angle - a rotation angle defined as RotationAngle enum.
    • getGasQuantificationInput

      @Nullable public @Nullable GasQuantificationInput getGasQuantificationInput()
      Gets the inputs used for quantification from the image.
      Note: when GasQuantificationInput is null or invalid, the GasQuantificationResult is also invalid (but the object may be present).
      Returns:
      GasQuantificationInput object or null if no quantification data available
      See Also:
    • getGasQuantificationResult

      @Nullable public @Nullable GasQuantificationResult getGasQuantificationResult()
      Gets the quantification result from the image.
      Note: it is important to check whether a corresponding GasQuantificationInput exists and is valid to make sure the returned GasQuantificationResult object is valid.
      Returns:
      GasQuantificationResult object or null if no quantification data available
      See Also:
    • close

      public void close()
      Closes the image and frees all resources.

      Important: All references to the ThermalImage fields became invalid and any further access to them generates exception. You must deep-copy any object before closing a ThermalImageFile, if you want to use it later.

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable