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
评论列表
文章目录