VTK
vtkmHistogram.h
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // Copyright (c) Kitware, Inc.
4 // All rights reserved.
5 // See LICENSE.txt for details.
6 //
7 // This software is distributed WITHOUT ANY WARRANTY; without even
8 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 // PURPOSE. See the above copyright notice for more information.
10 //
11 // Copyright 2012 Sandia Corporation.
12 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
13 // the U.S. Government retains certain rights in this software.
14 //
15 //=============================================================================
26 #ifndef vtkmHistogram_h
27 #define vtkmHistogram_h
28 
29 #include "vtkAcceleratorsVTKmModule.h" //required for correct export
30 #include "vtkTableAlgorithm.h"
31 
32 class vtkDoubleArray;
33 
34 class VTKACCELERATORSVTKM_EXPORT vtkmHistogram : public vtkTableAlgorithm
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39  static vtkmHistogram* New();
40 
42 
45  vtkSetMacro(NumberOfBins,size_t);
46  vtkGetMacro(NumberOfBins,size_t);
48 
50 
54  vtkSetVector2Macro(CustomBinRange,double);
55  vtkGetVector2Macro(CustomBinRange,double);
57 
59 
63  vtkSetMacro(UseCustomBinRanges, bool);
64  vtkGetMacro(UseCustomBinRanges, bool);
65  vtkBooleanMacro(UseCustomBinRanges, bool);
67 
69 
74  vtkSetMacro(CenterBinsAroundMinAndMax, bool);
75  vtkGetMacro(CenterBinsAroundMinAndMax, bool);
76  vtkBooleanMacro(CenterBinsAroundMinAndMax, bool);
78 
80 
83  vtkGetVectorMacro(ComputedRange,double, 2);
85 
87 
90  vtkGetMacro(BinDelta, double);
92 
93 protected:
94  vtkmHistogram();
95  ~vtkmHistogram();
96 
97  virtual int RequestData(vtkInformation*,
98  vtkInformationVector**, vtkInformationVector*) override;
99  int FillInputPortInformation(int port, vtkInformation* info) override;
100 
101 private:
102  vtkmHistogram(const vtkmHistogram&) = delete;
103  void operator=(const vtkmHistogram&) = delete;
104 
105  void FillBinExtents(vtkDoubleArray* binExtents);
106 
107  size_t NumberOfBins;
108  double BinDelta;
109  double CustomBinRange[2];
110  bool UseCustomBinRanges;
111  bool CenterBinsAroundMinAndMax;
112  double ComputedRange[2];
113 };
114 
115 #endif // vtkmHistogram_h
116 // VTK-HeaderTest-Exclude: vtkmHistogram.h
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.
generate a histogram out of a scalar data
Definition: vtkmHistogram.h:34