VTK-m  2.2
Entropy.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_Entropy_h
12 #define vtk_m_filter_density_estimate_Entropy_h
13 
14 #include <vtkm/filter/Filter.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace density_estimate
22 {
28 {
29 public:
30  //currently the Entropy filter only works on scalar data.
32 
33  //Construct a histogram which is used to compute the entropy with a default of 10 bins
34  VTKM_CONT
35  Entropy();
36 
37  VTKM_CONT
38  void SetNumberOfBins(vtkm::Id count) { this->NumberOfBins = count; }
39  VTKM_CONT
40  vtkm::Id GetNumberOfBins() const { return this->NumberOfBins; }
41 
42 private:
43  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
44 
45  vtkm::Id NumberOfBins = 10;
46 };
47 } // namespace density_estimate
48 } // namespace filter
49 } // namespace vtkm
50 
51 #endif // vtk_m_filter_density_estimate_Entropy_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::density_estimate::Entropy::GetNumberOfBins
vtkm::Id GetNumberOfBins() const
Definition: Entropy.h:40
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::TypeListScalarAll
vtkm::List< vtkm::Int8, vtkm::UInt8, vtkm::Int16, vtkm::UInt16, vtkm::Int32, vtkm::UInt32, vtkm::Int64, vtkm::UInt64, vtkm::Float32, vtkm::Float64 > TypeListScalarAll
A list of all scalars defined in vtkm/Types.h.
Definition: TypeList.h:105
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_export.h
vtkm::List
A template used to hold a list of types.
Definition: List.h:39
vtkm::filter::density_estimate::Entropy
Construct the entropy histogram of a given Field.
Definition: Entropy.h:27
vtkm::filter::density_estimate::Entropy::SetNumberOfBins
void SetNumberOfBins(vtkm::Id count)
Definition: Entropy.h:38
VTKM_FILTER_DENSITY_ESTIMATE_EXPORT
#define VTKM_FILTER_DENSITY_ESTIMATE_EXPORT
Definition: vtkm_filter_density_estimate_export.h:44
Filter.h