BTK
0.3dev.0
Open-source library to visualize/process biomechanical data
|
Extract a subpart of the acquisition. More...
#include <btkSubAcquisitionFilter.h>
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< Object > | Pointer |
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 |
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.
Smart pointer associated with a SubAcquisitionFilter object.
Smart pointer associated with a SubAcquisitionFilter object.
|
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.
|
protectedvirtual |
Generates the outputs' data.
Implements btk::ProcessObject.
|
inline |
Returns the content of the given acquisition to extract.
|
inline |
Returns the content of the given acquisition to extract, but also the given IDs.
|
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.
|
inline |
Gets the input registered with this process.
|
inlineprotected |
Returns the input at the index idx.
|
inline |
Gets the output created with this process.
|
inlineprotected |
Returns the output at the index idx.
|
protectedvirtual |
Creates an Acquisition:Pointer object and return it as a DataObject::Pointer.
Implements btk::ProcessObject.
|
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.
|
inline |
Sets the input required with this process.