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

vtkSplitField Class Reference

#include <vtkSplitField.h>

Inheritance diagram for vtkSplitField:

Inheritance graph
[legend]
Collaboration diagram for vtkSplitField:

Collaboration graph
[legend]
List of all members.

Detailed Description

Split a field into single component fields.

Date:
2002/12/10 19:07:57
Revision:
1.10

vtkSplitField is used to split a multi-component field (vtkDataArray) into multiple single component fields. The new fields are put in the same field data as the original field. The output arrays are of the same type as the input array. Example:

 sf->SetInputField("gradient", vtkSplitField::POINT_DATA);
 sf->Split(0, "firstcomponent");
 
tells vtkSplitField to extract the first component of the field called gradient and create an array called firstcomponent (the new field will be in the output's point data). The same can be done from Tcl:
 sf SetInputField gradient POINT_DATA
 sf Split 0 firstcomponent

 AttributeTypes: SCALARS, VECTORS, NORMALS, TCOORDS, TENSORS
 Field locations: DATA_OBJECT, POINT_DATA, CELL_DATA
 
Note that, by default, the original array is also passed through.

Warning:
When using Tcl, Java, Python or Visual Basic bindings, the array name can not be one of the AttributeTypes when calling Split() 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 Split() which takes enums.
See also:
vtkFieldData vtkDataSet vtkDataObjectToDataSetFilter vtkDataSetAttributes vtkDataArray vtkRearrangeFields vtkAssignAttribute vtkMergeFields
Created by:
  • Geveci, Berk
CVS contributions (if > 5%):
  • Geveci, Berk (82%)
  • King, Brad (6%)
CVS logs (CVSweb):
  • .cxx (/Graphics/vtkSplitField.cxx)
  • .h (/Graphics/vtkSplitField.h)
Tests:
vtkSplitField (Tests)

Definition at line 80 of file vtkSplitField.h.

Public Types

typedef vtkDataSetToDataSetFilter Superclass
enum  FieldLocations { DATA_OBJECT = 0, POINT_DATA = 1, CELL_DATA = 2 }

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetInputField (int attributeType, int fieldLoc)
void SetInputField (const char *name, int fieldLoc)
void SetInputField (const char *name, const char *fieldLoc)
void Split (int component, const char *arrayName)

Static Public Methods

int IsTypeOf (const char *type)
vtkSplitField * SafeDownCast (vtkObject *o)
vtkSplitField * New ()

Protected Types

enum  FieldTypes { NAME, ATTRIBUTE }

Protected Methods

 vtkSplitField ()
virtual ~vtkSplitField ()
void Execute ()
vtkDataArraySplitArray (vtkDataArray *da, int component)
ComponentGetNextComponent (Component *op)
ComponentGetFirst ()
void AddComponent (Component *op)
ComponentFindComponent (int index)
void DeleteAllComponents ()
void PrintComponent (Component *op, ostream &os, vtkIndent indent)
void PrintAllComponents (ostream &os, vtkIndent indent)

Protected Attributes

char * FieldName
int FieldType
int AttributeType
int FieldLocation
ComponentHead
ComponentTail

Static Protected Attributes

char FieldLocationNames [3][12]
char AttributeNames [vtkDataSetAttributes::NUM_ATTRIBUTES][10]


Member Typedef Documentation

typedef vtkDataSetToDataSetFilter vtkSplitField::Superclass
 

Reimplemented from vtkDataSetToDataSetFilter.

Definition at line 83 of file vtkSplitField.h.


Member Enumeration Documentation

enum vtkSplitField::FieldLocations
 

Enumeration values:
DATA_OBJECT 
POINT_DATA 
CELL_DATA 

Definition at line 105 of file vtkSplitField.h.

enum vtkSplitField::FieldTypes [protected]
 

Enumeration values:
NAME 
ATTRIBUTE 

Definition at line 137 of file vtkSplitField.h.


Constructor & Destructor Documentation

vtkSplitField::vtkSplitField   [protected]
 

virtual vtkSplitField::~vtkSplitField   [protected, virtual]
 


Member Function Documentation

virtual const char* vtkSplitField::GetClassName   [virtual]
 

Reimplemented from vtkDataSetToDataSetFilter.

int vtkSplitField::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 vtkSplitField::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.

vtkSplitField* vtkSplitField::SafeDownCast vtkObject   o [static]
 

Reimplemented from vtkDataSetToDataSetFilter.

void vtkSplitField::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.

vtkSplitField* vtkSplitField::New   [static]
 

Create a new vtkSplitField.

Reimplemented from vtkObject.

void vtkSplitField::SetInputField int    attributeType,
int    fieldLoc
 

Use the given attribute in the field data given by fieldLoc as input.

void vtkSplitField::SetInputField const char *    name,
int    fieldLoc
 

Use the array with given name in the field data given by fieldLoc as input.

void vtkSplitField::SetInputField const char *    name,
const char *    fieldLoc
 

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

void vtkSplitField::Split int    component,
const char *    arrayName
 

Create a new array with the given component.

void vtkSplitField::Execute   [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkSource.

vtkDataArray* vtkSplitField::SplitArray vtkDataArray   da,
int    component
[protected]
 

Component* vtkSplitField::GetNextComponent Component   op [inline, protected]
 

Definition at line 165 of file vtkSplitField.h.

References vtkSplitField::Component::Next.

Component* vtkSplitField::GetFirst   [inline, protected]
 

Definition at line 167 of file vtkSplitField.h.

void vtkSplitField::AddComponent Component   op [protected]
 

Component* vtkSplitField::FindComponent int    index [protected]
 

void vtkSplitField::DeleteAllComponents   [protected]
 

void vtkSplitField::PrintComponent Component   op,
ostream &    os,
vtkIndent    indent
[protected]
 

void vtkSplitField::PrintAllComponents ostream &    os,
vtkIndent    indent
[protected]
 


Member Data Documentation

char* vtkSplitField::FieldName [protected]
 

Definition at line 149 of file vtkSplitField.h.

int vtkSplitField::FieldType [protected]
 

Definition at line 150 of file vtkSplitField.h.

int vtkSplitField::AttributeType [protected]
 

Definition at line 151 of file vtkSplitField.h.

int vtkSplitField::FieldLocation [protected]
 

Definition at line 152 of file vtkSplitField.h.

char vtkSplitField::FieldLocationNames[3][12] [static, protected]
 

Definition at line 154 of file vtkSplitField.h.

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

Definition at line 155 of file vtkSplitField.h.

Component* vtkSplitField::Head [protected]
 

Definition at line 161 of file vtkSplitField.h.

Component* vtkSplitField::Tail [protected]
 

Definition at line 162 of file vtkSplitField.h.


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