API
4.2
For MATLAB, Python, Java, and C++ users
|
C3DFileAdapter reads a C3D file into markers and forces tables of type TimeSeriesTableVec3. More...
Public Member Functions | |
C3DFileAdapter * | clone () const override |
void | setLocationForForceExpression (const ForceLocation location) |
C3DFileAdpater provides options for expressing the force-plate measurements either as the net force and moments expressed at the ForcePlateOrigin, the CenterOfPressure, or the PointOfWrenchApplication. More... | |
ForceLocation | getLocationForForceExpression () const |
Retrieve the option for location for force expression. More... | |
std::shared_ptr< TimeSeriesTableVec3 > | getMarkersTable (DataAdapter::OutputTables &tables) |
Retrieve the TimeSeriesTableVec3 of Markers. More... | |
std::shared_ptr< TimeSeriesTableVec3 > | getForcesTable (DataAdapter::OutputTables &tables) |
Retrieve the TimeSeriesTableVec3 of Forces. More... | |
Public Member Functions inherited from OpenSim::FileAdapter | |
FileAdapter ()=default | |
FileAdapter (const FileAdapter &)=default | |
FileAdapter (FileAdapter &&)=default | |
FileAdapter & | operator= (const FileAdapter &)=default |
FileAdapter & | operator= (FileAdapter &&)=default |
virtual | ~FileAdapter ()=default |
Public Member Functions inherited from OpenSim::DataAdapter | |
DataAdapter ()=default | |
DataAdapter (const DataAdapter &)=default | |
DataAdapter (DataAdapter &&)=default | |
DataAdapter & | operator= (const DataAdapter &)=default |
DataAdapter & | operator= (DataAdapter &&)=default |
virtual | ~DataAdapter ()=default |
DataAdapter::OutputTables | read (const std::string &dataSourceSpecification) const |
Public interface to read data from a dataSourceSpecification, typically a file or folder. More... | |
const std::shared_ptr< AbstractDataTable > | getDataTable (const OutputTables &tables, const std::string tableName) |
Generic interface to retrieve a specific table by name from read result. More... | |
Static Public Member Functions | |
static void | write (const Tables &markerTable, const std::string &fileName) |
Static Public Member Functions inherited from OpenSim::FileAdapter | |
static void | writeFile (const InputTables &tables, const std::string &fileName) |
Write a collection of tables to the given file. More... | |
static std::string | findExtension (const std::string &filename) |
Find the extension from a filename. More... | |
static std::vector< std::string > | getNextLine (std::istream &stream, const std::string &delims) |
Get the next line from the stream and tokenize/split the line using the given delimiters. More... | |
static std::vector< std::string > | tokenize (const std::string &str, const std::string &delims) |
Tokenize/split a given string using the given delimiters. More... | |
static std::shared_ptr< DataAdapter > | createAdapterFromExtension (const std::string &fileName) |
Create a concerte FileAdapter based on the extension of the passed in file and return it. More... | |
Static Public Member Functions inherited from OpenSim::DataAdapter | |
static bool | registerDataAdapter (const std::string &identifier, const DataAdapter &adapter) |
Register a concrete DataAdapter by its unique string identifier. More... | |
C3DFileAdapter reads a C3D file into markers and forces tables of type TimeSeriesTableVec3.
The markers table has each column labeled by its corresponding marker name. For the forces table, the data are grouped by sensor (force-plate #) in force, point and moment order, with the respective f#, p# and m# column labels. C3DFileAdpater provides options for expressing the force-plate measurements either as the net force and moments expressed at the ForcePlateOrigin, the CenterOfPressure, or the PointOfWrenchApplication.
typedef std::vector<Event> OpenSim::C3DFileAdapter::EventTable |
typedef std::map<std::string, std::shared_ptr<TimeSeriesTableVec3> > OpenSim::C3DFileAdapter::Tables |
|
overridevirtual |
Implements OpenSim::DataAdapter.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
inline |
Retrieve the TimeSeriesTableVec3 of Forces.
|
inline |
Retrieve the option for location for force expression.
|
inline |
Retrieve the TimeSeriesTableVec3 of Markers.
|
inline |
C3DFileAdpater provides options for expressing the force-plate measurements either as the net force and moments expressed at the ForcePlateOrigin, the CenterOfPressure, or the PointOfWrenchApplication.
This function sets the option.
|
static |
|
strong |
Enumerated list of locations in which read in forces are expressed.
Measurement from force plates can be expressed by the C3DFileAdapter either at the OriginOfForcePlate (the default), CenterOfPressure, or the PointOfWrenchApplication. You need to call setLocationForForceExpression before invoking C3DFileAdapter::read(), otherwise the default location (OriginOfForcePlate) is assumed.
In the case of the CenterOfPressure (COP), the underlying assumptions are that the ground plane (in which COP is defined) passes through the lab origin (0,0,0) with the Z-axis as its normal vector.
The PointOfWrenchApplication (PWA) does not assume a plane of contact. The PWA is an equivalent wrench in the lab frame and computed according to Shimba 1984. Takeshi Shimba, An estimation of center of gravity from force platform data, Journal of Biomechanics, 17(1), pp53-60, 1984.
C++ example
Python example
Java example
MATLAB example
Enumerator | |
---|---|
OriginOfForcePlate | 0 : the origin of the force-plate |
CenterOfPressure | 1 : the center of pressure |
PointOfWrenchApplication | 2 : PWA as defined by Shimba, 1984 |