Scripting API

btkAppendEvent

Module BTKEventModifier

Description#

Appends a new event into the given acquisition and (optionally) returns an updated list of events.

Parameters#

hHandle pointing to a C++ btk::Acquisition object.
labelString with the event's label
timeSingle real number in second
contextString indicating the context (see note #1).
subjectString with the name of the subject.
descriptionString with a descritpion.
idSingle integer number to distinguish identical events (see note #2).

Returned Values#

eventsA dictionnary with the same format than in the function btkGetEvents
eventsInfoA dictionnary with the same format than in the function btkGetEvents

Detailed Description#

  • btkAppendEvent(h, label, time, context) will set automaticaly the content of the subject, description and id 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, btkGetEvents

Syntax#

(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)

Examples#