简体   繁体   中英

extract channel names from a multi-channel image

I am using skimage.io.imread (which uses tifffile ) to read a QPTIFF file. Multiple channels are successfully read as multiple dimensions. Is it possible to extract the channel names and other metadata?

PerkinElmer QPI metadata are stored as XML in the ImageDescription TIFF tags. To read the XML metadata, use the tifffile.TiffFile class, eg:

from xml.etree import ElementTree
from tifffile import TiffFile

with TiffFile('LuCa-7color_Scan1.tiff') as tif:
    for page in tif.series[0].pages:
        print(ElementTree.fromstring(page.description).find('Name').text)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM