monochrome 2025.1.17__py3-none-macosx_10_9_universal2.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- monochrome/__init__.py +23 -0
- monochrome/__main__.py +6 -0
- monochrome/_version.py +16 -0
- monochrome/data/Monochrome.app/Contents/Info.plist +73 -0
- monochrome/data/Monochrome.app/Contents/MacOS/Monochrome +0 -0
- monochrome/data/Monochrome.app/Contents/Resources/Monochrome.icns +0 -0
- monochrome/data/Monochrome.app/Contents/Resources/npy-logo.icns +0 -0
- monochrome/fbs/Array3DataChunkf.py +90 -0
- monochrome/fbs/Array3DataChunku16.py +90 -0
- monochrome/fbs/Array3DataChunku8.py +90 -0
- monochrome/fbs/Array3Meta.py +271 -0
- monochrome/fbs/Array3MetaFlow.py +121 -0
- monochrome/fbs/ArrayDataType.py +9 -0
- monochrome/fbs/BitRange.py +17 -0
- monochrome/fbs/CloseVideo.py +52 -0
- monochrome/fbs/Color.py +47 -0
- monochrome/fbs/ColorMap.py +15 -0
- monochrome/fbs/Data.py +17 -0
- monochrome/fbs/DictEntry.py +65 -0
- monochrome/fbs/Filepaths.py +70 -0
- monochrome/fbs/OpacityFunction.py +15 -0
- monochrome/fbs/PointsVideo.py +173 -0
- monochrome/fbs/Quit.py +38 -0
- monochrome/fbs/Root.py +68 -0
- monochrome/fbs/VideoExport.py +143 -0
- monochrome/fbs/VideoExportFormat.py +8 -0
- monochrome/fbs/__init__.py +0 -0
- monochrome/ipc.py +624 -0
- monochrome-2025.1.17.dist-info/METADATA +166 -0
- monochrome-2025.1.17.dist-info/RECORD +33 -0
- monochrome-2025.1.17.dist-info/WHEEL +5 -0
- monochrome-2025.1.17.dist-info/entry_points.txt +3 -0
- monochrome-2025.1.17.dist-info/licenses/LICENSE.md +19 -0
@@ -0,0 +1,121 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
import flatbuffers
|
6
|
+
from flatbuffers.compat import import_numpy
|
7
|
+
from typing import Any
|
8
|
+
from .Color import Color
|
9
|
+
from typing import Optional
|
10
|
+
np = import_numpy()
|
11
|
+
|
12
|
+
class Array3MetaFlow(object):
|
13
|
+
__slots__ = ['_tab']
|
14
|
+
|
15
|
+
@classmethod
|
16
|
+
def GetRootAs(cls, buf, offset: int = 0):
|
17
|
+
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
18
|
+
x = Array3MetaFlow()
|
19
|
+
x.Init(buf, n + offset)
|
20
|
+
return x
|
21
|
+
|
22
|
+
@classmethod
|
23
|
+
def GetRootAsArray3MetaFlow(cls, buf, offset=0):
|
24
|
+
"""This method is deprecated. Please switch to GetRootAs."""
|
25
|
+
return cls.GetRootAs(buf, offset)
|
26
|
+
# Array3MetaFlow
|
27
|
+
def Init(self, buf: bytes, pos: int):
|
28
|
+
self._tab = flatbuffers.table.Table(buf, pos)
|
29
|
+
|
30
|
+
# Array3MetaFlow
|
31
|
+
def Nx(self):
|
32
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
33
|
+
if o != 0:
|
34
|
+
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
|
35
|
+
return 0
|
36
|
+
|
37
|
+
# Array3MetaFlow
|
38
|
+
def Ny(self):
|
39
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
|
40
|
+
if o != 0:
|
41
|
+
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
|
42
|
+
return 0
|
43
|
+
|
44
|
+
# Array3MetaFlow
|
45
|
+
def Nt(self):
|
46
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
|
47
|
+
if o != 0:
|
48
|
+
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
|
49
|
+
return 0
|
50
|
+
|
51
|
+
# Array3MetaFlow
|
52
|
+
def Name(self) -> Optional[str]:
|
53
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
|
54
|
+
if o != 0:
|
55
|
+
return self._tab.String(o + self._tab.Pos)
|
56
|
+
return None
|
57
|
+
|
58
|
+
# Array3MetaFlow
|
59
|
+
def ParentName(self) -> Optional[str]:
|
60
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
|
61
|
+
if o != 0:
|
62
|
+
return self._tab.String(o + self._tab.Pos)
|
63
|
+
return None
|
64
|
+
|
65
|
+
# Array3MetaFlow
|
66
|
+
def Color(self) -> Optional[Color]:
|
67
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
|
68
|
+
if o != 0:
|
69
|
+
x = o + self._tab.Pos
|
70
|
+
obj = Color()
|
71
|
+
obj.Init(self._tab.Bytes, x)
|
72
|
+
return obj
|
73
|
+
return None
|
74
|
+
|
75
|
+
def Array3MetaFlowStart(builder: flatbuffers.Builder):
|
76
|
+
builder.StartObject(6)
|
77
|
+
|
78
|
+
def Start(builder: flatbuffers.Builder):
|
79
|
+
Array3MetaFlowStart(builder)
|
80
|
+
|
81
|
+
def Array3MetaFlowAddNx(builder: flatbuffers.Builder, nx: int):
|
82
|
+
builder.PrependInt32Slot(0, nx, 0)
|
83
|
+
|
84
|
+
def AddNx(builder: flatbuffers.Builder, nx: int):
|
85
|
+
Array3MetaFlowAddNx(builder, nx)
|
86
|
+
|
87
|
+
def Array3MetaFlowAddNy(builder: flatbuffers.Builder, ny: int):
|
88
|
+
builder.PrependInt32Slot(1, ny, 0)
|
89
|
+
|
90
|
+
def AddNy(builder: flatbuffers.Builder, ny: int):
|
91
|
+
Array3MetaFlowAddNy(builder, ny)
|
92
|
+
|
93
|
+
def Array3MetaFlowAddNt(builder: flatbuffers.Builder, nt: int):
|
94
|
+
builder.PrependInt32Slot(2, nt, 0)
|
95
|
+
|
96
|
+
def AddNt(builder: flatbuffers.Builder, nt: int):
|
97
|
+
Array3MetaFlowAddNt(builder, nt)
|
98
|
+
|
99
|
+
def Array3MetaFlowAddName(builder: flatbuffers.Builder, name: int):
|
100
|
+
builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
|
101
|
+
|
102
|
+
def AddName(builder: flatbuffers.Builder, name: int):
|
103
|
+
Array3MetaFlowAddName(builder, name)
|
104
|
+
|
105
|
+
def Array3MetaFlowAddParentName(builder: flatbuffers.Builder, parentName: int):
|
106
|
+
builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(parentName), 0)
|
107
|
+
|
108
|
+
def AddParentName(builder: flatbuffers.Builder, parentName: int):
|
109
|
+
Array3MetaFlowAddParentName(builder, parentName)
|
110
|
+
|
111
|
+
def Array3MetaFlowAddColor(builder: flatbuffers.Builder, color: Any):
|
112
|
+
builder.PrependStructSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(color), 0)
|
113
|
+
|
114
|
+
def AddColor(builder: flatbuffers.Builder, color: Any):
|
115
|
+
Array3MetaFlowAddColor(builder, color)
|
116
|
+
|
117
|
+
def Array3MetaFlowEnd(builder: flatbuffers.Builder) -> int:
|
118
|
+
return builder.EndObject()
|
119
|
+
|
120
|
+
def End(builder: flatbuffers.Builder) -> int:
|
121
|
+
return Array3MetaFlowEnd(builder)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
from enum import IntEnum
|
6
|
+
class BitRange(IntEnum):
|
7
|
+
AUTODETECT = 0
|
8
|
+
MINMAX = 1
|
9
|
+
UINT8 = 2
|
10
|
+
UINT10 = 3
|
11
|
+
UINT12 = 4
|
12
|
+
UINT16 = 5
|
13
|
+
FLOAT = 6
|
14
|
+
DIFF = 7
|
15
|
+
PHASE = 8
|
16
|
+
PHASE_DIFF = 9
|
17
|
+
INT8 = 10
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
import flatbuffers
|
6
|
+
from flatbuffers.compat import import_numpy
|
7
|
+
from typing import Any
|
8
|
+
from typing import Optional
|
9
|
+
np = import_numpy()
|
10
|
+
|
11
|
+
class CloseVideo(object):
|
12
|
+
__slots__ = ['_tab']
|
13
|
+
|
14
|
+
@classmethod
|
15
|
+
def GetRootAs(cls, buf, offset: int = 0):
|
16
|
+
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
17
|
+
x = CloseVideo()
|
18
|
+
x.Init(buf, n + offset)
|
19
|
+
return x
|
20
|
+
|
21
|
+
@classmethod
|
22
|
+
def GetRootAsCloseVideo(cls, buf, offset=0):
|
23
|
+
"""This method is deprecated. Please switch to GetRootAs."""
|
24
|
+
return cls.GetRootAs(buf, offset)
|
25
|
+
# CloseVideo
|
26
|
+
def Init(self, buf: bytes, pos: int):
|
27
|
+
self._tab = flatbuffers.table.Table(buf, pos)
|
28
|
+
|
29
|
+
# CloseVideo
|
30
|
+
def Name(self) -> Optional[str]:
|
31
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
32
|
+
if o != 0:
|
33
|
+
return self._tab.String(o + self._tab.Pos)
|
34
|
+
return None
|
35
|
+
|
36
|
+
def CloseVideoStart(builder: flatbuffers.Builder):
|
37
|
+
builder.StartObject(1)
|
38
|
+
|
39
|
+
def Start(builder: flatbuffers.Builder):
|
40
|
+
CloseVideoStart(builder)
|
41
|
+
|
42
|
+
def CloseVideoAddName(builder: flatbuffers.Builder, name: int):
|
43
|
+
builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
|
44
|
+
|
45
|
+
def AddName(builder: flatbuffers.Builder, name: int):
|
46
|
+
CloseVideoAddName(builder, name)
|
47
|
+
|
48
|
+
def CloseVideoEnd(builder: flatbuffers.Builder) -> int:
|
49
|
+
return builder.EndObject()
|
50
|
+
|
51
|
+
def End(builder: flatbuffers.Builder) -> int:
|
52
|
+
return CloseVideoEnd(builder)
|
monochrome/fbs/Color.py
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
import flatbuffers
|
6
|
+
from flatbuffers.compat import import_numpy
|
7
|
+
from typing import Any
|
8
|
+
np = import_numpy()
|
9
|
+
|
10
|
+
class Color(object):
|
11
|
+
__slots__ = ['_tab']
|
12
|
+
|
13
|
+
@classmethod
|
14
|
+
def SizeOf(cls) -> int:
|
15
|
+
return 16
|
16
|
+
|
17
|
+
# Color
|
18
|
+
def Init(self, buf: bytes, pos: int):
|
19
|
+
self._tab = flatbuffers.table.Table(buf, pos)
|
20
|
+
|
21
|
+
# Color
|
22
|
+
def Values(self, j = None):
|
23
|
+
if j is None:
|
24
|
+
return [self._tab.Get(flatbuffers.number_types.Float32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + i * 4)) for i in range(self.ValuesLength())]
|
25
|
+
elif j >= 0 and j < self.ValuesLength():
|
26
|
+
return self._tab.Get(flatbuffers.number_types.Float32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + j * 4))
|
27
|
+
else:
|
28
|
+
return None
|
29
|
+
|
30
|
+
# Color
|
31
|
+
def ValuesAsNumpy(self):
|
32
|
+
return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Float32Flags, self._tab.Pos + 0, self.ValuesLength())
|
33
|
+
|
34
|
+
# Color
|
35
|
+
def ValuesLength(self) -> int:
|
36
|
+
return 4
|
37
|
+
|
38
|
+
# Color
|
39
|
+
def ValuesIsNone(self) -> bool:
|
40
|
+
return False
|
41
|
+
|
42
|
+
|
43
|
+
def CreateColor(builder, values):
|
44
|
+
builder.Prep(4, 16)
|
45
|
+
for _idx0 in range(4 , 0, -1):
|
46
|
+
builder.PrependFloat32(values[_idx0-1])
|
47
|
+
return builder.Offset()
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
from enum import IntEnum
|
6
|
+
class ColorMap(IntEnum):
|
7
|
+
DEFAULT = 0
|
8
|
+
GRAY = 1
|
9
|
+
HSV = 2
|
10
|
+
BLACKBODY = 3
|
11
|
+
VIRIDIS = 4
|
12
|
+
PRGN = 5
|
13
|
+
PRGN_POS = 6
|
14
|
+
PRGN_NEG = 7
|
15
|
+
RDBU = 8
|
monochrome/fbs/Data.py
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
from enum import IntEnum
|
6
|
+
class Data(IntEnum):
|
7
|
+
NONE = 0
|
8
|
+
Filepaths = 1
|
9
|
+
Array3Meta = 2
|
10
|
+
Array3MetaFlow = 3
|
11
|
+
Array3DataChunkf = 4
|
12
|
+
Array3DataChunku8 = 5
|
13
|
+
Array3DataChunku16 = 6
|
14
|
+
VideoExport = 7
|
15
|
+
PointsVideo = 8
|
16
|
+
CloseVideo = 9
|
17
|
+
Quit = 10
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
import flatbuffers
|
6
|
+
from flatbuffers.compat import import_numpy
|
7
|
+
from typing import Any
|
8
|
+
from typing import Optional
|
9
|
+
np = import_numpy()
|
10
|
+
|
11
|
+
class DictEntry(object):
|
12
|
+
__slots__ = ['_tab']
|
13
|
+
|
14
|
+
@classmethod
|
15
|
+
def GetRootAs(cls, buf, offset: int = 0):
|
16
|
+
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
17
|
+
x = DictEntry()
|
18
|
+
x.Init(buf, n + offset)
|
19
|
+
return x
|
20
|
+
|
21
|
+
@classmethod
|
22
|
+
def GetRootAsDictEntry(cls, buf, offset=0):
|
23
|
+
"""This method is deprecated. Please switch to GetRootAs."""
|
24
|
+
return cls.GetRootAs(buf, offset)
|
25
|
+
# DictEntry
|
26
|
+
def Init(self, buf: bytes, pos: int):
|
27
|
+
self._tab = flatbuffers.table.Table(buf, pos)
|
28
|
+
|
29
|
+
# DictEntry
|
30
|
+
def Key(self) -> Optional[str]:
|
31
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
32
|
+
if o != 0:
|
33
|
+
return self._tab.String(o + self._tab.Pos)
|
34
|
+
return None
|
35
|
+
|
36
|
+
# DictEntry
|
37
|
+
def Val(self) -> Optional[str]:
|
38
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
|
39
|
+
if o != 0:
|
40
|
+
return self._tab.String(o + self._tab.Pos)
|
41
|
+
return None
|
42
|
+
|
43
|
+
def DictEntryStart(builder: flatbuffers.Builder):
|
44
|
+
builder.StartObject(2)
|
45
|
+
|
46
|
+
def Start(builder: flatbuffers.Builder):
|
47
|
+
DictEntryStart(builder)
|
48
|
+
|
49
|
+
def DictEntryAddKey(builder: flatbuffers.Builder, key: int):
|
50
|
+
builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(key), 0)
|
51
|
+
|
52
|
+
def AddKey(builder: flatbuffers.Builder, key: int):
|
53
|
+
DictEntryAddKey(builder, key)
|
54
|
+
|
55
|
+
def DictEntryAddVal(builder: flatbuffers.Builder, val: int):
|
56
|
+
builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(val), 0)
|
57
|
+
|
58
|
+
def AddVal(builder: flatbuffers.Builder, val: int):
|
59
|
+
DictEntryAddVal(builder, val)
|
60
|
+
|
61
|
+
def DictEntryEnd(builder: flatbuffers.Builder) -> int:
|
62
|
+
return builder.EndObject()
|
63
|
+
|
64
|
+
def End(builder: flatbuffers.Builder) -> int:
|
65
|
+
return DictEntryEnd(builder)
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
import flatbuffers
|
6
|
+
from flatbuffers.compat import import_numpy
|
7
|
+
from typing import Any
|
8
|
+
np = import_numpy()
|
9
|
+
|
10
|
+
class Filepaths(object):
|
11
|
+
__slots__ = ['_tab']
|
12
|
+
|
13
|
+
@classmethod
|
14
|
+
def GetRootAs(cls, buf, offset: int = 0):
|
15
|
+
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
16
|
+
x = Filepaths()
|
17
|
+
x.Init(buf, n + offset)
|
18
|
+
return x
|
19
|
+
|
20
|
+
@classmethod
|
21
|
+
def GetRootAsFilepaths(cls, buf, offset=0):
|
22
|
+
"""This method is deprecated. Please switch to GetRootAs."""
|
23
|
+
return cls.GetRootAs(buf, offset)
|
24
|
+
# Filepaths
|
25
|
+
def Init(self, buf: bytes, pos: int):
|
26
|
+
self._tab = flatbuffers.table.Table(buf, pos)
|
27
|
+
|
28
|
+
# Filepaths
|
29
|
+
def File(self, j: int):
|
30
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
31
|
+
if o != 0:
|
32
|
+
a = self._tab.Vector(o)
|
33
|
+
return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
|
34
|
+
return ""
|
35
|
+
|
36
|
+
# Filepaths
|
37
|
+
def FileLength(self) -> int:
|
38
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
39
|
+
if o != 0:
|
40
|
+
return self._tab.VectorLen(o)
|
41
|
+
return 0
|
42
|
+
|
43
|
+
# Filepaths
|
44
|
+
def FileIsNone(self) -> bool:
|
45
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
46
|
+
return o == 0
|
47
|
+
|
48
|
+
def FilepathsStart(builder: flatbuffers.Builder):
|
49
|
+
builder.StartObject(1)
|
50
|
+
|
51
|
+
def Start(builder: flatbuffers.Builder):
|
52
|
+
FilepathsStart(builder)
|
53
|
+
|
54
|
+
def FilepathsAddFile(builder: flatbuffers.Builder, file: int):
|
55
|
+
builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(file), 0)
|
56
|
+
|
57
|
+
def AddFile(builder: flatbuffers.Builder, file: int):
|
58
|
+
FilepathsAddFile(builder, file)
|
59
|
+
|
60
|
+
def FilepathsStartFileVector(builder, numElems: int) -> int:
|
61
|
+
return builder.StartVector(4, numElems, 4)
|
62
|
+
|
63
|
+
def StartFileVector(builder, numElems: int) -> int:
|
64
|
+
return FilepathsStartFileVector(builder, numElems)
|
65
|
+
|
66
|
+
def FilepathsEnd(builder: flatbuffers.Builder) -> int:
|
67
|
+
return builder.EndObject()
|
68
|
+
|
69
|
+
def End(builder: flatbuffers.Builder) -> int:
|
70
|
+
return FilepathsEnd(builder)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
from enum import IntEnum
|
6
|
+
class OpacityFunction(IntEnum):
|
7
|
+
NONE = 0
|
8
|
+
LINEAR = 1
|
9
|
+
LINEAR_R = 2
|
10
|
+
CENTERED = 3
|
11
|
+
FIXED_100 = 4
|
12
|
+
FIXED_75 = 5
|
13
|
+
FIXED_50 = 6
|
14
|
+
FIXED_25 = 7
|
15
|
+
FIXED_0 = 8
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
import flatbuffers
|
6
|
+
from flatbuffers.compat import import_numpy
|
7
|
+
from typing import Any
|
8
|
+
from .Color import Color
|
9
|
+
from typing import Optional
|
10
|
+
np = import_numpy()
|
11
|
+
|
12
|
+
class PointsVideo(object):
|
13
|
+
__slots__ = ['_tab']
|
14
|
+
|
15
|
+
@classmethod
|
16
|
+
def GetRootAs(cls, buf, offset: int = 0):
|
17
|
+
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
18
|
+
x = PointsVideo()
|
19
|
+
x.Init(buf, n + offset)
|
20
|
+
return x
|
21
|
+
|
22
|
+
@classmethod
|
23
|
+
def GetRootAsPointsVideo(cls, buf, offset=0):
|
24
|
+
"""This method is deprecated. Please switch to GetRootAs."""
|
25
|
+
return cls.GetRootAs(buf, offset)
|
26
|
+
# PointsVideo
|
27
|
+
def Init(self, buf: bytes, pos: int):
|
28
|
+
self._tab = flatbuffers.table.Table(buf, pos)
|
29
|
+
|
30
|
+
# PointsVideo
|
31
|
+
def Name(self) -> Optional[str]:
|
32
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
33
|
+
if o != 0:
|
34
|
+
return self._tab.String(o + self._tab.Pos)
|
35
|
+
return None
|
36
|
+
|
37
|
+
# PointsVideo
|
38
|
+
def ParentName(self) -> Optional[str]:
|
39
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
|
40
|
+
if o != 0:
|
41
|
+
return self._tab.String(o + self._tab.Pos)
|
42
|
+
return None
|
43
|
+
|
44
|
+
# PointsVideo
|
45
|
+
def PointsData(self, j: int):
|
46
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
|
47
|
+
if o != 0:
|
48
|
+
a = self._tab.Vector(o)
|
49
|
+
return self._tab.Get(flatbuffers.number_types.Float32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
|
50
|
+
return 0
|
51
|
+
|
52
|
+
# PointsVideo
|
53
|
+
def PointsDataAsNumpy(self):
|
54
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
|
55
|
+
if o != 0:
|
56
|
+
return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float32Flags, o)
|
57
|
+
return 0
|
58
|
+
|
59
|
+
# PointsVideo
|
60
|
+
def PointsDataLength(self) -> int:
|
61
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
|
62
|
+
if o != 0:
|
63
|
+
return self._tab.VectorLen(o)
|
64
|
+
return 0
|
65
|
+
|
66
|
+
# PointsVideo
|
67
|
+
def PointsDataIsNone(self) -> bool:
|
68
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
|
69
|
+
return o == 0
|
70
|
+
|
71
|
+
# PointsVideo
|
72
|
+
def TimeIdxs(self, j: int):
|
73
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
|
74
|
+
if o != 0:
|
75
|
+
a = self._tab.Vector(o)
|
76
|
+
return self._tab.Get(flatbuffers.number_types.Uint32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
|
77
|
+
return 0
|
78
|
+
|
79
|
+
# PointsVideo
|
80
|
+
def TimeIdxsAsNumpy(self):
|
81
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
|
82
|
+
if o != 0:
|
83
|
+
return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint32Flags, o)
|
84
|
+
return 0
|
85
|
+
|
86
|
+
# PointsVideo
|
87
|
+
def TimeIdxsLength(self) -> int:
|
88
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
|
89
|
+
if o != 0:
|
90
|
+
return self._tab.VectorLen(o)
|
91
|
+
return 0
|
92
|
+
|
93
|
+
# PointsVideo
|
94
|
+
def TimeIdxsIsNone(self) -> bool:
|
95
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
|
96
|
+
return o == 0
|
97
|
+
|
98
|
+
# PointsVideo
|
99
|
+
def Color(self) -> Optional[Color]:
|
100
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
|
101
|
+
if o != 0:
|
102
|
+
x = o + self._tab.Pos
|
103
|
+
obj = Color()
|
104
|
+
obj.Init(self._tab.Bytes, x)
|
105
|
+
return obj
|
106
|
+
return None
|
107
|
+
|
108
|
+
# PointsVideo
|
109
|
+
def PointSize(self):
|
110
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
|
111
|
+
if o != 0:
|
112
|
+
return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
|
113
|
+
return 0.0
|
114
|
+
|
115
|
+
def PointsVideoStart(builder: flatbuffers.Builder):
|
116
|
+
builder.StartObject(6)
|
117
|
+
|
118
|
+
def Start(builder: flatbuffers.Builder):
|
119
|
+
PointsVideoStart(builder)
|
120
|
+
|
121
|
+
def PointsVideoAddName(builder: flatbuffers.Builder, name: int):
|
122
|
+
builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
|
123
|
+
|
124
|
+
def AddName(builder: flatbuffers.Builder, name: int):
|
125
|
+
PointsVideoAddName(builder, name)
|
126
|
+
|
127
|
+
def PointsVideoAddParentName(builder: flatbuffers.Builder, parentName: int):
|
128
|
+
builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(parentName), 0)
|
129
|
+
|
130
|
+
def AddParentName(builder: flatbuffers.Builder, parentName: int):
|
131
|
+
PointsVideoAddParentName(builder, parentName)
|
132
|
+
|
133
|
+
def PointsVideoAddPointsData(builder: flatbuffers.Builder, pointsData: int):
|
134
|
+
builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(pointsData), 0)
|
135
|
+
|
136
|
+
def AddPointsData(builder: flatbuffers.Builder, pointsData: int):
|
137
|
+
PointsVideoAddPointsData(builder, pointsData)
|
138
|
+
|
139
|
+
def PointsVideoStartPointsDataVector(builder, numElems: int) -> int:
|
140
|
+
return builder.StartVector(4, numElems, 4)
|
141
|
+
|
142
|
+
def StartPointsDataVector(builder, numElems: int) -> int:
|
143
|
+
return PointsVideoStartPointsDataVector(builder, numElems)
|
144
|
+
|
145
|
+
def PointsVideoAddTimeIdxs(builder: flatbuffers.Builder, timeIdxs: int):
|
146
|
+
builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(timeIdxs), 0)
|
147
|
+
|
148
|
+
def AddTimeIdxs(builder: flatbuffers.Builder, timeIdxs: int):
|
149
|
+
PointsVideoAddTimeIdxs(builder, timeIdxs)
|
150
|
+
|
151
|
+
def PointsVideoStartTimeIdxsVector(builder, numElems: int) -> int:
|
152
|
+
return builder.StartVector(4, numElems, 4)
|
153
|
+
|
154
|
+
def StartTimeIdxsVector(builder, numElems: int) -> int:
|
155
|
+
return PointsVideoStartTimeIdxsVector(builder, numElems)
|
156
|
+
|
157
|
+
def PointsVideoAddColor(builder: flatbuffers.Builder, color: Any):
|
158
|
+
builder.PrependStructSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(color), 0)
|
159
|
+
|
160
|
+
def AddColor(builder: flatbuffers.Builder, color: Any):
|
161
|
+
PointsVideoAddColor(builder, color)
|
162
|
+
|
163
|
+
def PointsVideoAddPointSize(builder: flatbuffers.Builder, pointSize: float):
|
164
|
+
builder.PrependFloat32Slot(5, pointSize, 0.0)
|
165
|
+
|
166
|
+
def AddPointSize(builder: flatbuffers.Builder, pointSize: float):
|
167
|
+
PointsVideoAddPointSize(builder, pointSize)
|
168
|
+
|
169
|
+
def PointsVideoEnd(builder: flatbuffers.Builder) -> int:
|
170
|
+
return builder.EndObject()
|
171
|
+
|
172
|
+
def End(builder: flatbuffers.Builder) -> int:
|
173
|
+
return PointsVideoEnd(builder)
|
monochrome/fbs/Quit.py
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
2
|
+
|
3
|
+
# namespace: fbs
|
4
|
+
|
5
|
+
import flatbuffers
|
6
|
+
from flatbuffers.compat import import_numpy
|
7
|
+
from typing import Any
|
8
|
+
np = import_numpy()
|
9
|
+
|
10
|
+
class Quit(object):
|
11
|
+
__slots__ = ['_tab']
|
12
|
+
|
13
|
+
@classmethod
|
14
|
+
def GetRootAs(cls, buf, offset: int = 0):
|
15
|
+
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
16
|
+
x = Quit()
|
17
|
+
x.Init(buf, n + offset)
|
18
|
+
return x
|
19
|
+
|
20
|
+
@classmethod
|
21
|
+
def GetRootAsQuit(cls, buf, offset=0):
|
22
|
+
"""This method is deprecated. Please switch to GetRootAs."""
|
23
|
+
return cls.GetRootAs(buf, offset)
|
24
|
+
# Quit
|
25
|
+
def Init(self, buf: bytes, pos: int):
|
26
|
+
self._tab = flatbuffers.table.Table(buf, pos)
|
27
|
+
|
28
|
+
def QuitStart(builder: flatbuffers.Builder):
|
29
|
+
builder.StartObject(0)
|
30
|
+
|
31
|
+
def Start(builder: flatbuffers.Builder):
|
32
|
+
QuitStart(builder)
|
33
|
+
|
34
|
+
def QuitEnd(builder: flatbuffers.Builder) -> int:
|
35
|
+
return builder.EndObject()
|
36
|
+
|
37
|
+
def End(builder: flatbuffers.Builder) -> int:
|
38
|
+
return QuitEnd(builder)
|