From 1648c8c28301390b3bf0024019d06b79a5fb358e Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Mon, 31 Jan 2011 12:36:01 +0100 Subject: [PATCH] add standard config file for labeling rects, point, polygons --- labeltool.py | 4 +++- std_config.py | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 std_config.py diff --git a/labeltool.py b/labeltool.py index 0b623ca..f3b68c4 100755 --- a/labeltool.py +++ b/labeltool.py @@ -17,6 +17,7 @@ ORGANIZATION_NAME = """CVHCI Research Group""" ORGANIZATION_DOMAIN = """cvhci.anthropomatik.kit.edu""" __version__ = """0.1""" + class MainWindow(QMainWindow): def __init__(self, argv, parent=None): super(MainWindow, self).__init__(parent) @@ -48,7 +49,8 @@ class MainWindow(QMainWindow): self.view.setScene(self.scene) self.buttonarea = ButtonArea() - self.buttonarea.load("example_config.py") + # TODO make this configurable/settable via command line option + self.buttonarea.load("std_config.py") self.ui.dockAnnotationButtons.setWidget(self.buttonarea) self.connect(self.buttonarea, SIGNAL("stateChanged(state)"), self.scene.setMode) diff --git a/std_config.py b/std_config.py new file mode 100644 index 0000000..ba98064 --- /dev/null +++ b/std_config.py @@ -0,0 +1,6 @@ +RATIOS = ["0.5", "1", "2"] + +self.add_label("Rect", {"type": "rect"}) +self.add_label("FixedRatioRect", {"type": "ratiorect", "_ratio": RATIOS}) +self.add_label("Point", {"type": "point"}) +self.add_label("Polygon", {"type": "polygon"})