Class Fusion

java.lang.Object
com.flir.thermalsdk.image.fusion.Fusion

public class Fusion extends Object
Provides functionality to manage the Fusion modes of a ThermalImage.
  • Method Details

    • setMsx

      public void setMsx(double alpha) throws IllegalArgumentException
      Thermal MSX (Multi Spectral DynamicImaging) mode displays an infrared image where the edges of the objects are enhanced with information from the visual image. Note: Does no longer change the fusion mode.
      Parameters:
      alpha - Flag that indicate how much the visual image is blended with IR (valid value range: [0.0, 100.0]).
      Throws:
      IllegalArgumentException - when provided alpha value is out of range (valid value range: [0.0, 100.0])
      See Also:
    • getMsx

      public Msx getMsx()
      Thermal MSX (Multi Spectral Dynamic Imaging) mode displays an infrared image where the edges of the objects are enhanced with information from the visual image.
    • setPictureInPicture

      public void setPictureInPicture(int x, int y, int width, int height, ColorMode colorMode) throws IllegalArgumentException
      Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image. Note: Does no longer change the fusion mode.
      Parameters:
      x - left corner of the IR rectangle shape
      y - top corner of the IR rectangle shape
      width - width of the IR rectangle shape
      height - height of the IR rectangle shape
      colorMode - color mode of the visual image part
      Throws:
      IllegalArgumentException - when provided area size or position is incorrect
      See Also:
    • setPictureInPicture

      public void setPictureInPicture(Rectangle area, ColorMode colorMode) throws IllegalArgumentException
      Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image. Note: Does no longer change the fusion mode.
      Parameters:
      area - area defining the IR part of the image
      colorMode - color mode of the visual image part
      Throws:
      IllegalArgumentException - when provided area size or position is incorrect
      See Also:
    • getPictureInPicture

      public PictureInPicture getPictureInPicture()
      Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image.
    • setVisualOnly

      public void setVisualOnly(ColorMode colorMode)
      Visual image is zoomed and fused with IR image. Note: Does no longer change the fusion mode.
      Parameters:
      colorMode - color mode of the visual image
      See Also:
    • getVisualOnly

      public VisualOnly getVisualOnly()
      Visual image is zoomed and fused with IR image.
    • setBlending

      public void setBlending(double level, ColorMode colorMode)
      IR image is blended with visual image based on the specified blending factor value. Use Blending mode to display a blended image that uses a mix of infrared pixels and digital photo pixels. Note: Does no longer change the fusion mode.
      Parameters:
      level - blending factor value defining how much IR image is blended with visual image (1.0 = only IR, 0.0 = only visual)
      colorMode - color mode of the visual image
      See Also:
    • getBlending

      public Blending getBlending()
      IR image is blended with visual image based on the specified blending factor value.
    • setThermalFusion

      public void setThermalFusion(ThermalValue min, ThermalValue max) throws IllegalArgumentException
      IR image is blended with visual image based on the specified ThermalValue threshold. Note: Does no longer change the fusion mode.
      Parameters:
      min - lower/min threshold as ThermalValue
      max - higher/max threshold as ThermalValue
      Throws:
      IllegalArgumentException - when provided min value is greater than max value
      See Also:
    • setThermalFusionAbove

      public void setThermalFusionAbove(ThermalValue min)
      IR image is blended with visual image with no max temperature threshold. Note: Does no longer change the fusion mode.
      Parameters:
      min - lower/min threshold as ThermalValue
      See Also:
    • setThermalFusionBelow

      public void setThermalFusionBelow(ThermalValue max)
      IR image is blended with visual image with no min temperature threshold. Note: Does no longer change the fusion mode.
      Parameters:
      max - higher/max threshold as ThermalValue
      See Also:
    • getThermalFusion

      public ThermalFusion getThermalFusion()
      Get Thermal fusion settings.
    • getCurrentFusionMode

      public FusionMode getCurrentFusionMode()
      Get current fusion mode
    • setFusionMode

      public void setFusionMode(FusionMode fusionMode)
      Set current fusion mode. Usually this method is called after Fusion.setYYY(), in example:
           // assuming 'myThermalImage' is an instance of ThermalImage
           Fusion fusion = myThermalImage.getFusion();
           // we want to set an MSX mode with a custom alpha parameter
           fusion.setMsx(10); // first set alpha parameter value
           fusion.setFusionMode(FusionMode.MSX); // apply MSX mode to the ThermalImage
           // now calling 'myThermalImage.getImage()' will render an image in MSX mode with alpha value of 10
       
      If you want to use default parameters for particular fusion mode you only need to call:
           // assuming 'myThermalImage' is an instance of ThermalImage
           Fusion fusion = myThermalImage.getFusion();
           fusion.setFusionMode(FusionMode.MSX); // apply MSX mode with default alpha parameter to the ThermalImage
           // now calling 'myThermalImage.getImage()' will render an image in MSX mode with default alpha value
       
    • getPhoto

      @Nullable public @Nullable JavaImageBuffer getPhoto()
      Get a visual image (photo) as a JavaImageBuffer extracted from the file. This is a full resolution photo that is not fusion aligned.
      Returns:
      a visual image (photo) as a JavaImageBuffer extracted from the file or null, if no visual image is associated with this file.
      See Also:
    • getPhotoHeight

      public int getPhotoHeight()
      Get the height of the photo image, to get the photo itself see getPhoto().
      Returns:
      height of image
      See Also:
    • getPhotoWidth

      public int getPhotoWidth()
      Get the width of the photo image, to get the photo itself see getPhoto().
      Returns:
      width of image
      See Also:
    • setTransformation

      public void setTransformation(Transformation transform)
      Set a fusion transformation object.
    • getTransformation

      public Transformation getTransformation()
      Get a copy of fusion transformation object.
      Note: returned Transformation object after modification, needs to be applied in order to make effect.
           // assuming 'myThermalImage' is an instance of ThermalImage
           Fusion fusion = myThermalImage.getFusion();
           Transformation transformation = fusion.getTransformation();
           // modify Transformation object
           transformation.panX = 10;
           // apply updated Transformation to the ThermalImage
           fusion.setTransformation(transformation);
           // now calling 'myThermalImage.getImage()' will render an image with updated pan X