July 27, 2014

Reading Metadata Out of Nikon NIS Elements Generated TIFFs

Fluorescence image of 
cavitation effects,visualised 
using FITC-Dextran.
If, like me, you use Nikon's NIS Elements to do fluorescence imaging, you would have also noticed that nothing other than NIS Elements can read the metadata that is saved with TIFFs. ImageJ can't read it, the GIMP can't read it, tiffinfo can't read it. This means the only way to recover that metadata, which contains important things like exposure time and pixel size is to open the image in NIS Elements.

This sucks, because NIS Elements isn't exactly easily or widely available, and NIS Elements Viewer doesn't help either - it only opens ND3 files.

Fret not, however. The metadata isn't encoded in any particularly nasty way, and with a little exploration I was able to put together a small python script which will dump out all the relevant information.

Hope this helps someone. It would be nice if Nikon used the standard TIFF tags instead of putting everything in their own tags.

Cheers,
Steve

2 comments :

  1. Thanks for your script. I'm trying to process some similar images but the data I need looks like it's locked up in infotag 65331 rather than 65330. Have you worked on decoding that at all? Thanks for posting all your work thus far.

    ReplyDelete
    Replies
    1. 65331 contains a lot of binary data along with some strings. It certainly looks very useful, but at a glance I don't know what the binary data means. I will have to do some more sleuthing.

      It might help if I know what you are looking for, and better yet, if you have a sample image.

      Delete