VTK  9.5.20251112
vtkmHistogramSampling.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
15#ifndef vtkmHistogramSampling_h
16#define vtkmHistogramSampling_h
17
18#include "vtkAcceleratorsVTKmFiltersModule.h" //required for correct implementation
19#include "vtkDataSetAlgorithm.h"
20#include "vtkmAlgorithm.h" // For vtkmAlgorithm
21#include "vtkmlib/vtkmInitializer.h" // Need for initializing viskores
22
23#ifndef __VTK_WRAP__
24#define vtkDataSetAlgorithm vtkmAlgorithm<vtkDataSetAlgorithm>
25#endif
26
27VTK_ABI_NAMESPACE_BEGIN
28class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmHistogramSampling : public vtkDataSetAlgorithm
29{
30public:
32#ifndef __VTK_WRAP__
33#undef vtkDataSetAlgorithm
34#endif
35 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
42 vtkSetMacro(SampleFraction, double);
43 vtkGetMacro(SampleFraction, double);
45
47
50 vtkSetMacro(NumberOfBins, vtkIdType);
51 vtkGetMacro(NumberOfBins, vtkIdType);
53
54protected:
56 ~vtkmHistogramSampling() override = default;
58 vtkInformationVector* outputVector) override;
60
61private:
63 void operator=(const vtkmHistogramSampling&) = delete;
64 vtkmInitializer Initializer;
65
66 double SampleFraction = 0.1;
67 vtkIdType NumberOfBins = 10;
68};
69
70VTK_ABI_NAMESPACE_END
71#endif // vtkmHistogramSampling_h
Superclass for algorithms that produce output of the same type as input.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Accelerated point to cell interpolation filter.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkmHistogramSampling() override=default
static vtkmHistogramSampling * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks the algorithm to create empty output data ob...
int vtkIdType
Definition vtkType.h:367