Page 1 of 1

How to set a time step in bioformat Matlab

PostPosted: Thu Jul 11, 2013 12:35 pm
by michel
Can you control the time step between different images in Matlab using Bioformats java library?

Re: How to set a time step in bioformat Matlab

PostPosted: Fri Jul 12, 2013 10:54 am
by sbesson
Hi,

the time stamp of each plane of an image is stored in the DeltaT attribute of each Plane.

If you are reading from an image, e.g. to set the frame rate of an animation, you should be able to access it through the getPlaneDeltaT method. For instance using bfopen:

Code: Select all
data=bfopen(path_to_file);
data{4}.getPlaneDeltaT(0,0); % Read the time stamp of the first plane of the first series
data{4}.getPlaneDeltaT(0,1); % Read the time stamp of the second plane of the first series
...


If you want to set the time step instead, e.g. for synthetic images, you can use setPlaneDeltaT as follows

Code: Select all
metadata.setPlaneDeltaT(java.lang.Double(.1), 0,0); % Set the time stamp of the first plane
metadata.setPlaneDeltaT(java.lang.Double(1.1), 0,1); % Read the time stamp of the second plane
...


Cheers,
Sebastien