BTK
0.3dev.0
Open-source library to visualize/process biomechanical data
|
Label a specific time/frame during an acquisition. More...
#include <btkEvent.h>
Public Types | |
typedef btkSharedPtr< const Event > | ConstPointer |
enum | DetectionFlag { Unknown = 0x00, Manual = 0x02, Automatic = 0x04, FromForcePlatform = 0x08 } |
typedef btkNullPtr< Event > | NullPointer |
typedef btkSharedPtr< Event > | Pointer |
Public Types inherited from btk::DataObjectLabeled | |
typedef btkSharedPtr< const DataObjectLabeled > | ConstPointer |
typedef btkSharedPtr < DataObjectLabeled > | Pointer |
Public Types inherited from btk::DataObject | |
typedef btkSharedPtr< const DataObject > | ConstPointer |
typedef btkNullPtr< DataObject > | NullPointer |
typedef btkSharedPtr< DataObject > | Pointer |
Public Types inherited from btk::Object | |
typedef btkSharedPtr< const Object > | ConstPointer |
typedef btkSharedPtr< Object > | Pointer |
Public Member Functions | |
Pointer | Clone () const |
const std::string & | GetContext () const |
int | GetDetectionFlags () const |
int | GetFrame () const |
int | GetId () const |
const std::string & | GetSubject () const |
double | GetTime () const |
bool | HasDetectionFlag (DetectionFlag flag) |
void | SetContext (const std::string &context) |
void | SetDetectionFlags (int flags) |
void | SetFrame (int f) |
void | SetId (int id) |
void | SetSubject (const std::string &subject) |
void | SetTime (double t) |
Public Member Functions inherited from btk::DataObjectLabeled | |
const std::string & | GetDescription () const |
const std::string & | GetLabel () const |
virtual void | SetDescription (const std::string &description) |
virtual void | SetLabel (const std::string &label) |
Public Member Functions inherited from btk::DataObject | |
DataObject * | GetParent () const |
bool | HasParent () const |
void | Modified () |
void | SetParent (DataObject *parent) |
void | Update () |
Public Member Functions inherited from btk::Object | |
unsigned long int | GetTimestamp () const |
Static Public Member Functions | |
static Pointer | New () |
static Pointer | New (const std::string &label, double t, const std::string &context="", int detectionFlags=Unknown, const std::string &subject="", const std::string &desc="", int id=0) |
static Pointer | New (const std::string &label, int f, const std::string &context="", int detectionFlags=Unknown, const std::string &subject="", const std::string &desc="", int id=0) |
static Pointer | New (const std::string &label, double t, int f, const std::string &context="", int detectionFlags=Unknown, const std::string &subject="", const std::string &desc="", int id=0) |
static NullPointer | Null () |
Static Public Member Functions inherited from btk::DataObject | |
static NullPointer | Null () |
Friends | |
bool | operator!= (const Event &rLHS, const Event &rRHS) |
bool | operator== (const Event &rLHS, const Event &rRHS) |
Additional Inherited Members | |
Protected Member Functions inherited from btk::DataObjectLabeled | |
DataObjectLabeled (const std::string &label="", const std::string &description="") | |
DataObjectLabeled (const DataObjectLabeled &toCopy) | |
Protected Member Functions inherited from btk::DataObject | |
DataObject () | |
DataObject (const DataObject &toCopy) | |
virtual | ~DataObject () |
Protected Member Functions inherited from btk::Object | |
Object () | |
Object (const Object &toCopy) | |
virtual | ~Object () |
Protected Attributes inherited from btk::DataObjectLabeled | |
std::string | m_Description |
std::string | m_Label |
Protected Attributes inherited from btk::Object | |
unsigned long int | m_Timestamp |
Label a specific time/frame during an acquisition.
An event is defined as:
The ID is not used as a unique identifier but more to determine the type of the event. 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:
For example, a heel strike event on the left leg or the subject John Doe at frame 143 can be set by
Smart pointer associated with a const Event object.
Smart pointer associated with an Event object.
|
inline |
Clones the object and return it as new smart pointer.
|
inline |
Returns event's context.
|
inline |
Returns the method(s) which generate the event.
|
inline |
Returns event's frame index.
|
inline |
Returns the event's ID. Can be used by software (as Vicon Workstation) to indicate event (independently of the label).
|
inline |
Returns the subject associated with the event.
|
inline |
Returns event's time.
bool btk::Event::HasDetectionFlag | ( | DetectionFlag | flag | ) |
Checks if the given detection flag is contained in the event.
|
inlinestatic |
Creates a smart pointer associated with an Event object.
|
inlinestatic |
Creates a smart pointer associated with an Event object.
|
inlinestatic |
Creates a smart pointer associated with an Event object.
|
inlinestatic |
Static function to return a null pointer.
void btk::Event::SetContext | ( | const std::string & | context | ) |
Sets event's context.
void btk::Event::SetDetectionFlags | ( | int | flags | ) |
Sets the event's detection. Use the enumeration Event::DetectionFlag to set the method(s) of detection.
void btk::Event::SetFrame | ( | int | f | ) |
Sets event's frame index.
void btk::Event::SetId | ( | int | id | ) |
Sets the event's ID.
void btk::Event::SetSubject | ( | const std::string & | subject | ) |
Sets the subject associated with the event.
void btk::Event::SetTime | ( | double | t | ) |
Sets event's time.