VTK-m  2.2
ContourUncertainUniformMonteCarlo.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_uncertainty_ContourUncertainUniformMonteCarlo_h
12 #define vtk_m_filter_uncertainty_ContourUncertainUniformMonteCarlo_h
13 #include <vtkm/filter/Filter.h>
15 
16 namespace vtkm
17 {
18 namespace filter
19 {
20 namespace uncertainty
21 {
29 {
30  std::string NumberNonzeroProbabilityName = "num_nonzero_probability";
31  std::string EntropyName = "entropy";
32  vtkm::Float64 IsoValue = 0.0;
33  vtkm::IdComponent IterValue = 1;
34 
35 public:
37 
38  VTKM_CONT void SetMinField(const std::string& fieldName)
39  {
40  this->SetActiveField(0, fieldName, vtkm::cont::Field::Association::Points);
41  }
42  VTKM_CONT void SetMaxField(const std::string& fieldName)
43  {
44  this->SetActiveField(1, fieldName, vtkm::cont::Field::Association::Points);
45  }
46  VTKM_CONT void SetIsoValue(vtkm::Float64 value) { this->IsoValue = value; }
47  VTKM_CONT vtkm::Float64 GetIsoValue() const { return this->IsoValue; }
48 
49  VTKM_CONT void SetNumSample(vtkm::IdComponent value) { this->IterValue = value; }
50  VTKM_CONT vtkm::IdComponent GetNumSample() const { return this->IterValue; }
51 
52  VTKM_CONT void SetCrossProbabilityName(const std::string& name)
53  {
54  this->SetOutputFieldName(name);
55  }
56  VTKM_CONT const std::string& GetCrossProbabilityName() const
57  {
58  return this->GetOutputFieldName();
59  }
60 
61  VTKM_CONT void SetNumberNonzeroProbabilityName(const std::string& name)
62  {
63  this->NumberNonzeroProbabilityName = name;
64  }
65  VTKM_CONT const std::string& GetNumberNonzeroProbabilityName() const
66  {
67  return this->NumberNonzeroProbabilityName;
68  }
69  VTKM_CONT void SetEntropyName(const std::string& name) { this->EntropyName = name; }
70  VTKM_CONT const std::string& GetEntropyName() const { return this->EntropyName; }
71 
72 protected:
73  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
74 };
75 }
76 }
77 }
78 #endif
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetNumberNonzeroProbabilityName
void SetNumberNonzeroProbabilityName(const std::string &name)
Definition: ContourUncertainUniformMonteCarlo.h:61
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::IdComponent
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetEntropyName
const std::string & GetEntropyName() const
Definition: ContourUncertainUniformMonteCarlo.h:70
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetNumSample
vtkm::IdComponent GetNumSample() const
Definition: ContourUncertainUniformMonteCarlo.h:50
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetEntropyName
void SetEntropyName(const std::string &name)
Definition: ContourUncertainUniformMonteCarlo.h:69
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::ContourUncertainUniformMonteCarlo::SetIsoValue
void SetIsoValue(vtkm::Float64 value)
Definition: ContourUncertainUniformMonteCarlo.h:46
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetNumSample
void SetNumSample(vtkm::IdComponent value)
Definition: ContourUncertainUniformMonteCarlo.h:49
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetMaxField
void SetMaxField(const std::string &fieldName)
Definition: ContourUncertainUniformMonteCarlo.h:42
vtkm_filter_uncertainty_export.h
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
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetCrossProbabilityName
void SetCrossProbabilityName(const std::string &name)
Definition: ContourUncertainUniformMonteCarlo.h:52
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetIsoValue
vtkm::Float64 GetIsoValue() const
Definition: ContourUncertainUniformMonteCarlo.h:47
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetMinField
void SetMinField(const std::string &fieldName)
Definition: ContourUncertainUniformMonteCarlo.h:38
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo
Visualize isosurface uncertainty using Monte Carlo approach for uniformly distributed data.
Definition: ContourUncertainUniformMonteCarlo.h:28
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetNumberNonzeroProbabilityName
const std::string & GetNumberNonzeroProbabilityName() const
Definition: ContourUncertainUniformMonteCarlo.h:65
vtkm::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetCrossProbabilityName
const std::string & GetCrossProbabilityName() const
Definition: ContourUncertainUniformMonteCarlo.h:56
Filter.h