Viskores  1.0
ExtractGeometry.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_fulter_entity_extraction_ExtractGeometry_h
20 #define viskores_fulter_entity_extraction_ExtractGeometry_h
21 
23 #include <viskores/filter/Filter.h>
25 
26 namespace viskores
27 {
28 namespace filter
29 {
30 namespace entity_extraction
31 {
49 class VISKORES_FILTER_ENTITY_EXTRACTION_EXPORT ExtractGeometry : public viskores::filter::Filter
50 {
51 public:
58  void SetImplicitFunction(const viskores::ImplicitFunctionGeneral& func) { this->Function = func; }
59 
61  const viskores::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
62 
70  bool GetExtractInside() const { return this->ExtractInside; }
73  void SetExtractInside(bool value) { this->ExtractInside = value; }
76  void ExtractInsideOn() { this->ExtractInside = true; }
79  void ExtractInsideOff() { this->ExtractInside = false; }
80 
87  bool GetExtractBoundaryCells() const { return this->ExtractBoundaryCells; }
90  void SetExtractBoundaryCells(bool value) { this->ExtractBoundaryCells = value; }
93  void ExtractBoundaryCellsOn() { this->ExtractBoundaryCells = true; }
96  void ExtractBoundaryCellsOff() { this->ExtractBoundaryCells = false; }
97 
105  bool GetExtractOnlyBoundaryCells() const { return this->ExtractOnlyBoundaryCells; }
108  void SetExtractOnlyBoundaryCells(bool value) { this->ExtractOnlyBoundaryCells = value; }
111  void ExtractOnlyBoundaryCellsOn() { this->ExtractOnlyBoundaryCells = true; }
114  void ExtractOnlyBoundaryCellsOff() { this->ExtractOnlyBoundaryCells = false; }
115 
116 private:
118  viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
119 
120  bool ExtractInside = true;
121  bool ExtractBoundaryCells = false;
122  bool ExtractOnlyBoundaryCells = false;
124 };
125 } // namespace entity_extraction
126 } // namespace filter
127 } // namespace viskores
128 
129 #endif // viskores_fulter_entity_extraction_ExtractGeometry_h
viskores::filter::entity_extraction::ExtractGeometry::ExtractOnlyBoundaryCellsOff
void ExtractOnlyBoundaryCellsOff()
GetExtractOnlyBoundaryCells.
Definition: ExtractGeometry.h:114
viskores::filter::entity_extraction::ExtractGeometry::ExtractInsideOn
void ExtractInsideOn()
Specify the region of the implicit function to keep cells.
Definition: ExtractGeometry.h:76
viskores::filter::entity_extraction::ExtractGeometry::SetExtractInside
void SetExtractInside(bool value)
Specify the region of the implicit function to keep cells.
Definition: ExtractGeometry.h:73
viskores::ImplicitFunctionGeneral
Implicit function that can switch among known implicit function types.
Definition: ImplicitFunction.h:985
viskores::filter::entity_extraction::ExtractGeometry::SetExtractOnlyBoundaryCells
void SetExtractOnlyBoundaryCells(bool value)
GetExtractOnlyBoundaryCells.
Definition: ExtractGeometry.h:108
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::entity_extraction::ExtractGeometry::SetImplicitFunction
void SetImplicitFunction(const viskores::ImplicitFunctionGeneral &func)
Specifies the implicit function to be used to perform extract geometry.
Definition: ExtractGeometry.h:58
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::filter::entity_extraction::ExtractGeometry::ExtractOnlyBoundaryCellsOn
void ExtractOnlyBoundaryCellsOn()
GetExtractOnlyBoundaryCells.
Definition: ExtractGeometry.h:111
viskores::filter::entity_extraction::ExtractGeometry::GetExtractBoundaryCells
bool GetExtractBoundaryCells() const
Specify whether cells on the boundary should be extracted.
Definition: ExtractGeometry.h:87
viskores::filter::entity_extraction::ExtractGeometry::SetExtractBoundaryCells
void SetExtractBoundaryCells(bool value)
Specify whether cells on the boundary should be extracted.
Definition: ExtractGeometry.h:90
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::entity_extraction::ExtractGeometry::GetImplicitFunction
const viskores::ImplicitFunctionGeneral & GetImplicitFunction() const
Definition: ExtractGeometry.h:61
viskores::filter::entity_extraction::ExtractGeometry::GetExtractOnlyBoundaryCells
bool GetExtractOnlyBoundaryCells() const
Specify whether to extract cells only on the boundary.
Definition: ExtractGeometry.h:105
viskores_filter_entity_extraction_export.h
ImplicitFunction.h
viskores::filter::entity_extraction::ExtractGeometry::Function
viskores::ImplicitFunctionGeneral Function
Definition: ExtractGeometry.h:123
viskores::filter::entity_extraction::ExtractGeometry::GetExtractInside
bool GetExtractInside() const
Specify the region of the implicit function to keep cells.
Definition: ExtractGeometry.h:70
viskores::filter::entity_extraction::ExtractGeometry
Extract a subset of geometry based on an implicit function.
Definition: ExtractGeometry.h:49
viskores::filter::entity_extraction::ExtractGeometry::ExtractBoundaryCellsOn
void ExtractBoundaryCellsOn()
Specify whether cells on the boundary should be extracted.
Definition: ExtractGeometry.h:93
viskores::filter::entity_extraction::ExtractGeometry::ExtractInsideOff
void ExtractInsideOff()
Specify the region of the implicit function to keep cells.
Definition: ExtractGeometry.h:79
viskores::filter::entity_extraction::ExtractGeometry::ExtractBoundaryCellsOff
void ExtractBoundaryCellsOff()
Specify whether cells on the boundary should be extracted.
Definition: ExtractGeometry.h:96
Filter.h