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 =========================================================================*/
57 #ifndef vtkAssignAttribute_h
58 #define vtkAssignAttribute_h
59 
60 #include "vtkFiltersCoreModule.h" // For export macro
62 
63 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
64 
65 class vtkFieldData;
66 
67 class VTKFILTERSCORE_EXPORT vtkAssignAttribute : public vtkPassInputTypeAlgorithm
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
72 
76  static vtkAssignAttribute *New();
77 
81  void Assign(int inputAttributeType, int attributeType, int attributeLoc);
82 
86  void Assign(const char* fieldName, int attributeType, int attributeLoc);
87 
92  void Assign(const char* name, const char* attributeType,
93  const char* attributeLoc);
94 
95  // Always keep NUM_ATTRIBUTE_LOCS as the last entry
97  {
98  POINT_DATA=0,
99  CELL_DATA=1,
100  VERTEX_DATA=2,
101  EDGE_DATA=3,
102  NUM_ATTRIBUTE_LOCS
103  };
104 
105 protected:
106 
108  {
110  ATTRIBUTE
111  };
112 
114  ~vtkAssignAttribute() VTK_OVERRIDE;
115 
116  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
117  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
118  int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
119 
120  char* FieldName;
121  int FieldTypeAssignment;
122  int AttributeType;
123  int InputAttributeType;
124  int AttributeLocationAssignment;
125 
126  static char AttributeLocationNames[vtkAssignAttribute::NUM_ATTRIBUTE_LOCS][12];
127  static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][20];
128 private:
129  vtkAssignAttribute(const vtkAssignAttribute&) VTK_DELETE_FUNCTION;
130  void operator=(const vtkAssignAttribute&) VTK_DELETE_FUNCTION;
131 };
132 
133 #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:33
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:53