VTK-m  2.2
Mask.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_filter_entity_extraction_Mask_h
12 #define vtk_m_filter_entity_extraction_Mask_h
13 
14 #include <vtkm/filter/Filter.h>
16 
17 namespace vtkm
18 {
19 namespace filter
20 {
21 namespace entity_extraction
22 {
27 {
28 public:
29  // When CompactPoints is set, instead of copying the points and point fields
30  // from the input, the filter will create new compact fields without the unused elements
31  VTKM_CONT
32  bool GetCompactPoints() const { return this->CompactPoints; }
33  VTKM_CONT
34  void SetCompactPoints(bool value) { this->CompactPoints = value; }
35 
36  // Set the stride of the subsample
37  VTKM_CONT
38  vtkm::Id GetStride() const { return this->Stride; }
39  VTKM_CONT
40  void SetStride(vtkm::Id& stride) { this->Stride = stride; }
41 
42 private:
43  VTKM_CONT
44  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
45 
46  vtkm::Id Stride = 1;
47  bool CompactPoints = false;
48 };
49 } // namespace entity_extraction
50 } // namespace filter
51 } // namespace vtk
52 
53 #endif // vtk_m_filter_entity_extraction_Mask_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_FILTER_ENTITY_EXTRACTION_EXPORT
#define VTKM_FILTER_ENTITY_EXTRACTION_EXPORT
Definition: vtkm_filter_entity_extraction_export.h:44
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::entity_extraction::Mask::GetCompactPoints
bool GetCompactPoints() const
Definition: Mask.h:32
vtkm::filter::entity_extraction::Mask::GetStride
vtkm::Id GetStride() const
Definition: Mask.h:38
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::filter::entity_extraction::Mask::SetCompactPoints
void SetCompactPoints(bool value)
Definition: Mask.h:34
vtkm::filter::entity_extraction::Mask::SetStride
void SetStride(vtkm::Id &stride)
Definition: Mask.h:40
vtkm_filter_entity_extraction_export.h
vtkm::filter::entity_extraction::Mask
Subselect cells using a stride.
Definition: Mask.h:26
Filter.h