Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Graphics/vtkAssignAttribute.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkAssignAttribute.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00062 #ifndef __vtkAssignAttribute_h 00063 #define __vtkAssignAttribute_h 00064 00065 #include "vtkDataSetToDataSetFilter.h" 00066 00067 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES 00068 00069 class vtkFieldData; 00070 00071 class VTK_GRAPHICS_EXPORT vtkAssignAttribute : public vtkDataSetToDataSetFilter 00072 { 00073 public: 00074 vtkTypeRevisionMacro(vtkAssignAttribute,vtkDataSetToDataSetFilter); 00075 void PrintSelf(ostream& os, vtkIndent indent); 00076 00078 static vtkAssignAttribute *New(); 00079 00081 void Assign(int inputAttributeType, int attributeType, int attributeLoc); 00082 00084 void Assign(const char* fieldName, int attributeType, int attributeLoc); 00085 00087 00089 void Assign(const char* name, const char* attributeType, 00090 const char* attributeLoc); 00092 00093 00094 //BTX 00095 enum AttributeLocation 00096 { 00097 POINT_DATA=0, 00098 CELL_DATA=1 00099 }; 00100 //ETX 00101 00102 protected: 00103 00104 //BTX 00105 enum FieldType 00106 { 00107 NAME, 00108 ATTRIBUTE 00109 }; 00110 //ETX 00111 00112 vtkAssignAttribute(); 00113 virtual ~vtkAssignAttribute(); 00114 00115 void Execute(); 00116 00117 char* FieldName; 00118 int FieldType; 00119 int AttributeType; 00120 int InputAttributeType; 00121 int AttributeLocation; 00122 00123 static char AttributeLocationNames[2][12]; 00124 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10]; 00125 private: 00126 vtkAssignAttribute(const vtkAssignAttribute&); // Not implemented. 00127 void operator=(const vtkAssignAttribute&); // Not implemented. 00128 }; 00129 00130 #endif 00131 00132