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

vtkAssignAttribute Class Reference

#include <vtkAssignAttribute.h>

Inheritance diagram for vtkAssignAttribute:

Inheritance graph
[legend]
Collaboration diagram for vtkAssignAttribute:

Collaboration graph
[legend]
List of all members.

Detailed Description

Labels a field as an attribute.

vtkAssignAttribute is use to label a field (vtkDataArray) as an attribute. A field name or an attribute to labeled can be specified. For example:

 aa->Assign("foo", vtkDataSetAttributes::SCALARS, 
            vtkAssignAttribute::POINT_DATA);
 
tells vtkAssignAttribute to make the array in the point data called "foo" the active scalars. On the other hand,
 aa->Assign(vtkDataSetAttributes::VECTORS, vtkDataSetAttributes::SCALARS, 
            vtkAssignAttribute::POINT_DATA);
 
tells vtkAssignAttribute to make the active vectors also the active scalars. The same can be done more easily from Tcl by using the Assign() method which takes strings:
 aa Assign "foo" SCALARS POINT_DATA 
 or
 aa Assign SCALARS VECTORS POINT_DATA

 AttributeTypes: SCALARS, VECTORS, NORMALS, TCOORDS, TENSORS
 Attribute locations: POINT_DATA, CELL_DATA
 

Warning:
When using Tcl, Java, Python or Visual Basic bindings, the array name can not be one of the AttributeTypes when calling Assign() which takes strings as arguments. The Tcl (Java etc.) command will always assume the string corresponds to an attribute type when the argument is one of the AttributeTypes. In this situation, use the Assign() which takes enums.
See also:
vtkFieldData vtkDataSet vtkDataObjectToDataSetFilter vtkDataSetAttributes vtkDataArray vtkRearrangeFields vtkSplitField vtkMergeFields
Created by:
  • Geveci, Berk
CVS contributions (if > 5%):
  • Geveci, Berk (92%)
  • Cedilnik, Andy (6%)
CVS logs (CVSweb):
  • .cxx (/Graphics/vtkAssignAttribute.cxx)
  • .h (/Graphics/vtkAssignAttribute.h)
Examples:
vtkAssignAttribute (Examples)
Tests:
vtkAssignAttribute (Tests)

Definition at line 82 of file vtkAssignAttribute.h.

Public Types

typedef vtkDataSetToDataSetFilter Superclass
enum  AttributeLocation { POINT_DATA = 0, CELL_DATA = 1 }

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void Assign (int inputAttributeType, int attributeType, int attributeLoc)
void Assign (const char *fieldName, int attributeType, int attributeLoc)
void Assign (const char *name, const char *attributeType, const char *attributeLoc)

Static Public Member Functions

int IsTypeOf (const char *type)
vtkAssignAttributeSafeDownCast (vtkObject *o)
vtkAssignAttributeNew ()

Protected Types

enum  FieldType { NAME, ATTRIBUTE }

Protected Member Functions

 vtkAssignAttribute ()
virtual ~vtkAssignAttribute ()
void Execute ()

Protected Attributes

char * FieldName
int FieldType
int AttributeType
int InputAttributeType
int AttributeLocation

Static Protected Attributes

char AttributeLocationNames [2][12]
char AttributeNames [vtkDataSetAttributes::NUM_ATTRIBUTES][10]


Member Typedef Documentation

typedef vtkDataSetToDataSetFilter vtkAssignAttribute::Superclass
 

Reimplemented from vtkDataSetToDataSetFilter.

Definition at line 85 of file vtkAssignAttribute.h.


Member Enumeration Documentation

enum vtkAssignAttribute::AttributeLocation
 

Enumeration values:
POINT_DATA 
CELL_DATA 

Definition at line 106 of file vtkAssignAttribute.h.

enum vtkAssignAttribute::FieldType [protected]
 

Enumeration values:
NAME 
ATTRIBUTE 

Definition at line 116 of file vtkAssignAttribute.h.


Constructor & Destructor Documentation

vtkAssignAttribute::vtkAssignAttribute  )  [protected]
 

virtual vtkAssignAttribute::~vtkAssignAttribute  )  [protected, virtual]
 


Member Function Documentation

virtual const char* vtkAssignAttribute::GetClassName  )  [virtual]
 

Reimplemented from vtkDataSetToDataSetFilter.

int vtkAssignAttribute::IsTypeOf const char *  type  )  [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkDataSetToDataSetFilter.

virtual int vtkAssignAttribute::IsA const char *  type  )  [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkDataSetToDataSetFilter.

vtkAssignAttribute* vtkAssignAttribute::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkDataSetToDataSetFilter.

void vtkAssignAttribute::PrintSelf ostream &  os,
vtkIndent  indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkDataSetToDataSetFilter.

vtkAssignAttribute* vtkAssignAttribute::New  )  [static]
 

Create a new vtkAssignAttribute.

Reimplemented from vtkAlgorithm.

void vtkAssignAttribute::Assign int  inputAttributeType,
int  attributeType,
int  attributeLoc
 

Label an attribute as another attribute.

void vtkAssignAttribute::Assign const char *  fieldName,
int  attributeType,
int  attributeLoc
 

Label an array as an attribute.

void vtkAssignAttribute::Assign const char *  name,
const char *  attributeType,
const char *  attributeLoc
 

Helper method used by other language bindings. Allows the caller to specify arguments as strings instead of enums.

void vtkAssignAttribute::Execute  )  [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.


Member Data Documentation

char* vtkAssignAttribute::FieldName [protected]
 

Definition at line 128 of file vtkAssignAttribute.h.

int vtkAssignAttribute::FieldType [protected]
 

Definition at line 129 of file vtkAssignAttribute.h.

int vtkAssignAttribute::AttributeType [protected]
 

Definition at line 130 of file vtkAssignAttribute.h.

int vtkAssignAttribute::InputAttributeType [protected]
 

Definition at line 131 of file vtkAssignAttribute.h.

int vtkAssignAttribute::AttributeLocation [protected]
 

Definition at line 132 of file vtkAssignAttribute.h.

char vtkAssignAttribute::AttributeLocationNames[2][12] [static, protected]
 

Definition at line 134 of file vtkAssignAttribute.h.

char vtkAssignAttribute::AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10] [static, protected]
 

Definition at line 135 of file vtkAssignAttribute.h.


The documentation for this class was generated from the following file: