BTK  0.3dev.0
Open-source library to visualize/process biomechanical data
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
btk::AcquisitionUnitConverter Class Reference

Convert the units of the given input for points and analog channels. More...

#include <btkAcquisitionUnitConverter.h>

Inheritance diagram for btk::AcquisitionUnitConverter:
Inheritance graph
[legend]

Public Types

typedef btkSharedPtr< const
AcquisitionUnitConverter
ConstPointer
 
typedef btkSharedPtr
< AcquisitionUnitConverter
Pointer
 
enum  Unit {
  Length = 0, Angle = 1, Force = 2, Moment = 3,
  Power = 4
}
 
- Public Types inherited from btk::ProcessObject
typedef btkSharedPtr< const
ProcessObject
ConstPointer
 
typedef btkSharedPtr
< ProcessObject
Pointer
 
- Public Types inherited from btk::Object
typedef btkSharedPtr< const
Object
ConstPointer
 
typedef btkSharedPtr< ObjectPointer
 

Public Member Functions

Acquisition::Pointer GetInput ()
 
Acquisition::Pointer GetOutput ()
 
const std::string & GetUnit (Unit u)
 
void SetInput (Acquisition::Pointer input)
 
void SetUnit (Unit u, const std::string &s)
 
- Public Member Functions inherited from btk::ProcessObject
int GetInputNumber () const
 
int GetOutputNumber () const
 
int GetValidInputNumber () const
 
void ResetState ()
 
void Update ()
 
- Public Member Functions inherited from btk::Object
unsigned long int GetTimestamp () const
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 AcquisitionUnitConverter ()
 
virtual void GenerateData ()
 
Acquisition::Pointer GetInput (int idx)
 
Acquisition::Pointer GetOutput (int idx)
 
virtual DataObject::Pointer MakeOutput (int idx)
 
- Protected Member Functions inherited from btk::ProcessObject
int GetInputIndex (DataObject::Pointer input)
 
DataObject::Pointer GetNthInput (int idx)
 
DataObject::ConstPointer GetNthInput (int idx) const
 
DataObject::Pointer GetNthOutput (int idx)
 
DataObject::ConstPointer GetNthOutput (int idx) const
 
int GetOutputIndex (DataObject::Pointer output)
 
bool IsModified () const
 
void Modified ()
 
 ProcessObject ()
 
void SetInputNumber (int num)
 
virtual void SetNthInput (int idx, DataObject::Pointer input)
 
virtual void SetNthOutput (int idx, DataObject::Pointer output)
 
void SetOutputNumber (int num)
 
virtual ~ProcessObject ()
 
- Protected Member Functions inherited from btk::Object
 Object ()
 
 Object (const Object &toCopy)
 
virtual ~Object ()
 

Additional Inherited Members

- Protected Attributes inherited from btk::Object
unsigned long int m_Timestamp
 

Detailed Description

Convert the units of the given input for points and analog channels.

This filter can convert units for trajectory, force, moment, angle and power. The known unit for the trajectory (length) are:

Use the method AcquisitionUnitConverter::SetUnit() to select the wanted units.

By default, the data will be converted in millimeter, newton, newton by millimeter, degree and watt. Even if you could convert trajectories and moments with the desired units, it is recommended to use the same length unit (i.e. mm and Nmm or m with Nm).

Member Typedef Documentation

Smart pointer associated with a const AcquisitionUnitConverter object.

Smart pointer associated with a AcquisitionUnitConverter object.

Member Enumeration Documentation

Enums used to specify the point's type.

Enumerator
Length 

Enum value which represent the length unit.

Angle 

Enum value which represent the angle unit.

Force 

Enum value which represent the force unit.

Moment 

Enum value which represent the moment unit.

Power 

Enum value which represent the power unit.

Constructor & Destructor Documentation

btk::AcquisitionUnitConverter::AcquisitionUnitConverter ( )
protected

Constructor. Sets the number of inputs to 2 and outputs to 1.

Member Function Documentation

void btk::AcquisitionUnitConverter::GenerateData ( )
protectedvirtual

Generates the outputs' data.

Implements btk::ProcessObject.

Acquisition::Pointer btk::AcquisitionUnitConverter::GetInput ( )
inline

Gets the input registered with this process.

Acquisition::Pointer btk::AcquisitionUnitConverter::GetInput ( int  idx)
inlineprotected

Returns the input at the index idx.

Acquisition::Pointer btk::AcquisitionUnitConverter::GetOutput ( )
inline

Gets the output created with this process.

Acquisition::Pointer btk::AcquisitionUnitConverter::GetOutput ( int  idx)
inlineprotected

Gets the output created with this process at the index idx.

const std::string & btk::AcquisitionUnitConverter::GetUnit ( Unit  u)
inline

Return the string corresponding to the unit u.

DataObject::Pointer btk::AcquisitionUnitConverter::MakeOutput ( int  idx)
protectedvirtual

Creates a Acquisition::Pointer object and return it as a DataObject::Pointer.

Implements btk::ProcessObject.

static Pointer btk::AcquisitionUnitConverter::New ( )
inlinestatic

Creates a smart pointer associated with a AcquisitionUnitConverter object.

void btk::AcquisitionUnitConverter::SetInput ( Acquisition::Pointer  input)
inline

Sets the input required with this process.

void btk::AcquisitionUnitConverter::SetUnit ( Unit  u,
const std::string &  s 
)

Set the unit u with the string s.