VTK-m  2.0
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 
15 #include <vtkm/filter/density_estimate/vtkm_filter_density_estimate_export.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace density_estimate
22 {
27 class VTKM_FILTER_DENSITY_ESTIMATE_EXPORT Entropy : public vtkm::filter::FilterField
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::SetNumberOfBins
VTKM_CONT void SetNumberOfBins(vtkm::Id count)
Definition: Entropy.h:38
vtkm::cont::DataSet
Definition: DataSet.h:34
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::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::density_estimate::Entropy::GetNumberOfBins
VTKM_CONT vtkm::Id GetNumberOfBins() const
Definition: Entropy.h:40
vtkm::List
Definition: List.h:34
vtkm::filter::density_estimate::Entropy
Construct the entropy histogram of a given Field.
Definition: Entropy.h:27