VTK
|
Move/copy fields between field data, point data and cell data. More...
#include <vtkRearrangeFields.h>
Classes | |
struct | Operation |
Public Types | |
enum | OperationType { COPY = 0, MOVE = 1 } |
enum | FieldLocation { DATA_OBJECT = 0, POINT_DATA = 1, CELL_DATA = 2 } |
enum | FieldType { NAME, ATTRIBUTE } |
typedef vtkDataSetAlgorithm | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkRearrangeFields * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
int | RemoveOperation (int operationId) |
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 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 Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkRearrangeFields * | SafeDownCast (vtkObjectBase *o) |
static vtkRearrangeFields * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkRearrangeFields () | |
virtual | ~vtkRearrangeFields () |
int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) |
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 | |
static char | OperationTypeNames [2][5] |
static char | FieldLocationNames [3][12] |
static char | AttributeNames [vtkDataSetAttributes::NUM_ATTRIBUTES][10] |
Move/copy fields between field data, point data and cell data.
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
Definition at line 73 of file vtkRearrangeFields.h.
Reimplemented from vtkDataSetAlgorithm.
Definition at line 76 of file vtkRearrangeFields.h.
Definition at line 83 of file vtkRearrangeFields.h.
Definition at line 88 of file vtkRearrangeFields.h.
Definition at line 150 of file vtkRearrangeFields.h.
vtkRearrangeFields::vtkRearrangeFields | ( | ) | [protected] |
virtual vtkRearrangeFields::~vtkRearrangeFields | ( | ) | [protected, virtual] |
static int vtkRearrangeFields::IsTypeOf | ( | const char * | name | ) | [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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkDataSetAlgorithm.
virtual int vtkRearrangeFields::IsA | ( | const char * | name | ) | [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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkDataSetAlgorithm.
static vtkRearrangeFields* vtkRearrangeFields::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkDataSetAlgorithm.
virtual vtkObjectBase* vtkRearrangeFields::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkDataSetAlgorithm.
Reimplemented from vtkDataSetAlgorithm.
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 vtkDataSetAlgorithm.
static vtkRearrangeFields* vtkRearrangeFields::New | ( | ) | [static] |
Create a new vtkRearrangeFields with an empty operation list.
Reimplemented from vtkDataSetAlgorithm.
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 a 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 | ||
) |
Helper method used by other language bindings. Allows the caller to specify arguments as strings instead of enums.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 signature. See AddOperation for details.
int vtkRearrangeFields::RemoveOperation | ( | int | operationType, |
const char * | name, | ||
int | fromFieldLoc, | ||
int | toFieldLoc | ||
) |
Remove an operation with the given signature. See AddOperation for details.
int vtkRearrangeFields::RemoveOperation | ( | const char * | operationType, |
const char * | attributeType, | ||
const char * | fromFieldLoc, | ||
const char * | toFieldLoc | ||
) |
Remove an operation with the given signature. See AddOperation for details.
void vtkRearrangeFields::RemoveAllOperations | ( | ) | [inline] |
Remove all operations.
Definition at line 141 of file vtkRearrangeFields.h.
int vtkRearrangeFields::RequestData | ( | vtkInformation * | , |
vtkInformationVector ** | , | ||
vtkInformationVector * | |||
) | [protected, virtual] |
This is called within ProcessRequest when a request asks the algorithm to do its work. This is the method you should override to do whatever the algorithm is designed to do. This happens during the fourth pass in the pipeline execution process.
Reimplemented from vtkDataSetAlgorithm.
Operation* vtkRearrangeFields::GetNextOperation | ( | Operation * | op | ) | [inline, protected] |
Definition at line 187 of file vtkRearrangeFields.h.
Operation* vtkRearrangeFields::GetFirst | ( | ) | [inline, protected] |
Definition at line 189 of file vtkRearrangeFields.h.
void vtkRearrangeFields::AddOperation | ( | Operation * | op | ) | [protected] |
void vtkRearrangeFields::DeleteOperation | ( | Operation * | op, |
Operation * | before | ||
) | [protected] |
Operation* vtkRearrangeFields::FindOperation | ( | int | id, |
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::ApplyOperation | ( | Operation * | op, |
vtkDataSet * | input, | ||
vtkDataSet * | output | ||
) | [protected] |
vtkFieldData* vtkRearrangeFields::GetFieldDataFromLocation | ( | vtkDataSet * | ds, |
int | fieldLoc | ||
) | [protected] |
void vtkRearrangeFields::PrintAllOperations | ( | ostream & | os, |
vtkIndent | indent | ||
) | [protected] |
void vtkRearrangeFields::PrintOperation | ( | Operation * | op, |
ostream & | os, | ||
vtkIndent | indent | ||
) | [protected] |
Operation* vtkRearrangeFields::Head [protected] |
Definition at line 180 of file vtkRearrangeFields.h.
Operation* vtkRearrangeFields::Tail [protected] |
Definition at line 181 of file vtkRearrangeFields.h.
int vtkRearrangeFields::LastId [protected] |
Definition at line 184 of file vtkRearrangeFields.h.
char vtkRearrangeFields::OperationTypeNames[2][5] [static, protected] |
Definition at line 213 of file vtkRearrangeFields.h.
char vtkRearrangeFields::FieldLocationNames[3][12] [static, protected] |
Definition at line 214 of file vtkRearrangeFields.h.
char vtkRearrangeFields::AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10] [static, protected] |
Definition at line 215 of file vtkRearrangeFields.h.