[ome-users] Mac vs PC problem with ND2 files?

Cammer, Michael Michael.Cammer at med.nyu.edu
Wed Oct 17 18:07:39 BST 2012


One of my colleagues says that the below macro, which works fine on a PC running Windows 7, on the Mac puts the acquisition date of the first file opened into all the text files; the date is not refreshed.  He has tried with both Fiji and ImageJ.  Would somebody else who has ImageJ on a Mac and has ND2 files please check this?
Thank you!!
-Michael C.



//Saves all image files(*.nd2) in the folder (not recursively) as TIFF stacks.
//created on 12/14/11
//================================================

requires("1.47d");
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
                } // i
} // end




From: Depoil, David
Sent: Wednesday, October 17, 2012 12:41 PM
To: Cammer, Michael
Subject: <no subject>

The macro is set to open image from a folder and write into individual files the acquisition time of the corresponding image. It does it well for the first image but then for the next one it is writing always the same date. Ii there a update or refresh command ?

Cheers

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20121017/93dfe73c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get acquisition time macro.ijm
Type: application/octet-stream
Size: 890 bytes
Desc: get acquisition time macro.ijm
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20121017/93dfe73c/attachment.obj>


More information about the ome-users mailing list