VTK  9.7.1
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 
27 VTK_ABI_NAMESPACE_BEGIN
28 class VTKACCELERATORSVTKMFILTERS_EXPORT vtkmHistogramSampling : public vtkDataSetAlgorithm
29 {
30 public:
32 #ifndef __VTK_WRAP__
33 #undef vtkDataSetAlgorithm
34 #endif
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36  static vtkmHistogramSampling* New();
37 
39 
42  vtkSetMacro(SampleFraction, double);
43  vtkGetMacro(SampleFraction, double);
45 
47 
50  vtkSetMacro(NumberOfBins, vtkIdType);
51  vtkGetMacro(NumberOfBins, vtkIdType);
53 
54 protected:
56  ~vtkmHistogramSampling() override = default;
57  int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
58  vtkInformationVector* outputVector) override;
60 
61 private:
63  void operator=(const vtkmHistogramSampling&) = delete;
64  vtkmInitializer Initializer;
65 
66  double SampleFraction = 0.1;
67  vtkIdType NumberOfBins = 10;
68 };
69 
70 VTK_ABI_NAMESPACE_END
71 #endif // vtkmHistogramSampling_h
Store vtkAlgorithm input/output information.
int vtkIdType
Definition: vtkType.h:363
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Accelerated point to cell interpolation filter.
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called within ProcessRequest when a request asks the algorithm to create empty output data ob...
static vtkDataSetAlgorithm * New()