OpenSim::MarkerData Class Reference

A class implementing a sequence of marker frames from a TRC/TRB file. More...

#include <MarkerData.h>

Inheritance diagram for OpenSim::MarkerData:
OpenSim::Object

List of all members.

Public Member Functions

 MarkerData ()
 Default constructor.
 MarkerData (const std::string &aFileName) SWIG_DECLARE_EXCEPTION
virtual ~MarkerData ()
 Destructor.
void findFrameRange (double aStartTime, double aEndTime, int &rStartFrame, int &rEndFrame) const
 Find the range of frames that is between start time and end time (inclusive).
void averageFrames (double aThreshold=-1.0, double aStartTime=-SimTK::Infinity, double aEndTime=SimTK::Infinity)
 Average all the frames between aStartTime and aEndTime (inclusive) and store the result in the first frame.
const std::string & getFileName () const
void makeRdStorage (Storage &rStorage)
 Store the marker data in an Storage object.
const MarkerFramegetFrame (int aIndex) const
 Get a frame of marker data.
int getMarkerIndex (const std::string &aName) const
const UnitsgetUnits () const
void convertToUnits (const Units &aUnits)
 Convert all marker coordinates to the specified units.
const Array< std::string > & getMarkerNames () const
int getNumMarkers () const
int getNumFrames () const
double getStartFrameTime () const
 Utilities to support the GUI.
double getLastFrameTime () const
 Utilities to support the GUI.
double getDataRate () const
double getCameraRate () const

Detailed Description

A class implementing a sequence of marker frames from a TRC/TRB file.

Author:
Peter Loan
Version:
1.0

Constructor & Destructor Documentation

MarkerData::MarkerData (  ) 

Default constructor.

OpenSim::MarkerData::MarkerData ( const std::string &  aFileName  ) 
MarkerData::~MarkerData (  )  [virtual]

Destructor.


Member Function Documentation

void MarkerData::averageFrames ( double  aThreshold = -1.0,
double  aStartTime = -SimTK::Infinity,
double  aEndTime = SimTK::Infinity 
)

Average all the frames between aStartTime and aEndTime (inclusive) and store the result in the first frame.

All other frames are deleted. The time and frame number of this one remaining frame are copied from the startIndex frame. The aThreshold parameter is for printing a warning if any marker moves more than that amount in the averaged frames. aThreshold is specified by the user, and is assumed to be in the units of the marker data.

Parameters:
aThreshold amount of marker movement that is allowed for averaging.
aStartTime start time of frame range to average.
aEndTime end time of frame range to average.
void MarkerData::convertToUnits ( const Units aUnits  ) 

Convert all marker coordinates to the specified units.

Parameters:
aUnits units to convert to.
void MarkerData::findFrameRange ( double  aStartTime,
double  aEndTime,
int &  rStartFrame,
int &  rEndFrame 
) const

Find the range of frames that is between start time and end time (inclusive).

Parameters:
aStartTime start time.
aEndTime end time.
rStartFrame index of start frame is returned here.
rEndFrame index of end frame is returned here.
double OpenSim::MarkerData::getCameraRate (  )  const [inline]
double OpenSim::MarkerData::getDataRate (  )  const [inline]
const std::string& OpenSim::MarkerData::getFileName (  )  const [inline]
const MarkerFrame & MarkerData::getFrame ( int  aIndex  )  const

Get a frame of marker data.

Parameters:
aIndex index of the row to get.
Returns:
Pointer to the frame of data.
double MarkerData::getLastFrameTime (  )  const

Utilities to support the GUI.

getLastFrameTime: Expose the time for the last frame

int OpenSim::MarkerData::getMarkerIndex ( const std::string &  aName  )  const
const Array<std::string>& OpenSim::MarkerData::getMarkerNames (  )  const [inline]
int OpenSim::MarkerData::getNumFrames (  )  const [inline]
int OpenSim::MarkerData::getNumMarkers (  )  const [inline]
double MarkerData::getStartFrameTime (  )  const

Utilities to support the GUI.

getStartFrameTime: Exposes the time for first frame

const Units& OpenSim::MarkerData::getUnits (  )  const [inline]
void MarkerData::makeRdStorage ( Storage rStorage  ) 

Store the marker data in an Storage object.

The object is emptied before adding the marker data.

Parameters:
aStorage storage block to fill in with marker data.

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

Generated on Sun Sep 25 00:19:48 2011 for OpenSim by  doxygen 1.6.1