This file is indexed.

/usr/include/ITK-4.9/itkVideoIOBase.h is in libinsighttoolkit4-dev 4.9.0-4ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*=========================================================================
 *
 *  Copyright Insight Software Consortium
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0.txt
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *=========================================================================*/
#ifndef itkVideoIOBase_h
#define itkVideoIOBase_h

#include "itkImageIOBase.h"
#include "itkExceptionObject.h"
#include "ITKVideoIOExport.h"
#include "vnl/vnl_vector.h"

#include <string>

namespace itk
{
/** \class VideoIOBase
 * \brief Abstract superclass defines video IO interface.
 *
 * VideoIOBase is a class that reads and/or writes video data
 * using a particular external technique or external library (OpenCV, vxl). The
 * VideoIOBase encapsulates both the reading and writing of data. The
 * VideoIOBase is used by the VideoFileReader class (to read data)
 * and the VideoFileWriter (to write data). Normally the user does not directly
 * manipulate this class directly.
 *
 * A Pluggable factory pattern is used. This allows different kinds of
 * readers to be registered (even at run time) without having to
 * modify the code in this class.
 *
 * \sa VideoFileWriter
 * \sa VideoFileReader
 *
 * \ingroup ITKVideoIO
 */
class ITKVideoIO_EXPORT VideoIOBase : public ImageIOBase
{
public:
  /** Standard class typedefs. */
  typedef VideoIOBase          Self;
  typedef ImageIOBase          Superclass;
  typedef SmartPointer< Self > Pointer;
  typedef ::itk::SizeValueType SizeValueType;

  /** Frame offset typedefs */
  typedef double               TemporalOffsetType;
  typedef SizeValueType        FrameOffsetType;
  typedef double               TemporalRatioType;

  /** Video-specific typedefs */
  typedef SizeValueType CameraIDType;

  /** Run-time type information (and related methods). */
  itkTypeMacro(VideoIOBase, Superclass);

  /** Close the reader and writer and reset members */
  virtual void FinishReadingOrWriting() = 0;

  /*-------- This part of the interface deals with reading data. ------ */

  /** Enum used to define weather to read from a file or a camera */
  typedef enum {ReadFromFile, ReadFromCamera} ReadType;

  /** Set to reading from file */
  virtual void SetReadFromFile() = 0;

  /** Set to reading from a camera */
  virtual void SetReadFromCamera() = 0;

  /** Get the current read type */
  ReadType GetReadType() {
    return this->m_ReadType;
  }

  /** Return whether or not the VideoIO can read from a camera. The cameraID
   * can be a camera number for OpenCV or a guid for VXL */
  virtual bool CanReadCamera( CameraIDType cameraID ) const = 0;

  /** Set the next frame that should be read. Return true if you operation
   * successful */
  virtual bool SetNextFrameToRead( FrameOffsetType frameNumber ) = 0;

  /** Virtual accessor functions to be implemented in each derived class */
  virtual TemporalOffsetType GetPositionInMSec() const = 0;
  virtual TemporalRatioType GetRatio() const = 0;
  virtual FrameOffsetType GetFrameTotal() const = 0;
  virtual TemporalRatioType GetFramesPerSecond() const = 0;
  virtual FrameOffsetType GetCurrentFrame() const = 0;
  virtual FrameOffsetType GetLastIFrame() const = 0;

  /*-------- This part of the interfaces deals with writing data. ----- */

  /** Set Writer Parameters */
  virtual void SetWriterParameters( TemporalRatioType framesPerSecond,
                                    const std::vector<SizeValueType>& dim,
                                    const char* fourCC,
                                    unsigned int nChannels,
                                    IOComponentType componentType) = 0;

protected:

  VideoIOBase();
  virtual ~VideoIOBase();

  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;

  /** Member Variables */
  ReadType           m_ReadType;
  TemporalRatioType  m_FramesPerSecond;
  FrameOffsetType    m_FrameTotal;
  FrameOffsetType    m_CurrentFrame;
  FrameOffsetType    m_IFrameInterval;
  FrameOffsetType    m_LastIFrame;
  TemporalRatioType  m_Ratio;
  TemporalOffsetType m_PositionInMSec;
  bool               m_WriterOpen;
  bool               m_ReaderOpen;

private:
  VideoIOBase(const Self &) ITK_DELETE_FUNCTION;
  void operator=(const Self &) ITK_DELETE_FUNCTION;

};

} // end namespace itk

#endif // itkVideoIOBase_h