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

Contains the data related to a biomechanical acquisition. More...

Public Member Functions

def AppendAnalog
 
def AppendEvent
 
def AppendPoint
 
def BeginAnalog
 
def BeginEvent
 
def BeginMetaData
 
def BeginPoint
 
def ClearAnalogs
 
def ClearEvents
 
def ClearPoints
 
def Clone
 
def EndAnalog
 
def EndEvent
 
def EndMetaData
 
def EndPoint
 
def FindAnalog
 
def FindEvent
 
def FindPoint
 
def GetAnalog
 
def GetAnalogFrameNumber
 
def GetAnalogFrequency
 
def GetAnalogNumber
 
def GetAnalogResolution
 
def GetAnalogs
 
def GetDuration
 
def GetEvent
 
def GetEventNumber
 
def GetEvents
 
def GetFirstFrame
 
def GetLastFrame
 
def GetMaxInterpolationGap
 
def GetMetaData
 
def GetNumberAnalogSamplePerFrame
 
def GetPoint
 
def GetPointFrameNumber
 
def GetPointFrequency
 
def GetPointNumber
 
def GetPoints
 
def GetPointUnit
 
def GetTimestamp
 
def Init
 
def IsEmptyAnalog
 
def IsEmptyEvent
 
def IsEmptyPoint
 
def RemoveAnalog
 
def RemoveEvent
 
def RemovePoint
 
def Reset
 
def Resize
 
def ResizeAnalogNumber
 
def ResizeFrameNumber
 
def ResizeFrameNumberFromEnd
 
def ResizePointNumber
 
def SetAnalog
 
def SetAnalogNumber
 
def SetAnalogResolution
 
def SetAnalogs
 
def SetEvent
 
def SetEventNumber
 
def SetEvents
 
def SetFirstFrame
 
def SetMaxInterpolationGap
 
def SetMetaData
 
def SetPoint
 
def SetPointFrequency
 
def SetPointNumber
 
def SetPoints
 
def SetPointUnit
 
def Update
 

Static Public Attributes

 Bit10 = _btk.btkAcquisition_Bit10
 
 Bit12 = _btk.btkAcquisition_Bit12
 
 Bit14 = _btk.btkAcquisition_Bit14
 
 Bit16 = _btk.btkAcquisition_Bit16
 
 Bit8 = _btk.btkAcquisition_Bit8
 

Detailed Description

Contains the data related to a biomechanical acquisition.

Contains the data related to a biomechanical acquisition.

A biomechanical acquisition can contains:
  - 3D data (makers, points, forces, moments, ...) ;
  - analog channels (force platform, emg, ...) ;
  - events
  - acquisition's setup ;
  - subject's informations.
  
By default, the first frame is set to 1, the analog resolution is set to 12-bit, the maximum interpolation gap to 10 frames and the units are:
 - Marker: millimeters ;
 - Angle: degrees ;
 - Force: newtons ;
 - Moment: millimeter-newtons ;
 - Power: watts ;
 - Scalar: millimeters ;
 - Reaction: (nothing).
 
After the creation of the acquisition, you should use the Init() method to populate the acquisition. 
 
The member used for the maximum interpolation gap is only for information and is not used in the acquisition. It could be used later in a filter to fill gap.

The analog resolution can be set to the following values:
 - btk.btkAcquisition.Bit8 ;
 - btk.btkAcquisition.Bit10 ;
 - btk.btkAcquisition.Bit12 ;
 - btk.btkAcquisition.Bit14 ;
 - btk.btkAcquisition.Bit16.

Member Function Documentation

def btk.btkAcquisition.AppendAnalog (   self,   args  )
AppendAnalog(self, btkAnalog)

Append the analog channel ac in the acquisition This method also resizes the frame number of the inserted analog channel if necessary.
def btk.btkAcquisition.AppendEvent (   self,   args  )
AppendEvent(self, btkEvent)

Appends the given event in the acquisition.
def btk.btkAcquisition.AppendPoint (   self,   args  )
AppendPoint(self, btkPoint)

Convenient method to append a point in the acquisition. This method also resizes the frame number of the inserted point if necessary.
def btk.btkAcquisition.BeginAnalog (   self )
BeginAnalog(self) -> btkAnalogCollectionIterator

Returns an iterator to the beginning of the list of analog channels.
def btk.btkAcquisition.BeginEvent (   self )
BeginEvent(self) -> btkEventCollectionIterator

Returns an iterator to the beginning of the list of events.
def btk.btkAcquisition.BeginMetaData (   self )
BeginMetaData(self) -> btkMetaDataIterator

Returns an iterator to the beginning of the list of metadata.
def btk.btkAcquisition.BeginPoint (   self )
BeginPoint(self) -> btkPointCollectionIterator

Returns an iterator to the beginning of the list of points.
def btk.btkAcquisition.ClearAnalogs (   self )
ClearAnalogs(self)

Clear analogs channels.
def btk.btkAcquisition.ClearEvents (   self )
ClearEvents(self)

Clear events.
def btk.btkAcquisition.ClearPoints (   self )
ClearPoints(self)

Clear points.
def btk.btkAcquisition.Clone (   self )
Clone(self) -> btkAcquisition

Deep copy of the object
def btk.btkAcquisition.EndAnalog (   self )
EndAnalog(self) -> btkAnalogCollectionIterator

Returns an iterator just past the last analog channel.
def btk.btkAcquisition.EndEvent (   self )
EndEvent(self) -> btkEventCollectionIterator

Returns a const iterator just past the last event.
def btk.btkAcquisition.EndMetaData (   self )
EndMetaData(self) -> btkMetaDataIterator

Returns an iterator just past the last metadata.
def btk.btkAcquisition.EndPoint (   self )
EndPoint(self) -> btkPointCollectionIterator

Returns an iterator just past the last point.
def btk.btkAcquisition.FindAnalog (   self,   args  )
FindAnalog(self, string) -> btkAnalogIterator

Finds the analog channel with the proposed label and returns the iterator associated with it.
If no analog channel has the given label, an iterator pointing to the end of the collection is returned.
def btk.btkAcquisition.FindEvent (   self,   args  )
FindEvent(self, string) -> btkEventIterator

Finds the event with the proposed label and returns the iterator associated with it.
If no event has the given label, an iterator pointing to the end of the collection is returned.
def btk.btkAcquisition.FindPoint (   self,   args  )
FindPoint(self, string) -> btkPointIterator

Finds the point with the proposed label and returns the iterator associated with it.
If no point has the given label, an iterator pointing to the end of the collection is returned.
def btk.btkAcquisition.GetAnalog (   self,   args  )
GetAnalog(self, int) -> btkAnalog
GetAnalog(self, string) -> btkAnalog

Gets the analog channel at the given index or label. If no Analog exists, then an exception is thrown.
def btk.btkAcquisition.GetAnalogFrameNumber (   self )
GetAnalogFrameNumber(self) -> int

Returns the number of frames for the analog channels.
def btk.btkAcquisition.GetAnalogFrequency (   self )
GetAnalogFrequency(self) -> double

Returns the analogs sample rate.
def btk.btkAcquisition.GetAnalogNumber (   self )
GetAnalogNumber(self) -> int

Returns the number of analog channels.
def btk.btkAcquisition.GetAnalogResolution (   self )
GetAnalogResolution(self) -> btk.btkAcquisition.AnalogResolution

Returns the analog resolution.
def btk.btkAcquisition.GetAnalogs (   self )
GetAnalogs(self) -> btkAnalogCollection

Returns the collection of analog channels.
def btk.btkAcquisition.GetDuration (   self )
GetDuration(self) -> double

Returns the duration of the acquisition. The duration is computed as the multiplication of the points' frequency with the points frame number.
def btk.btkAcquisition.GetEvent (   self,   args  )
GetEvent(self, int) -> btkEvent

Gets the event at the given index.
def btk.btkAcquisition.GetEventNumber (   self )
GetEventNumber(self) -> int

Returns the number of events.
def btk.btkAcquisition.GetEvents (   self )
GetEvents(self) -> btkEventCollection

Returns the collection of events.
def btk.btkAcquisition.GetFirstFrame (   self )
GetFirstFrame(self) -> int

Return the first frame index of the acquisition.
def btk.btkAcquisition.GetLastFrame (   self )
GetLastFrame(self) -> int

Returns the last frame index of the acquisition base on the first frame index and the frame number.
def btk.btkAcquisition.GetMaxInterpolationGap (   self )
GetMaxInterpolationGap(self) -> int

Gets the maximum gap length that any interpolation method would fill for the 3D point data.
Warning: Only for information. Could be use later by a filter to fill gap 3D trajectories.
def btk.btkAcquisition.GetMetaData (   self )
GetMetaData(self) -> btkMetaData

Returns the metadata.
def btk.btkAcquisition.GetNumberAnalogSamplePerFrame (   self )
GetNumberAnalogSamplePerFrame(self) -> int

Returns the number of analog sample (acquired by each channel) per point frame.
def btk.btkAcquisition.GetPoint (   self,   args  )
GetPoint(self, int) -> btkPoint
GetPoint(self, string) -> btkPoint

Gets the point at the given index or label. If no Point exists, then an exception is thrown.
def btk.btkAcquisition.GetPointFrameNumber (   self )
GetPointFrameNumber(self) -> int

Returns the number of frames for the points.
def btk.btkAcquisition.GetPointFrequency (   self )
GetPointFrequency(self) -> double

Returns the point's frequency.
def btk.btkAcquisition.GetPointNumber (   self )
GetPointNumber(self) -> int

Returns the number of points.
def btk.btkAcquisition.GetPoints (   self )
GetPoints(self) -> btkPointCollection

Returns the collection of points.
def btk.btkAcquisition.GetPointUnit (   self,   args  )
GetPointUnit(self) -> std::string const
GetPointUnit(self, arg2) -> std::string const

Returns the unit for points which have the given type.
def btk.btkAcquisition.GetTimestamp (   self )
GetTimestamp(self) -> unsigned long

Returns the timestamp of the object.
def btk.btkAcquisition.Init (   self,   args  )
Init(self, pointNumber, frameNumber, analogNumber = 0, , analogSampleNumberPerPointFrame = 1)
Init(self, pointNumber, frameNumber, analogNumber = 0)
Init(self, pointNumber, frameNumber)

Initialize the acquisition with the given number of point which have each the given number of frames.
You can set also the number of analog channels and their number of frames corresponds to the given integer factor multiplied by the number of frames for the points.
This method label added points and analog channels using the string 'uname*' concatenated with the index of the channel.
def btk.btkAcquisition.IsEmptyAnalog (   self )
IsEmptyAnalog(self) -> bool

Checks if the analogs' list is empty.
def btk.btkAcquisition.IsEmptyEvent (   self )
IsEmptyEvent(self) -> bool

Checks if the events' list is empty.
def btk.btkAcquisition.IsEmptyPoint (   self )
IsEmptyPoint(self) -> bool

Checks if the points' list is empty.
def btk.btkAcquisition.RemoveAnalog (   self,   args  )
RemoveAnalog(self, string)
RemoveAnalog(self, int)
RemoveAnalog(self, btkAnalogCollectionIterator) -> btkAnalogCollectionIterator

Convenient method to delete an analog channel from the acquisition.
def btk.btkAcquisition.RemoveEvent (   self,   args  )
RemoveAnalog(self, int)
RemoveEvent(self, btkEventCollectionIterator) -> btkEventCollectionIterator

Removes the event associated with the given index or the given iterator.
def btk.btkAcquisition.RemovePoint (   self,   args  )
RemovePoint(self, string)
RemovePoint(self, int)
RemovePoint(self, btkPointCollectionIterator) -> btkPointCollectionIterator

Convenient method to delete a point from the acquisition.
def btk.btkAcquisition.Reset (   self )
Reset(self)

Resets the acquisition as an empty acquisition.
To re-populate this acquisition, you need to re-use the Init() method to set the point and analog number and their frame number.
def btk.btkAcquisition.Resize (   self,   args  )
Resize(self, pointNumber, frameNumber, analogNumber = 0, , analogSampleNumberPerPointFrame = 1)
Resize(self, pointNumber, frameNumber, analogNumber = 0)
Resize(self, pointNumber, frameNumber)

Resize the acquisition. Same as the method Init(), but does not label added points and analog channels
def btk.btkAcquisition.ResizeAnalogNumber (   self,   args  )
ResizeAnalogNumber(self, int)

Resize the number of analog channels.
def btk.btkAcquisition.ResizeFrameNumber (   self,   args  )
ResizeFrameNumber(self, int)

Resize the number of frames.
def btk.btkAcquisition.ResizeFrameNumberFromEnd (   self,   args  )
ResizeFrameNumberFromEnd(self, int)

Resize the number of frames by adding new (or removing) frames at the beginning of the acquisition and set automatically the new first frame index.
def btk.btkAcquisition.ResizePointNumber (   self,   args  )
ResizePointNumber(self, int)

Resize the number of points.
def btk.btkAcquisition.SetAnalog (   self,   args  )
SetAnalog(self, int, btkAnalog)

Sets the analog channel at the given index by the content of the given analog channel.
def btk.btkAcquisition.SetAnalogNumber (   self,   args  )
SetAnalogNumber(self, int)

Sets the number of analog channels.
def btk.btkAcquisition.SetAnalogResolution (   self,   args  )
SetAnalogResolution(self, btk.btkAcquisition.AnalogResolution)

Sets the analog resolution.
def btk.btkAcquisition.SetAnalogs (   self,   args  )
SetAnalogs(self, btkAnalogCollection)

Sets analog channels for this acquisition.
def btk.btkAcquisition.SetEvent (   self,   args  )
SetEvent(self, int, btkEvent)

Sets the content of event at the given index.
def btk.btkAcquisition.SetEventNumber (   self,   args  )
SetEventNumber(self, int)

Sets the number of events.
def btk.btkAcquisition.SetEvents (   self,   args  )
SetEvents(self, btkEventCollection)

Sets events for this acquisition.
def btk.btkAcquisition.SetFirstFrame (   self,   args  )
SetFirstFrame(self, int, adaptEvents)
SetFirstFrame(self, int)

Sets the first frame index. If the third argument is given and set to true, then events' frame/time will be shifted by the difference between the new first frame and the old one.
def btk.btkAcquisition.SetMaxInterpolationGap (   self,   args  )
SetMaxInterpolationGap(self, int)

Sets the maximum gap length that any interpolation method would fill for the 3D point data.
Warning: Only for information. Could be use later by a filter to fill gap 3D trajectories.
def btk.btkAcquisition.SetMetaData (   self,   args  )
SetMetaData(self, btkMetaData)

Sets the metadata of the acquisition.
def btk.btkAcquisition.SetPoint (   self,   args  )
SetPoint(self, int, btkPoint)

Sets the content of a point at the given index.
def btk.btkAcquisition.SetPointFrequency (   self,   args  )
SetPointFrequency(self, double)

Sets the points sample rate.
def btk.btkAcquisition.SetPointNumber (   self,   args  )
SetPointNumber(self, int)

Sets the number of points.
def btk.btkAcquisition.SetPoints (   self,   args  )
SetPoints(self, btkPointCollection)

Sets points for this acquisition.
def btk.btkAcquisition.SetPointUnit (   self,   args  )
SetPointUnit(self, units="mm")
SetPointUnit(self)
SetPointUnit(self, arg2, arg3)

Sets the point's unit for the given point's type. The type btk.btkPoint.Reaction cannot have any unit. You cannot set it.
def btk.btkAcquisition.Update (   self )
Update(self)

Updates the ProcessObject associated with this DataObject.

Member Data Documentation

btk.btkAcquisition.Bit10 = _btk.btkAcquisition_Bit10
static

10-bit resolution for the analog to digital converter (ADC).

btk.btkAcquisition.Bit12 = _btk.btkAcquisition_Bit12
static

12-bit resolution for the analog to digital converter (ADC).

btk.btkAcquisition.Bit14 = _btk.btkAcquisition_Bit14
static

14-bit resolution for the analog to digital converter (ADC).

btk.btkAcquisition.Bit16 = _btk.btkAcquisition_Bit16
static

16-bit resolution for the analog to digital converter (ADC).

btk.btkAcquisition.Bit8 = _btk.btkAcquisition_Bit8
static

8-bit resolution for the analog to digital converter (ADC).