/usr/include/paraview/vtkExtractHistogram.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 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkExtractHistogram.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.
=========================================================================*/
#ifndef vtkExtractHistogram_h
#define vtkExtractHistogram_h
#include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
#include "vtkTableAlgorithm.h"
//BTX
class vtkDoubleArray;
class vtkFieldData;
class vtkIntArray;
struct vtkEHInternals;
//ETX
// .NAME vtkExtractHistogram - Extract histogram data (binned values) from any
// dataset
// .SECTION Description
// vtkExtractHistogram accepts any vtkDataSet as input and produces a
// vtkPolyData containing histogram data as output. The output vtkPolyData
// will have contain a vtkDoubleArray named "bin_extents" which contains
// the boundaries between each histogram bin, and a vtkUnsignedLongArray
// named "bin_values" which will contain the value for each bin.
class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkExtractHistogram : public vtkTableAlgorithm
{
public:
static vtkExtractHistogram* New();
vtkTypeMacro(vtkExtractHistogram, vtkTableAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Controls which input data component should be binned, for input arrays
// with more-than-one component
vtkSetClampMacro(Component, int, 0, VTK_INT_MAX);
vtkGetMacro(Component, int);
// Description:
// Controls the number of bins N in the output histogram data
vtkSetClampMacro(BinCount, int, 1, VTK_INT_MAX);
vtkGetMacro(BinCount, int);
// Description:
// Get/Set custom bin ranges to use. These are used only when
// UseCustomBinRanges is set to true.
vtkSetVector2Macro(CustomBinRanges, double);
vtkGetVector2Macro(CustomBinRanges, double);
// Description:
// When set to true, CustomBinRanges will be used instead of using the full
// range for the selected array. By default, set to false.
vtkSetMacro(UseCustomBinRanges, bool);
vtkGetMacro(UseCustomBinRanges, bool);
vtkBooleanMacro(UseCustomBinRanges, bool);
// Description:
// This option controls whether the algorithm calculates averages
// of variables other than the primary variable that fall into each
// bin. False by default.
vtkSetMacro(CalculateAverages, int);
vtkGetMacro(CalculateAverages, int);
vtkBooleanMacro(CalculateAverages, int);
protected:
vtkExtractHistogram();
~vtkExtractHistogram();
// Description:
// Returns the data range for the input array to process.
// This method is not called with this->UseCustomBinRanges is true.
// Returns true is range could be determined correctly, otherwise returns
// false and range is set to {VTK_DOUBLE_MAX, VTK_DOUBLE_MIN}. When returning
// true, the actual data range is returned (without any extra padding).
virtual bool GetInputArrayRange(vtkInformationVector** inputVector, double range[2]);
virtual int FillInputPortInformation (int port, vtkInformation *info);
virtual int RequestData(vtkInformation *request,
vtkInformationVector **inputVector,
vtkInformationVector *outputVector);
// Initialize the bin_extents using the data range for the selected
// array.
virtual bool InitializeBinExtents(
vtkInformationVector** inputVector,
vtkDoubleArray* bin_extents,
double& min, double& max);
void BinAnArray(
vtkDataArray *src,
vtkIntArray *vals,
double min, double max,
vtkFieldData* field);
void FillBinExtents(vtkDoubleArray* bin_extents, double min, double max);
double CustomBinRanges[2];
bool UseCustomBinRanges;
int Component;
int BinCount;
int CalculateAverages;
vtkEHInternals* Internal;
private:
void operator=(const vtkExtractHistogram&); // Not implemented
vtkExtractHistogram(const vtkExtractHistogram&); // Not implemented
int GetInputFieldAssociation();
vtkFieldData* GetInputFieldData(vtkDataObject* input);
};
#endif
|