This PR searches for all *_metadata attributes found in the tifffile python object, and puts them in a dictionary that is passed into the napari layer.
Napari layer objects have a metadata attribute, which can hold a dictionary. Napari doesn't actually do anything with this dictionary, but it does get stored in the layer right beside the actual data, so it is possible for the user to look up the metadata (and possibly do something with it themselves later on).
TiffFile objects have a number of *_metadata attributes (for any given case, most will return None or an empty list/tuple):
andor_metadata
astrotiff_metadata
eer_metadata
epics_metadata
fei_metadata
fluoview_metadata
gdal_metadata
gdal_structural_metadata
geotiff_metadata
imagej_metadata
indica_metadata
lsm_metadata
mdgel_metadata
metaseries_metadata
micromanager_metadata
nih_metadata
ome_metadata
philips_metadata
pilatus_metadata
scanimage_metadata
scn_metadata
sem_metadata
shaped_metadata
sis_metadata
stk_metadata
streak_metadata
tvips_metadata
Context: we've been discussing ome-tiff files and their related metadata. Seeing just how many other types of metadata could potentially be stored makes me think that a more generic solution like this one would be preferable to individually checking for 27 different types of possible metadata.
This PR searches for all *
_metadata
attributes found in the tifffile python object, and puts them in a dictionary that is passed into the napari layer.Napari layer objects have a
metadata
attribute, which can hold a dictionary. Napari doesn't actually do anything with this dictionary, but it does get stored in the layer right beside the actual data, so it is possible for the user to look up the metadata (and possibly do something with it themselves later on).TiffFile objects have a number of *
_metadata
attributes (for any given case, most will return None or an empty list/tuple):Context: we've been discussing ome-tiff files and their related metadata. Seeing just how many other types of metadata could potentially be stored makes me think that a more generic solution like this one would be preferable to individually checking for 27 different types of possible metadata.