VTK-m  2.2
Histogram.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 
11 #ifndef vtk_m_filter_density_estimate_Histogram_h
12 #define vtk_m_filter_density_estimate_Histogram_h
13 
14 #include <vtkm/filter/Filter.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace density_estimate
22 {
41 {
42 public:
44 
48  VTKM_CONT void SetNumberOfBins(vtkm::Id count) { this->NumberOfBins = count; }
49 
51  VTKM_CONT vtkm::Id GetNumberOfBins() const { return this->NumberOfBins; }
52 
57  VTKM_CONT void SetRange(const vtkm::Range& range) { this->Range = range; }
58 
62  VTKM_CONT const vtkm::Range& GetRange() const { return this->Range; }
63 
67  VTKM_CONT vtkm::Float64 GetBinDelta() const { return this->BinDelta; }
68 
74  VTKM_CONT vtkm::Range GetComputedRange() const { return this->ComputedRange; }
75 
76 private:
77  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
78  VTKM_CONT vtkm::cont::PartitionedDataSet DoExecutePartitions(
79  const vtkm::cont::PartitionedDataSet& inData) override;
80 
85  VTKM_CONT void PreExecute(const vtkm::cont::PartitionedDataSet& input);
86  VTKM_CONT void PostExecute(const vtkm::cont::PartitionedDataSet& input,
89 
90  vtkm::Id NumberOfBins = 10;
91  vtkm::Float64 BinDelta = 0;
94  bool InExecutePartitions = false;
95 };
96 } // namespace density_estimate
97 } // namespace filter
98 } // namespace vtkm
99 
100 #endif // vtk_m_filter_density_estimate_Histogram_h
vtkm::filter::density_estimate::Histogram::GetBinDelta
vtkm::Float64 GetBinDelta() const
Returns the size of bin in the computed histogram.
Definition: Histogram.h:67
vtkm::filter::density_estimate::Histogram::ComputedRange
vtkm::Range ComputedRange
Definition: Histogram.h:92
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::density_estimate::Histogram::SetRange
void SetRange(const vtkm::Range &range)
Set the range to use to generate the histogram.
Definition: Histogram.h:57
vtkm::filter::density_estimate::Histogram::Range
vtkm::Range Range
Definition: Histogram.h:93
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::density_estimate::Histogram::GetComputedRange
vtkm::Range GetComputedRange() const
Returns the range used for most recent execute.
Definition: Histogram.h:74
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::filter::density_estimate::Histogram
Construct the histogram of a given field.
Definition: Histogram.h:40
vtkm_filter_density_estimate_export.h
vtkm::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
vtkm::filter::density_estimate::Histogram::GetRange
const vtkm::Range & GetRange() const
Get the range used to generate the histogram.
Definition: Histogram.h:62
vtkm::filter::density_estimate::Histogram::GetNumberOfBins
vtkm::Id GetNumberOfBins() const
Get the number of bins for the resulting histogram.
Definition: Histogram.h:51
vtkm::filter::density_estimate::Histogram::SetNumberOfBins
void SetNumberOfBins(vtkm::Id count)
Set the number of bins for the resulting histogram.
Definition: Histogram.h:48
VTKM_FILTER_DENSITY_ESTIMATE_EXPORT
#define VTKM_FILTER_DENSITY_ESTIMATE_EXPORT
Definition: vtkm_filter_density_estimate_export.h:44
vtkm::cont::PartitionedDataSet
Comprises a set of vtkm::cont::DataSet objects.
Definition: PartitionedDataSet.h:26
Filter.h
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31