omexml.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:pytorch_fnet 作者: AllenCellModeling 项目源码 文件源码
def __str__(self):
        #
        # need to register the ome namespace because BioFormats expects
        # that namespace to be the default or to be explicitly named "ome"
        #

        for ns_key in ["ome"]:
            ns = self.ns.get(ns_key) or NS_DEFAULT.format(ns_key=ns_key)
            # ElementTree.register_namespace(ns_key, ns)
            ElementTree.register_namespace('', ns)
        # ElementTree.register_namespace("om", NS_ORIGINAL_METADATA)
        result = StringIO()
        ElementTree.ElementTree(self.root_node).write(result,
                                                      encoding=uenc,
                                                      method="xml",
                                                      xml_declaration = True
                                                      # default_namespace = 'http://www.openmicroscopy.org/Schemas/ome/2013-06'
                                                      )
        return result.getvalue()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号