Class MeasurementShapeCollection
java.lang.Object
com.flir.thermalsdk.image.measurements.MeasurementShapeCollection
Container for a different type of
MeasurementShape
s. 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 TypeMethodDescriptionvoid
addCircle
(int x, int y, int radius) Adds a newMeasurementCircle
to the collection.void
addDelta
(MeasurementShape member1, DeltaMemberValueType member1ValueType, MeasurementShape member2, DeltaMemberValueType member2ValueType) Adds a newMeasurementDelta
to the collection.void
addHorizontalLine
(int y) Adds a newMeasurementLine
to the collection.void
Adds a newMeasurementLine
to the collection.void
addRectangle
(int x, int y, int width, int height) Adds a newMeasurementRectangle
to the collection.void
addReference
(ThermalValue value) Adds a newMeasurementReference
to the collection.void
addSpot
(int x, int y) Adds a newMeasurementSpot
to the collection.void
addVerticalLine
(int x) Adds a newMeasurementLine
to the collection.void
clear()
Removes allMeasurementShape
.boolean
contains
(MeasurementShape measurement) Checks, if collection contains providedMeasurementShape
.Gets allMeasurementCircle
s added to this collection.Gets allMeasurementDelta
s added to this collection.getItems()
Gets all measurements added to this collection.getLines()
Gets allMeasurementLine
s added to this collection.Gets allMeasurementRectangle
s added to this collection.Gets allMeasurementReference
s added to this collection.getSpots()
Gets allMeasurementSpot
s added to this collection.void
remove
(MeasurementShape measurement) Removes providedMeasurementShape
from this collection.int
size()
Gets the number ofMeasurementShape
added to this collection.
-
Method Details
-
addSpot
Adds a newMeasurementSpot
to 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 newMeasurementRectangle
to 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 newMeasurementCircle
to 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 newMeasurementLine
to 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 newMeasurementLine
to 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 newMeasurementLine
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 newMeasurementDelta
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
Adds a newMeasurementReference
to the collection.- Parameters:
value
- arbitrary reference measurement temperature value- Throws:
IllegalArgumentException
- Thrown when temperature is invalid
-
getSpots
Gets allMeasurementSpot
s added to this collection.- Returns:
- the list of spot measurement tools added to this collection.
-
getLines
Gets allMeasurementLine
s added to this collection.- Returns:
- the list of line measurement tools added to this collection.
-
getRectangles
Gets allMeasurementRectangle
s added to this collection.- Returns:
- the list of rectangle measurement tools added to this collection.
-
getCircles
Gets allMeasurementCircle
s added to this collection.- Returns:
- the list of circle measurement tools added to this collection.
-
getDeltas
Gets allMeasurementDelta
s added to this collection.- Returns:
- the list of delta measurement tools added to this collection.
-
getReferences
Gets allMeasurementReference
s 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,false
otherwise.
-
remove
Removes providedMeasurementShape
from this collection. Removed measurement tool are no longer active and thus they do not appear on the image.- Parameters:
measurement
- theMeasurementShape
to 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 ofMeasurementShape
added to this collection.- Returns:
- the size of the collection.
-