ITK  4.8.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 ITKVideoCore_EXPORT TemporalDataObject : public DataObject
43 {
44 public:
45 
52 
55 
57  typedef enum {Frame, RealTime, FrameAndRealTime} TemporalUnitType;
58 
59  itkNewMacro(Self);
60 
62  itkTypeMacro(TemporalDataObject, DataObject);
63 
65  virtual TemporalUnitType GetTemporalUnit() const;
66 
68  virtual void SetTemporalUnitToFrame();
69  virtual void SetTemporalUnitToRealTime();
70  virtual void SetTemporalUnitToFrameAndRealTime();
72 
74  SizeValueType GetNumberOfBuffers();
75  void SetNumberOfBuffers(SizeValueType num);
77 
78  virtual void SetLargestPossibleTemporalRegion(
79  const TemporalRegionType & region);
80  virtual const TemporalRegionType & GetLargestPossibleTemporalRegion() const;
81 
82  virtual void SetBufferedTemporalRegion(const TemporalRegionType & region);
83  virtual const TemporalRegionType & GetBufferedTemporalRegion() const;
84  virtual void SetRequestedTemporalRegion(const TemporalRegionType & region);
85  virtual const TemporalRegionType & GetRequestedTemporalRegion() const;
86 
89  virtual const TemporalRegionType GetUnbufferedRequestedTemporalRegion();
90 
91  virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE;
92 
93  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE;
94 
95  virtual bool VerifyRequestedRegion() ITK_OVERRIDE;
96 
97  virtual void CopyInformation(const DataObject *) ITK_OVERRIDE;
98 
99  virtual void SetRequestedRegion(const DataObject *) ITK_OVERRIDE;
100 
101  virtual void Graft(const DataObject *) ITK_OVERRIDE;
102 
103 protected:
104 
106  virtual ~TemporalDataObject();
107  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
108 
110  BufferType::Pointer m_DataObjectBuffer;
111 
113  TemporalRegionType m_LargestPossibleTemporalRegion;
114  TemporalRegionType m_RequestedTemporalRegion;
115  TemporalRegionType m_BufferedTemporalRegion;
116 
117  TemporalUnitType m_TemporalUnit;
118 
119 private:
120 
121  TemporalDataObject(const Self &); //purposely not implemented
122  void operator=(const Self &); //purposely not implemented
123 
124 }; // end class TemporalDataObject
125 
126 } // end namespace itk
127 
128 #endif
SmartPointer< Self > Pointer
Implements a weak reference to an object.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
Region subclass that holds a region in time.
RingBuffer< DataObject > BufferType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
DataObject subclass with knowledge of temporal region.
WeakPointer< const Self > ConstWeakPointer
Templated ring buffer for holding anything.
Definition: itkRingBuffer.h:39
SmartPointer< const Self > ConstPointer
Base class for all data objects in ITK.