Viskores  1.0
ContourUncertainUniformMonteCarlo.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 
19 #ifndef viskores_filter_uncertainty_ContourUncertainUniformMonteCarlo_h
20 #define viskores_filter_uncertainty_ContourUncertainUniformMonteCarlo_h
21 #include <viskores/filter/Filter.h>
23 
24 namespace viskores
25 {
26 namespace filter
27 {
28 namespace uncertainty
29 {
36 class VISKORES_FILTER_UNCERTAINTY_EXPORT ContourUncertainUniformMonteCarlo
38 {
39  std::string NumberNonzeroProbabilityName = "num_nonzero_probability";
40  std::string EntropyName = "entropy";
41  viskores::Float64 IsoValue = 0.0;
42  viskores::IdComponent IterValue = 1;
43 
44 public:
46 
47  VISKORES_CONT void SetMinField(const std::string& fieldName)
48  {
49  this->SetActiveField(0, fieldName, viskores::cont::Field::Association::Points);
50  }
51  VISKORES_CONT void SetMaxField(const std::string& fieldName)
52  {
53  this->SetActiveField(1, fieldName, viskores::cont::Field::Association::Points);
54  }
55  VISKORES_CONT void SetIsoValue(viskores::Float64 value) { this->IsoValue = value; }
56  VISKORES_CONT viskores::Float64 GetIsoValue() const { return this->IsoValue; }
57 
58  VISKORES_CONT void SetNumSample(viskores::IdComponent value) { this->IterValue = value; }
59  VISKORES_CONT viskores::IdComponent GetNumSample() const { return this->IterValue; }
60 
61  VISKORES_CONT void SetCrossProbabilityName(const std::string& name)
62  {
63  this->SetOutputFieldName(name);
64  }
65  VISKORES_CONT const std::string& GetCrossProbabilityName() const
66  {
67  return this->GetOutputFieldName();
68  }
69 
70  VISKORES_CONT void SetNumberNonzeroProbabilityName(const std::string& name)
71  {
72  this->NumberNonzeroProbabilityName = name;
73  }
75  {
76  return this->NumberNonzeroProbabilityName;
77  }
78  VISKORES_CONT void SetEntropyName(const std::string& name) { this->EntropyName = name; }
79  VISKORES_CONT const std::string& GetEntropyName() const { return this->EntropyName; }
80 
81 protected:
82  VISKORES_CONT viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
83 };
84 }
85 }
86 }
87 #endif
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetCrossProbabilityName
void SetCrossProbabilityName(const std::string &name)
Definition: ContourUncertainUniformMonteCarlo.h:61
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetCrossProbabilityName
const std::string & GetCrossProbabilityName() const
Definition: ContourUncertainUniformMonteCarlo.h:65
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetMinField
void SetMinField(const std::string &fieldName)
Definition: ContourUncertainUniformMonteCarlo.h:47
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
viskores_filter_uncertainty_export.h
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetEntropyName
void SetEntropyName(const std::string &name)
Definition: ContourUncertainUniformMonteCarlo.h:78
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo
Visualize isosurface uncertainty using Monte Carlo approach for uniformly distributed data.
Definition: ContourUncertainUniformMonteCarlo.h:36
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetMaxField
void SetMaxField(const std::string &fieldName)
Definition: ContourUncertainUniformMonteCarlo.h:51
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetIsoValue
void SetIsoValue(viskores::Float64 value)
Definition: ContourUncertainUniformMonteCarlo.h:55
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetNumberNonzeroProbabilityName
void SetNumberNonzeroProbabilityName(const std::string &name)
Definition: ContourUncertainUniformMonteCarlo.h:70
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::SetNumSample
void SetNumSample(viskores::IdComponent value)
Definition: ContourUncertainUniformMonteCarlo.h:58
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetNumberNonzeroProbabilityName
const std::string & GetNumberNonzeroProbabilityName() const
Definition: ContourUncertainUniformMonteCarlo.h:74
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetEntropyName
const std::string & GetEntropyName() const
Definition: ContourUncertainUniformMonteCarlo.h:79
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetIsoValue
viskores::Float64 GetIsoValue() const
Definition: ContourUncertainUniformMonteCarlo.h:56
viskores::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:169
viskores::filter::uncertainty::ContourUncertainUniformMonteCarlo::GetNumSample
viskores::IdComponent GetNumSample() const
Definition: ContourUncertainUniformMonteCarlo.h:59
viskores::cont::Field::Association::Points
@ Points
A field that applies to points.
Filter.h