[ome-users] Nikon ND2 Time information
Sebastien Besson
s.besson at dundee.ac.uk
Fri Jun 7 10:42:19 BST 2013
Hi Lewis,
first of all, I am forwarding this conversation to the ome-users mailing list.
Regarding your email, there is no PlaneDeltatT field for the .oib format as listed in http://www.openmicroscopy.org/site/support/bio-formats4/formats/olympus-fluoview-fv1000-metadata.html.
Thus the error below is not informative but expected.
As shown in the metadata table above, you should be able to read the PixelsTimeIncrement instead, i.e. for the first image series:
timeIncrement = double(omeMeta.getPixelsTimeIncrement(0));
Hope this helps,
Sebastien
On 6 Jun 2013, at 22:51, Kraft, Lewis James wrote:
Dear Sebastien,
Today I tried to read an Olympus .oib file. I received the following error which I traced back to the following line of code:
time(index1)=double(omeMeta.getPlaneDeltaT(0,index1-1));
Java exception occurred:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at ome.xml.model.Pixels.getPlane(Pixels.java:600)
at loci.formats.ome.OMEXMLMetadataImpl.getPlaneDeltaT(OMEXMLMetadataImpl.java:3631)
Do you have any ideas on what might have gone wrong?
Thanks much,
Lewis
From: Kraft, Lewis James
Sent: Friday, May 31, 2013 4:42 PM
To: 'Sebastien Besson'
Subject: RE: [ome-users] Nikon ND2 Time information
Dear Sebastien,
Ah Ha! You are exactly correct! Many thanks!
Cheers,
Lewis
From: Sebastien Besson [mailto:s.besson at dundee.ac.uk]
Sent: Friday, May 31, 2013 4:41 PM
To: Kraft, Lewis James
Subject: Re: [ome-users] Nikon ND2 Time information
Hi Lewis,
This is because the series and the plane index are 0-based. So to retrieve the first plane of the first series, try
deltaT = double(omeMeta.getPlaneDeltaT(0,0))
Cheers,
Sebastien
On 31 May 2013, at 22:33, Kraft, Lewis James wrote:
Thanks for the replies! Forgive me, for I am a bit clueless about the Java part of the programming, I tried the following:
>> deltaT = double(omeMeta.getPlaneDeltaT(1,1))
Java exception occurred:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at ome.xml.model.OME.getImage(OME.java:600)
at loci.formats.ome.OMEXMLMetadataImpl.getPlaneDeltaT(OMEXMLMetadataImpl.java:3631)
This resulted in the following error message from MATLAB. I am not sure if it is my lack of understanding of iSeries and iPlane in your example below?
Best,
Lewis Kraft
From: Sebastien Besson [mailto:s.besson at dundee.ac.uk]
Sent: Friday, May 31, 2013 2:56 PM
To: Curtis Rueden
Cc: Kraft, Lewis James; ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
Subject: Re: [ome-users] Nikon ND2 Time information
Hi Lewis,
with your variable names, you should be able to use the following to extract the timestamp of the plane iPlane for the series iSeries:
deltaT = double(omeMeta.getPlaneDeltaT(iSeries, iPlane));
As Curtis said, if this call leads to an error, you can send a sample file.
Regards,
Sebastien
On 31 May 2013, at 20:42, Curtis Rueden wrote:
Hi Lewis,
> Where can I find this time information for each image plane in the
> .nd2 files?
It is best to extract the timestamp information from the OME metadata (specifically: OME > Image > Pixels > Plane > DeltaT), since it has been standardized to a format-agnostic structure. Then you won't have to worry about whether your file is .lsm or .nd2 or etc.
If the information is not present in the OME metadata, then it means Bio-Formats is not parsing and standardizing that information properly. In that case, if you send us a sample file (via http://qa.openmicroscopy.org.uk/qa/upload/), we can work on fixing the problem.
Regards,
Curtis
On Fri, May 31, 2013 at 2:35 PM, Kraft, Lewis James <lewis.j.kraft at vanderbilt.edu<mailto:lewis.j.kraft at vanderbilt.edu>> wrote:
Hello,
I am want to read the Nikon .nd2 image file using loci_tools.jar for MATLAB. I have successfully imported the image data using loci_tools.jar with the following MATLAB commands:
imgdata=bfopen(‘fullfilepath\*.nd2’); %command for opening images using BioFormats MATLAB scripts
img=imgdata{1,1}{1,1}; %First image in the timeseries
metadata=imgdata{1,2}; %Metadata in the .nd2 file
omeMeta = imgdata{1, 4}; %OME Metadata
The Image data, and the OME metadata look fine. However, the original metadata is missing the time information. For example, when opening Zeiss .lsm files, I see the time information in metadata as, “*TimeStamp*,*TimeStamp*,…”. Where can I find this time information for each image plane in the .nd2 files?
Thanks much,
Lewis Kraft
_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
Dr Sébastien Besson
Open Microscopy Environment / Harvard Medical School
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364
The University of Dundee is a registered Scottish Charity, No: SC015096
Dr Sébastien Besson
Open Microscopy Environment / Harvard Medical School
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364
The University of Dundee is a registered Scottish Charity, No: SC015096
Dr Sébastien Besson
Open Microscopy Environment / Harvard Medical School
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20130607/82b9b57d/attachment.html>
More information about the ome-users
mailing list