Class MeasurementShapeCollection
java.lang.Object
com.flir.thermalsdk.image.measurements.MeasurementShapeCollection
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 Summary
Modifier and TypeMethodDescriptionvoidaddCircle(int x, int y, int radius) Adds a newMeasurementCircleto the collection.voidaddDelta(MeasurementShape member1, DeltaMemberValueType member1ValueType, MeasurementShape member2, DeltaMemberValueType member2ValueType) Adds a newMeasurementDeltato the collection.voidaddHorizontalLine(int y) Adds a newMeasurementLineto the collection.voidAdds a newMeasurementLineto the collection.voidaddRectangle(int x, int y, int width, int height) Adds a newMeasurementRectangleto the collection.voidaddReference(ThermalValue value) Adds a newMeasurementReferenceto the collection.voidaddSpot(int x, int y) Adds a newMeasurementSpotto the collection.voidaddVerticalLine(int x) Adds a newMeasurementLineto the collection.voidclear()Removes allMeasurementShape.booleancontains(MeasurementShape measurement) Checks, if collection contains providedMeasurementShape.Gets allMeasurementCircles added to this collection.Gets allMeasurementDeltas added to this collection.getItems()Gets all measurements added to this collection.getLines()Gets allMeasurementLines added to this collection.Gets allMeasurementRectangles added to this collection.Gets allMeasurementReferences added to this collection.getSpots()Gets allMeasurementSpots added to this collection.voidremove(MeasurementShape measurement) Removes providedMeasurementShapefrom this collection.intsize()Gets the number ofMeasurementShapeadded to this collection.
-
Method Details
-
addSpot
Adds a newMeasurementSpotto the collection.- Parameters:
x- X positiony- Y position- Throws:
IllegalArgumentException- if arguments are invalid (i.e. negative position or shape out of image bounds)
-
addRectangle
Adds a newMeasurementRectangleto the collection.- Parameters:
x- X position of the top left corner of the rectangley- Y position of the top left corner of the rectanglewidth- width of the rectangleheight- height of the rectangle- Throws:
IllegalArgumentException- if arguments are invalid (i.e. negative position or shape out of image bounds)
-
addCircle
Adds a newMeasurementCircleto the collection.- Parameters:
x- X position of the top left corner of the rectangle describing outside bounds of the circley- Y position of the top left corner of the rectangle describing outside bounds of the circleradius- circle radius- Throws:
IllegalArgumentException- if arguments are invalid (i.e. negative position or shape out of image bounds)
-
addHorizontalLine
Adds a newMeasurementLineto the collection.- Parameters:
y- Y position- Throws:
IllegalArgumentException- if arguments are invalid (i.e. negative position or shape out of image bounds)
-
addVerticalLine
Adds a newMeasurementLineto the collection.- Parameters:
x- X position- Throws:
IllegalArgumentException- if arguments are invalid (i.e. negative position or shape out of image bounds)
-
addLine
Adds a newMeasurementLineto 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 newMeasurementDeltato 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
Adds a newMeasurementReferenceto the collection.- Parameters:
value- arbitrary reference measurement temperature value- Throws:
IllegalArgumentException- Thrown when temperature is invalid
-
getSpots
Gets allMeasurementSpots added to this collection.- Returns:
- the list of spot measurement tools added to this collection.
-
getLines
Gets allMeasurementLines added to this collection.- Returns:
- the list of line measurement tools added to this collection.
-
getRectangles
Gets allMeasurementRectangles added to this collection.- Returns:
- the list of rectangle measurement tools added to this collection.
-
getCircles
Gets allMeasurementCircles added to this collection.- Returns:
- the list of circle measurement tools added to this collection.
-
getDeltas
Gets allMeasurementDeltas added to this collection.- Returns:
- the list of delta measurement tools added to this collection.
-
getReferences
Gets allMeasurementReferences added to this collection.- Returns:
- the list of MeasurementReference tools added to this collection.
-
clear
public void clear()Removes allMeasurementShape. Removed measurement tool(s) are no longer active and thus they do not appear on the image. -
contains
Checks, if collection contains providedMeasurementShape.- Parameters:
measurement- the measurement tool to search for.- Returns:
true, if collection contains provided measurement tool,falseotherwise.
-
remove
Removes providedMeasurementShapefrom this collection. Removed measurement tool are no longer active and thus they do not appear on the image.- Parameters:
measurement- theMeasurementShapeto remove.
-
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 ofMeasurementShapeadded to this collection.- Returns:
- the size of the collection.
-