We're Hiring!

Extracting metadata on lif files

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.

Extracting metadata on lif files

Postby phm » Fri Aug 25, 2017 2:40 pm

Hi,
I'm trying to extract metadata from lif files with Bioformat macro extensions. I would to read the metadata :
"TileScan_001 Tile|FieldX 5" in the metadata file :
Code: Select all
TileScan_001 HardwareSetting|ScannerSettingRecord|nFormatInDimension #1   1024
TileScan_001 HardwareSetting|ScannerSettingRecord|nFormatOutDimension #1   1024
TileScan_001 HardwareSetting|ScannerSettingRecord|nLineAccumulation #1   1
TileScan_001 HardwareSetting|ScannerSettingRecord|nLines #1   1.00000000000011
TileScan_001 HardwareSetting|ScannerSettingRecord|nPages #1   1
TileScan_001 HardwareSetting|ScannerSettingRecord|nSections #1   4
TileScan_001 Image name   TileScan_001_Merging001
TileScan_001 Reverse X orientation   false
TileScan_001 Reverse Y orientation   true
TileScan_001 Tile|FieldX   5
TileScan_001 Tile|FieldY   6
TileScan_001 Tile|PosX   0.04367906455037
TileScan_001 Tile|PosY   0.00536585662768


with the function
Code: Select all
Ext.getMetadataValue("TileScan_001 Tile|FieldX", Col);

However it return always 0
By the way from czi file I have no problem to read metadata (others) with the same function ???
Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Extracting metadata on lif files

Postby dgault » Mon Aug 28, 2017 10:33 am

Hi Philippe,

It depends on the type of metadata being read, the function you have attempted is used to retrieve global metadata for the entire file.

For series specific metadata you should be able to retrieve it using the function
Code: Select all
Ext.getSeriesMetadataValue(field, value)


Looking at the documentation and it appears that this series metadata function was missing so it would certainly have been very confusing. Our apologies for this oversight, I have opened a PR to correct the documentation for the future: https://github.com/openmicroscopy/bioformats/pull/2943

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

Re: Extracting metadata on lif files

Postby phm » Mon Aug 28, 2017 11:16 am

Thanks David,
It work nice.
Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest

cron