reference
API Reference › Thermal Images
labkit.thermal.inspectFile
Check whether a file contains supported radiometric data.
Syntax
info = labkit.thermal.inspectFile(path)
info = labkit.thermal.inspectFile(path, opts)Description
Performs the same format check and radiometric read as readFile, but returns the outcome instead of throwing when the extension, file contents, or calibration data are unsupported. Use this function to label files in a chooser or batch review before deciding which ones to read.
Inputs
path- Character vector or string scalar naming one candidate file.
opts- Optional scalar structure. See Options.
Options
RequireExisting- Logical scalar forwarded to readFile. Default: true.
TemperatureCorrection- "environment" or "planck-basic", forwarded to readFile. Default: "environment".
Outputs
info- Scalar structure with path, name, supportedExtension, isThermal, format, identifier, and message. supportedExtension reports only the filename extension. isThermal is true only after a supported radiometric payload is read successfully. On failure, identifier and message contain the caught reader error.
Failure Behavior
Unsupported extensions and all readFile failures return isThermal=false with identifier and message populated; those reader exceptions are not rethrown. path must still be convertible to scalar text, and malformed MATLAB values may raise the originating conversion error.
Example
info = labkit.thermal.inspectFile("candidate.jpg");
if info.isThermal
fprintf("Readable thermal format: %s\n", info.format)
else
warning("%s", info.message)
endRelated APIs
labkit.thermal.readFile— Read radiometric image data and convert it to degrees Celsius.labkit.thermal.isSupportedPath— Test whether a path has a supported thermal extension.labkit.thermal.fileDialogFilter— Create a file-selection filter for thermal images.labkit.thermal.rawToTemperatureC— Convert FLIR raw sensor values to degrees Celsius.labkit.thermal.readFiles— Read several radiometric image files.labkit.thermal.renderImage— Map a thermal matrix to an RGB image.labkit.thermal.supportedExtensions— List the supported thermal filename extensions.labkit.thermal.version— Return version information for the thermal API.
Source
This page is generated from the MATLAB help text in +labkit/+thermal/inspectFile.m.