We're Hiring!

bfconvert fails to get timestamp from ND2 files?

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

bfconvert fails to get timestamp from ND2 files?

Postby sdbrown » Thu Oct 08, 2015 3:53 pm

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?
sdbrown
 
Posts: 1
Joined: Wed Oct 07, 2015 11:24 pm

Re: bfconvert fails to get timestamp from ND2 files?

Postby sbesson » Fri Oct 09, 2015 3:49 pm

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
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: Google [Bot] and 1 guest