Coverage for application / tator / tator_type.py: 83%
18 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-23 05:22 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-23 05:22 +0000
1from enum import IntEnum
4class TatorStateType(IntEnum):
5 SUBSTRATE = 846
6 SUB_MODE = 847
9class TatorLocalizationType(IntEnum):
10 BOX = 48
11 DOT = 49
12 SUB_BOX = 794
13 SUB_DOT = 795
15 @classmethod
16 def is_relevant(cls, localization_type: int) -> bool:
17 """
18 Returns whether the given localization type is one of the types that we consider relevant for processing
19 (box, dot, sub-box, sub-dot).
20 """
21 return localization_type in cls._value2member_map_
23 @classmethod
24 def is_box(cls, localization_type: int) -> bool:
25 return localization_type == cls.BOX or localization_type == cls.SUB_BOX
27 @classmethod
28 def is_dot(cls, localization_type: int) -> bool:
29 return localization_type == cls.DOT or localization_type == cls.SUB_DOT