We're Hiring!

Getting Info string for B&H *.sdt files

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Getting Info string for B&H *.sdt files

Postby yuriy_alexandrov » Mon Apr 08, 2013 2:58 pm

We want to transfer Lab data to Omero routinely, mostly from our plate readers, - in which case Omero images are created by specific procedure. It is called from our "importer" utility written in Matlab.
"importer" opens list of data directories and transfers these directories to Omero, one after another.

We also have lot of data in Becker&Hickl sdt format and it would be convenient to import them in the same process.
"importer" can transfer sdt files, however there is one part that isn't transferred.
If sdt image is imported by Omero-client like Insight, the imported Image has an annotation file "original_metadata.txt" (aliased as ORIGINALMETADATA I believe). This annotation contains many B&H acquisition settings, which are meaningful. So I would like to keep this annotation file, and the problem is how to get that text string that is written there.

I looked at Java code in "bioformats" - the getInfo() function in "SDTReader" class looked promising.
I tried in Matlab, naively, just javaMethod('getInfo','SDTReader',sdtfilename) but result was error message "No class SDTReader can be located on Java class path".

I'm not sure if what I want to get is achievable form Matlab, but if it is, - please send your advice.

Best regards everybody,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: Getting Info string for B&H *.sdt files

Postby mlinkert » Tue Apr 09, 2013 1:48 pm

Hi Yuriy,

OMERO creates original_metadata.txt from a hashtable of metadata stored by Bio-Formats. This hashtable is accessible from Matlab as shown here:

http://www.openmicroscopy.org/site/supp ... l-metadata

If that doesn't work, please let us know.

Regards,
-Melissa
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: Getting Info string for B&H *.sdt files

Postby yuriy_alexandrov » Tue Apr 09, 2013 3:57 pm

Thanks Melissa,

I expected to find something like

loci.formats.MetadataTools.getOriginalMetadata() ???

it looks like, close, but not exactly..

Best,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: Getting Info string for B&H *.sdt files

Postby yuriy_alexandrov » Tue Apr 09, 2013 7:24 pm

OK now I got what You've meant -
Code: Select all
data = bfopen('/path/to/data/file');
metadata = data{1, 2};

I was fixed on Java function calls, and forgot about this option.
If I don't come back with more questions tomorrow, - it means it worked, and the case closed!

Many, many thanks,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest