Viskores  1.0
MaskPoints.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_MaskPoints_h
20 #define viskores_filter_entity_extraction_MaskPoints_h
21 
22 #include <viskores/filter/Filter.h>
24 
25 namespace viskores
26 {
27 namespace filter
28 {
29 namespace entity_extraction
30 {
34 class VISKORES_FILTER_ENTITY_EXTRACTION_EXPORT MaskPoints : public viskores::filter::Filter
35 {
36 public:
37  // When CompactPoints is set, instead of copying the points and point fields
38  // from the input, the filter will create new compact fields without the unused elements
40  bool GetCompactPoints() const { return this->CompactPoints; }
42  void SetCompactPoints(bool value) { this->CompactPoints = value; }
43 
45  viskores::Id GetStride() const { return this->Stride; }
47  void SetStride(viskores::Id stride) { this->Stride = stride; }
48 
49 private:
51  viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
52 
53  viskores::Id Stride = 1;
54  bool CompactPoints = true;
55 };
56 } // namespace eneity_extraction
57 } // namespace filter
58 } // namespace viskores
59 
60 #endif // viskores_filter_entity_extraction_MaskPoints_h
viskores::filter::entity_extraction::MaskPoints
Subselect points using a stride.
Definition: MaskPoints.h:34
viskores::filter::entity_extraction::MaskPoints::SetStride
void SetStride(viskores::Id stride)
Definition: MaskPoints.h:47
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
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
viskores::filter::entity_extraction::MaskPoints::SetCompactPoints
void SetCompactPoints(bool value)
Definition: MaskPoints.h:42
viskores::filter::entity_extraction::MaskPoints::GetCompactPoints
bool GetCompactPoints() const
Definition: MaskPoints.h:40
viskores::filter::entity_extraction::MaskPoints::GetStride
viskores::Id GetStride() const
Definition: MaskPoints.h:45
Filter.h