ITK  5.4.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  * https://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  itkOverrideGetNameOfClassMacro(TemporalRegion);
52 
55 
57  void
58  SetRealStart(const RealTimeStamp s);
60  GetRealStart() const;
64  void
65  SetRealDuration(const RealTimeInterval d);
67  GetRealDuration() const;
71  void
72  SetFrameStart(const FrameOffsetType s);
74  GetFrameStart() const;
78  void
79  SetFrameDuration(const FrameOffsetType d);
81  GetFrameDuration() const;
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  ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self);
107 
108 protected:
109  void
110  PrintSelf(std::ostream & os, Indent indent) const override;
111 
115  RealTimeStamp m_RealStart{};
116 
119  RealTimeInterval m_RealDuration{};
120 
122  FrameOffsetType m_FrameStart{ 0 };
123 
125  FrameOffsetType m_FrameDuration{ 0 };
126 
127 }; // end class TemporalRegion
128 
130 ITKVideoCore_EXPORT std::ostream &
131  operator<<(std::ostream & os, const TemporalRegion & region);
132 
133 } // end namespace itk
134 
135 #endif
itk::operator<<
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:216
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:545
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
itkNumericTraits.h
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::TemporalRegion::FrameOffsetType
itk::SizeValueType FrameOffsetType
Definition: itkTemporalRegion.h:54
itkRealTimeStamp.h