VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
62 #ifndef __vtkAssignAttribute_h
63 #define __vtkAssignAttribute_h
64 
65 #include "vtkFiltersCoreModule.h" // For export macro
66 #include "vtkPassInputTypeAlgorithm.h"
67 
68 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
69 
70 class vtkFieldData;
71 
72 class VTKFILTERSCORE_EXPORT vtkAssignAttribute : public vtkPassInputTypeAlgorithm
73 {
74 public:
75  vtkTypeMacro(vtkAssignAttribute,vtkPassInputTypeAlgorithm);
76  void PrintSelf(ostream& os, vtkIndent indent);
77 
79  static vtkAssignAttribute *New();
80 
82  void Assign(int inputAttributeType, int attributeType, int attributeLoc);
83 
85  void Assign(const char* fieldName, int attributeType, int attributeLoc);
86 
88 
90  void Assign(const char* name, const char* attributeType,
91  const char* attributeLoc);
93 
94 
95 //BTX
96  // Always keep NUM_ATTRIBUTE_LOCS as the last entry
98  {
99  POINT_DATA=0,
100  CELL_DATA=1,
101  VERTEX_DATA=2,
102  EDGE_DATA=3,
103  NUM_ATTRIBUTE_LOCS
104  };
105 //ETX
106 
107 protected:
108 
109 //BTX
111  {
113  ATTRIBUTE
114  };
115 //ETX
116 
118  virtual ~vtkAssignAttribute();
119 
120  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
121  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
122  int FillInputPortInformation(int, vtkInformation *);
123 
124  char* FieldName;
129 
130  static char AttributeLocationNames[vtkAssignAttribute::NUM_ATTRIBUTE_LOCS][12];
131  static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][20];
132 private:
133  vtkAssignAttribute(const vtkAssignAttribute&); // Not implemented.
134  void operator=(const vtkAssignAttribute&); // Not implemented.
135 };
136 
137 #endif
Labels a field as an attribute.