VTK-m  2.2
ContourUncertainUniform.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 // This code is based on the algorithm presented in the following papers:
12 // Wang, J., Athawale, T., Moreland, K., Chen, J., Johnson, C., & Pugmire,
13 // D. (2023). FunMC^ 2: A Filter for Uncertainty Visualization of Marching
14 // Cubes on Multi-Core Devices. Oak Ridge National Laboratory (ORNL),
15 // Oak Ridge, TN (United States).
16 //
17 // Athawale, T. M., Sane, S., & Johnson, C. R. (2021, October). Uncertainty
18 // Visualization of the Marching Squares and Marching Cubes Topology Cases.
19 // In 2021 IEEE Visualization Conference (VIS) (pp. 106-110). IEEE.
20 
21 #ifndef vtk_m_filter_uncertainty_ContourUncertainUniform_h
22 #define vtk_m_filter_uncertainty_ContourUncertainUniform_h
23 
24 #include <vtkm/filter/Filter.h>
26 
27 namespace vtkm
28 {
29 namespace filter
30 {
31 namespace uncertainty
32 {
44 {
45 
46  std::string NumberNonzeroProbabilityName = "num_nonzero_probability";
47  std::string EntropyName = "entropy";
48  vtkm::Float64 IsoValue = 0.0;
49 
50 public:
53 
56  VTKM_CONT void SetMinField(const std::string& fieldName)
57  {
58  this->SetActiveField(0, fieldName, vtkm::cont::Field::Association::Points);
59  }
60 
63  VTKM_CONT void SetMaxField(const std::string& fieldName)
64  {
65  this->SetActiveField(1, fieldName, vtkm::cont::Field::Association::Points);
66  }
67 
70  VTKM_CONT void SetIsoValue(vtkm::Float64 value) { this->IsoValue = value; }
71 
74  VTKM_CONT vtkm::Float64 GetIsoValue() const { return this->IsoValue; }
75 
78  VTKM_CONT void SetCrossProbabilityName(const std::string& name)
79  {
80  this->SetOutputFieldName(name);
81  }
82 
85  VTKM_CONT const std::string& GetCrossProbabilityName() const
86  {
87  return this->GetOutputFieldName();
88  }
89 
92  VTKM_CONT void SetNumberNonzeroProbabilityName(const std::string& name)
93  {
94  this->NumberNonzeroProbabilityName = name;
95  }
96 
99  VTKM_CONT const std::string& GetNumberNonzeroProbabilityName() const
100  {
101  return this->NumberNonzeroProbabilityName;
102  }
103 
106  VTKM_CONT void SetEntropyName(const std::string& name) { this->EntropyName = name; }
107 
110  VTKM_CONT const std::string& GetEntropyName() const { return this->EntropyName; }
111 
112 protected:
113  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
114 };
115 }
116 }
117 }
118 #endif
vtkm::filter::uncertainty::ContourUncertainUniform::GetIsoValue
vtkm::Float64 GetIsoValue() const
Gets isovalue Gets isovalue used for visualizing isosurfaces.
Definition: ContourUncertainUniform.h:74
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::uncertainty::ContourUncertainUniform::SetNumberNonzeroProbabilityName
void SetNumberNonzeroProbabilityName(const std::string &name)
Sets toplogy case count field (uncertainty field type 2).
Definition: ContourUncertainUniform.h:92
vtkm::filter::uncertainty::ContourUncertainUniform::SetEntropyName
void SetEntropyName(const std::string &name)
Sets entropy field.
Definition: ContourUncertainUniform.h:106
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::uncertainty::ContourUncertainUniform::GetCrossProbabilityName
const std::string & GetCrossProbabilityName() const
Gets crossing probability field (uncertainty field type 1).
Definition: ContourUncertainUniform.h:85
vtkm::filter::uncertainty::ContourUncertainUniform::SetCrossProbabilityName
void SetCrossProbabilityName(const std::string &name)
Sets crossing probability field (uncertainty field type 1).
Definition: ContourUncertainUniform.h:78
vtkm::filter::uncertainty::ContourUncertainUniform::GetEntropyName
const std::string & GetEntropyName() const
Gets entropy field.
Definition: ContourUncertainUniform.h:110
vtkm::filter::uncertainty::ContourUncertainUniform::SetMaxField
void SetMaxField(const std::string &fieldName)
Sets maximum field.
Definition: ContourUncertainUniform.h:63
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::cont::Field::Association::Points
@ Points
A field that applies to points.
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::uncertainty::ContourUncertainUniform::SetMinField
void SetMinField(const std::string &fieldName)
Sets minimum field.
Definition: ContourUncertainUniform.h:56
vtkm::filter::uncertainty::ContourUncertainUniform::SetIsoValue
void SetIsoValue(vtkm::Float64 value)
Sets isovalue.
Definition: ContourUncertainUniform.h:70
vtkm_filter_uncertainty_export.h
vtkm::filter::uncertainty::ContourUncertainUniform::GetNumberNonzeroProbabilityName
const std::string & GetNumberNonzeroProbabilityName() const
Gets toplogy case count field (uncertainty field type 2.
Definition: ContourUncertainUniform.h:99
vtkm::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
VTKM_FILTER_UNCERTAINTY_EXPORT
#define VTKM_FILTER_UNCERTAINTY_EXPORT
Definition: vtkm_filter_uncertainty_export.h:44
Filter.h
vtkm::filter::uncertainty::ContourUncertainUniform
Visualize isosurface uncertainty for uniform distributed data.
Definition: ContourUncertainUniform.h:43