VTK  9.3.0
vtkFieldDataToDataSetAttribute.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
22 #ifndef vtkFieldDataToDataSetAttribute_h
23 #define vtkFieldDataToDataSetAttribute_h
24 
25 #include "vtkFiltersCoreModule.h" // For export macro
27 
28 #include "vtkDataObject.h" // for vtkDataObject::AttributeType enum
29 
30 #include <set>
31 #include <string>
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class VTKFILTERSCORE_EXPORT vtkFieldDataToDataSetAttribute : public vtkPassInputTypeAlgorithm
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
47  vtkSetMacro(ProcessAllArrays, bool);
48  vtkGetMacro(ProcessAllArrays, bool);
49  vtkBooleanMacro(ProcessAllArrays, bool);
51 
53 
56  vtkSetMacro(OutputFieldType, int);
57  vtkGetMacro(OutputFieldType, int);
59 
64 
69  virtual void AddFieldDataArray(const char* name);
70 
76  virtual void RemoveFieldDataArray(const char* name);
77 
82  virtual void ClearFieldDataArrays();
83 
87  virtual const std::set<std::string>& GetFieldDataArrays();
89 
90 protected:
92  ~vtkFieldDataToDataSetAttribute() override = default;
93 
99 
103  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
104  vtkInformationVector* outputVector) override;
105 
106 private:
108  void operator=(const vtkFieldDataToDataSetAttribute&) = delete;
109 
110  bool ProcessAllArrays = true;
111 
113  int OutputFieldType = vtkDataObject::POINT;
114 
115  std::set<std::string> FieldDataArrays;
116 };
117 
118 VTK_ABI_NAMESPACE_END
119 #endif
map field data to other attribute data
virtual void AddFieldDataArray(const char *name)
Arrays to be processed.
virtual void ClearFieldDataArrays()
Removes all arrays to be processed from the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkFieldDataToDataSetAttribute * New()
~vtkFieldDataToDataSetAttribute() override=default
int FillInputPortInformation(int port, vtkInformation *info) override
Reimplemented to remove Composite support.
virtual void RemoveFieldDataArray(const char *name)
Removes an array to be processed.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Reimplemented create data arrays as required.
virtual const std::set< std::string > & GetFieldDataArrays()
Get the names of the arrays to process.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce output of the same type as input.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ name
Definition: vtkX3D.h:219