This file is indexed.

/usr/include/vtk-6.2/vtkImageHistogram.h is in libvtk6-dev 6.2.0+dfsg1-10build1.

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
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkImageHistogram.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 vtkImageHistogram - Compute the histogram for an image.
// .SECTION Description
// vtkImageHistogram generates a histogram from its input, and optionally
// produces a 2D black-and-white image of the histogram as its output.
// Unlike the class vtkImageAccumulate, a multi-component image does not
// result in a multi-dimensional histogram.  Instead, the resulting
// histogram will be the sum of the histograms of each of the individual
// components, unless SetActiveComponent is used to choose a single
// component.
// .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.

#ifndef vtkImageHistogram_h
#define vtkImageHistogram_h

#include "vtkImagingStatisticsModule.h" // For export macro
#include "vtkThreadedImageAlgorithm.h"

class vtkImageStencilData;
class vtkIdTypeArray;

class VTKIMAGINGSTATISTICS_EXPORT vtkImageHistogram : public vtkThreadedImageAlgorithm
{
public:
  static vtkImageHistogram *New();
  vtkTypeMacro(vtkImageHistogram,vtkThreadedImageAlgorithm);

  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Scale types for the histogram image.
  enum {
    Linear = 0,
    Log = 1,
    Sqrt = 2
    };

  // Description:
  // Set the component for which to generate a histogram.  The default
  // value is -1, which produces a histogram that is the sum of the
  // histograms of the individual components.
  vtkSetMacro(ActiveComponent, int);
  vtkGetMacro(ActiveComponent, int);

  // Description:
  // If this is On, then the histogram binning will be done automatically.
  // For char and unsigned char data, there will be 256 bins with unit
  // spacing.  For data of type short and larger, there will be between
  // 256 and MaximumNumberOfBins, depending on the range of the data, and
  // the BinOrigin will be set to zero if no negative values are present,
  // or to the smallest negative value if negative values are present.
  // For float data, the MaximumNumberOfBins will always be used.
  // The BinOrigin and BinSpacing will be set so that they provide a mapping
  // from bin index to scalar value.
  vtkSetMacro(AutomaticBinning, int);
  vtkBooleanMacro(AutomaticBinning, int);
  vtkGetMacro(AutomaticBinning, int);

  // Description:
  // The maximum number of bins to use when AutomaticBinning is On.
  // When AutomaticBinning is On, the size of the output histogram
  // will be set to the full range of the input data values, unless
  // the full range is greater than this value.  By default, the max
  // value is 65536, which is large enough to capture the full range
  // of 16-bit integers.
  vtkSetMacro(MaximumNumberOfBins, int);
  vtkGetMacro(MaximumNumberOfBins, int);

  // Description:
  // The number of bins in histogram (default 256).  This is automatically
  // computed unless AutomaticBinning is Off.
  vtkSetMacro(NumberOfBins, int);
  vtkGetMacro(NumberOfBins, int);

  // Description:
  // The value for the center of the first bin (default 0).  This is
  // automatically computed unless AutomaticBinning is Off.
  vtkSetMacro(BinOrigin, double);
  vtkGetMacro(BinOrigin, double);

  // Description:
  // The bin spacing (default 1).  This is automatically computed unless
  // AutomaticBinning is Off.
  vtkSetMacro(BinSpacing, double);
  vtkGetMacro(BinSpacing, double);

  // Description:
  // Use a stencil to compute the histogram for just a part of the image.
  void SetStencilData(vtkImageStencilData *stencil);
  vtkImageStencilData *GetStencil();

  // Description:
  // Equivalent to SetInputConnection(1, algOutput).
  void SetStencilConnection(vtkAlgorithmOutput* algOutput);

  // Description:
  // If this is On, then a histogram image will be produced as the output.
  // Regardless of this setting, the histogram is always available as a
  // vtkIdTypeArray from the GetHistogram method.
  vtkSetMacro(GenerateHistogramImage, int);
  vtkBooleanMacro(GenerateHistogramImage, int);
  vtkGetMacro(GenerateHistogramImage, int);

  // Description:
  // Set the size of the histogram image that is produced as output.
  // The default is 256 by 256.
  vtkSetVector2Macro(HistogramImageSize, int);
  vtkGetVector2Macro(HistogramImageSize, int);

  // Description:
  // Set the scale to use for the histogram image.  The default is
  // a linear scale, but sqrt and log provide better visualization.
  vtkSetClampMacro(HistogramImageScale, int,
    vtkImageHistogram::Linear, vtkImageHistogram::Sqrt);
  void SetHistogramImageScaleToLinear() {
    this->SetHistogramImageScale(vtkImageHistogram::Linear); }
  void SetHistogramImageScaleToLog() {
    this->SetHistogramImageScale(vtkImageHistogram::Log); }
  void SetHistogramImageScaleToSqrt() {
    this->SetHistogramImageScale(vtkImageHistogram::Sqrt); }
  vtkGetMacro(HistogramImageScale, int);
  const char *GetHistogramImageScaleAsString();

  // Description:
  // Get the histogram as a vtkIdTypeArray.  You must call Update()
  // before calling this method.
  vtkIdTypeArray *GetHistogram();

  // Description:
  // Get the total count of the histogram.  This will be the number of
  // voxels times the number of components.
  vtkIdType GetTotal() { return this->Total; }

  // Description:
  // This is part of the executive, but is public so that it can be accessed
  // by non-member functions.
  virtual void ThreadedRequestData(vtkInformation *request,
                                   vtkInformationVector **inputVector,
                                   vtkInformationVector *outputVector,
                                   vtkImageData ***inData,
                                   vtkImageData **outData, int ext[6], int id);
protected:
  vtkImageHistogram();
  ~vtkImageHistogram();

  virtual int RequestUpdateExtent(vtkInformation *vtkNotUsed(request),
                                 vtkInformationVector **inInfo,
                                 vtkInformationVector *vtkNotUsed(outInfo));
  virtual int RequestInformation(vtkInformation *vtkNotUsed(request),
                                 vtkInformationVector **inInfo,
                                 vtkInformationVector *vtkNotUsed(outInfo));
  virtual int RequestData(vtkInformation *,
                          vtkInformationVector **,
                          vtkInformationVector *);

  virtual int FillInputPortInformation(int port, vtkInformation *info);
  virtual int FillOutputPortInformation(int port, vtkInformation *info);

  // Description:
  // Compute the range of the data.  The GetScalarRange() function of
  // vtkImageData only computes the range of the first component, but
  // this filter requires the range for all components.
  void ComputeImageScalarRange(vtkImageData *data, double range[2]);

  int ActiveComponent;
  int AutomaticBinning;
  int MaximumNumberOfBins;

  int HistogramImageSize[2];
  int HistogramImageScale;
  int GenerateHistogramImage;

  int NumberOfBins;
  double BinOrigin;
  double BinSpacing;

  vtkIdTypeArray *Histogram;
  vtkIdType Total;

  vtkIdType *ThreadOutput[VTK_MAX_THREADS];
  int ThreadBinRange[VTK_MAX_THREADS][2];

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

#endif