ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
itk::RealTimeInterval Class Reference

#include <itkRealTimeInterval.h>

Detailed Description

A data structure for representing the time span between two RealTimeStamps, with similar high precision and a large dynamic range to what the RealTimeStamps offer.

This class represents the difference between two time points, typically for applications that need to mark the time of acquisition of data with high precision (microseconds) and a large dynamic range (years). This class will be the natural representation for the duration of a video sequence, or for the time that has passed between the acquisition of one images and a subsequent one.

See also
RealTimeStamp
RealTimeClock

Definition at line 45 of file itkRealTimeInterval.h.

+ Collaboration diagram for itk::RealTimeInterval:

Public Types

using MicroSecondsDifferenceType = int64_t
 
using SecondsDifferenceType = int64_t
 
using Self = RealTimeInterval
 
using TimeRepresentationType = double
 

Public Member Functions

 RealTimeInterval ()
 
 RealTimeInterval (SecondsDifferenceType, MicroSecondsDifferenceType)
 
void Set (SecondsDifferenceType, MicroSecondsDifferenceType)
 
 ~RealTimeInterval ()
 
TimeRepresentationType GetTimeInMicroSeconds () const
 
TimeRepresentationType GetTimeInMilliSeconds () const
 
TimeRepresentationType GetTimeInSeconds () const
 
TimeRepresentationType GetTimeInMinutes () const
 
TimeRepresentationType GetTimeInHours () const
 
TimeRepresentationType GetTimeInDays () const
 
Self operator- (const Self &) const
 
Self operator+ (const Self &) const
 
const Selfoperator-= (const Self &)
 
const Selfoperator+= (const Self &)
 
bool operator> (const Self &) const
 
bool operator< (const Self &) const
 
bool operator== (const Self &) const
 
 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION (Self)
 
bool operator<= (const Self &) const
 
bool operator>= (const Self &) const
 

Private Attributes

MicroSecondsDifferenceType m_MicroSeconds
 
SecondsDifferenceType m_Seconds
 

Friends

ITKCommon_EXPORT std::ostream & operator<< (std::ostream &os, const RealTimeInterval &v)
 
class RealTimeStamp
 

Member Typedef Documentation

◆ MicroSecondsDifferenceType

Definition at line 52 of file itkRealTimeInterval.h.

◆ SecondsDifferenceType

Internal types used to represent seconds and microseconds.

Definition at line 51 of file itkRealTimeInterval.h.

◆ Self

Definition at line 48 of file itkRealTimeInterval.h.

◆ TimeRepresentationType

Native type used to represent the time in different time units.

Definition at line 64 of file itkRealTimeInterval.h.

Constructor & Destructor Documentation

◆ RealTimeInterval() [1/2]

itk::RealTimeInterval::RealTimeInterval ( )

Constructor

◆ RealTimeInterval() [2/2]

itk::RealTimeInterval::RealTimeInterval ( SecondsDifferenceType  ,
MicroSecondsDifferenceType   
)

Constructor with values. Intentionally made public

◆ ~RealTimeInterval()

itk::RealTimeInterval::~RealTimeInterval ( )

Destructor

Member Function Documentation

◆ GetTimeInDays()

TimeRepresentationType itk::RealTimeInterval::GetTimeInDays ( ) const

Return time in multiple units.

◆ GetTimeInHours()

TimeRepresentationType itk::RealTimeInterval::GetTimeInHours ( ) const

Return time in multiple units.

◆ GetTimeInMicroSeconds()

TimeRepresentationType itk::RealTimeInterval::GetTimeInMicroSeconds ( ) const

Return time in multiple units.

◆ GetTimeInMilliSeconds()

TimeRepresentationType itk::RealTimeInterval::GetTimeInMilliSeconds ( ) const

Return time in multiple units.

◆ GetTimeInMinutes()

TimeRepresentationType itk::RealTimeInterval::GetTimeInMinutes ( ) const

Return time in multiple units.

◆ GetTimeInSeconds()

TimeRepresentationType itk::RealTimeInterval::GetTimeInSeconds ( ) const

Return time in multiple units.

◆ ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION()

itk::RealTimeInterval::ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION ( Self  )

Comparison operations.

◆ operator+()

Self itk::RealTimeInterval::operator+ ( const Self ) const

Arithmetic operations between RealTimeInterval and RealTimeInterval.

◆ operator+=()

const Self& itk::RealTimeInterval::operator+= ( const Self )

Arithmetic operations between RealTimeInterval and RealTimeInterval.

◆ operator-()

Self itk::RealTimeInterval::operator- ( const Self ) const

Arithmetic operations between RealTimeInterval and RealTimeInterval.

◆ operator-=()

const Self& itk::RealTimeInterval::operator-= ( const Self )

Arithmetic operations between RealTimeInterval and RealTimeInterval.

◆ operator<()

bool itk::RealTimeInterval::operator< ( const Self ) const

Comparison operations.

◆ operator<=()

bool itk::RealTimeInterval::operator<= ( const Self ) const

Comparison operations.

◆ operator==()

bool itk::RealTimeInterval::operator== ( const Self ) const

Comparison operations.

◆ operator>()

bool itk::RealTimeInterval::operator> ( const Self ) const

Comparison operations.

◆ operator>=()

bool itk::RealTimeInterval::operator>= ( const Self ) const

Comparison operations.

◆ Set()

void itk::RealTimeInterval::Set ( SecondsDifferenceType  ,
MicroSecondsDifferenceType   
)

Set with values. The units and signs of the seconds and microseconds will be harmonized internally.

Friends And Related Function Documentation

◆ operator<<

ITKCommon_EXPORT std::ostream& operator<< ( std::ostream &  os,
const RealTimeInterval v 
)
friend

Default print out of a RealTimeInterval

◆ RealTimeStamp

friend class RealTimeStamp
friend

Definition at line 115 of file itkRealTimeInterval.h.

Member Data Documentation

◆ m_MicroSeconds

MicroSecondsDifferenceType itk::RealTimeInterval::m_MicroSeconds
private

Number of Microseconds since the second. Should be in the range -999,999 to 999,999 and it must always have the same sign as the m_Seconds member variable.

Definition at line 124 of file itkRealTimeInterval.h.

◆ m_Seconds

SecondsDifferenceType itk::RealTimeInterval::m_Seconds
private

Number of Seconds and Microseconds since...

Definition at line 118 of file itkRealTimeInterval.h.


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