Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
vtkRearrangeFields Class Reference
#include <vtkRearrangeFields.h>
Inheritance diagram for vtkRearrangeFields:
[legend]Collaboration diagram for vtkRearrangeFields:
[legend]List of all members.
Detailed Description
Move/copy fields between field data, point data and cell data.
- Date:
-
2002/12/10 19:07:57
- Revision:
-
1.10
vtkRearrangeFields is used to copy/move fields (vtkDataArrays) between data object's field data, point data and cell data. To specify which fields are copied/moved, the user adds operations. There are two types of operations: 1. the type which copies/moves an attribute's data (i.e. the field will be copied but will not be an attribute in the target), 2. the type which copies/moves fields by name. For example:
rf->AddOperation(vtkRearrangeFields::COPY, "foo",
vtkRearrangeFields::DATA_OBJECT,
vtkRearrangeFields::POINT_DATA);
adds an operation which copies a field (data array) called foo from the data object's field data to point data. From Tcl, the same operation can be added as follows:
rf AddOperation COPY foo DATA_OBJECT POINT_DATA
The same can be done using Python and Java bindings by passing strings as arguments.
Operation types: COPY, MOVE
AttributeTypes: SCALARS, VECTORS, NORMALS, TCOORDS, TENSORS
Field data locations: DATA_OBJECT, 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 AddOperation() 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 AddOperation() which takes enums.
- See also:
-
vtkFieldData vtkDataSet vtkDataObjectToDataSetFilter vtkDataSetAttributes vtkDataArray vtkAssignAttribute vtkSplitField vtkMergeFields
- Created by:
-
- CVS contributions (if > 5%):
-
- Geveci, Berk (89%)
- King, Brad (5%)
- CVS logs (CVSweb):
-
- .
h
(/Graphics/vtkRearrangeFields.h)
- .
cxx
(/Graphics/vtkRearrangeFields.cxx)
- Examples:
-
vtkRearrangeFields (Examples)
- Tests:
-
vtkRearrangeFields (Tests)
Definition at line 87 of file vtkRearrangeFields.h.
|
Public Types |
typedef vtkDataSetToDataSetFilter | Superclass |
enum | OperationType { COPY = 0,
MOVE = 1
} |
enum | FieldLocation { DATA_OBJECT = 0,
POINT_DATA = 1,
CELL_DATA = 2
} |
enum | FieldType { NAME,
ATTRIBUTE
} |
Public Methods |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
|
int | AddOperation (int operationType, int attributeType, int fromFieldLoc, int toFieldLoc) |
int | AddOperation (int operationType, const char *name, int fromFieldLoc, int toFieldLoc) |
int | AddOperation (const char *operationType, const char *attributeType, const char *fromFieldLoc, const char *toFieldLoc) |
|
int | RemoveOperation (int operationId) |
int | RemoveOperation (int operationType, int attributeType, int fromFieldLoc, int toFieldLoc) |
int | RemoveOperation (int operationType, const char *name, int fromFieldLoc, int toFieldLoc) |
int | RemoveOperation (const char *operationType, const char *attributeType, const char *fromFieldLoc, const char *toFieldLoc) |
|
void | RemoveAllOperations () |
Static Public Methods |
int | IsTypeOf (const char *type) |
vtkRearrangeFields * | SafeDownCast (vtkObject *o) |
vtkRearrangeFields * | New () |
Protected Methods |
| vtkRearrangeFields () |
virtual | ~vtkRearrangeFields () |
void | Execute () |
Operation * | GetNextOperation (Operation *op) |
Operation * | GetFirst () |
void | AddOperation (Operation *op) |
void | DeleteOperation (Operation *op, Operation *before) |
Operation * | FindOperation (int id, Operation *&before) |
Operation * | FindOperation (const char *name, Operation *&before) |
Operation * | FindOperation (int operationType, const char *name, int fromFieldLoc, int toFieldLoc, Operation *&before) |
Operation * | FindOperation (int operationType, int attributeType, int fromFieldLoc, int toFieldLoc, Operation *&before) |
int | CompareOperationsByType (const Operation *op1, const Operation *op2) |
int | CompareOperationsByName (const Operation *op1, const Operation *op2) |
void | DeleteAllOperations () |
void | ApplyOperation (Operation *op, vtkDataSet *input, vtkDataSet *output) |
vtkFieldData * | GetFieldDataFromLocation (vtkDataSet *ds, int fieldLoc) |
void | PrintAllOperations (ostream &os, vtkIndent indent) |
void | PrintOperation (Operation *op, ostream &os, vtkIndent indent) |
Protected Attributes |
Operation * | Head |
Operation * | Tail |
int | LastId |
Static Protected Attributes |
char | OperationTypeNames [2][5] |
char | FieldLocationNames [3][12] |
char | AttributeNames [vtkDataSetAttributes::NUM_ATTRIBUTES][10] |
Member Typedef Documentation
Member Enumeration Documentation
enum vtkRearrangeFields::OperationType
|
|
enum vtkRearrangeFields::FieldLocation
|
|
enum vtkRearrangeFields::FieldType
|
|
Constructor & Destructor Documentation
vtkRearrangeFields::vtkRearrangeFields |
( |
|
) |
[protected] |
|
virtual vtkRearrangeFields::~vtkRearrangeFields |
( |
|
) |
[protected, virtual] |
|
Member Function Documentation
virtual const char* vtkRearrangeFields::GetClassName |
( |
|
) |
[virtual] |
|
int vtkRearrangeFields::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 vtkRearrangeFields::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. |
vtkRearrangeFields* vtkRearrangeFields::SafeDownCast |
( |
vtkObject * |
o |
) |
[static] |
|
void vtkRearrangeFields::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. |
vtkRearrangeFields* vtkRearrangeFields::New |
( |
|
) |
[static] |
|
|
Create a new vtkRearrangeFields with an empty operation list.
Reimplemented from vtkObject. |
int vtkRearrangeFields::AddOperation |
( |
int |
operationType, |
|
|
int |
attributeType, |
|
|
int |
fromFieldLoc, |
|
|
int |
toFieldLoc |
|
) |
|
|
|
Add an operation which copies an attribute's field (data array) from one field data to another. Returns an operation id which can later be used to remove the operation. |
int vtkRearrangeFields::AddOperation |
( |
int |
operationType, |
|
|
const char * |
name, |
|
|
int |
fromFieldLoc, |
|
|
int |
toFieldLoc |
|
) |
|
|
|
Add an operation which copies an attribute's field (data array) from one field data to another. Returns an operation id which can later be used to remove the operation. |
int vtkRearrangeFields::AddOperation |
( |
const char * |
operationType, |
|
|
const char * |
attributeType, |
|
|
const char * |
fromFieldLoc, |
|
|
const char * |
toFieldLoc |
|
) |
|
|
|
Add an operation which copies an attribute's field (data array) from one field data to another. Returns an operation id which can later be used to remove the operation. |
int vtkRearrangeFields::RemoveOperation |
( |
int |
operationId |
) |
|
|
|
Remove an operation with the given id. |
int vtkRearrangeFields::RemoveOperation |
( |
int |
operationType, |
|
|
int |
attributeType, |
|
|
int |
fromFieldLoc, |
|
|
int |
toFieldLoc |
|
) |
|
|
|
Remove an operation with the given id. |
int vtkRearrangeFields::RemoveOperation |
( |
int |
operationType, |
|
|
const char * |
name, |
|
|
int |
fromFieldLoc, |
|
|
int |
toFieldLoc |
|
) |
|
|
|
Remove an operation with the given id. |
int vtkRearrangeFields::RemoveOperation |
( |
const char * |
operationType, |
|
|
const char * |
attributeType, |
|
|
const char * |
fromFieldLoc, |
|
|
const char * |
toFieldLoc |
|
) |
|
|
|
Remove an operation with the given id. |
void vtkRearrangeFields::RemoveAllOperations |
( |
|
) |
[inline] |
|
void vtkRearrangeFields::Execute |
( |
|
) |
[protected, virtual] |
|
|
This method is the old style execute method
Reimplemented from vtkSource. |
Operation* vtkRearrangeFields::GetFirst |
( |
|
) |
[inline, protected] |
|
void vtkRearrangeFields::AddOperation |
( |
Operation * |
op |
) |
[protected] |
|
void vtkRearrangeFields::DeleteOperation |
( |
Operation * |
op, |
|
|
Operation * |
before |
|
) |
[protected] |
|
Operation* vtkRearrangeFields::FindOperation |
( |
const char * |
name, |
|
|
Operation *& |
before |
|
) |
[protected] |
|
Operation* vtkRearrangeFields::FindOperation |
( |
int |
operationType, |
|
|
const char * |
name, |
|
|
int |
fromFieldLoc, |
|
|
int |
toFieldLoc, |
|
|
Operation *& |
before |
|
) |
[protected] |
|
Operation* vtkRearrangeFields::FindOperation |
( |
int |
operationType, |
|
|
int |
attributeType, |
|
|
int |
fromFieldLoc, |
|
|
int |
toFieldLoc, |
|
|
Operation *& |
before |
|
) |
[protected] |
|
int vtkRearrangeFields::CompareOperationsByType |
( |
const Operation * |
op1, |
|
|
const Operation * |
op2 |
|
) |
[protected] |
|
int vtkRearrangeFields::CompareOperationsByName |
( |
const Operation * |
op1, |
|
|
const Operation * |
op2 |
|
) |
[protected] |
|
void vtkRearrangeFields::DeleteAllOperations |
( |
|
) |
[protected] |
|
void vtkRearrangeFields::PrintAllOperations |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
[protected] |
|
void vtkRearrangeFields::PrintOperation |
( |
Operation * |
op, |
|
|
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
[protected] |
|
Member Data Documentation
Operation* vtkRearrangeFields::Head [protected]
|
|
Operation* vtkRearrangeFields::Tail [protected]
|
|
int vtkRearrangeFields::LastId [protected]
|
|
char vtkRearrangeFields::OperationTypeNames[2][5] [static, protected]
|
|
char vtkRearrangeFields::FieldLocationNames[3][12] [static, protected]
|
|
char vtkRearrangeFields::AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10] [static, protected]
|
|
The documentation for this class was generated from the following file: