We're Hiring!

How to set a time step in bioformat Matlab

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

How to set a time step in bioformat Matlab

Postby michel » Thu Jul 11, 2013 12:35 pm

Can you control the time step between different images in Matlab using Bioformats java library?
michel
 
Posts: 3
Joined: Mon Jul 01, 2013 9:58 am

Re: How to set a time step in bioformat Matlab

Postby sbesson » Fri Jul 12, 2013 10:54 am

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
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest