VTK  9.2.6
vtkAssignAttribute.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAssignAttribute.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
54 #ifndef vtkAssignAttribute_h
55 #define vtkAssignAttribute_h
56 
57 #include "vtkFiltersCoreModule.h" // For export macro
59 
60 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
61 
62 class vtkFieldData;
63 
64 class VTKFILTERSCORE_EXPORT vtkAssignAttribute : public vtkPassInputTypeAlgorithm
65 {
66 public:
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
73  static vtkAssignAttribute* New();
74 
78  void Assign(int inputAttributeType, int attributeType, int attributeLoc);
79 
83  void Assign(const char* fieldName, int attributeType, int attributeLoc);
84 
89  void Assign(const char* name, const char* attributeType, const char* attributeLoc);
90 
91  // Always keep NUM_ATTRIBUTE_LOCS as the last entry
93  {
94  POINT_DATA = 0,
95  CELL_DATA = 1,
96  VERTEX_DATA = 2,
97  EDGE_DATA = 3,
98  NUM_ATTRIBUTE_LOCS
99  };
100 
101 protected:
103  {
105  ATTRIBUTE
106  };
107 
109  ~vtkAssignAttribute() override;
110 
113  int FillInputPortInformation(int, vtkInformation*) override;
114 
115  char* FieldName;
120 
121  static char AttributeLocationNames[vtkAssignAttribute::NUM_ATTRIBUTE_LOCS][12];
122  static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][20];
123 
124 private:
125  vtkAssignAttribute(const vtkAssignAttribute&) = delete;
126  void operator=(const vtkAssignAttribute&) = delete;
127 };
128 
129 #endif
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
a simple class to control print indentation
Definition: vtkIndent.h:39
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
Labels/marks a field as an attribute.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()
represent and manipulate fields of data
Definition: vtkFieldData.h:62