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

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 =========================================================================*/
00073 #ifndef __vtkAssignAttribute_h
00074 #define __vtkAssignAttribute_h
00075 
00076 #include "vtkDataSetToDataSetFilter.h"
00077 
00078 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
00079 
00080 class vtkFieldData;
00081 
00082 class VTK_GRAPHICS_EXPORT vtkAssignAttribute : public vtkDataSetToDataSetFilter
00083 {
00084 public:
00085   vtkTypeRevisionMacro(vtkAssignAttribute,vtkDataSetToDataSetFilter);
00086   void PrintSelf(ostream& os, vtkIndent indent);
00087 
00089   static vtkAssignAttribute *New();
00090 
00092   void Assign(int inputAttributeType, int attributeType, int attributeLoc);
00093 
00095   void Assign(const char* fieldName, int attributeType, int attributeLoc);
00096 
00098 
00100   void Assign(const char* name, const char* attributeType, 
00101               const char* attributeLoc);
00103 
00104 
00105 //BTX
00106   enum AttributeLocation
00107   {
00108     POINT_DATA=0,
00109     CELL_DATA=1
00110   };
00111 //ETX
00112 
00113 protected:
00114 
00115 //BTX
00116   enum FieldType
00117   {
00118     NAME,
00119     ATTRIBUTE
00120   };
00121 //ETX
00122 
00123   vtkAssignAttribute();
00124   virtual ~vtkAssignAttribute();
00125 
00126   void Execute();
00127 
00128   char* FieldName;
00129   int FieldType;
00130   int AttributeType;
00131   int InputAttributeType;
00132   int AttributeLocation;
00133 
00134   static char AttributeLocationNames[2][12];
00135   static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
00136 private:
00137   vtkAssignAttribute(const vtkAssignAttribute&);  // Not implemented.
00138   void operator=(const vtkAssignAttribute&);  // Not implemented.
00139 };
00140 
00141 #endif
00142 
00143