BTK
0.3dev.0
Open-source library to visualize/process biomechanical data
|
Writer of acquisition data into ASCII/Text file. More...
Public Types | |
typedef btkSharedPtr< const ASCIIFileWriter > | ConstPointer |
typedef btkSharedPtr < ASCIIFileWriter > | 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 | |
const std::string & | GetFilename () const |
const int * | GetFramesOfInterest () const |
void | GetFramesOfInterest (int &ff, int &lf) const |
Acquisition::Pointer | GetInput () |
const std::string & | GetSeparator () const |
void | SetFilename (const std::string &filename) |
void | SetFramesOfInterest (int ff=-1, int lf=-1) |
void | SetInput (Acquisition::Pointer input) |
void | SetSeparator (const std::string &sep) |
virtual | ~ASCIIFileWriter () |
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 | |
ASCIIFileWriter () | |
virtual void | GenerateData () |
virtual DataObject::Pointer | MakeOutput (int idx) |
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 |
Writer of acquisition data into ASCII/Text file.
Export data of events, points and analog channels to ASCII/Text file.
The format in the file is the following
The first column for the points and the analogs correspond to the time of the acquisition relative to the frame one.
You can specify the separator between values with the method SetSeparator(). By default, the separator is set to comma (,).
You can export only a subset of the acquisition by specifying the frames of interest using the method SetFramesOfInterest().
There is some options in this class enabled/disabled by using the metadata of the given input. This writer check if the metadata BTK_ASCII_EXPORT_OPTIONS exists and the check for its children. The used children metadata are:
Smart pointer associated with a const ASCIIFileWriter object.
Smart pointer associated with an ASCIIFileWriter object.
|
inlinevirtual |
Empty destructor.
|
protected |
Constructor. Sets the number of outputs equal to one. No input. Separator set to common (,).
|
protectedvirtual |
Create STL files based on the given file prefix (see SetFilePrefix()) and fill them with the given acquisition (see SetInputAcquisition()) and the given mesh (see SetInputMesh()). You can also set the frames to extract using the method SetFramesOfInterest().
Implements btk::ProcessObject.
|
inline |
Gets the filename of the file to read.
|
inline |
Returns the frames of interest.
|
inline |
Returns the frames of interest.
|
inline |
Returns the Acquisition used to create the text files.
Returns the Acquisition to export to an ASCII file.
|
inline |
Gets the string used to separate the values between them.
|
protectedvirtual |
Whatever the specified index, this method creates an Acquisition object
Implements btk::ProcessObject.
|
inlinestatic |
Creates a ASCIIFileWriter process
void btk::ASCIIFileWriter::SetFilename | ( | const std::string & | filename | ) |
Specifies the file to read. This is forwarded to the IO instance.
void btk::ASCIIFileWriter::SetFramesOfInterest | ( | int | ff = -1 , |
int | lf = -1 |
||
) |
Sets the frames of interest to export. Setting ff to -1 means you start from the first frame of the acquisition. Setting lf to -1 means you use the last frame of the acquisition.
|
inline |
Sets the Acquisition used to create the text files.
Sets the Acquisition to export to an ASCII file.
void btk::ASCIIFileWriter::SetSeparator | ( | const std::string & | sep | ) |
Sets the string used to separate the values between them.