Page 1 of 1

Adding exposure time metadata in Matlab

PostPosted: Tue Aug 08, 2017 10:37 am
by Pzdankowski
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

Re: Adding exposure time metadata in Matlab

PostPosted: Wed Aug 09, 2017 9:41 am
by dgault
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