VTK
|
Map values in an input array to different values in an output array of (possibly) different type. More...
#include <vtkMapArrayValues.h>
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.
Reimplemented from vtkPassInputTypeAlgorithm.
Definition at line 50 of file vtkMapArrayValues.h.
Definition at line 118 of file vtkMapArrayValues.h.
vtkMapArrayValues::vtkMapArrayValues | ( | ) | [protected] |
virtual vtkMapArrayValues::~vtkMapArrayValues | ( | ) | [protected, virtual] |
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.
static vtkMapArrayValues* vtkMapArrayValues::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkPassInputTypeAlgorithm.
virtual vtkObjectBase* vtkMapArrayValues::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkPassInputTypeAlgorithm.
vtkMapArrayValues* vtkMapArrayValues::NewInstance | ( | ) | const |
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.
static vtkMapArrayValues* vtkMapArrayValues::New | ( | ) | [static] |
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".
virtual int vtkMapArrayValues::GetOutputArrayType | ( | ) | [virtual] |
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.
void vtkMapArrayValues::AddToMap | ( | vtkVariant | from, |
vtkVariant | 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, |
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.
void vtkMapArrayValues::ClearMap | ( | ) |
Clear the internal map.
Get the size of the internal map.
int vtkMapArrayValues::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 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.
char* vtkMapArrayValues::InputArrayName [protected] |
Definition at line 137 of file vtkMapArrayValues.h.
char* vtkMapArrayValues::OutputArrayName [protected] |
Definition at line 138 of file vtkMapArrayValues.h.
int vtkMapArrayValues::OutputArrayType [protected] |
Definition at line 139 of file vtkMapArrayValues.h.
int vtkMapArrayValues::FieldType [protected] |
Definition at line 140 of file vtkMapArrayValues.h.
int vtkMapArrayValues::MapType [protected] |
Definition at line 141 of file vtkMapArrayValues.h.
int vtkMapArrayValues::PassArray [protected] |
Definition at line 142 of file vtkMapArrayValues.h.
double vtkMapArrayValues::FillValue [protected] |
Definition at line 143 of file vtkMapArrayValues.h.
vtkMapType* vtkMapArrayValues::Map [protected] |
Definition at line 146 of file vtkMapArrayValues.h.