VTK-m  2.0
ExtractPoints.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 vtkm_filter_entity_extraction_ExtractPoints_h
12 #define vtkm_filter_entity_extraction_ExtractPoints_h
13 
14 #include <vtkm/ImplicitFunction.h>
15 
17 #include <vtkm/filter/entity_extraction/vtkm_filter_entity_extraction_export.h>
18 
19 namespace vtkm
20 {
21 namespace filter
22 {
23 namespace entity_extraction
24 {
34 class VTKM_FILTER_ENTITY_EXTRACTION_EXPORT ExtractPoints : public vtkm::filter::FilterField
35 {
36 public:
39  VTKM_CONT
40  bool GetCompactPoints() const { return this->CompactPoints; }
41  VTKM_CONT
42  void SetCompactPoints(bool value) { this->CompactPoints = value; }
43 
45  void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral& func) { this->Function = func; }
46 
47  const vtkm::ImplicitFunctionGeneral& GetImplicitFunction() const { return this->Function; }
48 
49  VTKM_CONT
50  bool GetExtractInside() const { return this->ExtractInside; }
51  VTKM_CONT
52  void SetExtractInside(bool value) { this->ExtractInside = value; }
53  VTKM_CONT
54  void ExtractInsideOn() { this->ExtractInside = true; }
55  VTKM_CONT
56  void ExtractInsideOff() { this->ExtractInside = false; }
57 
58 private:
59  VTKM_CONT
60  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
61 
62  bool ExtractInside = true;
64 
65  bool CompactPoints = false;
66 };
67 } // namespace entity_extraction
68 } // namespace filter
69 } // namespace vtkm
70 
71 #endif // vtkm_filter_entity_extraction_ExtractPoints_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::ExtractPoints::GetExtractInside
VTKM_CONT bool GetExtractInside() const
Definition: ExtractPoints.h:50
vtkm::filter::entity_extraction::ExtractPoints::GetCompactPoints
VTKM_CONT bool GetCompactPoints() const
When CompactPoints is set, instead of copying the points and point fields from the input,...
Definition: ExtractPoints.h:40
vtkm::filter::entity_extraction::ExtractPoints::ExtractInsideOn
VTKM_CONT void ExtractInsideOn()
Definition: ExtractPoints.h:54
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::entity_extraction::ExtractPoints::ExtractInsideOff
VTKM_CONT void ExtractInsideOff()
Definition: ExtractPoints.h:56
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
vtkm::filter::entity_extraction::ExtractPoints::GetImplicitFunction
const vtkm::ImplicitFunctionGeneral & GetImplicitFunction() const
Definition: ExtractPoints.h:47
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
ImplicitFunction.h
vtkm::filter::entity_extraction::ExtractPoints
Extract only points from a geometry using an implicit function.
Definition: ExtractPoints.h:34
vtkm::filter::entity_extraction::ExtractPoints::Function
vtkm::ImplicitFunctionGeneral Function
Definition: ExtractPoints.h:63
vtkm::filter::entity_extraction::ExtractPoints::SetExtractInside
VTKM_CONT void SetExtractInside(bool value)
Definition: ExtractPoints.h:52
vtkm::filter::entity_extraction::ExtractPoints::SetCompactPoints
VTKM_CONT void SetCompactPoints(bool value)
Definition: ExtractPoints.h:42
vtkm::filter::entity_extraction::ExtractPoints::SetImplicitFunction
void SetImplicitFunction(const vtkm::ImplicitFunctionGeneral &func)
Set the volume of interest to extract.
Definition: ExtractPoints.h:45