VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
vtkAssignAttribute Class Reference

Labels a field as an attribute. More...

#include <vtkAssignAttribute.h>

Inherits vtkPassInputTypeAlgorithm.

Public Types

enum  AttributeLocation {
  POINT_DATA =0, CELL_DATA =1, VERTEX_DATA =2, EDGE_DATA =3,
  NUM_ATTRIBUTE_LOCS
}
 
typedef vtkPassInputTypeAlgorithm Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkAssignAttributeNewInstance () const
 
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

static int IsTypeOf (const char *type)
 
static vtkAssignAttributeSafeDownCast (vtkObjectBase *o)
 
static vtkAssignAttributeNew ()
 

Protected Types

enum  FieldType { NAME, ATTRIBUTE }
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkAssignAttribute ()
 
virtual ~vtkAssignAttribute ()
 
int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
int FillInputPortInformation (int, vtkInformation *)
 

Protected Attributes

char * FieldName
 
int FieldTypeAssignment
 
int AttributeType
 
int InputAttributeType
 
int AttributeLocationAssignment
 

Static Protected Attributes

static char AttributeLocationNames [vtkAssignAttribute::NUM_ATTRIBUTE_LOCS][12]
 
static char AttributeNames [vtkDataSetAttributes::NUM_ATTRIBUTES][20]
 

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
Examples:
vtkAssignAttribute (Examples)
Tests:
vtkAssignAttribute (Tests)

Definition at line 72 of file vtkAssignAttribute.h.

Member Typedef Documentation

typedef vtkPassInputTypeAlgorithm vtkAssignAttribute::Superclass

Definition at line 75 of file vtkAssignAttribute.h.

Member Enumeration Documentation

Enumerator
POINT_DATA 
CELL_DATA 
VERTEX_DATA 
EDGE_DATA 
NUM_ATTRIBUTE_LOCS 

Definition at line 97 of file vtkAssignAttribute.h.

Enumerator
NAME 
ATTRIBUTE 

Definition at line 110 of file vtkAssignAttribute.h.

Constructor & Destructor Documentation

vtkAssignAttribute::vtkAssignAttribute ( )
protected
virtual vtkAssignAttribute::~vtkAssignAttribute ( )
protectedvirtual

Member Function Documentation

static int vtkAssignAttribute::IsTypeOf ( const char *  type)
static
virtual int vtkAssignAttribute::IsA ( const char *  type)
virtual
static vtkAssignAttribute* vtkAssignAttribute::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkAssignAttribute::NewInstanceInternal ( ) const
protectedvirtual
vtkAssignAttribute* vtkAssignAttribute::NewInstance ( ) const
void vtkAssignAttribute::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
static vtkAssignAttribute* vtkAssignAttribute::New ( )
static

Create a new vtkAssignAttribute.

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.

int vtkAssignAttribute::RequestInformation ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protected
int vtkAssignAttribute::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protected
int vtkAssignAttribute::FillInputPortInformation ( int  ,
vtkInformation *   
)
protected

Member Data Documentation

char* vtkAssignAttribute::FieldName
protected

Definition at line 124 of file vtkAssignAttribute.h.

int vtkAssignAttribute::FieldTypeAssignment
protected

Definition at line 125 of file vtkAssignAttribute.h.

int vtkAssignAttribute::AttributeType
protected

Definition at line 126 of file vtkAssignAttribute.h.

int vtkAssignAttribute::InputAttributeType
protected

Definition at line 127 of file vtkAssignAttribute.h.

int vtkAssignAttribute::AttributeLocationAssignment
protected

Definition at line 128 of file vtkAssignAttribute.h.

char vtkAssignAttribute::AttributeLocationNames[vtkAssignAttribute::NUM_ATTRIBUTE_LOCS][12]
staticprotected

Definition at line 130 of file vtkAssignAttribute.h.

char vtkAssignAttribute::AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][20]
staticprotected

Definition at line 131 of file vtkAssignAttribute.h.


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