Hooks
Using hooks, React components know and manipulate the structure classes and the properties of the global ThermalManager
object.
Getting structure ojects
useThermalManager
- get the global instance ofThermalManager
useThermalRegistry( registryId, options )
- create or get an instance ofThermalRegistry
Properties that might be manipulated from React
useThermalManagerPaletteDrive
- color paletteuseThermalRegistryOpacityDrive
- IR / VISIBLE ratiouseThermalRegistryRangeDrive
- adjustable temperature rangeuseThermalGroupCursorPositionDrive
- cursor synchronisation
States of which React needs to know
useThermalRegistryHistogramState
exposes the current histogramuseThermalRegistryLoadingState
exposes current loading stateuseThermalRegistryMinmaxState
exposes the min & max temperature of a registryuseThermalGroupMinmaxState
exposes the min & max temperature of a group
Hooks for components
Many actions related to thermal display, we need buttons, dropdowns and other common components. For those, there are hooks, that takes care of the inner logic.
See [Components][components] page for details.
Listing
useThermalRegistryGroupsState
groups in a registryuseThermalGroupInstancesState
file instances in a group
Complex scenarios
There are hooks simplifying the most common use cases:
useSingleFileRegistry
- Intended for display of one single image in an isolated registry
- Handles its loading
- Creates an isolated registry for this particular file
Utility hooks
useThermalObjectPurpose
- creates unique ID for individual components