omexml.py 文件源码

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

项目:pytorch_fnet 作者: AllenCellModeling 项目源码 文件源码
def append_channel(self, index, name):
            # add channel
            new_channel = OMEXML.Channel(
                ElementTree.SubElement(self.node, qn(self.ns['ome'], "Channel")))
            new_channel.SamplesPerPixel = 1
            new_channel.ID = "Channel:0:"+str(index)
            new_channel.Name = name
            # add a bunch of planes with "TheC"=str(index)
            for t in range(self.get_SizeT()):
                for z in range(self.get_SizeZ()):
                    new_plane = OMEXML.Plane(
                        ElementTree.SubElement(self.node, qn(self.ns['ome'], "Plane")))
                    new_plane.TheC = str(index)
                    new_plane.TheZ = str(z)
                    new_plane.TheT = str(t)
            # update SizeC
            self.set_SizeC(self.get_SizeC() + 1)

        # can be done as a single step just prior to final output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号