VTK-m  2.2
GenerateIds.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 #ifndef vtk_m_filter_field_transform_GenerateIds_h
11 #define vtk_m_filter_field_transform_GenerateIds_h
12 
13 #include <vtkm/filter/Filter.h>
15 
16 namespace vtkm
17 {
18 namespace filter
19 {
20 namespace field_transform
21 {
32 {
33  std::string PointFieldName = "pointids";
34  std::string CellFieldName = "cellids";
35  bool GeneratePointIds = true;
36  bool GenerateCellIds = true;
37  bool UseFloat = false;
38 
39 public:
44  const std::string& GetPointFieldName() const { return this->PointFieldName; }
46  void SetPointFieldName(const std::string& name) { this->PointFieldName = name; }
47 
52  const std::string& GetCellFieldName() const { return this->CellFieldName; }
54  void SetCellFieldName(const std::string& name) { this->CellFieldName = name; }
55 
61  bool GetGeneratePointIds() const { return this->GeneratePointIds; }
63  void SetGeneratePointIds(bool flag) { this->GeneratePointIds = flag; }
64 
70  bool GetGenerateCellIds() const { return this->GenerateCellIds; }
72  void SetGenerateCellIds(bool flag) { this->GenerateCellIds = flag; }
73 
80  bool GetUseFloat() const { return this->UseFloat; }
82  void SetUseFloat(bool flag) { this->UseFloat = flag; }
83 
84 private:
85  vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
86 };
87 } // namespace field_transform
88 } // namespace vtkm::filter
89 } // namespace vtkm
90 
91 #endif //vtk_m_filter_field_transform_GenerateIds_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::field_transform::GenerateIds::SetUseFloat
void SetUseFloat(bool flag)
Specify whether the generated fields should be integer or float.
Definition: GenerateIds.h:82
vtkm::filter::field_transform::GenerateIds
Adds fields to a vtkm::cont::DataSet that give the ids for the points and cells.
Definition: GenerateIds.h:31
vtkm::filter::field_transform::GenerateIds::GetCellFieldName
const std::string & GetCellFieldName() const
The name given to the generated cell field.
Definition: GenerateIds.h:52
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm_filter_field_transform_export.h
vtkm::filter::field_transform::GenerateIds::SetPointFieldName
void SetPointFieldName(const std::string &name)
The name given to the generated point field.
Definition: GenerateIds.h:46
vtkm::filter::field_transform::GenerateIds::GetPointFieldName
const std::string & GetPointFieldName() const
The name given to the generated point field.
Definition: GenerateIds.h:44
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::field_transform::GenerateIds::SetCellFieldName
void SetCellFieldName(const std::string &name)
The name given to the generated cell field.
Definition: GenerateIds.h:54
vtkm::filter::field_transform::GenerateIds::GetUseFloat
bool GetUseFloat() const
Specify whether the generated fields should be integer or float.
Definition: GenerateIds.h:80
vtkm::filter::field_transform::GenerateIds::GetGenerateCellIds
bool GetGenerateCellIds() const
Specify whether the cell id field is generated.
Definition: GenerateIds.h:70
vtkm::filter::field_transform::GenerateIds::SetGenerateCellIds
void SetGenerateCellIds(bool flag)
Specify whether the cell id field is generated.
Definition: GenerateIds.h:72
vtkm::filter::field_transform::GenerateIds::SetGeneratePointIds
void SetGeneratePointIds(bool flag)
Specify whether the point id field is generated.
Definition: GenerateIds.h:63
vtkm::filter::field_transform::GenerateIds::GetGeneratePointIds
bool GetGeneratePointIds() const
Specify whether the point id field is generated.
Definition: GenerateIds.h:61
VTKM_FILTER_FIELD_TRANSFORM_EXPORT
#define VTKM_FILTER_FIELD_TRANSFORM_EXPORT
Definition: vtkm_filter_field_transform_export.h:44
Filter.h