This file is indexed.

/usr/include/IGSTK/igstkVideoFrameSpatialObject.h is in libigstk4-dev 4.4.0-2build2.

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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/*=========================================================================

  Program:   Image Guided Surgery Software Toolkit
  Module:    $RCSfile: igstkVideoFrameSpatialObject.h,v $
  Language:  C++
  Date:      $Date: 2009-06-18 18:40:55 $
  Version:   $Revision: 1.1 $

  Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
#ifndef __igstkVideoFrameSpatialObject_h
#define __igstkVideoFrameSpatialObject_h

#include "igstkMacros.h"
#include "igstkSpatialObject.h"
#include "igstkFrame.h"
#include "igstkTimeStamp.h"
#include "igstkVideoImagerTool.h"

#include "itkVTKImageExport.h"
#include "itkImage.h"
#include "itkSize.h"
#include "itkImageRegion.h"
#include "itkIndex.h"
#include "itkImportImageFilter.h"
#include "itkRGBPixel.h"

#include "vtkImageData.h"
#include "vtkImageImport.h"

#define DIMENSION 2

namespace igstk
{

template < class TPixelType, unsigned int TChannels >
class VideoFrameSpatialObject
: public SpatialObject
{

public:
  /** Macro with standard traits declarations. */
  igstkStandardTemplatedClassTraitsMacro( VideoFrameSpatialObject,
                                          SpatialObject )

  typedef itk::SpatialObject<3>          VideoFrameSpatialObjectType;

  typedef typename itk::RGBPixel< TPixelType >      RGBPixelType;
  typedef typename itk::ImportImageFilter< RGBPixelType, DIMENSION >
                                                            RGBImportFilterType;
  typedef typename itk::Image< RGBPixelType , DIMENSION >   RGBImageType;

  typedef TPixelType              PixelType;
  typedef typename itk::ImportImageFilter< PixelType, DIMENSION >
                                                               ImportFilterType;
  typedef typename itk::Image< PixelType , DIMENSION >         ImageType;

  typedef Frame                                FrameType;
  typedef typename TimeStamp::TimePeriodType   TimePeriodType;

  itkStaticConstMacro( m_NumberOfChannels, unsigned int, TChannels  );

  void Initialize();

  igstkLoadedTemplatedConstObjectEventMacro( ITKImageModifiedEvent,
                                                         IGSTKEvent, ImageType);

  igstkLoadedTemplatedConstObjectEventMacro( ITKRGBImageModifiedEvent,
                                                      IGSTKEvent, RGBImageType);

  /** Returns wheter the image has any pixels allocated or not */
  virtual bool IsEmpty() const;

  vtkImageData* GetImageData();
  TimeStamp::TimePeriodType GetFrameExpirationTime() const;
  TimeStamp::TimePeriodType GetFrameStartTime() const;

  igstkSetMacro(Width, unsigned int);
  igstkGetMacro(Width, unsigned int);

  igstkSetMacro(Height, unsigned int);
  igstkGetMacro(Height, unsigned int);

  igstkSetMacro(NumberOfScalarComponents, unsigned int);
  igstkGetMacro(NumberOfScalarComponents, unsigned int);

  //igstkGetMacro(NumberOfChannels, unsigned int);
  const unsigned int GetNumberOfChannels() const;

  igstkSetMacro(PixelSizeX, double);
  igstkGetMacro(PixelSizeX, double);

  igstkSetMacro(PixelSizeY, double);
  igstkGetMacro(PixelSizeY, double);

  void RequestGetITKImage();
  void RequestGetVTKImage()const;
  void SetVideoImagerTool(igstk::VideoImagerTool::Pointer);


  void UpdateImages();
  TPixelType* GetImagePtr();

protected:
  VideoFrameSpatialObject( void );
  ~VideoFrameSpatialObject( void );

private:

  typename RGBImageType::Pointer        m_RGBImage;
  typename RGBImportFilterType::Pointer m_RGBImportFilter;

  typename ImageType::Pointer         m_Image;
  typename ImportFilterType::Pointer  m_ImportFilter;

  itk::Size<DIMENSION>              m_Size;
  itk::ImageRegion<DIMENSION>       m_Region;
  itk::Index<DIMENSION>             m_Start;

  vtkImageData*       m_VTKImage;
  TPixelType *        m_RawBuffer;

  VTKImageModifiedEvent  m_VtkImageLoadedEvent;

  igstk::VideoImagerTool::Pointer m_VideoImagerTool;
  /** raw frame for the spatial object */
  FrameType                       m_Frame;

  unsigned int              m_Width;
  unsigned int              m_Height;
  double                    m_PixelSizeX;
  double                    m_PixelSizeY;
  RGBPixelType*             m_RGBPixelContainer;

  unsigned int              m_NumberOfScalarComponents;

  /** Filters for exporting the ITK image as a vtkImageData class. */
  typedef itk::VTKImageExport< RGBImageType >      ITKRGBExportFilterType;
  typedef typename ITKRGBExportFilterType::Pointer ITKRGBExportFilterPointer;

  typedef itk::VTKImageExport< ImageType >      ITKExportFilterType;
  typedef typename ITKExportFilterType::Pointer ITKExportFilterPointer;

  typedef vtkImageImport             VTKImportFilterType;
  typedef VTKImportFilterType*       VTKImportFilterPointer;

  /** Classes to connect an ITK pipeline to a VTK pipeline */
  ITKRGBExportFilterPointer          m_ItkRGBExporter;
  ITKExportFilterPointer             m_ItkExporter;

  VTKImportFilterPointer             m_VtkRGBImporter;
  VTKImportFilterPointer             m_VtkImporter;
};

} // end namespace igstk

#ifndef IGSTK_MANUAL_INSTANTIATION
#include "igstkVideoFrameSpatialObject.txx"
#endif

#endif // __igstkVideoFrameSpatialObject_h