This file is indexed.

/usr/include/paraview/vtkTexturePainter.h is in paraview-dev 5.0.1+dfsg1-4.

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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkTexturePainter.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/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 notice for more information.

=========================================================================*/
// .NAME vtkTexturePainter - renders a slice of vtkImageData by loading the
// slice as a texture and then applying it to a quad.
// .SECTION Description
// vtkTexturePainter is a painter for vtkImageData. It can render a slice of
// image data by loading it as an texture and then displaying it on a quad. It
// uses the bounds of the slice to position the quad. Unlike other image data
// algorithms, this painter provides API to choose the scalars to upload. If
// cell data is used, then cell centers are used to position the slice.
#ifndef vtkTexturePainter_h
#define vtkTexturePainter_h

#include "vtkPainter.h"
#include "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro

class vtkImageData;
class vtkInformationIntegerKey;
class vtkInformationObjectBaseKey;
class vtkInformationStringKey;
class vtkScalarsToColors;
class vtkTexture;

class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkTexturePainter : public vtkPainter
{
public:
  static vtkTexturePainter* New();
  vtkTypeMacro(vtkTexturePainter, vtkPainter);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Specify the X, Y or Z slice to use. The slice mode dictates how the data is
  // slicde.
  static vtkInformationIntegerKey* SLICE();

  // Description:
  // Specify how the slices are obtained.
  static vtkInformationIntegerKey* SLICE_MODE();

  // Description:
  // Turn on/off the mapping of color scalars through the lookup table.
  // The default is Off. If Off, unsigned char scalars will be used
  // directly as texture. If On, scalars will be mapped through the
  // lookup table to generate 4-component unsigned char scalars.
  // This ivar does not affect other scalars like unsigned short, float,
  // etc. These scalars are always mapped through lookup tables.
  // Look at vtkTexture::MapColorScalarsThroughLookupTable for more details.
  static vtkInformationIntegerKey* MAP_SCALARS();

  // Description:
  // Set the lookuptable to use for scalar mapping. If none is specified and the
  // scalars are not unsigned char scalars, then a default lookup table will be
  // created and used.
  static vtkInformationObjectBaseKey* LOOKUP_TABLE();

  // Description:
  // Determines the whether the scalars are to be obtained from point data or
  // cell data.
  // Look at the documentation for ScalarMode in vtkMapper for the different
  // possible values and their effect.
  static vtkInformationIntegerKey* SCALAR_MODE();
  vtkSetMacro(ScalarMode, int);
  vtkGetMacro(ScalarMode, int);

  // Description:
  // These three keys help identify the scalar array. If SCALAR_ARRAY_NAME is
  // absent or NULL, SCALAR_ARRAY_INDEX is used.
  // NOTE: We are deliberately not adding support to select a component to color
  // with. That is now a property of the lookup table and ideally must be set on
  // the lookup table.
  static vtkInformationStringKey* SCALAR_ARRAY_NAME();
  vtkSetStringMacro(ScalarArrayName);
  vtkGetStringMacro(ScalarArrayName);

  // Description:
  // Sepecify the index of the array to color with when scalar array name is
  // absent or null.
  static vtkInformationIntegerKey* SCALAR_ARRAY_INDEX();
  vtkSetMacro(ScalarArrayIndex, int);
  vtkGetMacro(ScalarArrayIndex, int);

  // Description:
  // Get/Set the Slice that needs to be rendering. This is applicable for 3D
  // images. If the Slice number is not valid, then the 0th slice is
  // rendered.
  vtkSetMacro(Slice, int);
  vtkGetMacro(Slice, int);

  // Description:
  // Indicates the direction in which the slices are made into 3D data.
  // If the input image is 2D, the the entire data is shown.
  vtkSetClampMacro(SliceMode, int, YZ_PLANE, XY_PLANE);
  vtkGetMacro(SliceMode, int);

  // Description:
  // Set the lookuptable to use.
  void SetLookupTable(vtkScalarsToColors*);

  // Description:
  // Set if LUT must be used when scalars in the image can be directly used as
  // colors. Look at vtkTexture::MapColorScalarsThroughLookupTable for more
  // details.
  vtkSetMacro(MapScalars, int);
  vtkGetMacro(MapScalars, int);

  // Description:
  // When set, the image slice is always rendered in the XY plane (Z==0)
  // irrespective of the image bounds. Default if Off.
  static vtkInformationIntegerKey* USE_XY_PLANE();
  vtkSetClampMacro(UseXYPlane, int, 0, 1);
  vtkBooleanMacro(UseXYPlane, int);
  vtkGetMacro(UseXYPlane, int);

  //BTX
  enum
    {
    YZ_PLANE = 0,
    XZ_PLANE = 1,
    XY_PLANE = 2,
    };
  //ETX

  virtual void ReleaseGraphicsResources (vtkWindow *);

  vtkSetVector6Macro(WholeExtent, int);

//BTX
protected:
  vtkTexturePainter();
  ~vtkTexturePainter();

  // Description:
  // Called before RenderInternal() if the Information has been changed
  // since the last time this method was called.
  virtual void ProcessInformation(vtkInformation*);

  // Description:
  // Performs the actual rendering. Subclasses may override this method.
  // default implementation merely call a Render on the DelegatePainter,
  // if any. When RenderInternal() is called, it is assured that the
  // DelegatePainter is in sync with this painter i.e. UpdateDelegatePainter()
  // has been called.
  virtual void RenderInternal(vtkRenderer *renderer,
                              vtkActor *actor,
                              unsigned long typeflags,
                              bool forceCompileOnly);

  // Description:
  // Internal method passes correct scalars to the Texture and returns 1 if cell
  // scalars are used else 0.
  int SetupScalars(vtkImageData* input);

  int Slice;
  int SliceMode;
  int MapScalars;
  int ScalarMode;
  int ScalarArrayIndex;
  int UseXYPlane;
  int WholeExtent[6];
  char* ScalarArrayName;
  vtkScalarsToColors* LookupTable;

  // We compute the coordinates for the quad used to draw the texture. This uses
  // the input data bounds and the slice properties.
  float QuadPoints[4][3];

  // This is used to load the image data to the texture.
  vtkTexture* Texture;

  vtkTimeStamp UpdateTime;
private:
  vtkTexturePainter(const vtkTexturePainter&); // Not implemented.
  void operator=(const vtkTexturePainter&); // Not implemented.
//ETX
};

#endif