Page 1 of 1

Extracting metadata on lif files

PostPosted: Fri Aug 25, 2017 2:40 pm
by phm
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

Re: Extracting metadata on lif files

PostPosted: Mon Aug 28, 2017 10:33 am
by dgault
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

Re: Extracting metadata on lif files

PostPosted: Mon Aug 28, 2017 11:16 am
by phm
Thanks David,
It work nice.
Philippe