BTK  0.3dev.0
Open-source library to visualize/process biomechanical data
List of all members | Public Types | Static Public Member Functions | Protected Member Functions
btk::AcquisitionFileIOFactory Class Reference

Manage all the acquisition file IOs and detect if a file is readable or writable. More...

#include <btkAcquisitionFileIOFactory.h>

Public Types

enum  OpenMode { ReadMode, WriteMode }
 

Static Public Member Functions

static bool AddFileIO (AcquisitionFileIOHandle::Pointer infoIO)
 
static AcquisitionFileIO::Pointer CreateAcquisitionIO (const std::string &filename, OpenMode mode)
 
static
AcquisitionFileIO::Extensions 
GetSupportedReadExtensions ()
 
static
AcquisitionFileIO::Extensions 
GetSupportedWrittenExtensions ()
 
static bool RemoveFileIO (AcquisitionFileIOHandle::Pointer infoIO)
 

Protected Member Functions

 AcquisitionFileIOFactory ()
 
virtual ~AcquisitionFileIOFactory ()
 

Detailed Description

Manage all the acquisition file IOs and detect if a file is readable or writable.

The goal of this factory is to return an AcquisitionFileIO object based on the given filename. For that, you need to call the method AcquisitionFileIOFactory::CreateAcquisitionIO. In this method, each AcquisitionFileIO object is tested to see if the file is supported or by file format managed.

If you want to add a new file format to this factory, you can use the method AcquisitionFileIOFactory::AddFileIO. Or you if you work directly into the source-code of BTK, you can register direclty the new file format using the file btkAcquisitionFileIOFactory_registration.cpp

See Also
AcquisitionFileIORegister

Member Enumeration Documentation

Enums used to specify the open mode.

Enumerator
ReadMode 

Enum value for the read mode

WriteMode 

Enum value for the write mode

Constructor & Destructor Documentation

btk::AcquisitionFileIOFactory::AcquisitionFileIOFactory ( )
protected

Constructor.

btk::AcquisitionFileIOFactory::~AcquisitionFileIOFactory ( )
inlineprotectedvirtual

Empty destructor.

Member Function Documentation

bool btk::AcquisitionFileIOFactory::AddFileIO ( AcquisitionFileIOHandle::Pointer  infoIO)
static

Append a file IO if it is not already added.

Should not be used by developers. Internal purpose.

AcquisitionFileIO::Pointer btk::AcquisitionFileIOFactory::CreateAcquisitionIO ( const std::string &  filename,
OpenMode  mode 
)
static

Try to find the AcquisitionFileIO helper to read/write the file. This method has to be modified each time a new AcquisitionFileIO is added in this library. The order of the IO is important as the first AcquisitionFileIO which can read/write the file is returned.

AcquisitionFileIO::Extensions btk::AcquisitionFileIOFactory::GetSupportedReadExtensions ( )
static

Returns the list of the file extensions than the factory could read.

Note: This list is directly created by the acquisition file IO registered with this factory.

AcquisitionFileIO::Extensions btk::AcquisitionFileIOFactory::GetSupportedWrittenExtensions ( )
static

Returns the list of the file extensions than the factory could write.

Note: This list is directly created by the acquisition file IO registered with this factory.

bool btk::AcquisitionFileIOFactory::RemoveFileIO ( AcquisitionFileIOHandle::Pointer  infoIO)
static

Remove a file IO if found.

Should not be used by developers. Internal purpose.