@labirthermal/core
Provides framework-agnostic TypeScript classes for work with thermal images in the browser:
- loading and reading of files
- core classes that enable processing of multiple IR images at once
Installation
Install @labirthermal/core from npm:
sh
npm install @labirthermal/coreUsage
The core library can be used:
- a) standalone in TypeScript – see Standalone usage
- b) via webcomponents (recommended) – see @labirthermal/webcomponents
Sections
Standalone usage
Step-by-step examples, each shown both in TypeScript and with the equivalent webcomponents:
- Load a single file – load one LRC file and render it. Radiometric FLIR JPEGs (
.jpg) are loaded the same way. - Load multiple files – load several files into one group.
- Controls – build your own GUI on top of the core classes.
Core classes
Reference of the classes forming the hierarchy:
- CallbacksManager – the reactivity primitive used across the whole library.
- ThermalManager
- ThermalRegistry
- ThermalGroup
Reference of the classes handling file loading:
- FilesService & batches – how files are fetched, parsed, cached and batched.
- ThermalFileReader – the result of a successful file load.
- ThermalFileInstance – one displayed IR image.
- ThermalFileFailure – the result of a failed file load.
Supported files
Formats that can be loaded, and how to add another one:
- Supported files – overview of the supported formats.
- LRC files and FLIR files.
- Writing a custom parser.
Key concepts
One of the main ambitions of the @labirthermal packages is to work with multiple files at once. For that reason, the library works with a hierarchical structure of classes:
ThermalManager= the global context shares the cacheThermalRegistry= one display set shares the thermal scaleThermalGroup= one group of filesThermalFileInstance= one IR image
Explore the core hierarchy:
- ThermalManager provides the application-level context and shared settings.
- ThermalRegistry groups related display state and contains groups.
- ThermalGroup organizes thermal file instances.
- ThermalFileInstance displays one IR image and handles its playback and analyses.