BTK Python wrapper  0.3dev.0
Python bindings for the Biomechanical ToolKit library (BTK)
Public Member Functions | Static Public Attributes | List of all members
btk.btkEvent Class Reference

Label a specific time/frame during an acquisition. More...

Public Member Functions

def Clone
 
def GetContext
 
def GetDescription
 
def GetDetectionFlags
 
def GetFrame
 
def GetId
 
def GetLabel
 
def GetSubject
 
def GetTime
 
def GetTimestamp
 
def HasDetectionFlag
 
def SetContext
 
def SetDescription
 
def SetDetectionFlags
 
def SetFrame
 
def SetId
 
def SetLabel
 
def SetSubject
 
def SetTime
 
def Update
 

Static Public Attributes

 Automatic = _btk.btkEvent_Automatic
 
 FromForcePlatform = _btk.btkEvent_FromForcePlatform
 
 Manual = _btk.btkEvent_Manual
 
 Unknown = _btk.btkEvent_Unknown
 

Detailed Description

Label a specific time/frame during an acquisition.

An event is defined as:
 - a label (string);
 - a time (double);
 - a frame (integer);
 - a context (string);
 - a detection flag (integer);
 - a description (string);
 - an ID (integer).
 
The detection flag has a limited range of possible values and are listed in the following enumeration:
 - btk.btkEvent.Unknown: Unknown method used to detect the event;
 - btk.btkEvent.Manual: Event detected manually;
 - btk.btkEvent.Automatic: Automatic method used to detect the event;
 - btk.btkEvent.FromForcePlatform: Method based on force platform data to detect the event.

Note: 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:
 - The value 0 is for general event;
 - Value 1 corresponds to the foot strike event;
 - Value 2 for the foot off. Without the use of these values.
It is known that Workstation and Nexus put all events in general (default value is 0). 
For Polygon, one user reported that some points had their values set to 0.

For example, a Heel Strike event on the left leg or the subject John Doe at frame 143 can be set by
evt = btk.btkEvent('FootStrike', 143, 'Right', btk.btkEvent.Manual, 'John Doe', 'Heel strike event', 2)

Member Function Documentation

def btk.btkEvent.Clone (   self )
Clone(self) -> btkEvent

Deep copy of the object.
def btk.btkEvent.GetContext (   self )
GetContext(self) -> std::string const &

Returns the event's context.
def btk.btkEvent.GetDescription (   self )
GetDescription(self) -> std::string const &

Returns the event's description.
def btk.btkEvent.GetDetectionFlags (   self )
GetDetectionFlags(self) -> int const

Returns the event's detection flags.
def btk.btkEvent.GetFrame (   self )
GetFrame(self) -> int const

Returns the event's frame.
def btk.btkEvent.GetId (   self )
GetId(self) -> int const

Returns the event's ID.
def btk.btkEvent.GetLabel (   self )
GetLabel(self) -> std::string const &

Returns the event's label.
def btk.btkEvent.GetSubject (   self )
GetSubject(self) -> std::string const &

Returns the event's subject.
def btk.btkEvent.GetTime (   self )
GetTime(self) -> double const

Returns the event's time.
def btk.btkEvent.GetTimestamp (   self )
GetTimestamp(self) -> unsigned long

Returns the timestamp of the object.
def btk.btkEvent.HasDetectionFlag (   self,   args  )
HasDetectionFlag(self, DetectionFlag) -> bool

Check if the event has the given detection flag.
def btk.btkEvent.SetContext (   self,   args  )
SetContext(self, string)

Sets the event's context.
def btk.btkEvent.SetDescription (   self,   args  )
SetDescription(self, string)

Sets the event's description.
def btk.btkEvent.SetDetectionFlags (   self,   args  )
SetDetectionFlags(self, int)

Sets the event's detection flags
def btk.btkEvent.SetFrame (   self,   args  )
SetFrame(self, int)

Sets the event's frame.
def btk.btkEvent.SetId (   self,   args  )
SetId(self, int)

Sets the event's ID.
def btk.btkEvent.SetLabel (   self,   args  )
SetLabel(self, string)

Sets the event's label.
def btk.btkEvent.SetSubject (   self,   args  )
SetSubject(self, string)

Sets the event's subject.
def btk.btkEvent.SetTime (   self,   args  )
SetTime(self, double)

Sets the event's time.
def btk.btkEvent.Update (   self )
Update(self)

Updates the ProcessObject associated with this DataObject.

Member Data Documentation

btk.btkEvent.Automatic = _btk.btkEvent_Automatic
static

Automatic method used to detect the event.

btk.btkEvent.FromForcePlatform = _btk.btkEvent_FromForcePlatform
static

Method based on force platform data to detect the event.

btk.btkEvent.Manual = _btk.btkEvent_Manual
static

Event detected manually.

btk.btkEvent.Unknown = _btk.btkEvent_Unknown
static

Unknown method used to detect the event.