VTK  9.1.0
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 "vtkAcceleratorsVTKmFiltersModule.h" //required for correct export
30#include "vtkTableAlgorithm.h"
31
32class vtkDoubleArray;
33
34class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmHistogram : public vtkTableAlgorithm
35{
36public:
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
93protected:
95 ~vtkmHistogram() override;
96
99
100private:
101 vtkmHistogram(const vtkmHistogram&) = delete;
102 void operator=(const vtkmHistogram&) = delete;
103
104 void FillBinExtents(vtkDoubleArray* binExtents);
105
106 size_t NumberOfBins;
107 double BinDelta;
108 double CustomBinRange[2];
109 bool UseCustomBinRanges;
110 bool CenterBinsAroundMinAndMax;
111 double ComputedRange[2];
112};
113
114#endif // vtkmHistogram_h
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:113
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:35
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.
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453