Class MeasurementShapeCollection

java.lang.Object
com.flir.thermalsdk.image.measurements.MeasurementShapeCollection

public class MeasurementShapeCollection extends Object
Container for a different type of MeasurementShapes. It provides access to all measurements added to an image. It also allows to add a new measurements to an existing image. The collection is obtained by calling ThermalImage.getMeasurements().
  • Method Details

    • addSpot

      public void addSpot(int x, int y) throws IllegalArgumentException
      Adds a new MeasurementSpot to the collection.
      Parameters:
      x - X position
      y - Y position
      Throws:
      IllegalArgumentException - if arguments are invalid (i.e. negative position or shape out of image bounds)
    • addRectangle

      public void addRectangle(int x, int y, int width, int height) throws IllegalArgumentException
      Adds a new MeasurementRectangle to the collection.
      Parameters:
      x - X position of the top left corner of the rectangle
      y - Y position of the top left corner of the rectangle
      width - width of the rectangle
      height - height of the rectangle
      Throws:
      IllegalArgumentException - if arguments are invalid (i.e. negative position or shape out of image bounds)
    • addCircle

      public void addCircle(int x, int y, int radius) throws IllegalArgumentException
      Adds a new MeasurementCircle to the collection.
      Parameters:
      x - X position of the top left corner of the rectangle describing outside bounds of the circle
      y - Y position of the top left corner of the rectangle describing outside bounds of the circle
      radius - circle radius
      Throws:
      IllegalArgumentException - if arguments are invalid (i.e. negative position or shape out of image bounds)
    • addHorizontalLine

      public void addHorizontalLine(int y) throws IllegalArgumentException
      Adds a new MeasurementLine to the collection.
      Parameters:
      y - Y position
      Throws:
      IllegalArgumentException - if arguments are invalid (i.e. negative position or shape out of image bounds)
    • addVerticalLine

      public void addVerticalLine(int x) throws IllegalArgumentException
      Adds a new MeasurementLine to the collection.
      Parameters:
      x - X position
      Throws:
      IllegalArgumentException - if arguments are invalid (i.e. negative position or shape out of image bounds)
    • addLine

      public void addLine(Point posStart, Point posEnd) throws IllegalArgumentException
      Adds a new MeasurementLine to the collection. Note: Coordinates should be positive values.
      Parameters:
      posStart - The start of the line.
      posEnd - The end of the line.
      Throws:
      IllegalArgumentException - if arguments are invalid (i.e. negative position or shape out of image bounds)
    • addDelta

      public void addDelta(MeasurementShape member1, DeltaMemberValueType member1ValueType, MeasurementShape member2, DeltaMemberValueType member2ValueType) throws IllegalArgumentException
      Adds a new MeasurementDelta to the collection.
      Parameters:
      member1 - The first delta member shape.
      member1ValueType - The first delta member value type.
      member2 - The second delta member shape.
      member2ValueType - The second delta member value type.
      Throws:
      IllegalArgumentException - Thrown if the delta is invalid
    • addReference

      public void addReference(ThermalValue value) throws IllegalArgumentException
      Adds a new MeasurementReference to the collection.
      Parameters:
      value - arbitrary reference measurement temperature value
      Throws:
      IllegalArgumentException - Thrown when temperature is invalid
    • getSpots

      public List<MeasurementSpot> getSpots()
      Gets all MeasurementSpots added to this collection.
      Returns:
      the list of spot measurement tools added to this collection.
    • getLines

      public List<MeasurementLine> getLines()
      Gets all MeasurementLines added to this collection.
      Returns:
      the list of line measurement tools added to this collection.
    • getRectangles

      public List<MeasurementRectangle> getRectangles()
      Gets all MeasurementRectangles added to this collection.
      Returns:
      the list of rectangle measurement tools added to this collection.
    • getCircles

      public List<MeasurementCircle> getCircles()
      Gets all MeasurementCircles added to this collection.
      Returns:
      the list of circle measurement tools added to this collection.
    • getDeltas

      public List<MeasurementDelta> getDeltas()
      Gets all MeasurementDeltas added to this collection.
      Returns:
      the list of delta measurement tools added to this collection.
    • getReferences

      public List<MeasurementReference> getReferences()
      Gets all MeasurementReferences added to this collection.
      Returns:
      the list of MeasurementReference tools added to this collection.
    • clear

      public void clear()
      Removes all MeasurementShape. Removed measurement tool(s) are no longer active and thus they do not appear on the image.
    • contains

      public boolean contains(MeasurementShape measurement)
      Checks, if collection contains provided MeasurementShape.
      Parameters:
      measurement - the measurement tool to search for.
      Returns:
      true, if collection contains provided measurement tool, false otherwise.
    • remove

      public void remove(MeasurementShape measurement)
      Removes provided MeasurementShape from this collection. Removed measurement tool are no longer active and thus they do not appear on the image.
      Parameters:
      measurement - the MeasurementShape to remove.
    • getItems

      public List<MeasurementShape> getItems()
      Gets all measurements added to this collection.
      Returns:
      the list of all measurement tools added to this collection.
    • size

      public int size()
      Gets the number of MeasurementShape added to this collection.
      Returns:
      the size of the collection.