Scripting API
btkAppendEvent
Module | BTKEventModifier |
Description#
Appends a new event into the given acquisition and (optionally) returns an updated list of events.
Parameters#
h | Handle pointing to a C++ btk::Acquisition object. |
label | String with the event's label |
time | Single real number in second |
context | String indicating the context (see note #1). |
subject | String with the name of the subject. |
description | String with a descritpion. |
id | Single integer number to distinguish identical events (see note #2). |
Returned Values#
events | A dictionnary with the same format than in the function btkGetEvents |
eventsInfo | A dictionnary with the same format than in the function btkGetEvents |
Detailed Description#
btkAppendEvent(h, label, time, context)
will set automaticaly the content of thesubject
,description
andid
members for the inserted event. If the metadata SUBJECTS:NAMES exists, then, its first value is used to set event's subject. The description and the id members are set with informations found in the first event with the same label.btkAppendEvent(h, label, time, context, subject)
will set the description and the id members with informations found in the first event with the same label.btkAppendEvent(h, label, time, context, subject, description)
will set the id member with informations found in the first event with the same label.
Notes#
Note #1: Even if there is no rule for the context, these 3 contexts are oftenly used: General, Left, Right.
Note #2: Even if there is no rule for the id value, these 3 next values are used in Vicon Workstation and Nexus to distinguish events' type:
- 0 is for general event ;
- 1 corresponds to the foot strike event ;
- 2 for the foot off event.
See also#
btkClearEvents, btkGetEventsSyntax#
(events, eventsInfo) = btkAppendEvent(h, label, time, context)
(events, eventsInfo) = btkAppendEvent(h, label, time, context, subject)
(events, eventsInfo) = btkAppendEvent(h, label, time, context, subject, description)
(events, eventsInfo) = btkAppendEvent(h, label, time, context, subject, description, id)