ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkVideoIOBase.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 __itkVideoIOBase_h
19 #define __itkVideoIOBase_h
20 
21 #include "itkImageIOBase.h"
22 #include "itkExceptionObject.h"
23 #include "vnl/vnl_vector.h"
24 
25 #include <string>
26 
27 namespace itk
28 {
48 class VideoIOBase : public ImageIOBase
49 {
50 public:
52  typedef VideoIOBase Self;
56 
58  typedef double TemporalOffsetType;
60  typedef double TemporalRatioType;
61 
64 
66  itkTypeMacro(VideoIOBase, Superclass);
67 
69  virtual void FinishReadingOrWriting() = 0;
70 
71  /*-------- This part of the interface deals with reading data. ------ */
72 
75 
77  virtual void SetReadFromFile() = 0;
78 
80  virtual void SetReadFromCamera() = 0;
81 
84  return this->m_ReadType;
85  }
86 
89  virtual bool CanReadCamera( CameraIDType cameraID ) const = 0;
90 
93  virtual bool SetNextFrameToRead( FrameOffsetType frameNumber ) = 0;
94 
96  virtual TemporalOffsetType GetPositionInMSec() const = 0;
97  virtual TemporalRatioType GetRatio() const = 0;
98  virtual FrameOffsetType GetFrameTotal() const = 0;
99  virtual TemporalRatioType GetFramesPerSecond() const = 0;
100  virtual FrameOffsetType GetCurrentFrame() const = 0;
101  virtual FrameOffsetType GetLastIFrame() const = 0;
103 
104  /*-------- This part of the interfaces deals with writing data. ----- */
105 
107  virtual void SetWriterParameters( TemporalRatioType framesPerSecond,
108  const std::vector<SizeValueType>& dim,
109  const char* fourCC,
110  unsigned int nChannels,
111  IOComponentType componentType) = 0;
112 
113 protected:
114 
115  VideoIOBase();
116  virtual ~VideoIOBase();
117 
118  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
119 
131 
132 private:
133  VideoIOBase(const Self &); //purposely not implemented
134  void operator=(const Self &); //purposely not implemented
135 
136 };
137 
138 } // end namespace itk
139 
140 #endif // __itkVideoIOBase_h
virtual ~VideoIOBase()
Light weight base class for most itk classes.
Abstract superclass defines video IO interface.
TemporalRatioType m_FramesPerSecond
FrameOffsetType m_IFrameInterval
FrameOffsetType m_FrameTotal
Abstract superclass defines image IO interface.
FrameOffsetType m_LastIFrame
TemporalRatioType m_Ratio
virtual bool CanReadCamera(CameraIDType cameraID) const =0
virtual TemporalOffsetType GetPositionInMSec() const =0
virtual TemporalRatioType GetFramesPerSecond() const =0
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
VideoIOBase Self
unsigned long SizeValueType
Definition: itkIntTypes.h:143
ReadType GetReadType()
SizeValueType FrameOffsetType
virtual void SetReadFromFile()=0
SizeValueType CameraIDType
virtual TemporalRatioType GetRatio() const =0
virtual FrameOffsetType GetFrameTotal() const =0
::itk::SizeValueType SizeValueType
virtual void FinishReadingOrWriting()=0
FrameOffsetType m_CurrentFrame
void operator=(const Self &)
virtual FrameOffsetType GetCurrentFrame() const =0
::itk::SizeValueType SizeValueType
ImageIOBase Superclass
virtual void SetWriterParameters(TemporalRatioType framesPerSecond, const std::vector< SizeValueType > &dim, const char *fourCC, unsigned int nChannels, IOComponentType componentType)=0
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual FrameOffsetType GetLastIFrame() const =0
virtual void SetReadFromCamera()=0
Base class for most ITK classes.
Definition: itkObject.h:57
TemporalOffsetType m_PositionInMSec
double TemporalRatioType
double TemporalOffsetType
virtual bool SetNextFrameToRead(FrameOffsetType frameNumber)=0