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

Interface to read/write ANC files. More...

#include <btkANCFileIO.h>

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

Public Types

typedef btkSharedPtr< const
ANCFileIO
ConstPointer
 
typedef btkSharedPtr< ANCFileIOPointer
 
- 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)
 
int GetFileGeneration () const
 
virtual void Read (const std::string &filename, Acquisition::Pointer output)
 
void SetFileGeneration (int gen)
 
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 ExtensionsGetSupportedExtensions () 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

 ANCFileIO ()
 
- 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
 

Detailed Description

Interface to read/write ANC files.

A ANC file contains analog channels data stored in ASCII format. Two generation of ANC file is known:

The ANC file format is created by Motion Analysis Corp.

Warning
The force platforms contained in this file format seem to be only force platforms of type II.
Moreover, Due to the file format, it is impossible to detect the correct scale for the force platforms' channels. Then, it is supposed, that the gain is 4000 and the excitation voltage is 10V. Plus, the scale factor is set as the opposite of the result to compute reactive forces.

Member Typedef Documentation

Smart pointer associated with a const ANCFileIO object.

Smart pointer associated with a ANCFileIO object.

Constructor & Destructor Documentation

btk::ANCFileIO::ANCFileIO ( )
protected

Constructor.

Member Function Documentation

bool btk::ANCFileIO::CanReadFile ( const std::string &  filename)
virtual

Checks if the first word in the file corresponds to "PathFileType".

Implements btk::AcquisitionFileIO.

bool btk::ANCFileIO::CanWriteFile ( const std::string &  filename)
virtual

Checks if the suffix of filename is ANC.

Implements btk::AcquisitionFileIO.

int btk::ANCFileIO::GetFileGeneration ( ) const
inline

Returns the generation of the ANC file.

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

Create a ANCFileIO object an return it as a smart pointer.

void btk::ANCFileIO::Read ( const std::string &  filename,
Acquisition::Pointer  output 
)
virtual

Read the file designated by filename and fill output.

Implements btk::AcquisitionFileIO.

void btk::ANCFileIO::SetFileGeneration ( int  gen)
inline

Set the generation of the ANC file.

void btk::ANCFileIO::Write ( const std::string &  filename,
Acquisition::Pointer  input 
)
virtual

Write the file designated by filename with the content of input.

Implements btk::AcquisitionFileIO.