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

Extract a subpart of the acquisition. More...

Public Member Functions

def GetExtractionOption
 
def GetFramesIndex
 
def GetInput
 
def GetInputNumber
 
def GetOutput
 
def GetOutputNumber
 
def GetTimestamp
 
def GetValidInputNumber
 
def ResetState
 
def SetExtractionOption
 
def SetFramesIndex
 
def SetInput
 
def Update
 

Static Public Attributes

 All = _btk.btkSubAcquisitionFilter_All
 
 AnalogsOnly = _btk.btkSubAcquisitionFilter_AnalogsOnly
 
 EventsOnly = _btk.btkSubAcquisitionFilter_EventsOnly
 
 PointsOnly = _btk.btkSubAcquisitionFilter_PointsOnly
 

Detailed Description

Extract a subpart of the acquisition.

Detect heel strike and toe-off events during gait from vertical ground reaction wrench.

To fill exactly the detected events, you need to give some extra information to this filter:
 - The value of the first frame of the acquisition where the force platform data were extracted (to be added to the detected frames' index).
 - The acquisition's frequency used by the force platform data (to calculate the time related to the event's frame).
 - The subject's label (optional).
All these informations have to be given to the method SetAcquisitionInformation().

To detect the heel strike and toe-off events you can set some options:
 - The threshold value used to known when an event occurred (see SetThresholdValue()).
 - The mapping between the force plates and the side (left, right, general)  of the events detected (see SetForceplateContextMapping()).
 - The region of interest where to detect the events (see SetRegionOfInterest()).

The algorithm works as following: Based on the region of interest, the maximum is searched. 
If the maximum is higher than the threshold set, then the frame of the value on the left side of 
this maximum lower than the threshold is used to create a heel strike event. On the other hand, 
the value on the right side of the maximum lower than the threshold is used to create a toe-off event.

Note: The design of this class is not perfect as it cannot be used in a pipeline without 
to update the part before to know some acquisition's information (first frame, sample frequency, subject's name).
This class (or the pipeline mechanism) could be modified in a future version of BTK to make up this problem.

Member Function Documentation

def btk.btkSubAcquisitionFilter.GetExtractionOption (   self,   args  )
GetExtractionOption(self) -> btkSubAcquisitionFilter::ExtractionOption
GetExtractionOption(self, ids) -> btkSubAcquisitionFilter::ExtractionOption
def btk.btkSubAcquisitionFilter.GetFramesIndex (   self )
GetFramesIndex(self) -> int const *

Returns the index of the frames to extract. The returned array contains two values, where the first one is the low bound while the second value is the high bound.
The index starts from 0 and correspond to the first frame of the acquisition. By default, all the frames are extracted and boundaries are set to -1.
def btk.btkSubAcquisitionFilter.GetInput (   self )
GetInput(self) -> btkAcquisition

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

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

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

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

Returns the timestamp of the object.
def btk.btkSubAcquisitionFilter.GetValidInputNumber (   self )
GetValidInputNumber(self) -> int

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

Reset the state of the process. Usefull when an exception was thrown during the generation of the data.
def btk.btkSubAcquisitionFilter.SetExtractionOption (   self,   args  )
SetExtractionOption(self, option)
SetExtractionOption(self, option, ids)
def btk.btkSubAcquisitionFilter.SetFramesIndex (   self,   args  )
SetFramesIndex(self, lb=-1, ub=-1)
SetFramesIndex(self, lb=-1)
SetFramesIndex(self)

Set the boundaries of the frames to extract. The default values (-1) reset the extraction to take all the frames.
def btk.btkSubAcquisitionFilter.SetInput (   self,   args  )
SetInput(self, btkAcquisition)

Sets the input required with this process.
def btk.btkSubAcquisitionFilter.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.btkSubAcquisitionFilter.All = _btk.btkSubAcquisitionFilter_All
static

Extract all the content of the acquisiton (points, analog, events)

btk.btkSubAcquisitionFilter.AnalogsOnly = _btk.btkSubAcquisitionFilter_AnalogsOnly
static

Extract only data in the analog channels.

btk.btkSubAcquisitionFilter.EventsOnly = _btk.btkSubAcquisitionFilter_EventsOnly
static

Extract only data int the events.

btk.btkSubAcquisitionFilter.PointsOnly = _btk.btkSubAcquisitionFilter_PointsOnly
static

Extract only data in the points.