VTK  9.2.5
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 =========================================================================*/
73 #ifndef vtkAssignAttribute_h
74 #define vtkAssignAttribute_h
75 
76 #include "vtkFiltersCoreModule.h" // For export macro
78 
79 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
80 
81 class vtkFieldData;
82 
83 class VTKFILTERSCORE_EXPORT vtkAssignAttribute : public vtkPassInputTypeAlgorithm
84 {
85 public:
87  void PrintSelf(ostream& os, vtkIndent indent) override;
88 
93 
97  void Assign(int inputAttributeType, int attributeType, int attributeLoc);
98 
102  void Assign(const char* fieldName, int attributeType, int attributeLoc);
103 
108  void Assign(const char* name, const char* attributeType, const char* attributeLoc);
109 
110  // Always keep NUM_ATTRIBUTE_LOCS as the last entry
112  {
113  POINT_DATA = 0,
114  CELL_DATA = 1,
115  VERTEX_DATA = 2,
116  EDGE_DATA = 3,
117  NUM_ATTRIBUTE_LOCS
118  };
119 
120 protected:
122  {
124  ATTRIBUTE
125  };
126 
129 
133 
134  char* FieldName;
139 
140  static char AttributeLocationNames[vtkAssignAttribute::NUM_ATTRIBUTE_LOCS][12];
141  static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][20];
142 
143 private:
144  vtkAssignAttribute(const vtkAssignAttribute&) = delete;
145  void operator=(const vtkAssignAttribute&) = delete;
146 };
147 
148 #endif
Labels/marks a field as an attribute.
static vtkAssignAttribute * New()
Create a new vtkAssignAttribute.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Assign(const char *name, const char *attributeType, const char *attributeLoc)
Helper method used by other language bindings.
~vtkAssignAttribute() override
void Assign(const char *fieldName, int attributeType, int attributeLoc)
Label an array as an attribute.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void Assign(int inputAttributeType, int attributeType, int attributeLoc)
Label an attribute as another attribute.
represent and manipulate fields of data
Definition: vtkFieldData.h:172
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce output of the same type as input.
@ name
Definition: vtkX3D.h:225