Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::Reader Class Reference

Reader for bioMod files. More...

#include <ModelReader.h>

Static Public Member Functions

static Model readModelFile (const utils::Path &path)
 Create a biorbd model from a bioMod file.
static void readModelFile (const utils::Path &path, Model *model)
 Create a biorbd model from a bioMod file.
static std::vector< std::vector< utils::Vector3d > > readMarkerDataFile (const utils::Path &path)
 Read a bioMark file, containing markers data.
static std::vector< rigidbody::GeneralizedCoordinates > readQDataFile (const utils::Path &path)
 Read a bioKin file, containing kinematics data.
static std::vector< utils::Vector > readActivationDataFile (const utils::Path &path)
 Read a bioMus fine, containing muscle activations data.
static std::vector< utils::Vector > readTorqueDataFile (const utils::Path &path)
 Read a bioTorque file containing generalized torques data.
static std::vector< utils::Vector > readGroundReactionForceDataFile (const utils::Path &path)
 Read a bioGRF file containing ground reaction force (GRF) data.
static void readViconForceFile (const utils::Path &path, std::vector< std::vector< size_t > > &frame, std::vector< size_t > &frequency, std::vector< std::vector< utils::Vector3d > > &force, std::vector< std::vector< utils::Vector3d > > &moment, std::vector< std::vector< utils::Vector3d > > &cop)
 Read a Vicon ASCII force file.
static std::vector< std::vector< utils::SpatialVector > > readViconForceFile (const utils::String &path)
 Read a Vicon ASCII force file.
static std::vector< std::vector< utils::Vector3d > > readViconMarkerFile (const utils::Path &path, int nFramesToGet=-1)
 Read a Vicon ASCII marker file (CSV formated).
static std::vector< std::vector< utils::Vector3d > > readViconMarkerFile (const utils::Path &path, std::vector< utils::String > &markOrder, int nFramesToGet=-1)
 Read a Vicon ASCII marker file (CSV formated).
static rigidbody::Mesh readMeshFileBiorbdSegments (const utils::Path &path)
 Read a bioMesh file containing the meshing of a segment.
static rigidbody::Mesh readMeshFilePly (const utils::Path &path)
 Read a PLY file containing the meshing of a segment.
static rigidbody::Mesh readMeshFileObj (const utils::Path &path)
 Read a OBJ file containing the meshing of a segment.
static rigidbody::Mesh readMeshFileStl (const utils::Path &path)
 Read a STL file containing the meshing of a segment.

Static Protected Member Functions

static void readVector3d (utils::IfStream &file, const std::map< utils::Equation, double > &variable, utils::Vector3d &vector)
 Read a Vector 3d.
static void readMatrix33 (utils::IfStream &file, const std::map< utils::Equation, double > &variable, utils::Matrix3d &matrix)
 Read a Matrix 3x3.
static void readRtMatrix (utils::IfStream &file, const std::map< utils::Equation, double > &variable, bool RTinMatrix, utils::RotoTrans &RT)
 Read a RT matrix either in 4x4 format or Rot1233 seq Trans123 format.

Detailed Description

Reader for bioMod files.

Definition at line 33 of file ModelReader.h.

Member Function Documentation

◆ readActivationDataFile()

std::vector< utils::Vector > Reader::readActivationDataFile ( const utils::Path & path)
static

Read a bioMus fine, containing muscle activations data.

Parameters
pathThe path of the file
Returns
Returns the activations

Definition at line 1685 of file ModelReader.cpp.

◆ readGroundReactionForceDataFile()

std::vector< utils::Vector > Reader::readGroundReactionForceDataFile ( const utils::Path & path)
static

Read a bioGRF file containing ground reaction force (GRF) data.

Parameters
pathThe path of the file
Returns
Returns the ground reaction force

Definition at line 1796 of file ModelReader.cpp.

◆ readMarkerDataFile()

std::vector< std::vector< utils::Vector3d > > Reader::readMarkerDataFile ( const utils::Path & path)
static

Read a bioMark file, containing markers data.

Parameters
pathThe path of the file
Returns
Returns the markers

Definition at line 1574 of file ModelReader.cpp.

◆ readMatrix33()

void Reader::readMatrix33 ( utils::IfStream & file,
const std::map< utils::Equation, double > & variable,
utils::Matrix3d & matrix )
staticprotected

Read a Matrix 3x3.

Parameters
fileA reference to the current file being read pointing to the RT
variableThe variable set
matrixThe matrix to fill

Definition at line 2482 of file ModelReader.cpp.

◆ readMeshFileBiorbdSegments()

rigidbody::Mesh Reader::readMeshFileBiorbdSegments ( const utils::Path & path)
static

Read a bioMesh file containing the meshing of a segment.

Parameters
pathThe path of the file
Returns
Returns the mesh

Definition at line 2131 of file ModelReader.cpp.

◆ readMeshFileObj()

rigidbody::Mesh Reader::readMeshFileObj ( const utils::Path & path)
static

Read a OBJ file containing the meshing of a segment.

Parameters
pathThe path of the file
Returns
Returns the mesh

Definition at line 2355 of file ModelReader.cpp.

◆ readMeshFilePly()

rigidbody::Mesh Reader::readMeshFilePly ( const utils::Path & path)
static

Read a PLY file containing the meshing of a segment.

Parameters
pathThe path of the file
Returns
Returns the mesh

Definition at line 2188 of file ModelReader.cpp.

◆ readMeshFileStl()

rigidbody::Mesh Reader::readMeshFileStl ( const utils::Path & path)
static

Read a STL file containing the meshing of a segment.

Parameters
pathThe path of the file
Returns
Returns the mesh

Definition at line 2524 of file ModelReader.cpp.

◆ readModelFile() [1/2]

Model Reader::readModelFile ( const utils::Path & path)
static

Create a biorbd model from a bioMod file.

Parameters
pathThe path of the file
Returns
The biorbd model

Definition at line 73 of file ModelReader.cpp.

◆ readModelFile() [2/2]

void Reader::readModelFile ( const utils::Path & path,
Model * model )
static

Create a biorbd model from a bioMod file.

Parameters
pathThe path of the file
modelThe model to fill

Definition at line 80 of file ModelReader.cpp.

◆ readQDataFile()

std::vector< rigidbody::GeneralizedCoordinates > Reader::readQDataFile ( const utils::Path & path)
static

Read a bioKin file, containing kinematics data.

Parameters
pathThe path of the file
Returns
Returns the kinematics

Definition at line 1631 of file ModelReader.cpp.

◆ readRtMatrix()

void Reader::readRtMatrix ( utils::IfStream & file,
const std::map< utils::Equation, double > & variable,
bool RTinMatrix,
utils::RotoTrans & RT )
staticprotected

Read a RT matrix either in 4x4 format or Rot1233 seq Trans123 format.

Parameters
fileA reference to the current file being read pointing to the RT
variableThe variable set
RTinMatrixIf the RT is in matrix or in Euler format
RTThe RotoTrans matrix to fill

Definition at line 2493 of file ModelReader.cpp.

◆ readTorqueDataFile()

std::vector< utils::Vector > Reader::readTorqueDataFile ( const utils::Path & path)
static

Read a bioTorque file containing generalized torques data.

Parameters
pathThe path of the file
Returns
Returns the torque

Definition at line 1740 of file ModelReader.cpp.

◆ readVector3d()

void Reader::readVector3d ( utils::IfStream & file,
const std::map< utils::Equation, double > & variable,
utils::Vector3d & vector )
staticprotected

Read a Vector 3d.

Parameters
fileA reference to the current file being read pointing to the RT
variableThe variable set
vectorThe vector to fill

Definition at line 2473 of file ModelReader.cpp.

◆ readViconForceFile() [1/2]

void Reader::readViconForceFile ( const utils::Path & path,
std::vector< std::vector< size_t > > & frame,
std::vector< size_t > & frequency,
std::vector< std::vector< utils::Vector3d > > & force,
std::vector< std::vector< utils::Vector3d > > & moment,
std::vector< std::vector< utils::Vector3d > > & cop )
static

Read a Vicon ASCII force file.

Parameters
pathThe path of the file
frameThe fame vector (output)
frequencyThe acquisition frequency (output)
forceThe linear forces (x,y,z) (output)
momentThe moments (x,y,z) (output)
copThe center of pressure (x,y,z) (output)

Definition at line 1852 of file ModelReader.cpp.

◆ readViconForceFile() [2/2]

std::vector< std::vector< utils::SpatialVector > > Reader::readViconForceFile ( const utils::String & path)
static

Read a Vicon ASCII force file.

Parameters
pathThe path of the file
Returns
Returns all the data in a spatial transform format

Definition at line 1954 of file ModelReader.cpp.

◆ readViconMarkerFile() [1/2]

std::vector< std::vector< utils::Vector3d > > Reader::readViconMarkerFile ( const utils::Path & path,
int nFramesToGet = -1 )
static

Read a Vicon ASCII marker file (CSV formated).

Parameters
pathThe path of the file
nFramesToGetThe number of frames
Returns
The markers for each frame

If the number of frame asked is less than the total number of frames, frames are evenly skip while reading. To get all frames, nFramesToGet should be set to -1.

Definition at line 2603 of file ModelReader.cpp.

◆ readViconMarkerFile() [2/2]

std::vector< std::vector< utils::Vector3d > > Reader::readViconMarkerFile ( const utils::Path & path,
std::vector< utils::String > & markOrder,
int nFramesToGet = -1 )
static

Read a Vicon ASCII marker file (CSV formated).

Parameters
pathThe path of the file
markOrderThe markers to keep
nFramesToGetThe number of frames
Returns
Returns the data

markOrder can be used for both changing the order of the marker to read and to skip some markers

If the number of frame asked is less than the total number of frames, frames are evenly skip while reading. To get all frames, nFramesToGet should be set to -1.

Definition at line 1978 of file ModelReader.cpp.


The documentation for this class was generated from the following files: