hyperspy.io_plugins.tiff module
- hyperspy.io_plugins.tiff._get_scale_unit(signal, encoding=None)
Return a list of scales and units, the length of the list is equal to the signal dimension.
- hyperspy.io_plugins.tiff._get_tags_dict(signal, extratags=[], factor=100000000)
Get the tags to export the scale and the unit to be used in Digital Micrograph and ImageJ.
- hyperspy.io_plugins.tiff._imagej_description(version='1.11a', **kwargs)
Return a string that will be used by ImageJ to read the unit when appropriate arguments are provided
- hyperspy.io_plugins.tiff.file_reader(filename, force_read_resolution=False, lazy=False, **kwds)
Read data from tif files using Christoph Gohlke’s tifffile library. The units and the scale of images saved with ImageJ or Digital Micrograph is read. There is limited support for reading the scale of files created with Zeiss and FEI SEMs.
- Parameters
filename (str) – Name of the file to read
force_read_resolution (bool) – Force reading the x_resolution, y_resolution and the resolution_unit of the tiff tags. See http://www.awaresystems.be/imaging/tiff/tifftags/resolutionunit.html Default is False.
lazy (bool) – Load the data lazily. Default is False
**kwds –
optional –
- hyperspy.io_plugins.tiff.file_writer(filename, signal, export_scale=True, extratags=[], **kwds)
Writes data to tif using Christoph Gohlke’s tifffile library