VTK-m  2.2
ExtractGeometry.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_fulter_entity_extraction_ExtractGeometry_h
12 #define vtk_m_fulter_entity_extraction_ExtractGeometry_h
13 
14 #include <vtkm/ImplicitFunction.h>
15 #include <vtkm/filter/Filter.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace entity_extraction
23 {
42 {
43 public:
49  VTKM_CONT
50  void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral& func) { this->Function = func; }
51 
52  VTKM_CONT
53  const vtkm::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
54 
61  VTKM_CONT
62  bool GetExtractInside() const { return this->ExtractInside; }
64  VTKM_CONT
65  void SetExtractInside(bool value) { this->ExtractInside = value; }
67  VTKM_CONT
68  void ExtractInsideOn() { this->ExtractInside = true; }
70  VTKM_CONT
71  void ExtractInsideOff() { this->ExtractInside = false; }
72 
78  VTKM_CONT
79  bool GetExtractBoundaryCells() const { return this->ExtractBoundaryCells; }
81  VTKM_CONT
82  void SetExtractBoundaryCells(bool value) { this->ExtractBoundaryCells = value; }
84  VTKM_CONT
85  void ExtractBoundaryCellsOn() { this->ExtractBoundaryCells = true; }
87  VTKM_CONT
88  void ExtractBoundaryCellsOff() { this->ExtractBoundaryCells = false; }
89 
96  VTKM_CONT
97  bool GetExtractOnlyBoundaryCells() const { return this->ExtractOnlyBoundaryCells; }
99  VTKM_CONT
100  void SetExtractOnlyBoundaryCells(bool value) { this->ExtractOnlyBoundaryCells = value; }
102  VTKM_CONT
103  void ExtractOnlyBoundaryCellsOn() { this->ExtractOnlyBoundaryCells = true; }
105  VTKM_CONT
106  void ExtractOnlyBoundaryCellsOff() { this->ExtractOnlyBoundaryCells = false; }
107 
108 private:
109  VTKM_CONT
110  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
111 
112  bool ExtractInside = true;
113  bool ExtractBoundaryCells = false;
114  bool ExtractOnlyBoundaryCells = false;
116 };
117 } // namespace entity_extraction
118 } // namespace filter
119 } // namespace vtkm
120 
121 #endif // vtk_m_fulter_entity_extraction_ExtractGeometry_h
vtkm::filter::entity_extraction::ExtractGeometry::ExtractInsideOn
void ExtractInsideOn()
Specify the region of the implicit function to keep cells.
Definition: ExtractGeometry.h:68
vtkm::ImplicitFunctionGeneral
Implicit function that can switch among known implicit function types.
Definition: ImplicitFunction.h:965
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::entity_extraction::ExtractGeometry::SetExtractBoundaryCells
void SetExtractBoundaryCells(bool value)
Specify whether cells on the boundary should be extracted.
Definition: ExtractGeometry.h:82
VTKM_FILTER_ENTITY_EXTRACTION_EXPORT
#define VTKM_FILTER_ENTITY_EXTRACTION_EXPORT
Definition: vtkm_filter_entity_extraction_export.h:44
vtkm::filter::entity_extraction::ExtractGeometry::GetExtractInside
bool GetExtractInside() const
Specify the region of the implicit function to keep cells.
Definition: ExtractGeometry.h:62
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::entity_extraction::ExtractGeometry::ExtractBoundaryCellsOn
void ExtractBoundaryCellsOn()
Specify whether cells on the boundary should be extracted.
Definition: ExtractGeometry.h:85
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::entity_extraction::ExtractGeometry::SetExtractOnlyBoundaryCells
void SetExtractOnlyBoundaryCells(bool value)
GetExtractOnlyBoundaryCells.
Definition: ExtractGeometry.h:100
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
ImplicitFunction.h
vtkm::filter::entity_extraction::ExtractGeometry::GetImplicitFunction
const vtkm::ImplicitFunctionGeneral & GetImplicitFunction() const
Definition: ExtractGeometry.h:53
vtkm::filter::entity_extraction::ExtractGeometry::ExtractBoundaryCellsOff
void ExtractBoundaryCellsOff()
Specify whether cells on the boundary should be extracted.
Definition: ExtractGeometry.h:88
vtkm::filter::entity_extraction::ExtractGeometry::ExtractOnlyBoundaryCellsOn
void ExtractOnlyBoundaryCellsOn()
GetExtractOnlyBoundaryCells.
Definition: ExtractGeometry.h:103
vtkm::filter::entity_extraction::ExtractGeometry::ExtractInsideOff
void ExtractInsideOff()
Specify the region of the implicit function to keep cells.
Definition: ExtractGeometry.h:71
vtkm::filter::entity_extraction::ExtractGeometry::SetImplicitFunction
void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral &func)
Specifies the implicit function to be used to perform extract geometry.
Definition: ExtractGeometry.h:50
vtkm_filter_entity_extraction_export.h
vtkm::filter::entity_extraction::ExtractGeometry::Function
vtkm::ImplicitFunctionGeneral Function
Definition: ExtractGeometry.h:115
vtkm::filter::entity_extraction::ExtractGeometry::GetExtractOnlyBoundaryCells
bool GetExtractOnlyBoundaryCells() const
Specify whether to extract cells only on the boundary.
Definition: ExtractGeometry.h:97
vtkm::filter::entity_extraction::ExtractGeometry::SetExtractInside
void SetExtractInside(bool value)
Specify the region of the implicit function to keep cells.
Definition: ExtractGeometry.h:65
vtkm::filter::entity_extraction::ExtractGeometry
Extract a subset of geometry based on an implicit function.
Definition: ExtractGeometry.h:41
vtkm::filter::entity_extraction::ExtractGeometry::ExtractOnlyBoundaryCellsOff
void ExtractOnlyBoundaryCellsOff()
GetExtractOnlyBoundaryCells.
Definition: ExtractGeometry.h:106
vtkm::filter::entity_extraction::ExtractGeometry::GetExtractBoundaryCells
bool GetExtractBoundaryCells() const
Specify whether cells on the boundary should be extracted.
Definition: ExtractGeometry.h:79
Filter.h