def genXML(self):
    '\n            Return XML root\n        '
    if ((self.filename is None) or (self.foldername is None) or (self.imgSize is None)):
        return None
    top = Element('annotation')
    if self.verified:
        top.set('verified', 'yes')
    folder = SubElement(top, 'data_set')
    folder.text = self.foldername
    size_part = SubElement(top, 'size')
    width = SubElement(size_part, 'width')
    height = SubElement(size_part, 'height')
    depth = SubElement(size_part, 'depth')
    width.text = str(self.imgSize[1])
    height.text = str(self.imgSize[0])
    if (len(self.imgSize) == 3):
        depth.text = str(self.imgSize[2])
    else:
        depth.text = '1'
    return top
Return XML root
def genXML(self):
    '\n            \n        '
    if ((self.filename is None) or (self.foldername is None) or (self.imgSize is None)):
        return None
    top = Element('annotation')
    if self.verified:
        top.set('verified', 'yes')
    folder = SubElement(top, 'data_set')
    folder.text = self.foldername
    size_part = SubElement(top, 'size')
    width = SubElement(size_part, 'width')
    height = SubElement(size_part, 'height')
    depth = SubElement(size_part, 'depth')
    width.text = str(self.imgSize[1])
    height.text = str(self.imgSize[0])
    if (len(self.imgSize) == 3):
        depth.text = str(self.imgSize[2])
    else:
        depth.text = '1'
    return top