NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | List of all members
mitk::TrackingAndTimeStampsContainer Class Reference

Contains a matched vector of timestamps, and 4x4 tracking Matrices. More...

Public Member Functions

void Clear ()
 Empties the list. More...
 
int LoadFromDirectory (const std::string &dirName, const bool &haltOnMatrixReadFail)
 Loads tracking data from directory. More...
 
int SaveToDirectory (const std::string &dirName)
 Saves tracking data to directory. More...
 
void Insert (const TimeStampsContainer::TimeStamp &timeStamp, const cv::Matx44d &matrix)
 Simply adds a TimeStamp+Matrix combo to the list. More...
 
TimeStampsContainer::TimeStamp GetTimeStamp (std::vector< TimeStampsContainer::TimeStamp >::size_type frameNumber) const
 Returns the time stamp at a given frameNumber. More...
 
cv::Matx44d GetMatrix (std::vector< TimeStampsContainer::TimeStamp >::size_type frameNumber) const
 Returns the matrix at a given frameNumber. More...
 
std::vector
< TimeStampsContainer::TimeStamp >
::size_type 
GetSize () const
 Gets the number of items. More...
 
std::vector
< TimeStampsContainer::TimeStamp >
::size_type 
GetFrameNumber (const TimeStampsContainer::TimeStamp &timeStamp) const
 
TimeStampsContainer::TimeStamp GetNearestTimeStamp (const TimeStampsContainer::TimeStamp &timeStamp, long long *delta=NULL) const
 
cv::Matx44d InterpolateMatrix (const TimeStampsContainer::TimeStamp &timeStamp, long long &minError, bool &inBounds)
 Extracts a matrix for the given time-stamp, by interpolating. More...
 
cv::Matx44d GetNearestMatrix (const TimeStampsContainer::TimeStamp &timeStamp, long long &error, bool &inBounds)
 Extracts a matrix for the given time-stamp, by using the nearest time stamp. More...
 

Detailed Description

Contains a matched vector of timestamps, and 4x4 tracking Matrices.

See also mitk::TimeStampsContainer.

This class is not thread-safe.

Member Function Documentation

void mitk::TrackingAndTimeStampsContainer::Clear ( void  )

Empties the list.

std::vector< TimeStampsContainer::TimeStamp >::size_type mitk::TrackingAndTimeStampsContainer::GetFrameNumber ( const TimeStampsContainer::TimeStamp timeStamp) const
cv::Matx44d mitk::TrackingAndTimeStampsContainer::GetMatrix ( std::vector< TimeStampsContainer::TimeStamp >::size_type  frameNumber) const

Returns the matrix at a given frameNumber.

cv::Matx44d mitk::TrackingAndTimeStampsContainer::GetNearestMatrix ( const TimeStampsContainer::TimeStamp timeStamp,
long long &  error,
bool &  inBounds 
)

Extracts a matrix for the given time-stamp, by using the nearest time stamp.

Parameters
thedesired time stamp and a holder to return the timing error.
anda bool which will be true if the timestamp is within the high and low bounds
TimeStampsContainer::TimeStamp mitk::TrackingAndTimeStampsContainer::GetNearestTimeStamp ( const TimeStampsContainer::TimeStamp timeStamp,
long long *  delta = NULL 
) const
std::vector< TimeStampsContainer::TimeStamp >::size_type mitk::TrackingAndTimeStampsContainer::GetSize ( ) const

Gets the number of items.

TimeStampsContainer::TimeStamp mitk::TrackingAndTimeStampsContainer::GetTimeStamp ( std::vector< TimeStampsContainer::TimeStamp >::size_type  frameNumber) const

Returns the time stamp at a given frameNumber.

void mitk::TrackingAndTimeStampsContainer::Insert ( const TimeStampsContainer::TimeStamp timeStamp,
const cv::Matx44d &  matrix 
)

Simply adds a TimeStamp+Matrix combo to the list.

Most use-cases will load call LoadFromDirectory().

cv::Matx44d mitk::TrackingAndTimeStampsContainer::InterpolateMatrix ( const TimeStampsContainer::TimeStamp timeStamp,
long long &  minError,
bool &  inBounds 
)

Extracts a matrix for the given time-stamp, by interpolating.

Parameters
thedesired time stamp and a holder to return the timing error.
anda bool which will be true if the timestamp is within the high and low bounds
int mitk::TrackingAndTimeStampsContainer::LoadFromDirectory ( const std::string dirName,
const bool &  haltOnMatrixReadFail 
)

Loads tracking data from directory.

Returns
The number of matrix files that failed on read
int mitk::TrackingAndTimeStampsContainer::SaveToDirectory ( const std::string dirName)

Saves tracking data to directory.


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