ITK  4.6.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 
28 #define ITK_INFINITE_FRAME_DURATION itk::NumericTraits<itk::SizeValueType>::max()
29 #define ITK_INFINITE_REAL_DURATION RealTimeInterval(ITK_INFINITE_FRAME_DURATION, 0)
30 
31 namespace itk
32 {
41 class TemporalRegion : public Region
42 {
43 public:
44 
47  typedef Region Superclass;
48 
49  itkTypeMacro(TemporalRegion, Region);
50 
53 
55  void SetRealStart(const RealTimeStamp s);
58 
60  void SetRealDuration(const RealTimeInterval d);
63 
65  void SetFrameStart(const FrameOffsetType s);
68 
70  void SetFrameDuration(const FrameOffsetType d);
73 
75  virtual RegionType GetRegionType() const ITK_OVERRIDE;
76 
79 
81  virtual ~TemporalRegion();
82 
84  virtual bool IsEqualInFrames(const Self & region) const;
85 
87  bool IsEqualInRealTime(const Self & region) const;
88 
90  bool operator==(const Self & region) const;
91 
92  bool operator!=(const Self & region) const;
93 
94 protected:
95 
96  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
97 
103 
104 }; // end class TemporalRegion
105 
107 std::ostream & operator<<(std::ostream & os, const TemporalRegion & region);
108 
109 } // end namespace itk
110 
111 #endif
FrameOffsetType GetFrameDuration() const
FrameOffsetType m_FrameStart
void SetRealStart(const RealTimeStamp s)
virtual bool IsEqualInFrames(const Self &region) const
FrameOffsetType m_FrameDuration
unsigned long SizeValueType
Definition: itkIntTypes.h:143
FrameOffsetType GetFrameStart() const
RealTimeStamp GetRealStart() const
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...
RealTimeStamp m_RealStart
RealTimeInterval GetRealDuration() const
Region subclass that holds a region in time.
RealTimeInterval m_RealDuration
A region represents some portion or piece of data.
Definition: itkRegion.h:64
bool IsEqualInRealTime(const Self &region) const
::itk::SizeValueType FrameOffsetType
void SetRealDuration(const RealTimeInterval d)
void SetFrameStart(const FrameOffsetType s)
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual RegionType GetRegionType() const ITK_OVERRIDE
void SetFrameDuration(const FrameOffsetType d)