nanshe-org / nanshe

An image processing toolkit
https://nanshe-org.github.io/nanshe
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

TIFF metadata support (ScanImage) #205

Closed jakirkham closed 9 years ago

jakirkham commented 9 years ago

It would be nice to serialize metadata from multipage TIFF to HDF5. Currently, we don't do this. However, there is some useful metadata like frame rate, start and stop times, etc. It would be nice to store this as attributes on the Dataset containing the video.

jakirkham commented 9 years ago

This can be handled through pillow. The easiest way to do this is to do the following. It appears that the header is always stored at 270 ( http://www.awaresystems.be/imaging/tiff/tifftags/imagedescription.html ).

>>> with Image.open("./ITPT044_S001_F01_002.tif") as im:
>>>     header = im.tag[270]