Viskores  1.0
ExtractPoints.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_entity_extraction_ExtractPoints_h
20 #define viskores_filter_entity_extraction_ExtractPoints_h
21 
23 
24 #include <viskores/filter/Filter.h>
26 
27 namespace viskores
28 {
29 namespace filter
30 {
31 namespace entity_extraction
32 {
42 class VISKORES_FILTER_ENTITY_EXTRACTION_EXPORT ExtractPoints : public viskores::filter::Filter
43 {
44 public:
53  bool GetCompactPoints() const { return this->CompactPoints; }
56  void SetCompactPoints(bool value) { this->CompactPoints = value; }
57 
63  void SetImplicitFunction(const viskores::ImplicitFunctionGeneral& func) { this->Function = func; }
64 
65  const viskores::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
66 
74  bool GetExtractInside() const { return this->ExtractInside; }
77  void SetExtractInside(bool value) { this->ExtractInside = value; }
80  void ExtractInsideOn() { this->ExtractInside = true; }
83  void ExtractInsideOff() { this->ExtractInside = false; }
84 
85 private:
87  viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
88 
89  bool ExtractInside = true;
91 
92  bool CompactPoints = false;
93 };
94 } // namespace entity_extraction
95 } // namespace filter
96 } // namespace viskores
97 
98 #endif // viskores_filter_entity_extraction_ExtractPoints_h
viskores::ImplicitFunctionGeneral
Implicit function that can switch among known implicit function types.
Definition: ImplicitFunction.h:985
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::entity_extraction::ExtractPoints::SetCompactPoints
void SetCompactPoints(bool value)
Option to remove unused points and compact result int a smaller array.
Definition: ExtractPoints.h:56
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::filter::entity_extraction::ExtractPoints::ExtractInsideOn
void ExtractInsideOn()
Specify the region of the implicit function to keep points.
Definition: ExtractPoints.h:80
viskores::filter::entity_extraction::ExtractPoints::GetCompactPoints
bool GetCompactPoints() const
Option to remove unused points and compact result int a smaller array.
Definition: ExtractPoints.h:53
viskores::filter::entity_extraction::ExtractPoints
Extract only points from a geometry using an implicit function.
Definition: ExtractPoints.h:42
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_export.h
ImplicitFunction.h
viskores::filter::entity_extraction::ExtractPoints::GetExtractInside
bool GetExtractInside() const
Specify the region of the implicit function to keep points.
Definition: ExtractPoints.h:74
viskores::filter::entity_extraction::ExtractPoints::SetExtractInside
void SetExtractInside(bool value)
Specify the region of the implicit function to keep points.
Definition: ExtractPoints.h:77
viskores::filter::entity_extraction::ExtractPoints::ExtractInsideOff
void ExtractInsideOff()
Specify the region of the implicit function to keep points.
Definition: ExtractPoints.h:83
viskores::filter::entity_extraction::ExtractPoints::SetImplicitFunction
void SetImplicitFunction(const viskores::ImplicitFunctionGeneral &func)
Specifies the implicit function to be used to perform extract points.
Definition: ExtractPoints.h:63
viskores::filter::entity_extraction::ExtractPoints::GetImplicitFunction
const viskores::ImplicitFunctionGeneral & GetImplicitFunction() const
Definition: ExtractPoints.h:65
viskores::filter::entity_extraction::ExtractPoints::Function
viskores::ImplicitFunctionGeneral Function
Definition: ExtractPoints.h:90
Filter.h