ITK  5.2.0
Insight Toolkit
itkTemporalDataObject.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 itkTemporalDataObject_h
19 #define itkTemporalDataObject_h
20 
21 #include "itkDataObject.h"
22 #include "itkRingBuffer.h"
23 #include "itkTemporalRegion.h"
24 #include "ITKVideoCoreExport.h"
25 
26 namespace itk
27 {
33 {
34 public:
40  enum class TemporalUnit : uint8_t
41  {
42  Frame,
43  RealTime,
45  };
46 };
47 // Define how to print enumeration
48 extern ITKVideoCore_EXPORT std::ostream &
49  operator<<(std::ostream & out, TemporalDataObjectEnums::TemporalUnit value);
50 
65 class ITK_FORCE_EXPORT_MACRO(ITKVideoCore) TemporalDataObject : public DataObject
66 {
67 public:
68  ITK_DISALLOW_COPY_AND_MOVE(TemporalDataObject);
69 
76 
79 
82 
83 #if !defined(ITK_LEGACY_REMOVE)
84 
85  static constexpr TemporalUnitEnum Frame = TemporalUnitEnum::Frame;
86  static constexpr TemporalUnitEnum RealTime = TemporalUnitEnum::RealTime;
87  static constexpr TemporalUnitEnum FrameAndRealTime = TemporalUnitEnum::FrameAndRealTime;
88 #endif
89 
90  itkNewMacro(Self);
91 
93  itkTypeMacro(TemporalDataObject, DataObject);
94 
96  virtual TemporalUnitType
97  GetTemporalUnit() const;
98 
100  virtual void
101  SetTemporalUnitToFrame();
102  virtual void
103  SetTemporalUnitToRealTime();
104  virtual void
105  SetTemporalUnitToFrameAndRealTime();
107 
110  GetNumberOfBuffers();
111  void
112  SetNumberOfBuffers(SizeValueType num);
114 
115  virtual void
116  SetLargestPossibleTemporalRegion(const TemporalRegionType & region);
117  virtual const TemporalRegionType &
118  GetLargestPossibleTemporalRegion() const;
119 
120  virtual void
121  SetBufferedTemporalRegion(const TemporalRegionType & region);
122  virtual const TemporalRegionType &
123  GetBufferedTemporalRegion() const;
124  virtual void
125  SetRequestedTemporalRegion(const TemporalRegionType & region);
126  virtual const TemporalRegionType &
127  GetRequestedTemporalRegion() const;
128 
131  virtual const TemporalRegionType
132  GetUnbufferedRequestedTemporalRegion();
133 
134  void
135  SetRequestedRegionToLargestPossibleRegion() override;
136 
137  bool
138  RequestedRegionIsOutsideOfTheBufferedRegion() override;
139 
140  bool
141  VerifyRequestedRegion() override;
142 
143  void
144  CopyInformation(const DataObject *) override;
145 
146  void
147  SetRequestedRegion(const DataObject *) override;
148 
149  void
150  Graft(const DataObject *) override;
151 
152 protected:
154  ~TemporalDataObject() override;
155  void
156  PrintSelf(std::ostream & os, Indent indent) const override;
157 
160 
165 
166  TemporalUnitEnum m_TemporalUnit{ TemporalUnitEnum::Frame };
167 }; // end class TemporalDataObject
168 } // end namespace itk
169 
170 #endif
itk::TemporalDataObject
class ITK_FORWARD_EXPORT TemporalDataObject
Definition: itkTemporalProcessObject.h:29
itk::uint8_t
::uint8_t uint8_t
Definition: itkIntTypes.h:29
itk::operator<<
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:218
itk::TemporalDataObject::m_DataObjectBuffer
BufferType::Pointer m_DataObjectBuffer
Definition: itkTemporalDataObject.h:159
itk::TemporalDataObject::m_RequestedTemporalRegion
TemporalRegionType m_RequestedTemporalRegion
Definition: itkTemporalDataObject.h:163
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkDataObject.h
itk::TemporalRegion
Region subclass that holds a region in time.
Definition: itkTemporalRegion.h:43
itk::TemporalDataObjectEnums
Contains all enum classes used by TemporalUnit class.
Definition: itkTemporalDataObject.h:32
itk::TemporalDataObjectEnums::TemporalUnit::RealTime
itkRingBuffer.h
itk::RingBuffer
Templated ring buffer for holding anything.
Definition: itkRingBuffer.h:40
itk::TemporalDataObject::m_LargestPossibleTemporalRegion
TemporalRegionType m_LargestPossibleTemporalRegion
Definition: itkTemporalDataObject.h:162
itk::DataObject
class ITK_FORWARD_EXPORT DataObject
Definition: itkDataObject.h:42
itkTemporalRegion.h
itk::TemporalDataObjectEnums::TemporalUnit::FrameAndRealTime
itk::WeakPointer
Implements a weak reference to an object.
Definition: itkWeakPointer.h:44
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
TemporalUnit
For defining the way in which to compare temporal regions.
itk::TemporalDataObjectEnums::TemporalUnit
TemporalUnit
Definition: itkTemporalDataObject.h:40
itk::TemporalDataObject::m_BufferedTemporalRegion
TemporalRegionType m_BufferedTemporalRegion
Definition: itkTemporalDataObject.h:164
itk::TemporalDataObjectEnums::TemporalUnit::Frame
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::TemporalDataObject
DataObject subclass with knowledge of temporal region.
Definition: itkTemporalDataObject.h:65
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293