mirror of
https://github.com/wassname/sloth.git
synced 2026-08-05 13:20:52 +08:00
- seperate items and inserters
- use dicts for ITEMS and INSERTERS
This commit is contained in:
+10
-22
@@ -1,5 +1,4 @@
|
||||
from items import AnnotationGraphicsRectItem as RectItem
|
||||
from items import RectItemInserter, AnnotationGraphicsPointItem
|
||||
import items
|
||||
from loaders import FeretLoader, RectIdLoader
|
||||
from bboxitem import *
|
||||
|
||||
@@ -20,16 +19,16 @@ HOTKEYS = (
|
||||
("", "BodyBBox", "b")
|
||||
)
|
||||
|
||||
ITEMS = (
|
||||
("rect", RectItem),
|
||||
("point", AnnotationGraphicsPointItem),
|
||||
("bodybbox", BodyBoundingboxItem),
|
||||
)
|
||||
ITEMS = {
|
||||
"rect": items.RectItem,
|
||||
"point": items.PointItem,
|
||||
"bodybbox": BodyBoundingboxItem,
|
||||
}
|
||||
|
||||
INSERTERS = (
|
||||
("rect", RectItemInserter),
|
||||
("bodybbox", BodyBoundingboxItemInserter),
|
||||
)
|
||||
INSERTERS = {
|
||||
"rect": items.RectItemInserter,
|
||||
"bodybbox": BodyBoundingboxItemInserter,
|
||||
}
|
||||
|
||||
LOADERS = (
|
||||
('txt', RectIdLoader),
|
||||
@@ -38,14 +37,3 @@ LOADERS = (
|
||||
PLUGINS = (
|
||||
)
|
||||
|
||||
#labeltool.buttonarea.add_label("Rect", {"type": "rect"})
|
||||
#labeltool.buttonarea.add_label("FixedRatioRect", {"type": "ratiorect", "_ratio": RATIOS})
|
||||
#labeltool.buttonarea.add_label("Point", {"type": "point"})
|
||||
#labeltool.buttonarea.add_label("Polygon", {"type": "polygon"})
|
||||
#labeltool.buttonarea.add_label("BodyBBox", {"type": "bodybbox"})
|
||||
#
|
||||
#Labeltool.buttonarea.add_hotkey("", "Rect", "r")
|
||||
#Labeltool.buttonarea.add_hotkey("", "Point", "p")
|
||||
#Labeltool.buttonarea.add_hotkey("", "Polygon", "o")
|
||||
#Labeltool.buttonarea.add_hotkey("", "BodyBBox", "b")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user