ITK  5.2.0
Insight Toolkit
itkTemporalRegion.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 {
43 class ITKVideoCore_EXPORT TemporalRegion : public Region
44 {
45 public:
46 
49  using Superclass = Region;
50 
51  itkTypeMacro(TemporalRegion, Region);
52 
55 
57  void
58  SetRealStart(const RealTimeStamp s);
60  GetRealStart() const;
62 
64  void
65  SetRealDuration(const RealTimeInterval d);
67  GetRealDuration() const;
69 
71  void
72  SetFrameStart(const FrameOffsetType s);
74  GetFrameStart() const;
76 
78  void
79  SetFrameDuration(const FrameOffsetType d);
81  GetFrameDuration() const;
83 
86  GetRegionType() const override;
87 
90 
92  ~TemporalRegion() override;
93 
95  virtual bool
96  IsEqualInFrames(const Self & region) const;
97 
99  bool
100  IsEqualInRealTime(const Self & region) const;
101 
103  bool
104  operator==(const Self & region) const;
105 
106  bool
107  operator!=(const Self & region) const;
108 
109 protected:
110  void
111  PrintSelf(std::ostream & os, Indent indent) const override;
112 
116  FrameOffsetType m_FrameStart{ 0 };
117  FrameOffsetType m_FrameDuration{ 0 };
118 
119 }; // end class TemporalRegion
120 
122 ITKVideoCore_EXPORT std::ostream &
123  operator<<(std::ostream & os, const TemporalRegion & region);
124 
125 } // end namespace itk
126 
127 #endif
itk::operator<<
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:213
itkRegion.h
itk::RealTimeStamp
The RealTimeStamp is a data structure for representing time with high precision and a large dynamic r...
Definition: itkRealTimeStamp.h:45
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkRealTimeInterval.h
itk::TemporalRegion
Region subclass that holds a region in time.
Definition: itkTemporalRegion.h:43
RegionEnum
itk::Region
A region represents some portion or piece of data.
Definition: itkRegion.h:65
itk::operator==
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:532
itk::TemporalRegion::m_RealStart
RealTimeStamp m_RealStart
Definition: itkTemporalRegion.h:114
itk::operator!=
bool operator!=(const Index< VDimension > &one, const Index< VDimension > &two)
Definition: itkIndex.h:539
itk::RealTimeInterval
A data structure for representing the time span between two RealTimeStamps, with similar high precisi...
Definition: itkRealTimeInterval.h:45
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::TemporalRegion::FrameOffsetType
::itk::SizeValueType FrameOffsetType
Definition: itkTemporalRegion.h:54
itk::TemporalRegion::m_RealDuration
RealTimeInterval m_RealDuration
Definition: itkTemporalRegion.h:115
itkNumericTraits.h
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itkRealTimeStamp.h