VTK  9.5.20251110
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 "vtkmAlgorithm.h" // For vtkmAlgorithm
21#include "vtkmlib/vtkmInitializer.h" // Need for initializing viskores
22
23#ifndef __VTK_WRAP__
24#define vtkTableAlgorithm vtkmAlgorithm<vtkTableAlgorithm>
25#endif
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkDoubleArray;
29
30class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmHistogram : public vtkTableAlgorithm
31{
32public:
34#ifndef __VTK_WRAP__
35#undef vtkTableAlgorithm
36#endif
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38 static vtkmHistogram* New();
39
41
44 vtkSetMacro(NumberOfBins, vtkIdType);
45 vtkGetMacro(NumberOfBins, vtkIdType);
47
49
53 vtkSetVector2Macro(CustomBinRange, double);
54 vtkGetVector2Macro(CustomBinRange, double);
56
58
62 vtkSetMacro(UseCustomBinRanges, bool);
63 vtkGetMacro(UseCustomBinRanges, bool);
64 vtkBooleanMacro(UseCustomBinRanges, bool);
66
68
73 vtkSetMacro(CenterBinsAroundMinAndMax, bool);
74 vtkGetMacro(CenterBinsAroundMinAndMax, bool);
75 vtkBooleanMacro(CenterBinsAroundMinAndMax, bool);
77
79
82 vtkGetVectorMacro(ComputedRange, double, 2);
84
86
89 vtkGetMacro(BinDelta, double);
91
92protected:
94 ~vtkmHistogram() override;
95
97 int FillInputPortInformation(int port, vtkInformation* info) override;
98
99private:
100 vtkmHistogram(const vtkmHistogram&) = delete;
101 void operator=(const vtkmHistogram&) = delete;
102
103 void FillBinExtents(vtkDoubleArray* binExtents);
104
105 vtkIdType NumberOfBins;
106 double BinDelta;
107 double CustomBinRange[2];
108 bool UseCustomBinRanges;
109 bool CenterBinsAroundMinAndMax;
110 double ComputedRange[2];
111 vtkmInitializer Initializer;
112};
113
114VTK_ABI_NAMESPACE_END
115#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
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
static vtkmHistogram * New()
~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.
int vtkIdType
Definition vtkType.h:367