import sys
from PySide6.QtWidgets import QApplication
from gui.node_editor import NodeEditor
from modules.image_reader import factory as image_reader_factory
from modules.extractor import factory as pysera_factory
from modules.writer import factory as csv_factory

def main():
    app = QApplication(sys.argv)
    catalog = {
        "ImageReader": image_reader_factory,
        "PySERAExtractor": pysera_factory,
        "CSVWriter": csv_factory
    }
    editor = NodeEditor(catalog)
    editor.resize(1100, 720)
    editor.show()
    sys.exit(app.exec())

if __name__ == "__main__":
    main()
