We're Hiring!

Adding exposure time metadata in 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.

Adding exposure time metadata in Matlab

Postby Pzdankowski » Tue Aug 08, 2017 10:37 am

Hello,

I am having a custom built microscope and I would like to use Matlab to convert my stack of images I record in labview with their metadata into the ome-tiff file. Everything works pretty well, however I am struggling to write the exposure time of my images into the created metadata. I am able to write down pixel information but unable to do the same with the exposure time. I tried to find the solution in the documentation, and I’m using the createMinimalOMEXMLMetadata.m and it seems that this function is unable to write exposure time in the metadata. Would you be able to help me with writing the exposure time and any additional metadata I would need, using the matlab?

Cheers
Piotr
Pzdankowski
 
Posts: 1
Joined: Mon Aug 07, 2017 6:08 pm

Re: Adding exposure time metadata in Matlab

Postby dgault » Wed Aug 09, 2017 9:41 am

Hi Piotr,

The Matlab toolbox comes with some helper functions to make things easier but the Java API can also be used for more specific needs. In this particular case the function you are looking for is setPlaneExposureTime

An example of how this would look would be:
Code: Select all
metadata = createMinimalOMEXMLMetadata(plane);
Time exposureTime = new Time(Double.valueOf(value), UNITS.MILLISECOND);
metadata.setPlaneExposureTime(exposureTime, imageIndex, planeIndex);


The Matlab documentation provides some standard workflows and Matlab specific info.
For info on using the Java API you can also use the Java developer documentation.
The functions for setting metadata specifically can be found in MetadataStore

I hope that was able to help, please feel free to let us know if you require any further help

David Gault
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest

cron