BTK
0.3dev.0
Open-source library to visualize/process biomechanical data
|
Interface to read/write C3D files. More...
#include <btkC3DFileIO.h>
Public Types | |
enum | { CompatibleVicon = AcquisitionFileIO::FileFormatOption } |
enum | AnalogIntegerFormat { Signed, Unsigned } |
typedef btkSharedPtr< const C3DFileIO > | ConstPointer |
typedef btkSharedPtr< C3DFileIO > | Pointer |
Public Types inherited from btk::AcquisitionFileIO | |
enum | ByteOrder { OrderNotApplicable = 0, IEEE_LittleEndian, VAX_LittleEndian, IEEE_BigEndian } |
typedef btkSharedPtr< const AcquisitionFileIO > | ConstPointer |
enum | FileType { TypeNotApplicable, ASCII, Binary } |
enum | InternalsUpdateOption { UpdateNotApplicable = 0, NoUpdate = UpdateNotApplicable, DataBasedUpdate = 1, MetaDataBasedUpdate = 2, FileFormatOption = 512 } |
typedef btkSharedPtr < AcquisitionFileIO > | Pointer |
enum | StorageFormat { StorageNotApplicable = 0, Float = -1, Integer = 1 } |
Public Member Functions | |
virtual bool | CanReadFile (const std::string &filename) |
virtual bool | CanWriteFile (const std::string &filename) |
std::vector< double > & | GetAnalogChannelScale () |
const std::vector< double > & | GetAnalogChannelScale () const |
AnalogIntegerFormat | GetAnalogIntegerFormat () const |
double | GetAnalogUniversalScale () const |
std::vector< int > & | GetAnalogZeroOffset () |
const std::vector< int > & | GetAnalogZeroOffset () const |
double | GetPointScale () const |
virtual void | Read (const std::string &filename, Acquisition::Pointer output) |
void | SetAnalogChannelScale (const std::vector< double > &s) |
void | SetAnalogIntegerFormat (AnalogIntegerFormat f) |
void | SetAnalogUniversalScale (double s) |
void | SetAnalogZeroOffset (const std::vector< int > &s) |
void | SetPointScale (double s) |
virtual void | Write (const std::string &filename, Acquisition::Pointer input) |
Public Member Functions inherited from btk::AcquisitionFileIO | |
ByteOrder | GetByteOrder () const |
std::string | GetByteOrderAsString () const |
FileType | GetFileType () const |
int | GetInternalsUpdateOptions () const |
StorageFormat | GetStorageFormat () const |
std::string | GetStorageFormatAsString () const |
virtual const Extensions & | GetSupportedExtensions () const =0 |
bool | HasInternalsUpdateOption (int option) const |
void | SetByteOrder (ByteOrder b) |
void | SetInternalsUpdateOptions (int options) |
void | SetStorageFormat (StorageFormat s) |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from btk::AcquisitionFileIO | |
static bool | HasReadOperation () |
static bool | HasWriteOperation () |
Protected Member Functions | |
C3DFileIO () | |
Protected Member Functions inherited from btk::AcquisitionFileIO | |
AcquisitionFileIO (FileType f=TypeNotApplicable, ByteOrder b=OrderNotApplicable, StorageFormat s=StorageNotApplicable, int internalsUpdate=UpdateNotApplicable) | |
void | SetFileType (FileType f) |
virtual | ~AcquisitionFileIO () |
Additional Inherited Members | |
Protected Attributes inherited from btk::AcquisitionFileIO | |
ByteOrder | m_ByteOrder |
FileType | m_FileType |
int | m_InternalsUpdate |
StorageFormat | m_StorageFormat |
Interface to read/write C3D files.
All the informations related to the acquisition are stored in the output object. Few data, like the byte order, the points' scale, the analog universal scale, the integer analog storage format are available as member of this class. These informations are extracted when a C3D file is read or can be filled/modified to write a new C3D file. All these members can be accessed or modified using dedicated methods.
Compared to the C3DServer API, all the data in BTK extracted from a C3D file are already scaled and available in the children of the output Acquisition. You don't need to access to the groups/parameters for that. However, if you have some custom parameters, then you can access them from the metadata stored in the output Acquisition using the method Acquisition::GetMetadata().
Moreover, there are specific options to create a C3D file from an acquisition:
To write a C3D file with a given processor architecture (called byte order in BTK), you have to use the method C3DFileIO::SetByteOrder().
For more informations on this file's format: http:://www.c3d.org
Smart pointer associated with a const C3DFileIO object.
Smart pointer associated with a C3DFileIO object.
anonymous enum |
|
protected |
Constructor.
|
virtual |
Checks if the first byte of the file corresponds to C3D header.
Implements btk::AcquisitionFileIO.
|
virtual |
Checks if the suffix of filename is C3D.
Implements btk::AcquisitionFileIO.
|
inline |
Returns the vector of scales used for the analog channels' scaling (parameter ANALOG:SCALE).
|
inline |
Returns the vector of scales used for the analog channels' scaling.
|
inline |
Return the integer format (signed/unsigned).
|
inline |
Returns the universal scale factor used to scale analog channels (parameter ANALOG:GEN_SCALE).
|
inline |
Returns the vector of offsets used for the analog channels' scaling (parameter ANALOG:OFFSET).
|
inline |
Returns the vector of offsets used for the analog channels' scaling.
|
inline |
Returns the scale for the points obtains from the POINT:SCALE parameter or from its determination for a created acquisition.
|
inlinestatic |
Create a C3DFileIO object an return it as a smart pointer.
|
virtual |
Read the file designated by filename and fill output.
Implements btk::AcquisitionFileIO.
|
inline |
Sets the vector of scales used for the analog channels' scaling.
|
inline |
Sets the integer format used to store analog channels data.
|
inline |
Sets Returns the universal scale factor used to scale analog channels.
|
inline |
Sets the vector of offsets used for the analog channels' scaling.
|
inline |
Sets the scale for the points.
|
virtual |
Write the file designated by filename with the content of input.
Before writing the acquisition in a C3D file, this method do some operation. In the order:
Implements btk::AcquisitionFileIO.