LabKit MATLAB Workbench

reference

API ReferenceThermal 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)
end

Source

This page is generated from the MATLAB help text in +labkit/+thermal/inspectFile.m.