ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTemporalDataObject.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 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 {
28 
42 class ITK_FORCE_EXPORT_MACRO(ITKVideoCore) TemporalDataObject : public DataObject
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_ASSIGN(TemporalDataObject);
46 
53 
56 
58  typedef enum {Frame, RealTime, FrameAndRealTime} TemporalUnitType;
59 
60  itkNewMacro(Self);
61 
63  itkTypeMacro(TemporalDataObject, DataObject);
64 
66  virtual TemporalUnitType GetTemporalUnit() const;
67 
69  virtual void SetTemporalUnitToFrame();
70  virtual void SetTemporalUnitToRealTime();
71  virtual void SetTemporalUnitToFrameAndRealTime();
73 
75  SizeValueType GetNumberOfBuffers();
76  void SetNumberOfBuffers(SizeValueType num);
78 
79  virtual void SetLargestPossibleTemporalRegion(
80  const TemporalRegionType & region);
81  virtual const TemporalRegionType & GetLargestPossibleTemporalRegion() const;
82 
83  virtual void SetBufferedTemporalRegion(const TemporalRegionType & region);
84  virtual const TemporalRegionType & GetBufferedTemporalRegion() const;
85  virtual void SetRequestedTemporalRegion(const TemporalRegionType & region);
86  virtual const TemporalRegionType & GetRequestedTemporalRegion() const;
87 
90  virtual const TemporalRegionType GetUnbufferedRequestedTemporalRegion();
91 
92  void SetRequestedRegionToLargestPossibleRegion() override;
93 
94  bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
95 
96  bool VerifyRequestedRegion() override;
97 
98  void CopyInformation(const DataObject *) override;
99 
100  void SetRequestedRegion(const DataObject *) override;
101 
102  void Graft(const DataObject *) override;
103 
104 protected:
105 
107  ~TemporalDataObject() override;
108  void PrintSelf(std::ostream & os, Indent indent) const override;
109 
112 
117 
118  TemporalUnitType m_TemporalUnit{Frame};
119 }; // end class TemporalDataObject
120 
121 } // end namespace itk
122 
123 #endif
TemporalRegionType m_LargestPossibleTemporalRegion
unsigned long SizeValueType
Definition: itkIntTypes.h:83
class ITK_FORWARD_EXPORT DataObject
Definition: itkDataObject.h:41
Implements a weak reference to an object.
TemporalRegionType m_BufferedTemporalRegion
Region subclass that holds a region in time.
TemporalRegionType m_RequestedTemporalRegion
class ITK_FORWARD_EXPORT TemporalDataObject
Control indentation during Print() invocation.
Definition: itkIndent.h:49
DataObject subclass with knowledge of temporal region.
BufferType::Pointer m_DataObjectBuffer
Base class for most ITK classes.
Definition: itkObject.h:60
Templated ring buffer for holding anything.
Definition: itkRingBuffer.h:39
Base class for all data objects in ITK.