TRE registration methods in sarpy.io.general.nitf_elements.tres.registration¶
Module for maintaining the TRE registry
- sarpy.io.general.nitf_elements.tres.registration.register_tre(tre_type, tre_id=None, replace=False)¶
Register a type in the TRE registry.
- Parameters:
tre_type (type) – A subclass of TRE
tre_id (None|str) – The id for the type. The class name will be used if not supplied.
replace (bool) – Should we replace if a TRE with given id if already registered?
- Return type:
None
- sarpy.io.general.nitf_elements.tres.registration.find_tre(tre_id)¶
Try to find a TRE with given id in our registry. Return None if not found.
- Parameters:
tre_id (str|bytes) –
- Return type:
- sarpy.io.general.nitf_elements.tres.registration.parse_package(packages=None)¶
Walk the packages contained in packages, find all subclasses of TRE, and register them.
- Return type:
None