Graphics/vtkAssignAttribute.h Source File

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

# Graphics/vtkAssignAttribute.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkAssignAttribute.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00077 #ifndef __vtkAssignAttribute_h
    00078 #define __vtkAssignAttribute_h
    00079
    00080 #include "vtkDataSetToDataSetFilter.h"
    00081
    00082 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
    00083
    00084 class vtkFieldData;
    00085
    00086 class VTK_GRAPHICS_EXPORT vtkAssignAttribute : public vtkDataSetToDataSetFilter
    00087 {
    00088 public:
    00089   vtkTypeRevisionMacro(vtkAssignAttribute,vtkDataSetToDataSetFilter);
    00090   void PrintSelf(ostream& os, vtkIndent indent);
    00091
    00093   static vtkAssignAttribute *New();
    00094
    00096   void Assign(int inputAttributeType, int attributeType, int attributeLoc);
    00097
    00099   void Assign(const char* fieldName, int attributeType, int attributeLoc);
    00100
    00102
    00104   void Assign(const char* name, const char* attributeType,
    00105               const char* attributeLoc);
    00107
    00108
    00109 //BTX
    00110   enum AttributeLocation
    00111   {
    00112     POINT_DATA=0,
    00113     CELL_DATA=1
    00114   };
    00115 //ETX
    00116
    00117 protected:
    00118
    00119 //BTX
    00120   enum FieldType
    00121   {
    00122     NAME,
    00123     ATTRIBUTE
    00124   };
    00125 //ETX
    00126
    00127   vtkAssignAttribute();
    00128   virtual ~vtkAssignAttribute();
    00129
    00130   void Execute();
    00131
    00132   char* FieldName;
    00133   int FieldType;
    00134   int AttributeType;
    00135   int InputAttributeType;
    00136   int AttributeLocation;
    00137
    00138   static char AttributeLocationNames[2][12];
    00139   static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
    00140 private:
    00141   vtkAssignAttribute(const vtkAssignAttribute&);  // Not implemented.
    00142   void operator=(const vtkAssignAttribute&);  // Not implemented.
    00143 };
    00144
    00145 #endif
    00146
    00147