BTK Matlab Wrapper  0.3dev.0
Matlab bindings for the Biomechanical ToolKit library (BTK)
btkAppendEvent Class Reference

Description

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

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)
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).
Return values
eventsA structure with the same format than in the function btkGetEvents
eventsInfoA structure 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.

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, btkRemoveEvent