SDK Base Python bindings API

class metavision_sdk_base.GenericHeader(*args, **kwargs)

Overloaded function.

  1. __init__(self: metavision_sdk_base.GenericHeader) -> None

  2. __init__(self: metavision_sdk_base.GenericHeader, arg0: dict) -> None

Parameters

dict (dictionary) – a python dictionary holding key value pairs of string types.

  1. __init__(self: metavision_sdk_base.GenericHeader, arg0: str) -> None

Parameters

filename (str) – name of the file to open

add_date(self: metavision_sdk_base.GenericHeader) None

Adds the current date and time to the header (in the format Y-m-d H:M:S).

note

The date is updated at each call to this method

empty(self: metavision_sdk_base.GenericHeader) bool

Returns if the header is empty.

return

True if the header is empty, false otherwise

get_date(self: metavision_sdk_base.GenericHeader) str

Gets the date and time at which the associated file was recorded.

return

The current date and time in string format if it is found, or an empty string otherwise.

get_field(self: metavision_sdk_base.GenericHeader, key: str) str

Gets the value associated to the input key.

return

The value associated to the input key if it exists, or an empty string otherwise

get_header_map(self: metavision_sdk_base.GenericHeader) dict[str, str]

Gets the HeaderMap holding the header information.

return

The header map

remove_date(self: metavision_sdk_base.GenericHeader) None

Removes the date if there was any in the header.

remove_field(self: metavision_sdk_base.GenericHeader, key: str) None

Remove the input field (if exists)

set_field(self: metavision_sdk_base.GenericHeader, key: str, value: str) None

Adds a new field in the header.

key

The key of the field in the header

value

The value of the field

to_string(self: metavision_sdk_base.GenericHeader) str

Serializes the header map.

return

The header in a string format

class metavision_sdk_base.SoftwareInfo(self: metavision_sdk_base.SoftwareInfo, version_major: int, version_minor: int, version_patch: int, version_suffix_string: str, vcs_branch: str, vcs_commit: str, vcs_date: str) None

Stores information about the version of the software.

Constructor.

version_major

Major version number

version_minor

Minor version number

version_patch

Patch version number

version_suffix_string

Version suffix string

vcs_branch

VCS branch name

vcs_commit

VCS commit’s hash

vcs_date

VCS commit’s date

get_vcs_branch(self: metavision_sdk_base.SoftwareInfo) str

Returns version control software (vcs) branch.

get_vcs_commit(self: metavision_sdk_base.SoftwareInfo) str

Returns version control software (vcs) commit.

get_vcs_date(self: metavision_sdk_base.SoftwareInfo) str

Returns version control software (vcs) commit’s date.

get_version(self: metavision_sdk_base.SoftwareInfo) str

Returns version as a string.

get_version_major(self: metavision_sdk_base.SoftwareInfo) int

Returns major version number.

get_version_minor(self: metavision_sdk_base.SoftwareInfo) int

Returns minor version number.

get_version_patch(self: metavision_sdk_base.SoftwareInfo) int

Returns patch version number.

get_version_suffix(self: metavision_sdk_base.SoftwareInfo) str

Returns version suffix string.

class metavision_sdk_base.EventCDBuffer(self: metavision_sdk_base.EventCDBuffer, size: int = 0) None

Constructor

numpy(self: metavision_sdk_base.EventCDBuffer, copy: bool = False) numpy.ndarray[metavision_sdk_base._EventCD_decode]
Copy

if True, allocates new memory and returns a copy of the events. If False, use the same memory

resize(self: metavision_sdk_base.EventCDBuffer, size: int) None

resizes the buffer to the specified size

size

the new size of the buffer

metavision_sdk_base.EventCD

alias of dtype({‘names’: [‘x’, ‘y’, ‘p’, ‘t’], ‘formats’: [‘<u2’, ‘<u2’, ‘<i2’, ‘<i8’], ‘offsets’: [0, 2, 4, 8], ‘itemsize’: 16})

This is the numpy.dtype to represent numpy structured arrays of EventCD

class metavision_sdk_base.EventExtTriggerBuffer(self: metavision_sdk_base.EventExtTriggerBuffer, size: int = 0) None

Constructor

numpy(self: metavision_sdk_base.EventExtTriggerBuffer, copy: bool = False) numpy.ndarray[metavision_sdk_base._EventExtTrigger_decode]
Copy

if True, allocates new memory and returns a copy of the events. If False, use the same memory

resize(self: metavision_sdk_base.EventExtTriggerBuffer, size: int) None

resizes the buffer to the specified size

size

the new size of the buffer

metavision_sdk_base.EventExtTrigger

alias of dtype({‘names’: [‘p’, ‘t’, ‘id’], ‘formats’: [‘<i2’, ‘<i8’, ‘<i2’], ‘offsets’: [0, 8, 16], ‘itemsize’: 24})

This is the numpy.dtype to represent numpy structured arrays of EventExtTrigger