NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
mitkTimeStampsContainer.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef mitkTimeStampsContainer_h
16 #define mitkTimeStampsContainer_h
17 
18 #include "niftkOpenCVUtilsExports.h"
19 #include <cv.h>
20 
21 namespace mitk
22 {
23 
30 class NIFTKOPENCVUTILS_EXPORT TimeStampsContainer
31 {
32 public:
33 
34  typedef unsigned long long TimeStamp;
35 
39  void Clear();
40 
44  void Sort();
45 
49  void Insert(const TimeStamp& timeStamp);
50 
55  bool Remove(const TimeStamp& timeStamp);
56 
60  TimeStamp GetTimeStamp(std::vector<TimeStampsContainer::TimeStamp>::size_type frameNumber) const;
61 
65  std::vector<TimeStampsContainer::TimeStamp>::size_type GetSize() const;
66 
72  std::vector<TimeStampsContainer::TimeStamp>::size_type GetFrameNumber(const TimeStamp& timeStamp) const;
73 
90  bool GetBoundingTimeStamps(const TimeStamp& timeStamp,
91  TimeStamp& before,
92  TimeStamp& after,
93  double& proportion
94  ) const;
95 
106  TimeStamp GetNearestTimeStamp (const TimeStamp& timeStamp , long long * delta = NULL ) const;
107 
108 private:
109 
110  std::vector<TimeStamp> m_TimeStamps;
111 
112 };
113 
114 } // end namespace
115 
116 #endif
unsigned long long TimeStamp
Definition: mitkTimeStampsContainer.h:34
Definition: ReceptorMemberCommandTest.cxx:25
Helper class that contains a vector of timestamps, that are assumed to be strictly increasing...
Definition: mitkTimeStampsContainer.h:30