This file is indexed.

/usr/include/vtk-5.10/vtkImageResliceMapper.h is in libvtk5-dev 5.10.1+dfsg-2.1build1.

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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkImageResliceMapper.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 vtkImageResliceMapper - map a slice of a vtkImageData to the screen
// .SECTION Description
// vtkImageResliceMapper will cut a 3D image with an abitrary slice plane
// and draw the results on the screen.  The slice can be set to automatically
// follow the camera, so that the camera controls the slicing.
// .SECTION Thanks
// Thanks to David Gobbi at the Seaman Family MR Centre and Dept. of Clinical
// Neurosciences, Foothills Medical Centre, Calgary, for providing this class.
// .SECTION See also
// vtkImageSlice vtkImageProperty vtkImageSliceMapper

#ifndef __vtkImageResliceMapper_h
#define __vtkImageResliceMapper_h

#include "vtkImageMapper3D.h"

class vtkImageSliceMapper;
class vtkRenderer;
class vtkRenderWindow;
class vtkCamera;
class vtkLookupTable;
class vtkImageSlice;
class vtkImageData;
class vtkImageResliceToColors;
class vtkMatrix4x4;
class vtkAbstractImageInterpolator;

class VTK_RENDERING_EXPORT vtkImageResliceMapper : public vtkImageMapper3D
{
public:
  static vtkImageResliceMapper *New();
  vtkTypeMacro(vtkImageResliceMapper,vtkImageMapper3D);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Set the slice that will be used to cut through the image.
  // This slice should be in world coordinates, rather than
  // data coordinates.  Use SliceFacesCamera and SliceAtFocalPoint
  // if you want the slice to automatically follow the camera.
  virtual void SetSlicePlane(vtkPlane *plane);

  // Description:
  // When using SliceAtFocalPoint, this causes the slicing to occur at
  // the closest slice to the focal point, instead of the default behavior
  // where a new slice is interpolated between the original slices.  This
  // flag is ignored if the slicing is oblique to the original slices.
  vtkSetMacro(JumpToNearestSlice, int);
  vtkBooleanMacro(JumpToNearestSlice, int);
  vtkGetMacro(JumpToNearestSlice, int);

  // Description:
  // The slab thickness, for thick slicing (default: zero)
  vtkSetMacro(SlabThickness, double);
  vtkGetMacro(SlabThickness, double);

  // Description:
  // The slab type, for thick slicing (default: mean)
  vtkSetClampMacro(SlabType, int, VTK_IMAGE_SLAB_MIN, VTK_IMAGE_SLAB_MEAN);
  vtkGetMacro(SlabType, int);
  void SetSlabTypeToMin() {
    this->SetSlabType(VTK_IMAGE_SLAB_MIN); };
  void SetSlabTypeToMax() {
    this->SetSlabType(VTK_IMAGE_SLAB_MAX); };
  void SetSlabTypeToMean() {
    this->SetSlabType(VTK_IMAGE_SLAB_MEAN); };
  virtual const char *GetSlabTypeAsString();

  // Description:
  // Set the number of slab samples to use as a factor of the number
  // of input slices within the slab thickness.  The default value
  // is 2, but 1 will increase speed with very little loss of quality.
  vtkSetClampMacro(SlabSampleFactor, int, 1, 2);
  vtkGetMacro(SlabSampleFactor, int);

  // Description:
  // Set the reslice sample frequency as in relation to the input image
  // sample frequency.  The default value is 1, but higher values can be
  // used to improve the results.  This is cheaper than turning on
  // ResampleToScreenPixels.
  vtkSetClampMacro(ImageSampleFactor, int, 1, 16);
  vtkGetMacro(ImageSampleFactor, int);

  // Description:
  // Automatically reduce the rendering quality for greater speed
  // when doing an interactive render.  This is on by default.
  vtkSetMacro(AutoAdjustImageQuality, int);
  vtkBooleanMacro(AutoAdjustImageQuality, int);
  vtkGetMacro(AutoAdjustImageQuality, int);

  // Description:
  // Resample the image directly to the screen pixels, instead of
  // using a texture to scale the image after resampling.  This is
  // slower and uses more memory, but provides high-quality results.
  // It is On by default.
  vtkSetMacro(ResampleToScreenPixels, int);
  vtkBooleanMacro(ResampleToScreenPixels, int);
  vtkGetMacro(ResampleToScreenPixels, int);

  // Description:
  // Keep the color mapping stage distinct from the reslicing stage.
  // This will improve the quality and possibly the speed of interactive
  // window/level operations, but it uses more memory and might slow down
  // interactive slicing operations.  On by default.
  vtkSetMacro(SeparateWindowLevelOperation, int);
  vtkBooleanMacro(SeparateWindowLevelOperation, int);
  vtkGetMacro(SeparateWindowLevelOperation, int);

  // Description:
  // Set a custom interpolator.  This will only be used if the
  // ResampleToScreenPixels option is on.
  virtual void SetInterpolator(vtkAbstractImageInterpolator *sampler);
  virtual vtkAbstractImageInterpolator *GetInterpolator();

  // Description:
  // This should only be called by the renderer.
  virtual void Render(vtkRenderer *renderer, vtkImageSlice *prop);

  // Description:
  // Release any graphics resources that are being consumed by
  // this mapper.  The parameter window is used to determine
  // which graphic resources to release.
  virtual void ReleaseGraphicsResources(vtkWindow *);

  // Description:
  // Get the mtime for the mapper.
  unsigned long GetMTime();

  // Description:
  // The bounding box (array of six doubles) of the data expressed as
  // (xmin,xmax, ymin,ymax, zmin,zmax).
  double *GetBounds();
  void GetBounds(double bounds[6])
    { this->vtkAbstractMapper3D::GetBounds(bounds); };

  // Description:
  // Handle requests from the pipeline executive.
  int ProcessRequest(vtkInformation* request,
                     vtkInformationVector** inInfo,
                     vtkInformationVector* outInfo);

protected:
  vtkImageResliceMapper();
  ~vtkImageResliceMapper();

  // Description:
  // Do a checkerboard pattern to the alpha of an RGBA image
  void CheckerboardImage(
    vtkImageData *input, vtkCamera *camera, vtkImageProperty *property);

  // Description:
  // Update the slice-to-world matrix from the camera.
  void UpdateSliceToWorldMatrix(vtkCamera *camera);

  // Description:
  // Check if the vtkProp3D matrix has changed, and if so, set
  // the WorldToDataMatrix to its inverse.
  void UpdateWorldToDataMatrix(vtkImageSlice *prop);

  // Description:
  // Update the reslice matrix, which is the slice-to-data matrix.
  void UpdateResliceMatrix(vtkRenderer *ren, vtkImageSlice *prop);

  // Description:
  // Set all of the reslicing parameters.  This requires that
  // the SliceToWorld and WorldToData matrices are up-to-date.
  void UpdateResliceInformation(vtkRenderer *ren);

  // Description:
  // Set the interpolation.
  void UpdateResliceInterpolation(vtkImageProperty *property);

  // Description:
  // Update anything related to the image coloring.
  void UpdateColorInformation(vtkImageProperty *property);

  // Description:
  // Make a polygon by cutting the data bounds with a plane.
  void UpdatePolygonCoords(vtkRenderer *ren);

  // Description:
  // Override Update to handle some tricky details.
  void Update();

  // Description:
  // Garbage collection for reference loops.
  void ReportReferences(vtkGarbageCollector*);

  vtkImageSliceMapper *SliceMapper; // Does the OpenGL rendering

  int JumpToNearestSlice; // Adjust SliceAtFocalPoint
  int AutoAdjustImageQuality; // LOD-style behavior
  int SeparateWindowLevelOperation; // Do window/level as a separate step
  double SlabThickness; // Current slab thickness
  int SlabType; // Current slab mode
  int SlabSampleFactor; // Sampling factor for slab mode
  int ImageSampleFactor; // Sampling factor for image pixels
  int ResampleToScreenPixels; // Use software interpolation only
  int InternalResampleToScreenPixels; // Use software interpolation only
  int ResliceNeedUpdate; // Execute reslice on next render
  vtkImageResliceToColors *ImageReslice; // For software interpolation
  vtkMatrix4x4 *ResliceMatrix; // Cached reslice matrix
  vtkMatrix4x4 *WorldToDataMatrix; // World to Data transform matrix
  vtkMatrix4x4 *SliceToWorldMatrix; // Slice to World transform matrix
  vtkTimeStamp UpdateTime;

private:
  vtkImageResliceMapper(const vtkImageResliceMapper&);  // Not implemented.
  void operator=(const vtkImageResliceMapper&);  // Not implemented.
};

#endif