Class MeasurementCircle
java.lang.Object
com.flir.thermalsdk.image.measurements.MeasurementShape
com.flir.thermalsdk.image.measurements.MeasurementShapeMovable
com.flir.thermalsdk.image.measurements.MeasurementCircle
Defines the circle measurement tool shape. Circle is described by a surrounding rectangle. This
tool allows to measure temperature in circle area. It gives the possibility to find area's
minimum, maximum and average temperature. There is functionality to find the exact location for
minimum and maximum values.
Below is an example, how to read and modify the collection containing circle measurement tools.
Below is an example, how to read and modify the collection containing circle measurement tools.
public class MyMeasurements {`
private ThermalImage mImage;
// ... load the image from file or FLIR Thermal camera
public void getCircleMeasurements() { MeasurementShapeCollection collection = mImage.getMeasurements(); List<MeasurementCircle> circles = collection.getCircles(); // use circles }
public void addCircleMeasurement(int left, int top, int radius) { try { mImage.getMeasurements().addCircle(left, top, radius); } catch (IllegalArgumentException e) { // invalid shape coordinates } } }
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Gets a center point of the circle.int
Gets the height of the area the rectangle measurement tool covers.boolean
boolean
boolean
boolean
int
getWidth()
Gets the width of the area the rectangle measurement tool covers.void
Moves the shape to the desired position.void
offset
(int offsetX, int offsetY) Moves the shape byoffsetX
on X axis and byoffsetY
on Y axis.void
setAreaCalc
(boolean enable) void
setAvgCalc
(boolean enable) void
setMaxCalc
(boolean enable) void
setMaxMarker
(boolean visible) void
setMinCalc
(boolean enable) void
setMinMarker
(boolean visible) void
setRadius
(int radius) Sets circle radius.void
setSize
(int x, int y, int radius) Sets circle size.toString()
-
Method Details
-
moveTo
Moves the shape to the desired position. Note that the point corresponds to an circle geometric center.- Specified by:
moveTo
in classMeasurementShapeMovable
- Parameters:
point
- A point where the shape should be moved to. Note that the point corresponds to an circle geometric center.- 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
Description copied from class:MeasurementShapeMovable
Moves the shape byoffsetX
on X axis and byoffsetY
on Y axis.- Specified by:
offset
in classMeasurementShapeMovable
- Parameters:
offsetX
- an X axis offset by which the shape will be movedoffsetY
- 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)
-
getCenter
Gets a center point of the circle.- Returns:
- Returns a center point of the circle.
-
setRadius
Sets circle radius.- Parameters:
radius
- radius of the circle- Throws:
IllegalArgumentException
- when given parameters are incorrect
-
setSize
Sets circle size.- Parameters:
x
- the X coordinate of the center point of the circley
- the Y coordinate of the center point of the circleradius
- radius of the circle- Throws:
IllegalArgumentException
- when given parameters are incorrect
-
getWidth
public int getWidth()Gets the width of the area the rectangle measurement tool covers.- Returns:
- the width of the area the rectangle measurement tool covers.
-
getHeight
public int getHeight()Gets the height of the area the rectangle measurement tool covers.- Returns:
- the height of the area the rectangle measurement tool covers.
-
getMinMarkerPosition
-
getMinMarker
public boolean getMinMarker() -
setMinMarker
- Throws:
MeasurementException
-
getMaxMarkerPosition
-
getMaxMarker
public boolean getMaxMarker() -
setMaxMarker
- Throws:
MeasurementException
-
getAvgValue
-
getMinValue
-
getMaxValue
-
getAvgCalc
public boolean getAvgCalc() -
setAvgCalc
- Throws:
MeasurementException
-
getMinCalc
public boolean getMinCalc() -
setMinCalc
- Throws:
MeasurementException
-
getMaxCalc
public boolean getMaxCalc() -
setMaxCalc
- Throws:
MeasurementException
-
getAreaDimensions
-
getAreaCalc
public boolean getAreaCalc() -
setAreaCalc
public void setAreaCalc(boolean enable) -
toString
-