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

Melissa Linkert melissa at glencoesoftware.com
Thu Oct 18 23:25:40 BST 2012


Hi Michael,

As mentioned in the thread initiated by David Depoil:

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

...the problem is that the file modification date is used as the
acquisition date, which is not always entirely reliable.  Given that the
absolute acquisition time does not appear to be stored in the files,
we may not be able to do much about this.

Regards,
-Melissa

On Wed, Oct 17, 2012 at 05:07:39PM +0000, Cammer, Michael wrote:
> 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


> _______________________________________________
> 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