nexusLIMS.extractors.plugins.quanta_tif#

FEI/Thermo Fisher TIFF extractor plugin.

Module Contents#

Classes#

QuantaTiffExtractor

Extractor for FEI/Thermo Fisher TIFF files.

Functions#

get_quanta_metadata

Get metadata from a Quanta TIF file.

Data#

FEI_TIFF_TAG

TIFF tag ID where FEI/Thermo stores metadata in TIFF files. The tag contains INI-style metadata with sections like [User], [Beam], [Image], etc.

FEI_XML_TIFF_TAG

TIFF tag ID where FEI/Thermo stores XML metadata in TIFF files (if present). This tag contains supplementary XML metadata that may be embedded after the standard INI metadata.

API#

nexusLIMS.extractors.plugins.quanta_tif.FEI_TIFF_TAG#

34682

TIFF tag ID where FEI/Thermo stores metadata in TIFF files. The tag contains INI-style metadata with sections like [User], [Beam], [Image], etc.

nexusLIMS.extractors.plugins.quanta_tif.FEI_XML_TIFF_TAG#

34683

TIFF tag ID where FEI/Thermo stores XML metadata in TIFF files (if present). This tag contains supplementary XML metadata that may be embedded after the standard INI metadata.

class nexusLIMS.extractors.plugins.quanta_tif.QuantaTiffExtractor[source]#

Extractor for FEI/Thermo Fisher TIFF files.

This extractor handles metadata extraction from .tif files saved by FEI/Thermo Fisher FIBs and SEMs (e.g., Quanta, Helios, etc.). The extractor performs content sniffing to verify the file contains FEI metadata before attempting extraction.

name#

‘quanta_tif_extractor’

priority#

100

supported_extensions#

Type: typing.ClassVar

supports(context: ExtractionContext) bool[source]#

Check if this extractor supports the given file.

Performs content sniffing to verify this is a FEI/Thermo TIFF file by:

  1. Checking for the FEI-specific TIFF tag (34682) containing [User] or [Beam]

  2. Falling back to binary content sniffing for files with FEI metadata markers

Parameters:

context – The extraction context containing file information

Returns:

True if this appears to be a FEI/Thermo TIFF file with metadata

Return type:

bool

extract(context: ExtractionContext) list[dict[str, Any]][source]#

Extract metadata from a FEI/Thermo TIFF file.

Returns the metadata (as a list of dictionaries) from a .tif file saved by the FEI Quanta SEM or related instruments. Specific tags of interest are extracted and placed under the root-level nx_meta node.

Parameters:

context – The extraction context containing file information

Returns:

List containing a single metadata dict with ‘nx_meta’ key

Return type:

list[dict]

nexusLIMS.extractors.plugins.quanta_tif.get_quanta_metadata(filename)[source]#

Get metadata from a Quanta TIF file.

Deprecated since version This: function is deprecated. Use QuantaTiffExtractor class instead.

Parameters:

filename (Path) – path to a file saved in the harvested directory of the instrument

Returns:

mdict – A description of the file’s metadata.

Return type:

dict