Class MeasurementSpot


public class MeasurementSpot extends MeasurementShapeMovable

Defines a measurement spot/point tool. Allows to measure temperature in a point of the image. The temperature isn't displayed for a exact location the spot is placed at. It is calculated as an average value for spots surrounding area. This area is a square of 3x3 or 5x5 size.


Measurements attached to an image can be obtained from MeasurementShapeCollection. The collection is created, when image is loaded. To obtain all attached spot measurements it is necessary to call:
 public class MyMeasurements {
 
private ThermalImage mImage;
// ... get the image
public void getSpotMeasurements() { MeasurementShapeCollection collection = mImage.getMeasurements(); List<MeasurementSpot> spots = collection.getSpots(); // use spots - move, get value, etc. } }
  • Method Details

    • moveTo

      public void moveTo(Point point) throws MeasurementException, IllegalArgumentException
      Description copied from class: MeasurementShapeMovable
      Moves the shape to the desired position.
      Specified by:
      moveTo in class MeasurementShapeMovable
      Parameters:
      point - A point where the shape should be moved to. If not stated otherwise, the point corresponds to top left corner of the shape.
      Throws:
      MeasurementException - when the shape is invalid (i.e. removed from measurements collection)
      IllegalArgumentException - when moving to given point causes the shape to be out of image bound (i.e. moving to negative coordinates)
    • offset

      public void offset(int offsetX, int offsetY) throws MeasurementException, IllegalArgumentException
      Description copied from class: MeasurementShapeMovable
      Moves the shape by offsetX on X axis and by offsetY on Y axis.
      Specified by:
      offset in class MeasurementShapeMovable
      Parameters:
      offsetX - an X axis offset by which the shape will be moved
      offsetY - an Y axis offset by which the shape will be moved
      Throws:
      MeasurementException - when the shape is invalid (i.e. removed from measurements collection)
      IllegalArgumentException - when moving to given position causes the shape to be out of image bound (i.e. moving to negative coordinates)
    • getValue

      public ThermalValue getValue()
      Gets the ThermalValue read by spot measurement tools. This value describes temperature measured by the spot tool.
      Returns:
      the temperature measured by tool.
    • getPosition

      public Point getPosition()
      Gets the coordinates of the spot measurement.
      Returns:
      the coordinates of the spot measurement as a Point object or null if can't read the position
    • toString

      public String toString()
      Overrides:
      toString in class Object