VTK
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 =========================================================================*/
63 #ifndef vtkAssignAttribute_h
64 #define vtkAssignAttribute_h
65 
66 #include "vtkFiltersCoreModule.h" // For export macro
68 
69 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
70 
71 class vtkFieldData;
72 
73 class VTKFILTERSCORE_EXPORT vtkAssignAttribute : public vtkPassInputTypeAlgorithm
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
78 
82  static vtkAssignAttribute *New();
83 
87  void Assign(int inputAttributeType, int attributeType, int attributeLoc);
88 
92  void Assign(const char* fieldName, int attributeType, int attributeLoc);
93 
98  void Assign(const char* name, const char* attributeType,
99  const char* attributeLoc);
100 
101  // Always keep NUM_ATTRIBUTE_LOCS as the last entry
103  {
104  POINT_DATA=0,
105  CELL_DATA=1,
106  VERTEX_DATA=2,
107  EDGE_DATA=3,
108  NUM_ATTRIBUTE_LOCS
109  };
110 
111 protected:
112 
114  {
116  ATTRIBUTE
117  };
118 
120  ~vtkAssignAttribute() VTK_OVERRIDE;
121 
122  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
123  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
124  int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
125 
126  char* FieldName;
127  int FieldTypeAssignment;
128  int AttributeType;
129  int InputAttributeType;
130  int AttributeLocationAssignment;
131 
132  static char AttributeLocationNames[vtkAssignAttribute::NUM_ATTRIBUTE_LOCS][12];
133  static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][20];
134 private:
135  vtkAssignAttribute(const vtkAssignAttribute&) VTK_DELETE_FUNCTION;
136  void operator=(const vtkAssignAttribute&) VTK_DELETE_FUNCTION;
137 };
138 
139 #endif
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
represent and manipulate attribute data in a dataset
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.
static vtkPassInputTypeAlgorithm * New()
represent and manipulate fields of data
Definition: vtkFieldData.h:56