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 | Protected Attributes
btk::AcquisitionFileReader Class Reference

Reader for files which contain acquisition data (C3D, TRC, ...). More...

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

Public Types

typedef btkSharedPtr< const
AcquisitionFileReader
ConstPointer
 
typedef btkSharedPtr
< AcquisitionFileReader
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< ObjectPointer
 

Public Member Functions

AcquisitionFileIO::Pointer GetAcquisitionIO ()
 
AcquisitionFileIO::ConstPointer GetAcquisitionIO () const
 
bool GetDisableFilenameExceptionState () const
 
const std::string & GetFilename () const
 
Acquisition::Pointer GetOutput ()
 
void SetAcquisitionIO (AcquisitionFileIO::Pointer io=AcquisitionFileIO::Pointer())
 
void SetDisableFilenameExceptionState (bool s)
 
void SetFilename (const std::string &filename)
 
virtual ~AcquisitionFileReader ()
 
- 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

 AcquisitionFileReader ()
 
virtual void GenerateData ()
 
Acquisition::Pointer GetOutput (int idx)
 
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 ()
 

Protected Attributes

AcquisitionFileIO::Pointer m_AcquisitionIO
 
std::string m_Filename
 
- Protected Attributes inherited from btk::Object
unsigned long int m_Timestamp
 

Detailed Description

Reader for files which contain acquisition data (C3D, TRC, ...).

This class uses an AcquisitionFileIO object to read the data from the file corresponding to the given filename. You have two ways to set this object. First, you can set it manually by using the method AcquisitionFileReader::SetAcquisitionIO(), Second, the correct object can be detected automatically, by checking in each registered AcquisitionFileIO if it can read or not the file.

The use of the manual setting should be only used if you want to read a file with a selected file format. To go back to the automatic mode from the manual mode, you only have to use the method AcquisitionFileReader::SetAcquisitionIO() without any argument.

Note: Internally, this class use the AcquisitionFileIOFactory class for the automatic mode.

Member Typedef Documentation

Smart pointer associated with a const AcquisitionFileReader object.

Smart pointer associated with an AcquisitionFileReader object.

Constructor & Destructor Documentation

btk::AcquisitionFileReader::~AcquisitionFileReader ( )
inlinevirtual

Empty destructor.

btk::AcquisitionFileReader::AcquisitionFileReader ( )
protected

Constructor. Sets the number of outputs equal to one. No input.

Member Function Documentation

void btk::AcquisitionFileReader::GenerateData ( )
protectedvirtual

Check the file integrety, find a AcquisitionIO helper class if no one has been specified and finally read the file.

Implements btk::ProcessObject.

AcquisitionFileIO::Pointer btk::AcquisitionFileReader::GetAcquisitionIO ( )
inline

Returns a Poiner associated with the AcquisitionIO helper class used to read the file.

AcquisitionFileIO::ConstPointer btk::AcquisitionFileReader::GetAcquisitionIO ( ) const
inline

Returns a ConstPointer associated with the AcquisitionIO helper class used to read the file.

bool btk::AcquisitionFileReader::GetDisableFilenameExceptionState ( ) const
inline

Returns state of the disabling of the exception for missing filename.

const std::string & btk::AcquisitionFileReader::GetFilename ( ) const
inline

Gets the filename of the file to read.

Acquisition::Pointer btk::AcquisitionFileReader::GetOutput ( )
inline

Returns the Acquisition read from the AcquisitionIO helper class.

Acquisition::Pointer btk::AcquisitionFileReader::GetOutput ( int  idx)
inlineprotected

Returns the output at the index idx.

DataObject::Pointer btk::AcquisitionFileReader::MakeOutput ( int  idx)
protectedvirtual

Whatever the specified index, this method creates an Acquisition object

Implements btk::ProcessObject.

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

Creates a AcquisitionFileReader process.

void btk::AcquisitionFileReader::SetAcquisitionIO ( AcquisitionFileIO::Pointer  io = AcquisitionFileIO::Pointer())

Set the AcquisitionIO helper class. This method forces the AcquisitionIO to be used to read a particular file. The AcquisitionIO is oftenly created via the object factory mechanism that determines whether a particular AcquisitionIO can read a certain file (see AcquisitionFileIOFactory).

void btk::AcquisitionFileReader::SetDisableFilenameExceptionState ( bool  s)
inline

Enable/disable exception for the missing of the filename.

void btk::AcquisitionFileReader::SetFilename ( const std::string &  filename)

Specifies the file to read. This is forwarded to the IO instance.

Member Data Documentation

btk::AcquisitionFileReader::m_AcquisitionIO
protected

AcquisitionFileIO helper class to read the acquisition data and fill an Acquisition object.

btk::AcquisitionFileReader::m_Filename
protected

Path of the file to read.