Page 1 of 1

bfconvert fails to get timestamp from ND2 files?

PostPosted: Thu Oct 08, 2015 3:53 pm
by sdbrown
Howdy open microscopy heroes,

I've got some ND2 files from Nikon Elements that I'm trying to convert to TIFFs. I've been using a command like

bfconvert ./sample.nd2 ./tiff/extracted_%A_t%ts%sc%c.ome.tiff

as my data has no Z stacks, multiple FOVs, multiple channels, and many timepoints, giving one image per .tiff file.

While I can successfully extract the TIFFs and read them with other software, the resulting timestamp in the filenames is when the file was extracted and written to disk rather than the acquisition time of the image in the file. The TIFF files do not have the acquisition time in the metadata revealed by tiffcomment and showinf, but I know this data is present because if I export the ND2 to TIFFs using Nikon Elements, I can parse a Julian date out of the TIFF headers (a pain to set up initially but the algorithm I've got now works quite reliably).

The data are useless to me without timestamps, but I long to be liberated from the Elements "Export to TIFF" function! Any ideas on how I might recover the timestamps?

Re: bfconvert fails to get timestamp from ND2 files?

PostPosted: Fri Oct 09, 2015 3:49 pm
by sbesson
Hi there,

the logic for replacing the tokens for the name of the TIFF files is int FormatTools.getFilename(). This functionality will read the image acquisition date if this metadata has been populated by Bio-Formats and it is thus format-specific.

Unfortunately, the Nikon NIS ND2 reader, unlike the Nikon Elements TIFF reader, does not parse the image acquisition date from the raw data at the moment. To be able to achieve the conversion you want, the support for reading the acquisition date should be added for this particular format first. I can create a relevant request for extension if this makes sense to you. If you rely on the exact timestamp, I am afraid you are still dependent on Elements TIFF export functionality for the moment.

Best,
Sebastien