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

Merges or concatenates two or more btk::Acquisition objects into a single new one. More...

#include <btkMergeAcquisitionFilter.h>

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

Public Types

enum  { KeepAllFrames = 0, KeepFromHighestFirstFrame }
 
typedef btkSharedPtr< const
MergeAcquisitionFilter
ConstPointer
 
typedef btkSharedPtr
< MergeAcquisitionFilter
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

int GetFirstFrameRule () const
 
Acquisition::Pointer GetInput (int idx)
 
Acquisition::Pointer GetOutput ()
 
void SetFirstFrameRule (int rule)
 
void SetInput (int idx, 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 GetOutput (int idx)
 
virtual DataObject::Pointer MakeOutput (int idx)
 
 MergeAcquisitionFilter ()
 
- 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

Merges or concatenates two or more btk::Acquisition objects into a single new one.

The difference between the merging or the concatenating depends of the acquisitions' informations.

If the acquisitions are exactly the same (same label for points and analog channels) and the first frame of the n+1th acquisition corresponds to the last frame of the nth acquisition, then the acquisitions are merged, otherwise, the data are concatenated. Merged acquisitions means that the output will have the same number of points, analog channels, events than each output but the number of frames corresponds to the sum of the input's frame number.

Rules to merge/concatenate acquisitions are:

Actions during the merging/concatenation:

Moreover, you can set a rule to keep only the data from the higher or the lower first frame. Use the method SetFirstFrameRule() with the values KeepAllFrames or KeepFromHighestFirstFrame.

Member Typedef Documentation

Smart pointer associated with a const MergeAcquisitionFilter object.

Smart pointer associated with a MergeAcquisitionFilter object.

Member Enumeration Documentation

anonymous enum
Enumerator
KeepAllFrames 

Option to keep all the frames of the given acquisitions during the merging process

KeepFromHighestFirstFrame 

Option to keep only the frames starting from the highest first frame extracted from the given acquisitions.

Constructor & Destructor Documentation

btk::MergeAcquisitionFilter::MergeAcquisitionFilter ( )
protected

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

Member Function Documentation

void btk::MergeAcquisitionFilter::GenerateData ( )
protectedvirtual

Generates the outputs' data.

Implements btk::ProcessObject.

int btk::MergeAcquisitionFilter::GetFirstFrameRule ( ) const
inline

Returns the rule for the first frame kept.

Two rules are available:

  • KeepAllFrames: Use the lower first frame;
  • KeepFromHighestFirstFrame: Use the higher first frame.
Acquisition::Pointer btk::MergeAcquisitionFilter::GetInput ( int  idx)
inline

Gets the input registered with this process at the index idx.

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

Gets the output created with this process.

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

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

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

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

Implements btk::ProcessObject.

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

Creates a smart pointer associated with a MergeAcquisitionFilter object.

void btk::MergeAcquisitionFilter::SetFirstFrameRule ( int  rule)

Sets the rule for the first frame kept.

Two rules are available:

  • KeepAllFrames: Use the lower first frame;
  • KeepFromHighestFirstFrame: Use the higher first frame.
void btk::MergeAcquisitionFilter::SetInput ( int  idx,
Acquisition::Pointer  input 
)
inline

Sets the input required with this process at the index idx.