[ome-users] ND2 loci name confusion

Melissa Linkert melissa at glencoesoftware.com
Thu Oct 18 23:22:33 BST 2012


Hi David,

> I am truing to get the acquisition date from ND2 file using the command Ext.getImageCreationDate(creationDate); I did a macro to batch process it. It is working great when all the file in the folder have name starting differently but if the name are too similar (only the last bit is different) the command is taking only the date from the first file and use it for all the files of the folder.

I assume that this is the same problem as was reported by Michael Cammer:

http://lists.openmicroscopy.org.uk/pipermail/ome-users/2012-October/003348.html

This is likely not an issue with the macro or the file names, and almost
certainly a result of the fact that Bio-Formats does not find the acquisition
date in the file, and so uses the file's modification time instead.  This time
can vary depending upon the file system and operating system; you can verify
that this is indeed the problem by comparing the timestamp in Finder or the
output of 'ls -l' with the output of the macro.

Unfortunately, the absolute acquisition time does not appear to be
recorded in .nd2 files - at least, I don't see it in any of the files
that I have here.  Nikon's NIS-Elements Viewer software also only shows
the file modification time as far as I can tell.  When you open these
files in Elements, do you see the correct acquisition time?

Regards,
-Melissa

On Thu, Oct 18, 2012 at 03:08:21PM +0000, Depoil, David wrote:
> Dear all,
> 
> I am truing to get the acquisition date from ND2 file using the command Ext.getImageCreationDate(creationDate); I did a macro to batch process it. It is working great when all the file in the folder have name starting differently but if the name are too similar (only the last bit is different) the command is taking only the date from the first file and use it for all the files of the folder.
> 
> Here is the macro :
> --------
> requires("1.44c");
> 
> setBatchMode(true);
> 
> dir = getDirectory("Choose a Directory");
> getTimeacquisition(dir);
> 
> setBatchMode(false);
> 
> function getTimeacquisition(dir){
> list=getFileList(dir);
> for (i=0; i<(list.length); i++){
> print(list[i]);
> if (endsWith(list[i], ".nd2")) {
> title1 = "time";
> title2 = "["+title1+"]";
> f = title2;
> run("Text Window...", "name="+title2+" width=70 height=8");
> run("Bio-Formats Macro Extensions");
> id = dir+list[i];
> Ext.setId(id);
> creationDate = "";
> Ext.getImageCreationDate(creationDate);
> print(f,id + ";AcquisitionDate; " + creationDate);
> selectWindow("time");
> Path=id+(".txt");
> saveAs("Text", Path);
> run ("Close");
> 
> }
> }
> }
> -----
> If the name in the folder are  :
> !!!!!!!!!!!28jun2012-mcc640-AND t cells-TCR green-32ms2-exp2-1.nd2
> !!!!!!!!!!28jun2012-mcc640-AND t cells-TCR green-32ms2-exp2-2.nd2
> !!!!!!!!!28jun2012-mcc640-AND t cells-TCR green-32ms2-exp2-3.nd2
> 
> This is working
> 
> But if the name are
> 28jun2012-mcc640-AND t cells-TCR green-32ms2-exp2-1.nd2
> 28jun2012-mcc640-AND t cells-TCR green-32ms2-exp2-2.nd2
> 28jun2012-mcc640-AND t cells-TCR green-32ms2-exp2-3.nd2
> 
> Only the date from the file one is used and aply to the other
> -----
> 
> I am using the LOCI oct 17th daily version with latest ImageJ or Fidji. It seems to happen only on mac computers.
> 
> Best,
> 
> David D
> 
> 

> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users




More information about the ome-users mailing list