Last active
May 30, 2016 13:50
-
-
Save omsai/1d4a141e3f738f7e8ba6 to your computer and use it in GitHub Desktop.
FIJI label timestamps using Bioformats.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Map time stamps to image labels. | |
// | |
// Running this script adds a timestamp label to each image slice. | |
// Thus the timestamp shows up in paranthesis in the info bar on top | |
// of the image. | |
// | |
// Adapted from planeTimings.txt in bioformats repository: | |
// https://github.com/openmicroscopy/bioformats/blob/v5.0.2/components/bio-formats-plugins/utils/macros/planeTimings.txt | |
// | |
// Pariksheet Nanda <[email protected]> 2014-06-19 | |
// License: Public Domain | |
run("Bio-Formats Macro Extensions"); | |
id = getInfo("image.directory") + getInfo("image.filename"); | |
Ext.setId(id); | |
Ext.getImageCount(imageCount); | |
deltaT = newArray(imageCount); | |
for (no = 0; no < imageCount; no++) { | |
Ext.getPlaneTimingDeltaT(deltaT[no], no); | |
if (deltaT[no] == deltaT[no]) { // not NaN | |
s = toString(deltaT[no]) + " s"; | |
} | |
setSlice(no+1); | |
run("Set Label...", "label=&s"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment