NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Helper class that contains a vector of timestamps, that are assumed to be strictly increasing. More...
Public Types | |
typedef unsigned long long | TimeStamp |
Public Member Functions | |
void | Clear () |
Empties the list. More... | |
void | Sort () |
Sorts the list. More... | |
void | Insert (const TimeStamp &timeStamp) |
Simply adds a TimeStamp to the list. More... | |
bool | Remove (const TimeStamp &timeStamp) |
Removes a TimeStamp to the list. More... | |
TimeStamp | GetTimeStamp (std::vector< TimeStampsContainer::TimeStamp >::size_type frameNumber) const |
Returns the time stamp at a given frameNumber. More... | |
std::vector < TimeStampsContainer::TimeStamp > ::size_type | GetSize () const |
Gets the number of timestamps. More... | |
std::vector < TimeStampsContainer::TimeStamp > ::size_type | GetFrameNumber (const TimeStamp &timeStamp) const |
Given a timeStamp in nanoseconds, will search the list for the corresponding array index, returning -1 if not found. More... | |
bool | GetBoundingTimeStamps (const TimeStamp &timeStamp, TimeStamp &before, TimeStamp &after, double &proportion) const |
Retrieves the timestamps before and after a given point. More... | |
TimeStamp | GetNearestTimeStamp (const TimeStamp &timeStamp, long long *delta=NULL) const |
Retrieves the closest timestamp, and if delta is non-null, will populate with the error. More... | |
Helper class that contains a vector of timestamps, that are assumed to be strictly increasing.
See also mitkTimeStampsContainerTest.cxx.
typedef unsigned long long mitk::TimeStampsContainer::TimeStamp |
bool mitk::TimeStampsContainer::GetBoundingTimeStamps | ( | const TimeStamp & | timeStamp, |
TimeStamp & | before, | ||
TimeStamp & | after, | ||
double & | proportion | ||
) | const |
Retrieves the timestamps before and after a given point.
[in] | timeStamp | in nano-seconds since Unix Epoch (UTC). |
[out] | before | timestamp in nano-seconds since Unix Epoch (UTC). |
[out] | after | timestamp in nano-seconds since Unix Epoch (UTC). |
[out] | proportion | the fraction from [0 to 1] of what proportion the input timestamp is of the interval between before and after. |
Additional Spec:
std::vector< TimeStampsContainer::TimeStamp >::size_type mitk::TimeStampsContainer::GetFrameNumber | ( | const TimeStamp & | timeStamp | ) | const |
Given a timeStamp in nanoseconds, will search the list for the corresponding array index, returning -1 if not found.
[in] | timeStamp | in nano-seconds since Unix Epoch (UTC). |
unsigned long long mitk::TimeStampsContainer::GetNearestTimeStamp | ( | const TimeStamp & | timeStamp, |
long long * | delta = NULL |
||
) | const |
Retrieves the closest timestamp, and if delta is non-null, will populate with the error.
[in] | timeStamp | in nano-seconds since Unix Epoch (UTC). |
[out] | delta | i.e. the number of nanoseconds between the requested timestamp, and the returned timestamp. |
Additional Spec:
std::vector< TimeStampsContainer::TimeStamp >::size_type mitk::TimeStampsContainer::GetSize | ( | ) | const |
Gets the number of timestamps.
TimeStampsContainer::TimeStamp mitk::TimeStampsContainer::GetTimeStamp | ( | std::vector< TimeStampsContainer::TimeStamp >::size_type | frameNumber | ) | const |
Returns the time stamp at a given frameNumber.
Simply adds a TimeStamp to the list.
bool mitk::TimeStampsContainer::Remove | ( | const TimeStamp & | timeStamp | ) |
Removes a TimeStamp to the list.
void mitk::TimeStampsContainer::Sort | ( | ) |
Sorts the list.