VTK  9.3.20240329
vtkmHistogram.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3 // SPDX-FileCopyrightText: Copyright 2012 Sandia Corporation.
4 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
15 #ifndef vtkmHistogram_h
16 #define vtkmHistogram_h
17 
18 #include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct export
19 #include "vtkTableAlgorithm.h"
20 #include "vtkmlib/vtkmInitializer.h" // Need for initializing vtk-m
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkDoubleArray;
24 
25 class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmHistogram : public vtkTableAlgorithm
26 {
27 public:
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30  static vtkmHistogram* New();
31 
33 
36  vtkSetMacro(NumberOfBins, size_t);
37  vtkGetMacro(NumberOfBins, size_t);
39 
41 
45  vtkSetVector2Macro(CustomBinRange, double);
46  vtkGetVector2Macro(CustomBinRange, double);
48 
50 
54  vtkSetMacro(UseCustomBinRanges, bool);
55  vtkGetMacro(UseCustomBinRanges, bool);
56  vtkBooleanMacro(UseCustomBinRanges, bool);
58 
60 
65  vtkSetMacro(CenterBinsAroundMinAndMax, bool);
66  vtkGetMacro(CenterBinsAroundMinAndMax, bool);
67  vtkBooleanMacro(CenterBinsAroundMinAndMax, bool);
69 
71 
74  vtkGetVectorMacro(ComputedRange, double, 2);
76 
78 
81  vtkGetMacro(BinDelta, double);
83 
84 protected:
86  ~vtkmHistogram() override;
87 
90 
91 private:
92  vtkmHistogram(const vtkmHistogram&) = delete;
93  void operator=(const vtkmHistogram&) = delete;
94 
95  void FillBinExtents(vtkDoubleArray* binExtents);
96 
97  size_t NumberOfBins;
98  double BinDelta;
99  double CustomBinRange[2];
100  bool UseCustomBinRanges;
101  bool CenterBinsAroundMinAndMax;
102  double ComputedRange[2];
103  vtkmInitializer Initializer;
104 };
105 
106 VTK_ABI_NAMESPACE_END
107 #endif // vtkmHistogram_h
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkTables as output.
generate a histogram out of a scalar data
Definition: vtkmHistogram.h:26
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
~vtkmHistogram() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkmHistogram * New()
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447