ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkTemporalRegion.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkTemporalRegion_h
19 #define itkTemporalRegion_h
20 
21 #include "itkRegion.h"
22 #include "itkRealTimeStamp.h"
23 #include "itkRealTimeInterval.h"
24 #include "itkNumericTraits.h"
25 #include <climits>
26 #include "ITKVideoCoreExport.h"
27 
29 #define ITK_INFINITE_FRAME_DURATION itk::NumericTraits<itk::SizeValueType>::max()
30 #define ITK_INFINITE_REAL_DURATION RealTimeInterval(ITK_INFINITE_FRAME_DURATION, 0)
31 
32 namespace itk
33 {
42 class ITKVideoCore_EXPORT TemporalRegion : public Region
43 {
44 public:
45 
48  typedef Region Superclass;
49 
50  itkTypeMacro(TemporalRegion, Region);
51 
54 
56  void SetRealStart(const RealTimeStamp s);
57  RealTimeStamp GetRealStart() const;
59 
61  void SetRealDuration(const RealTimeInterval d);
62  RealTimeInterval GetRealDuration() const;
64 
66  void SetFrameStart(const FrameOffsetType s);
67  FrameOffsetType GetFrameStart() const;
69 
71  void SetFrameDuration(const FrameOffsetType d);
72  FrameOffsetType GetFrameDuration() const;
74 
76  virtual RegionType GetRegionType() const ITK_OVERRIDE;
77 
80 
82  virtual ~TemporalRegion();
83 
85  virtual bool IsEqualInFrames(const Self & region) const;
86 
88  bool IsEqualInRealTime(const Self & region) const;
89 
91  bool operator==(const Self & region) const;
92 
93  bool operator!=(const Self & region) const;
94 
95 protected:
96 
97  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
98 
100  RealTimeStamp m_RealStart;
101  RealTimeInterval m_RealDuration;
102  FrameOffsetType m_FrameStart;
103  FrameOffsetType m_FrameDuration;
104 
105 }; // end class TemporalRegion
106 
108 ITKVideoCore_EXPORT std::ostream & operator<<(std::ostream & os, const TemporalRegion & region);
109 
110 } // end namespace itk
111 
112 #endif
unsigned long SizeValueType
Definition: itkIntTypes.h:143
The RealTimeStamp is a data structure for representing time with high precision and a large dynamic r...
A data structure for representing the time span between two RealTimeStamps, with similar high precisi...
Region subclass that holds a region in time.
A region represents some portion or piece of data.
Definition: itkRegion.h:64
::itk::SizeValueType FrameOffsetType
Control indentation during Print() invocation.
Definition: itkIndent.h:49