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::SubAcquisitionFilter Class Reference

Extract a subpart of the acquisition. More...

#include <btkSubAcquisitionFilter.h>

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

Public Types

typedef btkSharedPtr< const
SubAcquisitionFilter
ConstPointer
 
enum  ExtractionOption { All = 0, PointsOnly, AnalogsOnly, EventsOnly }
 
typedef btkSharedPtr
< SubAcquisitionFilter
Pointer
 
- 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

ExtractionOption GetExtractionOption () const
 
ExtractionOption GetExtractionOption (std::list< int > &ids) const
 
const int * GetFramesIndex () const
 
Acquisition::Pointer GetInput ()
 
Acquisition::Pointer GetOutput ()
 
void SetExtractionOption (ExtractionOption option)
 
void SetExtractionOption (ExtractionOption option, const std::list< int > &ids)
 
void SetFramesIndex (int lb=-1, int ub=-1)
 
void SetInput (Acquisition::Pointer input)
 
- 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

virtual void GenerateData ()
 
Acquisition::Pointer GetInput (int idx)
 
Acquisition::Pointer GetOutput (int idx)
 
virtual DataObject::Pointer MakeOutput (int idx)
 
 SubAcquisitionFilter ()
 
- 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

Extract a subpart of the acquisition.

By using the methods SetExtractionOption, you can specify if only the points, the analogs channels, or the events have to be extracted. In the case of the points and the analog channels, you can also specify the ids to extract.

To extract a subpart of the acquisition, you have to use the method SetFramesIndex() and give the indices to extract. The index starts from 0 and correspond to the first frame of the acquisition. By default, all the frames are extracted.

Finally, the rest of the acquisition is every time extracted. Thus, the metadata are only shallow copied, and the first frame, acquisition's frequencies, etc. remain the same.

Member Typedef Documentation

Smart pointer associated with a SubAcquisitionFilter object.

Smart pointer associated with a SubAcquisitionFilter object.

Member Enumeration Documentation

Option for the part of the acquisition to extract.

Enumerator
All 

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

PointsOnly 

Extract only data in the points.

AnalogsOnly 

Extract only data in the analog channels.

EventsOnly 

Extract only data int the events.

Constructor & Destructor Documentation

btk::SubAcquisitionFilter::SubAcquisitionFilter ( )
protected

Constructor. By default, the points, the analog channels and the events are extracted all along the acquisition. The metadata are also added in the result.

Member Function Documentation

void btk::SubAcquisitionFilter::GenerateData ( )
protectedvirtual

Generates the outputs' data.

Implements btk::ProcessObject.

ExtractionOption btk::SubAcquisitionFilter::GetExtractionOption ( ) const
inline

Returns the content of the given acquisition to extract.

ExtractionOption btk::SubAcquisitionFilter::GetExtractionOption ( std::list< int > &  ids) const
inline

Returns the content of the given acquisition to extract, but also the given IDs.

const int * btk::SubAcquisitionFilter::GetFramesIndex ( ) const
inline

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.

WrenchCollection::Pointer btk::SubAcquisitionFilter::GetInput ( )
inline

Gets the input registered with this process.

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

Returns the input at the index idx.

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

Gets the output created with this process.

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

Returns the output at the index idx.

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

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

Implements btk::ProcessObject.

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

Creates a smart pointer associated with a SubAcquisitionFilter object.

void btk::SubAcquisitionFilter::SetExtractionOption ( ExtractionOption  option)

Sets the content in the given acquisition to extract.

void btk::SubAcquisitionFilter::SetExtractionOption ( ExtractionOption  option,
const std::list< int > &  ids 
)

Set the content to extract by specifying the items' ID.

Only the options PointsOnly and AnalogsOnly are accepted. If the option All or EventsOnly is given to this method, then a warning is displayed and the command is not taken into account.

void btk::SubAcquisitionFilter::SetFramesIndex ( int  lb = -1,
int  ub = -1 
)

Set the boundaries of the frames to extract. The default values (-1) reset the extraction to take all the frames.

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

Sets the input required with this process.