Last active
March 20, 2017 16:25
-
-
Save simleo/8bf7353e57055aa2b745885d00a35fc4 to your computer and use it in GitHub Desktop.
ome-files-py, map annotations and data packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://github.com/CellMigStandOrg/CMSO-Samples/pull/10 | |
import ome_files | |
import ome_files.metadata as ofmd | |
reader = ome_files.OMETIFFReader() | |
reader.set_id("links/ome_links_1/multifile.companion.ome") | |
meta = ofmd.OMEXMLMetadata(reader.get_ome_xml()) | |
reader.close() | |
cmso_annotations = [_ for _ in meta.get_map_annotations() | |
if _.Namespace == "CMSO/dpkg"] | |
for ann in cmso_annotations: | |
print ann.Value.get("FilePath") | |
# ['results1.json', 'objects1.csv', 'events1.csv'] | |
# ['results2.json', 'objects2.csv', 'events2.csv'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment