BTK  0.3dev.0
Open-source library to visualize/process biomechanical data
Classes | Macros | Typedefs | Functions
Common

Common is the base of BTK. It contains required classes by others modules. More...

Classes

class  btk::Acquisition
 Contains the data related to a biomechanical acquisition. More...
 
class  btk::Analog
 Analog channel data along the time. More...
 
class  btk::Collection< T >
 List of objects. More...
 
class  btk::DataObject
 Input and output entry for processes in pipelines. More...
 
class  btk::DataObjectLabeled
 DataObject with a label and a description. More...
 
class  btk::Event
 Label a specific time/frame during an acquisition. More...
 
class  btk::ForcePlatform
 Base class for all type of force platform. More...
 
class  btk::ForcePlatformType< t, r, c >
 Convenient class to represent a concrete force platform. More...
 
class  btk::IMU
 Container of analog channels representing an inertial measurement unit (IMU). More...
 
class  btk::IMUType< t >
 Convenient class to represents a concrete IMU. More...
 
class  btk::Logger
 Log mechanism to display debug message, warnings and errors. More...
 
class  btk::Measure< Derived >
 Measure with d dimensions along the time. More...
 
class  btk::MetaData
 Store data which cannot be embedded within timeseries data (calibration matrix, subject informations, ...). More...
 
class  btk::MetaDataInfo
 Container class to store data of a MetaData object. More...
 
class  btk::NullPtr< T >
 To simplify the API when testing a shared pointer to know if it is null or not. More...
 
class  btk::Object
 Base for all objects which need to keep track of modified time. More...
 
class  btk::Point
 Coordinates of a point in a 3D space along the time. More...
 
class  btk::ProcessObject
 Interface to create a filter/process in a pipeline. More...
 
class  btk::Wrench
 Represents a wrench as position, force and moment varying during the time. More...
 

Macros

#define btkNullPtr   btk::NullPtr
 
#define btkSharedPtr   std::tr1::shared_ptr
 

Typedefs

typedef Collection< Analog > btk::AnalogCollection
 
typedef Collection< Event > btk::EventCollection
 
typedef Collection< ForcePlatform > btk::ForcePlatformCollection
 
typedef ForcePlatformType< 1, 6, 6 > btk::ForcePlatformType1
 
typedef ForcePlatformType< 2, 6, 6 > btk::ForcePlatformType2
 
typedef ForcePlatformType< 3, 8, 8 > btk::ForcePlatformType3
 
typedef ForcePlatformType< 4, 6, 6 > btk::ForcePlatformType4
 
typedef ForcePlatformType< 5, 8, 6 > btk::ForcePlatformType5
 
typedef ForcePlatformType< 6, 12, 12 > btk::ForcePlatformType6
 
typedef Collection< IMU > btk::IMUCollection
 
typedef IMUType< 1 > btk::IMUType1
 
typedef IMUType< 2 > btk::IMUType2
 
typedef Collection< Point > btk::PointCollection
 
typedef Collection< Wrench > btk::WrenchCollection
 

Functions

template<typename T >
void btk::MetaDataCollapseChildrenValues (std::vector< T > &target, MetaData::ConstPointer parent, const std::string &baselabel, int targetFinalSize=-1, const T &blankReplacement=T())
 
MetaData::Pointer btk::MetaDataCreateChild (MetaData::Pointer parent, const std::string &label)
 
template<typename T >
void btk::MetaDataCreateChild (MetaData::Pointer parent, const std::string &label, const T &val)
 
template<typename T >
void btk::MetaDataCreateChild (MetaData::Pointer parent, const std::string &label, const std::vector< T > &val)
 
template<typename T >
void btk::MetaDataCreateChild (MetaData::Pointer parent, const std::string &label, const std::vector< T > &val, int numCol)
 
template<typename T >
bool btk::operator!= (btkSharedPtr< T > const &lhs, btkNullPtr< T > const &rhs)
 
template<typename T >
bool btk::operator!= (btkSharedPtr< const T > const &lhs, btkNullPtr< T > const &rhs)
 
template<typename T >
bool btk::operator!= (btkNullPtr< T > const &lhs, btkSharedPtr< T > const &rhs)
 
template<typename T >
bool btk::operator!= (btkNullPtr< T > const &lhs, btkSharedPtr< const T > rhs)
 
template<typename T >
bool btk::operator!= (btkSharedPtr< T > const &lhs, btkNullPtr< T >(*rhs)())
 
template<typename T >
bool btk::operator!= (btkSharedPtr< const T > const &lhs, btkNullPtr< T >(*rhs)())
 
template<typename T >
bool btk::operator!= (btkNullPtr< T >(*lhs)(), btkSharedPtr< T > const &rhs)
 
template<typename T >
bool btk::operator!= (btkNullPtr< T >(*lhs)(), btkSharedPtr< const T > const &rhs)
 
template<typename T >
bool btk::operator== (btkSharedPtr< T > const &lhs, btkNullPtr< T > const &rhs)
 
template<typename T >
bool btk::operator== (btkSharedPtr< const T > const &lhs, btkNullPtr< T > const &rhs)
 
template<typename T >
bool btk::operator== (btkNullPtr< T > const &lhs, btkSharedPtr< T > const &rhs)
 
template<typename T >
bool btk::operator== (btkNullPtr< T > const &lhs, btkSharedPtr< const T > rhs)
 
template<typename T >
bool btk::operator== (btkSharedPtr< T > const &lhs, btkNullPtr< T >(*rhs)())
 
template<typename T >
bool btk::operator== (btkSharedPtr< const T > const &lhs, btkNullPtr< T >(*rhs)())
 
template<typename T >
bool btk::operator== (btkNullPtr< T >(*lhs)(), btkSharedPtr< T > const &rhs)
 
template<typename T >
bool btk::operator== (btkNullPtr< T >(*lhs)(), btkSharedPtr< const T > rhs)
 

Detailed Description

Common is the base of BTK. It contains required classes by others modules.

This modules corresponds to the library BTKCommon

Macro Definition Documentation

#define btkNullPtr   btk::NullPtr

Macro to be consistent with the API and more specificaly with btkSharedPtr.

#define btkSharedPtr   std::tr1::shared_ptr

Macro which uses the right shared_ptr class in BTK. To downcast a shared pointer you need to use the function static_pointer_cast.

Typedef Documentation

Collection of analog channels

Collection of events

Collection of force platform channels

typedef ForcePlatformType<1,6,6> btk::ForcePlatformType1

Represents Force platform Type-1 (6 channels: FX, FY, FZ, PX, PY, MZ)

typedef ForcePlatformType<2,6,6> btk::ForcePlatformType2

Represents Force platform Type-2 (6 channels: FX, FY, FZ, MX, MY, MZ)

typedef ForcePlatformType<3,8,8> btk::ForcePlatformType3

Represents Force platform Type-3 (8 channels: FZ1, FZ2, FZ3, FZ4, FX12, FX34, FY14, FY23)

typedef ForcePlatformType<4,6,6> btk::ForcePlatformType4

Represents Force platform Type-4 (Same as Type-2 + calibration matrix 6 by 6)

typedef ForcePlatformType<5,8,6> btk::ForcePlatformType5

Represents Force platform Type-5 (8 channels: FZ1, FZ2, FZ3, FZ4, FX12, FX34, FY14, FY23 + calibration matrix 6 (columns) by 8 (rows))

typedef ForcePlatformType<6,12,12> btk::ForcePlatformType6

Represents Force platform Type-6 (12 channels: FX[1,2,3,4], FY[1,2,3,4], FZ[1,2,3,4] + calibration matrix 12 by 12)

Collection of IMUs

typedef IMUType<1> btk::IMUType1

Represents IMU Type-1 (6D: 3 accelerometers and 3 gyroscopes)

typedef IMUType<2> btk::IMUType2

Represents IMU Type-2 (Type 1 + calibration matrix used to align accelerometers and gyroscopes on the same inertial reference frame)

Collection of points

Collection of wrenches

Function Documentation

template<typename T >
void btk::MetaDataCollapseChildrenValues ( std::vector< T > &  target,
MetaData::ConstPointer  parent,
const std::string &  baselabel,
int  targetFinalSize = -1,
const T &  blankReplacement = T() 
)

Collapse the parent children entries' values starting with the string baselabel and incrementing (for example: LABELS, LABELS2, LABELS3). The entries' values are stored in target.

The input targetFinalSize can be used to fix the number of values to collapse (by default: -1). The input blankReplacement can be used to fill the target' values which have no corresponding in the parent (By default: default object constructor).

MetaData::Pointer btk::MetaDataCreateChild ( MetaData::Pointer  parent,
const std::string &  label 
)

Creates an new MetaData or replaces its data if it already exists.

This method constructs a MetaData without value, with the label label, an empty description and is unlocked.

template<typename T >
void btk::MetaDataCreateChild ( MetaData::Pointer  parent,
const std::string &  label,
const T &  val 
)

Creates a new MetaData or replaces its data if it already exists.

This method constructs a MetaData with a single value val, with the label label, an empty description and is unlocked.

template<typename T >
void btk::MetaDataCreateChild ( MetaData::Pointer  parent,
const std::string &  label,
const std::vector< T > &  val 
)

Creates a new MetaData or replaces its data if it already exists.

This method constructs a MetaData with a 1D vector val as values, with the label label, an empty description and is unlocked. This method gives also the possibility to create more than one entry if the vector's length is greater or equal to 256. The other entries containing the extra 256 items use the same mechanism as proposed for MetaDataCollapseChildrenValues (e.g.: LABELS, LABELS2, LABELS3).

template<typename T >
void btk::MetaDataCreateChild ( MetaData::Pointer  parent,
const std::string &  label,
const std::vector< T > &  val,
int  numCol 
)

Creates a new MetaData or replaces its data if it already exists.

This method constructs an unlocked MetaData with a 2D vector val as values, an integer numCol for the number of column, a string label for the label and an empty description. This method is a recursive method which give the possibility to create more than one entry if the vector's length is greater or equal to 256 * numCol. The number of column must be lower than 256. The number of columns is written in the first dimension. The other entries containing the extra 256 items use the same mechanism as proposed for MetaDataCollapseChildrenValues (e.g.: LABELS, LABELS2, LABELS3).

template<typename T >
bool btk::operator!= ( btkSharedPtr< T > const &  lhs,
btkNullPtr< T > const &  rhs 
)
inline

Inequality operator to test if a (const) shared pointer is null or not.

Note
It is not advised to use this implementation of the operator. In pratice it will requires the instantiante a NullPtr object which will be then copied by reference.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // A btk::NullPtr object is instanciated in the following condition.
* if (an != btk::Analog::Null())
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator!= ( btkSharedPtr< const T > const &  lhs,
btkNullPtr< T > const &  rhs 
)
inline

Inequality operator to test if a (const) shared pointer is null or not.

Note
It is not advised to use this implementation of the operator. In pratice it will requires the instantiante a NullPtr object which will be then copied by reference.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // A btk::NullPtr object is instanciated in the following condition.
* if (an != btk::Analog::Null())
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator!= ( btkNullPtr< T > const &  lhs,
btkSharedPtr< T > const &  rhs 
)
inline

Inequality operator to test if a (const) shared pointer is null or not.

Note
It is not advised to use this implementation of the operator. In pratice it will requires the instantiante a NullPtr object which will be then copied by reference.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // A btk::NullPtr object is instanciated in the following condition.
* if (btk::Analog::Null() != an)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator!= ( btkNullPtr< T > const &  lhs,
btkSharedPtr< const T >  rhs 
)
inline

Inequality operator to test if a (const) shared pointer is null or not.

Note
It is not advised to use this implementation of the operator. In pratice it will requires the instantiante a NullPtr object which will be then copied by reference.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // A btk::NullPtr object is instanciated in the following condition.
* if (btk::Analog::Null() != an)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator!= ( btkSharedPtr< T > const &  lhs,
btkNullPtr< T >(*)()  rhs 
)
inline

Inequality operator to test if a (const) shared pointer is null or not.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // No btk::NullPtr object is instanciated in the following condition.
* if (an != btk::Analog::Null)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator!= ( btkSharedPtr< const T > const &  lhs,
btkNullPtr< T >(*)()  rhs 
)
inline

Inequality operator to test if a (const) shared pointer is null or not.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // No btk::NullPtr object is instanciated in the following condition.
* if (an != btk::Analog::Null)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator!= ( btkNullPtr< T >(*)()  lhs,
btkSharedPtr< T > const &  rhs 
)
inline

Inequality operator to test if a (const) shared pointer is null or not.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // No btk::NullPtr object is instanciated in the following condition.
* if (btk::Analog::Null != an)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator!= ( btkNullPtr< T >(*)()  lhs,
btkSharedPtr< const T > const &  rhs 
)
inline

Inequality operator to test if a (const) shared pointer is null or not.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // No btk::NullPtr object is instanciated in the following condition.
* if (btk::Analog::Null != an)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator== ( btkSharedPtr< T > const &  lhs,
btkNullPtr< T > const &  rhs 
)
inline

Equality operator to test if a (const) shared pointer is null or not.

Note
It is not advised to use this implementation of the operator. In pratice it will requires the instantiante a NullPtr object which will be then copied by reference.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // A btk::NullPtr object is instanciated in the following condition.
* if (an == btk::Analog::Null())
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator== ( btkSharedPtr< const T > const &  lhs,
btkNullPtr< T > const &  rhs 
)
inline

Equality operator to test if a (const) shared pointer is null or not.

Note
It is not advised to use this implementation of the operator. In pratice it will requires the instantiante a NullPtr object which will be then copied by reference.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // A btk::NullPtr object is instanciated in the following condition.
* if (an == btk::Analog::Null())
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator== ( btkNullPtr< T > const &  lhs,
btkSharedPtr< T > const &  rhs 
)
inline

Equality operator to test if a (const) shared pointer is null or not.

Note
It is not advised to use this implementation of the operator. In pratice it will requires the instantiante a NullPtr object which will be then copied by reference.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // A btk::NullPtr object is instanciated in the following condition.
* if (btk::Analog::Null() == an)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator== ( btkNullPtr< T > const &  lhs,
btkSharedPtr< const T >  rhs 
)
inline

Equality operator to test if a (const) shared pointer is null or not.

Note
It is not advised to use this implementation of the operator. In pratice it will requires the instantiante a NullPtr object which will be then copied by reference.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // A btk::NullPtr object is instanciated in the following condition.
* if (btk::Analog::Null() == an)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator== ( btkSharedPtr< T > const &  lhs,
btkNullPtr< T >(*)()  rhs 
)
inline

Equality operator to test if a (const) shared pointer is null or not.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // No btk::NullPtr object is instanciated in the following condition.
* if (an == btk::Analog::Null)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator== ( btkSharedPtr< const T > const &  lhs,
btkNullPtr< T >(*)()  rhs 
)
inline

Equality operator to test if a (const) shared pointer is null or not.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // No btk::NullPtr object is instanciated in the following condition.
* if (an == btk::Analog::Null)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator== ( btkNullPtr< T >(*)()  lhs,
btkSharedPtr< T > const &  rhs 
)
inline

Equality operator to test if a (const) shared pointer is null or not.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // No btk::NullPtr object is instanciated in the following condition.
* if (btk::Analog::Null == an)
* {
* // Do whatever
* }
*
template<typename T >
bool btk::operator== ( btkNullPtr< T >(*)()  lhs,
btkSharedPtr< const T >  rhs 
)
inline

Equality operator to test if a (const) shared pointer is null or not.

Example

* // Variable an is a btk::Analog::(Const)Pointer object.
* // No btk::NullPtr object is instanciated in the following condition.
* if (btk::Analog::Null == an)
* {
* // Do whatever
* }
*