VTK-m  2.2
ThresholdPoints.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_entity_extraction_ThresholdPoints_h
12 #define vtk_m_filter_entity_extraction_ThresholdPoints_h
13 
14 #include <vtkm/filter/Filter.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace entity_extraction
22 {
24 {
25 public:
26  // When CompactPoints is set, instead of copying the points and point fields
27  // from the input, the filter will create new compact fields without the unused elements
28  VTKM_CONT
29  bool GetCompactPoints() const { return this->CompactPoints; }
30  VTKM_CONT
31  void SetCompactPoints(bool value) { this->CompactPoints = value; }
32 
33  VTKM_CONT
34  vtkm::Float64 GetLowerThreshold() const { return this->LowerValue; }
35  VTKM_CONT
36  void SetLowerThreshold(vtkm::Float64 value) { this->LowerValue = value; }
37 
38  VTKM_CONT
39  vtkm::Float64 GetUpperThreshold() const { return this->UpperValue; }
40  VTKM_CONT
41  void SetUpperThreshold(vtkm::Float64 value) { this->UpperValue = value; }
42 
43  VTKM_CONT
44  void SetThresholdBelow(vtkm::Float64 value);
45  VTKM_CONT
46  void SetThresholdAbove(vtkm::Float64 value);
47  VTKM_CONT
48  void SetThresholdBetween(vtkm::Float64 value1, vtkm::Float64 value2);
49 
50 private:
51  VTKM_CONT
52  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
53 
54  constexpr static int THRESHOLD_BELOW = 0;
55  constexpr static int THRESHOLD_ABOVE = 1;
56  constexpr static int THRESHOLD_BETWEEN = 2;
57 
58  double LowerValue = 0;
59  double UpperValue = 0;
60  int ThresholdType = THRESHOLD_BETWEEN;
61 
62  bool CompactPoints = false;
63 };
64 } // namespace entity_extraction
65 } // namespace filter
66 } // namespace vtkm
67 
68 #endif // vtk_m_filter_entity_extraction_ThresholdPoints_h
vtkm::filter::entity_extraction::ThresholdPoints::GetCompactPoints
bool GetCompactPoints() const
Definition: ThresholdPoints.h:29
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_FILTER_ENTITY_EXTRACTION_EXPORT
#define VTKM_FILTER_ENTITY_EXTRACTION_EXPORT
Definition: vtkm_filter_entity_extraction_export.h:44
vtkm::filter::entity_extraction::ThresholdPoints::SetUpperThreshold
void SetUpperThreshold(vtkm::Float64 value)
Definition: ThresholdPoints.h:41
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::entity_extraction::ThresholdPoints::GetLowerThreshold
vtkm::Float64 GetLowerThreshold() const
Definition: ThresholdPoints.h:34
vtkm::filter::entity_extraction::ThresholdPoints
Definition: ThresholdPoints.h:23
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::entity_extraction::ThresholdPoints::GetUpperThreshold
vtkm::Float64 GetUpperThreshold() const
Definition: ThresholdPoints.h:39
vtkm::filter::entity_extraction::ThresholdPoints::SetCompactPoints
void SetCompactPoints(bool value)
Definition: ThresholdPoints.h:31
vtkm::filter::entity_extraction::ThresholdPoints::SetLowerThreshold
void SetLowerThreshold(vtkm::Float64 value)
Definition: ThresholdPoints.h:36
vtkm_filter_entity_extraction_export.h
vtkm::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
Filter.h