Package com.flir.thermalsdk.image
Class ThermalImageFile
java.lang.Object
com.flir.thermalsdk.image.ImageBase
com.flir.thermalsdk.image.ThermalImage
com.flir.thermalsdk.image.ThermalImageFile
- All Implemented Interfaces:
Closeable
,AutoCloseable
Describes a file on the physical file system, which contains a
ThermalImage
. Moreover it
contains additional data, which helps to analyze and interpret the image.-
Method Summary
Modifier and TypeMethodDescriptionGets an absolute path to the file this image was loaded from, i.e.Gets an opened file's name, i.e.static boolean
isThermalImage
(byte[] data) Check if the given byte array contains thermal data.static boolean
isThermalImage
(String file) Check if the file contains thermal data.void
save()
Saves current object to file.void
save
(@Nullable JavaImageBuffer overlay) Save this object to a file with provided image as an overlay.Methods inherited from class com.flir.thermalsdk.image.ThermalImage
addSketch, close, getCameraInformation, getColorDistribution, getColorDistributionSettings, getDateTaken, getDisplaySettings, getDistanceUnit, getExternalSensors, getFusion, getImage, getImageParameters, getIsotherms, getMeasurements, getMinSpotRadius, getPalette, getPhoto, getScale, getSketch, getStatistics, getTemperatureUnit, getTextAnnotations, getTimeZoneTakenOffset, getValueAt, getValues, getValues, getVoiceAnnotation, hasVoiceAnnotation, saveAs, saveAs, setColorDistribution, setColorDistributionSettings, setDisplaySettings, setDistanceUnit, setPalette, setTemperatureUnit, setTextAnnotations, storeVoiceAnnotation, toString
Methods inherited from class com.flir.thermalsdk.image.ImageBase
getCompassInformation, getDescription, getGasQuantificationInput, getGasQuantificationResult, getGpsInformation, getHeight, getWidth, rotate, setCompassInformation, setDescription, setGpsInformation
-
Method Details
-
isThermalImage
Check if the file contains thermal data. This method will only check the file header, useopen(String)
to verify that the specified file is not corrupt- Parameters:
file
- Path to file.- Throws:
RuntimeException
- when failed to open image fileIllegalArgumentException
- when file is null or empty
-
isThermalImage
public static boolean isThermalImage(byte[] data) Check if the given byte array contains thermal data. This method will only check the file header, useopen(byte[])
to verify that the specified file is not corrupt- Parameters:
data
- Data buffer containing an image.- Throws:
IllegalArgumentException
- when data is null
-
save
Saves current object to file.Note: a default overlay is added to the picture. See
save(JavaImageBuffer)
for details about the overlay.
Note: After callingsave()
the rotation of the image is set to 0- Throws:
IOException
- when file cannot be stored.
-
save
Save this object to a file with provided image as an overlay.Note: After calling
save(JavaImageBuffer)
the rotation of the image is set to 0- Parameters:
overlay
- an overlay to be added to the stored image. The overlay pixels, are used as plain JPEG part when storing the image. This overlay is what a "casual" image viewer application can "see" and also is usually used to show JPEG thumbnail.- Throws:
IOException
- when file cannot be stored.
-
getFileName
Gets an opened file's name, i.e. "FLIR1234.jpg".- Returns:
- Returns a file name, i.e. "FLIR1234.jpg".
-
getAbsolutePath
Gets an absolute path to the file this image was loaded from, i.e. "C:\FLIR\images\FLIR1234.jpg" (Java desktop), "<sd-card>/FLIR/images/FLIR1234.jpg" (Android).- Returns:
- Returns the loaded file absolute path.
-