VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkMapArrayValues Class Reference

Map values in an input array to different values in an output array of (possibly) different type. More...

#include <vtkMapArrayValues.h>

Inheritance diagram for vtkMapArrayValues:
Inheritance graph
[legend]
Collaboration diagram for vtkMapArrayValues:
Collaboration graph
[legend]

List of all members.

Public Types

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

Public Member Functions

virtual int IsA (const char *type)
vtkMapArrayValuesNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void ClearMap ()
int GetMapSize ()
virtual void SetFieldType (int)
virtual int GetFieldType ()
virtual void SetPassArray (int)
virtual int GetPassArray ()
virtual void PassArrayOn ()
virtual void PassArrayOff ()
virtual void SetFillValue (double)
virtual double GetFillValue ()
virtual void SetInputArrayName (const char *)
virtual char * GetInputArrayName ()
virtual void SetOutputArrayName (const char *)
virtual char * GetOutputArrayName ()
virtual int GetOutputArrayType ()
virtual void SetOutputArrayType (int)
void AddToMap (vtkVariant from, vtkVariant to)
void AddToMap (int from, int to)
void AddToMap (int from, char *to)
void AddToMap (char *from, int to)
void AddToMap (char *from, char *to)

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkMapArrayValuesSafeDownCast (vtkObjectBase *o)
static vtkMapArrayValuesNew ()

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkMapArrayValues ()
virtual ~vtkMapArrayValues ()
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int FillInputPortInformation (int, vtkInformation *)

Protected Attributes

char * InputArrayName
char * OutputArrayName
int OutputArrayType
int FieldType
int MapType
int PassArray
double FillValue
vtkMapType * Map

Detailed Description

Map values in an input array to different values in an output array of (possibly) different type.

vtkMapArrayValues allows you to associate certain values of an attribute array (on either a vertex, edge, point, or cell) with different values in a newly created attribute array.

vtkMapArrayValues manages an internal STL map of vtkVariants that can be added to or cleared. When this filter executes, each "key" is searched for in the input array and the indices of the output array at which there were matches the set to the mapped "value".

You can control whether the input array values are passed to the output before the mapping occurs (using PassArray) or, if not, what value to set the unmapped indices to (using FillValue).

One application of this filter is to help address the dirty data problem. For example, using vtkMapArrayValues you could associate the vertex values "Foo, John", "Foo, John.", and "John Foo" with a single entity.

Definition at line 47 of file vtkMapArrayValues.h.


Member Typedef Documentation

Reimplemented from vtkPassInputTypeAlgorithm.

Definition at line 50 of file vtkMapArrayValues.h.


Member Enumeration Documentation

Enumerator:
POINT_DATA 
CELL_DATA 
VERTEX_DATA 
EDGE_DATA 
ROW_DATA 
NUM_ATTRIBUTE_LOCS 

Definition at line 118 of file vtkMapArrayValues.h.


Constructor & Destructor Documentation

virtual vtkMapArrayValues::~vtkMapArrayValues ( ) [protected, virtual]

Member Function Documentation

static int vtkMapArrayValues::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 vtkPassInputTypeAlgorithm.

virtual int vtkMapArrayValues::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 vtkPassInputTypeAlgorithm.

Reimplemented from vtkPassInputTypeAlgorithm.

virtual vtkObjectBase* vtkMapArrayValues::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkPassInputTypeAlgorithm.

Reimplemented from vtkPassInputTypeAlgorithm.

void vtkMapArrayValues::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 vtkPassInputTypeAlgorithm.

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkPassInputTypeAlgorithm.

virtual void vtkMapArrayValues::SetFieldType ( int  ) [virtual]

Set/Get where the data is located that is being mapped. See FieldType enumeration for possible values. Default is POINT_DATA.

virtual int vtkMapArrayValues::GetFieldType ( ) [virtual]

Set/Get where the data is located that is being mapped. See FieldType enumeration for possible values. Default is POINT_DATA.

virtual void vtkMapArrayValues::SetPassArray ( int  ) [virtual]

Set/Get whether to copy the data from the input array to the output array before the mapping occurs. If turned off, FillValue is used to initialize any unmapped array indices. Default is off.

virtual int vtkMapArrayValues::GetPassArray ( ) [virtual]

Set/Get whether to copy the data from the input array to the output array before the mapping occurs. If turned off, FillValue is used to initialize any unmapped array indices. Default is off.

virtual void vtkMapArrayValues::PassArrayOn ( ) [virtual]

Set/Get whether to copy the data from the input array to the output array before the mapping occurs. If turned off, FillValue is used to initialize any unmapped array indices. Default is off.

virtual void vtkMapArrayValues::PassArrayOff ( ) [virtual]

Set/Get whether to copy the data from the input array to the output array before the mapping occurs. If turned off, FillValue is used to initialize any unmapped array indices. Default is off.

virtual void vtkMapArrayValues::SetFillValue ( double  ) [virtual]

Set/Get whether to copy the data from the input array to the output array before the mapping occurs. If turned off, FillValue is used to initialize any unmapped array indices. Default is -1.

virtual double vtkMapArrayValues::GetFillValue ( ) [virtual]

Set/Get whether to copy the data from the input array to the output array before the mapping occurs. If turned off, FillValue is used to initialize any unmapped array indices. Default is -1.

virtual void vtkMapArrayValues::SetInputArrayName ( const char *  ) [virtual]

Set/Get the name of the input array. This must be set prior to execution.

virtual char* vtkMapArrayValues::GetInputArrayName ( ) [virtual]

Set/Get the name of the input array. This must be set prior to execution.

virtual void vtkMapArrayValues::SetOutputArrayName ( const char *  ) [virtual]

Set/Get the name of the output array. Default is "ArrayMap".

virtual char* vtkMapArrayValues::GetOutputArrayName ( ) [virtual]

Set/Get the name of the output array. Default is "ArrayMap".

Set/Get the type of the output array. See vtkSetGet.h for possible values. Default is VTK_INT.

virtual void vtkMapArrayValues::SetOutputArrayType ( int  ) [virtual]

Set/Get the type of the output array. See vtkSetGet.h for possible values. Default is VTK_INT.

Add to the internal STL map. "from" should be a value in the input array and "to" should be the new value it gets assigned in the output array.

void vtkMapArrayValues::AddToMap ( int  from,
int  to 
)

Add to the internal STL map. "from" should be a value in the input array and "to" should be the new value it gets assigned in the output array.

void vtkMapArrayValues::AddToMap ( int  from,
char *  to 
)

Add to the internal STL map. "from" should be a value in the input array and "to" should be the new value it gets assigned in the output array.

void vtkMapArrayValues::AddToMap ( char *  from,
int  to 
)

Add to the internal STL map. "from" should be a value in the input array and "to" should be the new value it gets assigned in the output array.

void vtkMapArrayValues::AddToMap ( char *  from,
char *  to 
)

Add to the internal STL map. "from" should be a value in the input array and "to" should be the new value it gets assigned in the output array.

Clear the internal map.

Get the size of the internal map.

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 vtkPassInputTypeAlgorithm.

int vtkMapArrayValues::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkPassInputTypeAlgorithm.


Member Data Documentation

Definition at line 137 of file vtkMapArrayValues.h.

Definition at line 138 of file vtkMapArrayValues.h.

Definition at line 139 of file vtkMapArrayValues.h.

Definition at line 140 of file vtkMapArrayValues.h.

Definition at line 141 of file vtkMapArrayValues.h.

Definition at line 142 of file vtkMapArrayValues.h.

Definition at line 143 of file vtkMapArrayValues.h.

vtkMapType* vtkMapArrayValues::Map [protected]

Definition at line 146 of file vtkMapArrayValues.h.


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