[ome-users] ND2 loci name confusion

Depoil, David David.Depoil at nyumc.org
Thu Oct 18 16:08:21 BST 2012


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20121018/387f9328/attachment.html>


More information about the ome-users mailing list