VTK-m  2.0
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>
16 #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
17 
18 namespace vtkm
19 {
20 namespace filter
21 {
22 namespace entity_extraction
23 {
39 class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractGeometry : public vtkm::filter::FilterField
40 {
41 public:
42  // Set the volume of interest to extract
43  void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral& func) { this->Function = func; }
44 
45  const vtkm::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
46 
47  VTKM_CONT
48  bool GetExtractInside() const { return this->ExtractInside; }
49  VTKM_CONT
50  void SetExtractInside(bool value) { this->ExtractInside = value; }
51  VTKM_CONT
52  void ExtractInsideOn() { this->ExtractInside = true; }
53  VTKM_CONT
54  void ExtractInsideOff() { this->ExtractInside = false; }
55 
56  VTKM_CONT
57  bool GetExtractBoundaryCells() const { return this->ExtractBoundaryCells; }
58  VTKM_CONT
59  void SetExtractBoundaryCells(bool value) { this->ExtractBoundaryCells = value; }
60  VTKM_CONT
61  void ExtractBoundaryCellsOn() { this->ExtractBoundaryCells = true; }
62  VTKM_CONT
63  void ExtractBoundaryCellsOff() { this->ExtractBoundaryCells = false; }
64 
65  VTKM_CONT
66  bool GetExtractOnlyBoundaryCells() const { return this->ExtractOnlyBoundaryCells; }
67  VTKM_CONT
68  void SetExtractOnlyBoundaryCells(bool value) { this->ExtractOnlyBoundaryCells = value; }
69  VTKM_CONT
70  void ExtractOnlyBoundaryCellsOn() { this->ExtractOnlyBoundaryCells = true; }
71  VTKM_CONT
72  void ExtractOnlyBoundaryCellsOff() { this->ExtractOnlyBoundaryCells = false; }
73 
74 private:
75  VTKM_CONT
76  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
77 
78  bool ExtractInside = true;
79  bool ExtractBoundaryCells = false;
80  bool ExtractOnlyBoundaryCells = false;
82 };
83 } // namespace entity_extraction
84 } // namespace filter
85 } // namespace vtkm
86 
87 #endif // vtk_m_fulter_entity_extraction_ExtractGeometry_h
vtkm::ImplicitFunctionGeneral
Implicit function that can switch among known implicit function types.
Definition: ImplicitFunction.h:749
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::entity_extraction::ExtractGeometry::ExtractInsideOn
VTKM_CONT void ExtractInsideOn()
Definition: ExtractGeometry.h:52
vtkm::filter::entity_extraction::ExtractGeometry::ExtractBoundaryCellsOn
VTKM_CONT void ExtractBoundaryCellsOn()
Definition: ExtractGeometry.h:61
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::entity_extraction::ExtractGeometry::SetExtractInside
VTKM_CONT void SetExtractInside(bool value)
Definition: ExtractGeometry.h:50
vtkm::filter::entity_extraction::ExtractGeometry::GetExtractBoundaryCells
VTKM_CONT bool GetExtractBoundaryCells() const
Definition: ExtractGeometry.h:57
vtkm::filter::entity_extraction::ExtractGeometry::SetExtractBoundaryCells
VTKM_CONT void SetExtractBoundaryCells(bool value)
Definition: ExtractGeometry.h:59
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::entity_extraction::ExtractGeometry::GetExtractOnlyBoundaryCells
VTKM_CONT bool GetExtractOnlyBoundaryCells() const
Definition: ExtractGeometry.h:66
vtkm::filter::entity_extraction::ExtractGeometry::SetExtractOnlyBoundaryCells
VTKM_CONT void SetExtractOnlyBoundaryCells(bool value)
Definition: ExtractGeometry.h:68
vtkm::filter::entity_extraction::ExtractGeometry::GetExtractInside
VTKM_CONT bool GetExtractInside() const
Definition: ExtractGeometry.h:48
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:45
vtkm::filter::entity_extraction::ExtractGeometry::ExtractBoundaryCellsOff
VTKM_CONT void ExtractBoundaryCellsOff()
Definition: ExtractGeometry.h:63
vtkm::filter::entity_extraction::ExtractGeometry::ExtractOnlyBoundaryCellsOn
VTKM_CONT void ExtractOnlyBoundaryCellsOn()
Definition: ExtractGeometry.h:70
vtkm::filter::entity_extraction::ExtractGeometry::ExtractInsideOff
VTKM_CONT void ExtractInsideOff()
Definition: ExtractGeometry.h:54
vtkm::filter::entity_extraction::ExtractGeometry::ExtractOnlyBoundaryCellsOff
VTKM_CONT void ExtractOnlyBoundaryCellsOff()
Definition: ExtractGeometry.h:72
vtkm::filter::entity_extraction::ExtractGeometry::SetImplicitFunction
void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral &func)
Definition: ExtractGeometry.h:43
vtkm::filter::entity_extraction::ExtractGeometry::Function
vtkm::ImplicitFunctionGeneral Function
Definition: ExtractGeometry.h:81
vtkm::filter::entity_extraction::ExtractGeometry
Extract a subset of geometry based on an implicit function.
Definition: ExtractGeometry.h:39