30 lines
622 B
Python
Executable File
30 lines
622 B
Python
Executable File
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
# \file ComponentTree.py
|
|
# \brief TODO
|
|
# \author Florent Guiotte <florent.guiotte@gmail.com>
|
|
# \version 0.1
|
|
# \date 10 oct. 2017
|
|
#
|
|
# TODO details
|
|
|
|
import collections
|
|
|
|
class ComponentTree:
|
|
def __init__(self, parent=None, data=None):
|
|
self.parent = parent
|
|
self.children = list()
|
|
self.component = None # Boolean filter on img
|
|
self.data = data # ref. on img
|
|
|
|
def __iter__(self):
|
|
return self.children.__iter__()
|
|
|
|
def main():
|
|
tree = ComponentTree()
|
|
for i in tree:
|
|
print(i)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|