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

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

#include <btkBSFFileIO.h>

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

Public Types

typedef btkSharedPtr< const
BSFFileIO
ConstPointer
 
typedef btkSharedPtr< BSFFileIOPointer
 
- 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 void Read (const std::string &filename, Acquisition::Pointer output)
 
- Public Member Functions inherited from btk::AcquisitionFileIO
virtual bool CanWriteFile (const std::string &filename)=0
 
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)
 
virtual void Write (const std::string &filename, Acquisition::Pointer input)=0
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from btk::AcquisitionFileIO
static bool HasReadOperation ()
 
static bool HasWriteOperation ()
 

Protected Member Functions

 BSFFileIO ()
 
- 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 BSF files.

The BSF file format is a proprietary file format developed by the AMTI company (Watertown, USA).

The reader of this file format was implemented using the documentation of the software NetForce (appendix B), graciously offered by the AMTI company.

Warning
The implementation of the writer is restricted and required first the permission of the AMTI company.
Todo:
Still need more checks when there are extra instruments, what about the instrument offset, coord, interdist and zero?

Member Typedef Documentation

Smart pointer associated with a const BSFFileIO object.

Smart pointer associated with a BSFFileIO object.

Constructor & Destructor Documentation

btk::BSFFileIO::BSFFileIO ( )
protected

Constructor.

Member Function Documentation

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

Check if the content of the file starts with the value 100 which correspond to the latest known version of the BSF file format.

Implements btk::AcquisitionFileIO.

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

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

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

Read the file designated by filename and fill output.

Implements btk::AcquisitionFileIO.