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.btkAcquisitionUnitConverter Class Reference

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

Public Member Functions

def GetInput
 
def GetInputNumber
 
def GetOutput
 
def GetOutputNumber
 
def GetTimestamp
 
def GetUnit
 
def GetValidInputNumber
 
def ResetState
 
def SetInput
 
def SetUnit
 
def Update
 

Static Public Attributes

 Angle = _btk.btkAcquisitionUnitConverter_Angle
 
 Force = _btk.btkAcquisitionUnitConverter_Force
 
 Length = _btk.btkAcquisitionUnitConverter_Length
 
 Moment = _btk.btkAcquisitionUnitConverter_Moment
 
 Power = _btk.btkAcquisitionUnitConverter_Power
 

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:
 - meter (m);
 - decimeter (dm);
 - centimeter (cm)
 - millimeter (mm)
 - inch (in)
The known unit for the force are:
 - newton (N);
The known unit for the moment are:
 - newton by meter (Nm);
 - newton by decimeter (Ndm);
 - newton by centimeter (Ncm);
 - newton by millimeter (Nmm);
 - newton by inch (Nin);
The known unit for the angle are:
 - radian (rad);
 - degree (deg);
The known unit for the power are:
 - watt (W);
Moreover, the metadata known to be influenced by these unit (FORCE_PLATFORM, 
SEG) are also converted. The metadata POINT:*UNITS are not updated as they are not
used in BTK (instead, you can use the method btkAcquisition::GetPointUnit()).

Use the method btkAcquisitionUnitConverter::SetUnit() with the following enumeration 
value to select the wanted units:
 - btk.btkAcquisitionUnitConverter.Length
 - btk.btkAcquisitionUnitConverter.Angle
 - btk.btkAcquisitionUnitConverter.Force
 - btk.btkAcquisitionUnitConverter.Moment
 - btk.btkAcquisitionUnitConverter.Power

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 Function Documentation

def btk.btkAcquisitionUnitConverter.GetInput (   self )
GetInput(self) -> btkAcquisition

Gets the input registered with this process.
def btk.btkAcquisitionUnitConverter.GetInputNumber (   self )
GetInputNumber(self) -> int

Returns the number of inputs.
def btk.btkAcquisitionUnitConverter.GetOutput (   self )
GetOutput(self) -> btkAcquisition

Returns the output created with this process.
def btk.btkAcquisitionUnitConverter.GetOutputNumber (   self )
GetOutputNumber(self) -> int

Returns the number of outputs.
def btk.btkAcquisitionUnitConverter.GetTimestamp (   self )
GetTimestamp(self) -> unsigned long

Returns the timestamp of the object.
def btk.btkAcquisitionUnitConverter.GetUnit (   self,   args  )
GetUnit(self, btk.btkAcquisitionUnitConverter.Unit) -> string

Returns the string corresponding to the given unit
def btk.btkAcquisitionUnitConverter.GetValidInputNumber (   self )
GetValidInputNumber(self) -> int

Returns the number of inputs which are valid (i.e. not null).
def btk.btkAcquisitionUnitConverter.ResetState (   self )
ResetState(self)

Reset the state of the process. Usefull when an exception was thrown during the generation of the data.
def btk.btkAcquisitionUnitConverter.SetInput (   self,   args  )
SetInput(self, btkAcquisition)

Sets the input required with this process.
def btk.btkAcquisitionUnitConverter.SetUnit (   self,   args  )
SetUnit(self, btk.btkAcquisitionUnitConverter.Unit, string)

Set the given unit with the given string
def btk.btkAcquisitionUnitConverter.Update (   self )
Update(self)

Update the pipeline and then all the data inside. Recursive method which
 1) determines the processes to update
 2) generate the data by using the GenerateData() method.

Member Data Documentation

btk.btkAcquisitionUnitConverter.Angle = _btk.btkAcquisitionUnitConverter_Angle
static

Enum value which represent the angle unit.

btk.btkAcquisitionUnitConverter.Force = _btk.btkAcquisitionUnitConverter_Force
static

Enum value which represent the force unit.

btk.btkAcquisitionUnitConverter.Length = _btk.btkAcquisitionUnitConverter_Length
static

Enum value which represent the length unit.

btk.btkAcquisitionUnitConverter.Moment = _btk.btkAcquisitionUnitConverter_Moment
static

Enum value which represent the moment unit.

btk.btkAcquisitionUnitConverter.Power = _btk.btkAcquisitionUnitConverter_Power
static

Enum value which represent the power unit.