This file is indexed.

/usr/include/vtk-6.3/vtkExtractStructuredGridHelper.h is in libvtk6-dev 6.3.0+dfsg1-5.

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
226
227
228
229
230
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkExtractGrid.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 vtkExtractStructuredGridHelper - helper for extracting/sub-sampling
//  structured datasets.
//
// .SECTION Description
// vtkExtractStructuredGridHelper provides some common functionality that is
// used by filters that extract and sub-sample structured data. Specifically,
// it provides functionality for calculating the mapping from the output extent
// of each process to the input extent.
//
// .SECTION See Also
// vtkExtractGrid vtkExtractVOI vtkExtractRectilinearGrid

#ifndef vtkExtractStructuredGridHelper_h
#define vtkExtractStructuredGridHelper_h

#include "vtkCommonDataModelModule.h" // For export macro
#include "vtkObject.h"

// Forward declarations
class vtkCellData;
class vtkPointData;
class vtkPoints;

namespace vtk
{
namespace detail
{

struct vtkIndexMap;

} // END namespace detail
} // END namespace vtk

class VTKCOMMONDATAMODEL_EXPORT vtkExtractStructuredGridHelper :
  public vtkObject
{
public:
  static vtkExtractStructuredGridHelper *New();
  vtkTypeMacro(vtkExtractStructuredGridHelper,vtkObject);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Get & Set Macros
  vtkGetVector6Macro(OutputWholeExtent,int);

  // Description:
  // \brief Initializes the index map.
  // \param voi the extent of the volume of interest
  // \param wholeExt the whole extent of the domain
  // \param smapleRate the sampling rate
  // \param includeBoundary indicates whether to include the boundary or not.
  void Initialize(int voi[6], int wholeExt[6], int sampleRate[3],
                  bool includeBoundary);

  // Description:
  // Returns true if the helper is properly initialized.
  bool IsValid() const;

  // Description:
  // \brief Returns the size along a given dimension
  // \param dim the dimension in query
  // \pre dim >= 0 && dim < 3
  int GetSize(const int dim);

  // Description:
  // \brief Given a dimension and output index, return the corresponding
  // extent index. This method should be used to convert array indices,
  // such as the coordinate arrays for rectilinear grids.
  // \param dim the data dimension
  // \param outIdx The output index along the given dimension.
  // \pre dim >= 0 && dim < 3
  // \pre outIdx >= 0 && outIdx < this->GetSize( dim )
  // \return The input extent index along the given dimension.
  // \sa GetMappedExtentValue
  // \sa GetMappedExtentValueFromIndex
  int GetMappedIndex(int dim, int outIdx);

  // Description:
  // \brief Given a dimension and output extent value, return the corresponding
  // input extent index. This method should be used to compute extent
  // indices from extent values.
  // \param dim the data dimension
  // \param outExtVal The output extent value along the given dimension.
  // \pre dim >= 0 && dim < 3
  // \pre outExtVal >= this->GetOutputWholeExtent()[2*dim] &&
  //      outExtVal <= this->GetOutputWholeExtent()[2*dim+1]
  // \return The input extent index along the given dimension.
  // \sa GetMappedExtentValue
  // \sa GetMappedExtentValueFromIndex
  int GetMappedIndexFromExtentValue(int dim, int outExtVal);

  // Description:
  // \brief Given a dimension and output extent value, return the corresponding
  // input extent value. This method should be used to convert extent values.
  // \param dim the data dimension.
  // \param outExtVal The output extent value along the given dimension.
  // \pre dim >= 0 && dim < 3
  // \pre outExtVal >= this->GetOutputWholeExtent()[2*dim] &&
  //      outExtVal <= this->GetOutputWholeExtent()[2*dim+1]
  // \return The input extent value along the given dimension.
  // \sa GetMappedIndex
  // \sa GetMappedExtentValueFromIndex
  int GetMappedExtentValue(int dim, int outExtVal);

  // Description:
  // \brief Given a dimension and output extent index, return the corresponding
  // input extent value. This method should be used to compute extent values
  // from extent indices.
  // \param dim the data dimension.
  // \param outIdx The output index along the given dimension.
  // \pre dim >= 0 && dim < 3
  // \pre outIdx >= 0 && outIdx < this->GetSize( dim )
  // \return The input extent value along the given dimension.
  // \sa GetMappedIndex
  // \sa GetMappedExtentValue
  int GetMappedExtentValueFromIndex(int dim, int outIdx);

  // Description:
  // \brief Returns the begin & end extent that intersects with the VOI
  // \param inExt the input extent
  // \param voi the volume of interest
  // \param begin the begin extent
  // \param end the end extent
  void ComputeBeginAndEnd(int inExt[6], int voi[6], int begin[3], int end[3]);

  // Description:
  // \brief Copies the points & point data to the output.
  // \param inExt the input grid extent.
  // \param outExt the output grid extent.
  // \param pd pointer to the input point data.
  // \param inpnts pointer to the input points, or NULL if uniform grid.
  // \param outPD point to the output point data.
  // \param outpnts pointer to the output points, or NULL if uniform grid.
  // \param sampleRate The sample rate in each dimension. Optional, used to
  // optimizing copy operations if present.
  // \pre pd != NULL.
  // \pre outPD != NULL.
  void CopyPointsAndPointData( int inExt[6], int outExt[6],
                    vtkPointData* pd, vtkPoints* inpnts,
                    vtkPointData* outPD, vtkPoints* outpnts,
                    int sampleRate[3] = NULL);

  // Description:
  // \brief Copies the cell data to the output.
  // \param inExt the input grid extent.
  // \param outExt the output grid extent.
  // \param cd the input cell data.
  // \param outCD the output cell data.
  // \param sampleRate The sample rate in each dimension. Optional, used to
  // optimizing copy operations if present.
  // \pre cd != NULL.
  // \pre outCD != NULL.
  void CopyCellData(int inExt[6], int outExt[6],
                    vtkCellData* cd, vtkCellData* outCD,
                    int sampleRate[3] = NULL);

  // Description:
  // Calculate the VOI for a partitioned structured dataset. This method sets
  // \a partitionedVOI to the VOI that extracts as much of the
  // \a partitionedExtent as possible while considering the \a globalVOI, the
  // \a sampleRate, and the boundary conditions.
  // \param globalVOI The full VOI for the entire distributed dataset.
  // \param partitionedExtent Extent of the process's partitioned input data.
  // \param sampleRate The sampling rate in each dimension.
  // \param includeBoundary Whether or not to include the boundary of the VOI,
  // even if it doesn't fit the spacing.
  // \param partitionedVOI The extent of the process's partitioned dataset that
  // should be extracted by a serial extraction filter.
  static void GetPartitionedVOI(const int globalVOI[6],
                                const int partitionedExtent[6],
                                const int sampleRate[3],
                                bool includeBoundary,
                                int partitionedVOI[6]);
  // Description:
  // Calculate the partitioned output extent for a partitioned structured
  // dataset. This method sets \a partitionedOutputExtent to the correct extent
  // of an extracted dataset, such that it properly fits with the other
  // partitioned pieces while considering the \a globalVOI, the
  // \a sampleRate, and the boundary conditions.
  // \param globalVOI The full VOI for the entire distributed dataset.
  // \param partitionedVOI The VOI used in the serial extraction.
  // \param outputWholeExtent The output extent of the full dataset.
  // \param sampleRate The sampling rate in each dimension.
  // \param includeBoundary Whether or not to include the boundary of the VOI,
  // even if it doesn't fit the spacing.
  // \param partitionedOutputExtent The correct output extent of the extracted
  // dataset.
  static void GetPartitionedOutputExtent(const int globalVOI[6],
                                         const int partitionedVOI[6],
                                         const int outputWholeExtent[6],
                                         const int sampleRate[3],
                                         bool includeBoundary,
                                         int partitionedOutputExtent[6]);

protected:
  vtkExtractStructuredGridHelper();
  ~vtkExtractStructuredGridHelper();

  // Input parameters -- used to reinitialize when data changes.
  int VOI[6];
  int InputWholeExtent[6];
  int SampleRate[3];
  bool IncludeBoundary;

  int OutputWholeExtent[6];
  vtk::detail::vtkIndexMap* IndexMap;

  // Description:
  // \brief Invalidates the output extent.
  void Invalidate();

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

#endif /* VTKEXTRACTSTRUCTUREDGRIDHELPER_H_ */