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
71class vtkFieldData;
72
73class VTKFILTERSCORE_EXPORT vtkAssignAttribute : public vtkPassInputTypeAlgorithm
74{
75public:
77 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
78
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
111protected:
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];
134private:
135 vtkAssignAttribute(const vtkAssignAttribute&) VTK_DELETE_FUNCTION;
136 void operator=(const vtkAssignAttribute&) VTK_DELETE_FUNCTION;
137};
138
139#endif
Labels/marks a field as an attribute.
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.
void Assign(int inputAttributeType, int attributeType, int attributeLoc)
Label an attribute as another attribute.
static vtkAssignAttribute * New()
Create a new vtkAssignAttribute.
represent and manipulate attribute data in a dataset
represent and manipulate fields of data
Definition: vtkFieldData.h:57
a simple class to control print indentation
Definition: vtkIndent.h:40
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:219