ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkTemporalDataObject.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkTemporalDataObject_h
00019 #define __itkTemporalDataObject_h
00020 
00021 #include "itkDataObject.h"
00022 #include "itkRingBuffer.h"
00023 #include "itkTemporalRegion.h"
00024 
00025 namespace itk
00026 {
00027 
00041 class ITK_EXPORT TemporalDataObject : public DataObject
00042 {
00043 public:
00044 
00046   typedef TemporalDataObject         Self;
00047   typedef DataObject                 Superclass;
00048   typedef SmartPointer< Self >       Pointer;
00049   typedef SmartPointer< const Self > ConstPointer;
00050   typedef WeakPointer< const Self >  ConstWeakPointer;
00051 
00052   typedef RingBuffer<DataObject>        BufferType;
00053   typedef TemporalRegion                TemporalRegionType;
00054 
00056   typedef enum {Frame, RealTime, FrameAndRealTime} TemporalUnitType;
00057 
00058   itkNewMacro(Self);
00059 
00061   itkTypeMacro(TemporalDataObject, DataObject);
00062 
00064   virtual TemporalUnitType GetTemporalUnit() const;
00065 
00067   virtual void SetTemporalUnitToFrame();
00068   virtual void SetTemporalUnitToRealTime();
00069   virtual void SetTemporalUnitToFrameAndRealTime();
00071 
00073   SizeValueType GetNumberOfBuffers();
00074   void SetNumberOfBuffers(SizeValueType num);
00076 
00077   virtual void SetLargestPossibleTemporalRegion(
00078     const TemporalRegionType & region);
00079   virtual const TemporalRegionType & GetLargestPossibleTemporalRegion() const;
00080 
00081   virtual void SetBufferedTemporalRegion(const TemporalRegionType & region);
00082   virtual const TemporalRegionType & GetBufferedTemporalRegion() const;
00083   virtual void SetRequestedTemporalRegion(const TemporalRegionType & region);
00084   virtual const TemporalRegionType & GetRequestedTemporalRegion() const;
00085 
00088   virtual const TemporalRegionType GetUnbufferedRequestedTemporalRegion();
00089 
00090   virtual void SetRequestedRegionToLargestPossibleRegion();
00091 
00092   virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
00093 
00094   virtual bool VerifyRequestedRegion();
00095 
00096   virtual void CopyInformation(const DataObject *);
00097 
00098   virtual void SetRequestedRegion(const DataObject *);
00099 
00100   virtual void Graft(const DataObject *);
00101 
00102 protected:
00103 
00104   TemporalDataObject();
00105   virtual ~TemporalDataObject();
00106   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00107 
00109   BufferType::Pointer m_DataObjectBuffer;
00110 
00112   TemporalRegionType m_LargestPossibleTemporalRegion;
00113   TemporalRegionType m_RequestedTemporalRegion;
00114   TemporalRegionType m_BufferedTemporalRegion;
00115 
00116   TemporalUnitType m_TemporalUnit;
00117 private:
00118 
00119   TemporalDataObject(const Self &); //purposely not implemented
00120   void operator=(const Self &);     //purposely not implemented
00121 
00122 };  // end class TemporalDataObject
00123 
00124 } // end namespace itk
00125 
00126 #endif
00127