VTK-m  2.2
NDHistogram.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 #ifndef vtk_m_filter_density_estimate_NDHistogram_h
11 #define vtk_m_filter_density_estimate_NDHistogram_h
12 
13 #include <vtkm/filter/Filter.h>
15 
16 namespace vtkm
17 {
18 namespace filter
19 {
20 namespace density_estimate
21 {
35 {
36 public:
37  VTKM_CONT
38  void AddFieldAndBin(const std::string& fieldName, vtkm::Id numOfBins);
39 
40  // This index is the field position in FieldNames
41  // (or the input _fieldName string vector of SetFields() Function)
42  VTKM_CONT
43  vtkm::Float64 GetBinDelta(size_t fieldIdx);
44 
45  // This index is the field position in FieldNames
46  // (or the input _fieldName string vector of SetFields() Function)
47  VTKM_CONT
48  vtkm::Range GetDataRange(size_t fieldIdx);
49 
50 private:
51  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
52 
53  std::vector<vtkm::Id> NumOfBins;
54  std::vector<std::string> FieldNames;
55  std::vector<vtkm::Float64> BinDeltas;
56  std::vector<vtkm::Range> DataRanges; //Min Max of the field
57 };
58 } // namespace density_estimate
59 } // namespace filter
60 } // namespace vtm
61 
62 #endif //vtk_m_filter_density_estimate_NDHistogram_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::density_estimate::NDHistogram::FieldNames
std::vector< std::string > FieldNames
Definition: NDHistogram.h:54
vtkm::filter::density_estimate::NDHistogram::DataRanges
std::vector< vtkm::Range > DataRanges
Definition: NDHistogram.h:56
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::density_estimate::NDHistogram::NumOfBins
std::vector< vtkm::Id > NumOfBins
Definition: NDHistogram.h:53
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::NDHistogram
Generate a N-Dims histogram from input fields.
Definition: NDHistogram.h:34
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::NDHistogram::BinDeltas
std::vector< vtkm::Float64 > BinDeltas
Definition: NDHistogram.h:55
VTKM_FILTER_DENSITY_ESTIMATE_EXPORT
#define VTKM_FILTER_DENSITY_ESTIMATE_EXPORT
Definition: vtkm_filter_density_estimate_export.h:44
Filter.h
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31