BTK Python wrapper
0.3dev.0
Python bindings for the Biomechanical ToolKit library (BTK)
|
Class to read/write C3D files. More...
Public Member Functions | |
def | CanReadFile |
def | CanWriteFile |
def | GetAnalogChannelScale |
def | GetAnalogIntegerFormat |
def | GetAnalogUniversalScale |
def | GetAnalogZeroOffset |
def | GetByteOrder |
def | GetByteOrderAsString |
def | GetFileType |
def | GetInternalsUpdateOptions |
def | GetPointScale |
def | GetStorageFormat |
def | GetStorageFormatAsString |
def | HasInternalsUpdateOption |
def | Read |
def | SetAnalogChannelScale |
def | SetAnalogIntegerFormat |
def | SetAnalogUniversalScale |
def | SetAnalogZeroOffset |
def | SetByteOrder |
def | SetInternalsUpdateOptions |
def | SetPointScale |
def | SetStorageFormat |
def | Write |
Public Member Functions inherited from btk.btkAcquisitionFileIO | |
def | CanReadFile |
def | CanWriteFile |
def | GetByteOrder |
def | GetByteOrderAsString |
def | GetFileType |
def | GetInternalsUpdateOptions |
def | GetStorageFormat |
def | GetStorageFormatAsString |
def | HasInternalsUpdateOption |
def | Read |
def | SetByteOrder |
def | SetInternalsUpdateOptions |
def | SetStorageFormat |
def | Write |
Static Public Attributes | |
CompatibleVicon = _btk.btkC3DFileIO_CompatibleVicon | |
Signed = _btk.btkC3DFileIO_Signed | |
Unsigned = _btk.btkC3DFileIO_Unsigned | |
Static Public Attributes inherited from btk.btkAcquisitionFileIO | |
ASCII = _btk.btkAcquisitionFileIO_ASCII | |
Binary = _btk.btkAcquisitionFileIO_Binary | |
DataBasedUpdate = _btk.btkAcquisitionFileIO_DataBasedUpdate | |
FileFormatOption = _btk.btkAcquisitionFileIO_FileFormatOption | |
Float = _btk.btkAcquisitionFileIO_Float | |
IEEE_BigEndian = _btk.btkAcquisitionFileIO_IEEE_BigEndian | |
IEEE_LittleEndian = _btk.btkAcquisitionFileIO_IEEE_LittleEndian | |
Integer = _btk.btkAcquisitionFileIO_Integer | |
MetaDataBasedUpdate = _btk.btkAcquisitionFileIO_MetaDataBasedUpdate | |
NoUpdate = _btk.btkAcquisitionFileIO_NoUpdate | |
OrderNotApplicable = _btk.btkAcquisitionFileIO_OrderNotApplicable | |
StorageNotApplicable = _btk.btkAcquisitionFileIO_StorageNotApplicable | |
TypeNotApplicable = _btk.btkAcquisitionFileIO_TypeNotApplicable | |
UpdateNotApplicable = _btk.btkAcquisitionFileIO_UpdateNotApplicable | |
VAX_LittleEndian = _btk.btkAcquisitionFileIO_VAX_LittleEndian | |
Class to read/write C3D files.
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 btkAcquisition::GetMetadata(). Moreover, there are several options to create a C3D file from an acquisition: - DataBasedUpdate; - MetaDataBasedUpdate; - CompatibleVicon. By default, the writer is set with the options ScalesFromDataUpdate, MetaDataFromDataUpdate and CompatibleVicon. These options give you the possibility to create a C3D file from any kind of acquisition (created from raw or extracted from another file format). To write a C3D file with a given processor architecture (called byte order in BTK), you have to use the method btkC3DFileIO::SetByteOrder(). For more informations on this file's format: http:://www.c3d.org
def btk.btkC3DFileIO.CanReadFile | ( | self, | args | ) |
CanReadFile(self, filename) -> bool Checks if the given filename can be read by this AcquisitionFileIO. This methods should try to read the file header instead to check the file's suffix.
def btk.btkC3DFileIO.CanWriteFile | ( | self, | args | ) |
CanWriteFile(self, filename) -> bool Checks if the given filename can be write by this AcquisitionFileIO. This method should try to determine if the file's suffix corresponds to one of the supported file's suffixes by this btkAcquisitionFileIO.
def btk.btkC3DFileIO.GetAnalogChannelScale | ( | self | ) |
GetAnalogChannelScale(self) -> btkDoubleArray Returns the vector of scales used for the analog channels' scaling (parameter ANALOG:SCALE).
def btk.btkC3DFileIO.GetAnalogIntegerFormat | ( | self | ) |
GetAnalogIntegerFormat(self) -> btkC3DFileIO_impl::AnalogIntegerFormat Return the integer format (signed/unsigned).
def btk.btkC3DFileIO.GetAnalogUniversalScale | ( | self | ) |
GetAnalogUniversalScale(self) -> double Returns the universal scale factor used to scale analog channels (parameter ANALOG:GEN_SCALE).
def btk.btkC3DFileIO.GetAnalogZeroOffset | ( | self | ) |
GetAnalogZeroOffset(self) -> btkIntArray Returns the vector of offsets used for the analog channels' scaling (parameter ANALOG:OFFSET).
def btk.btkC3DFileIO.GetByteOrder | ( | self | ) |
GetByteOrder(self) -> btkAcquisitionFileIO_impl::ByteOrder Gets the byte order of the file (only for binary file).
def btk.btkC3DFileIO.GetByteOrderAsString | ( | self | ) |
GetByteOrderAsString(self) -> std::string Gets the byte order as a string.
def btk.btkC3DFileIO.GetFileType | ( | self | ) |
GetFileType(self) -> btkAcquisitionFileIO_impl::FileType Gets the type of the file.
def btk.btkC3DFileIO.GetInternalsUpdateOptions | ( | self | ) |
GetInternalsUpdateOptions(self) -> int Returns the option(s) used to update internals.
def btk.btkC3DFileIO.GetPointScale | ( | self | ) |
GetPointScale(self) -> double Returns the scale for the points obtains from the POINT:SCALE parameter or from its determination for a created acquisition.
def btk.btkC3DFileIO.GetStorageFormat | ( | self | ) |
GetStorageFormat(self) -> btkAcquisitionFileIO_impl::StorageFormat Return the format used to store points and analog channels.
def btk.btkC3DFileIO.GetStorageFormatAsString | ( | self | ) |
GetStorageFormatAsString(self) -> std::string Gets the storage format as a string.
def btk.btkC3DFileIO.HasInternalsUpdateOption | ( | self, | args | ) |
HasInternalsUpdateOption(self, option) -> bool Returns true if the given @a option is used or false if not.
def btk.btkC3DFileIO.Read | ( | self, | args | ) |
Read(self, filename, output) Read the file designated by the given filename and fill the given btkAcquisition
def btk.btkC3DFileIO.SetAnalogChannelScale | ( | self, | args | ) |
SetAnalogChannelScale(self, s) Sets the vector of scales used for the analog channels' scaling.
def btk.btkC3DFileIO.SetAnalogIntegerFormat | ( | self, | args | ) |
SetAnalogIntegerFormat(self, f) Sets the integer format used to store analog channels data.
def btk.btkC3DFileIO.SetAnalogUniversalScale | ( | self, | args | ) |
SetAnalogUniversalScale(self, s) Sets Returns the universal scale factor used to scale analog channels.
def btk.btkC3DFileIO.SetAnalogZeroOffset | ( | self, | args | ) |
SetAnalogZeroOffset(self, s) Sets the vector of offsets used for the analog channels' scaling.
def btk.btkC3DFileIO.SetByteOrder | ( | self, | args | ) |
SetByteOrder(self, b) Sets the byte order of the file.
def btk.btkC3DFileIO.SetInternalsUpdateOptions | ( | self, | args | ) |
SetInternalsUpdateOptions(self, options) Sets the option(s) used to update internals.
def btk.btkC3DFileIO.SetPointScale | ( | self, | args | ) |
SetPointScale(self, s) Sets the scale for the points.
def btk.btkC3DFileIO.SetStorageFormat | ( | self, | args | ) |
SetStorageFormat(self, s) Set the format used to store points and analog channels.
def btk.btkC3DFileIO.Write | ( | self, | args | ) |
Write(self, filename, input) Write the file designated by the given filename with the content of the given btkAcquisition.
|
static |
Checks and updates (if necessary) acquisitions parameter which can crash Vicon's product (Polygon, Workstation, Nexus).
|
static |
Analog's data are stored as signed integer values.
|
static |
Analog's data are stored as unsigned integer values.