vtkGenerateIndexArray Class Reference

#include <vtkGenerateIndexArray.h>

Inheritance diagram for vtkGenerateIndexArray:

Inheritance graph
[legend]
Collaboration diagram for vtkGenerateIndexArray:

Collaboration graph
[legend]

List of all members.


Detailed Description

Generates a new vtkIdTypeArray containing zero-base indices.

vtkGenerateIndexArray operates in one of two distinct "modes". By default, it simply generates an index array containing monotonically-increasing integers in the range [0, N), where N is appropriately sized for the field type that will store the results. This mode is useful for generating a unique ID field for datasets that have none.

The second "mode" uses an existing array from the input data object as a "reference". Distinct values from the reference array are sorted in ascending order, and an integer index in the range [0, N) is assigned to each. The resulting map is used to populate the output index array, mapping each value in the reference array to its corresponding index and storing the result in the output array. This mode is especially useful when generating tensors, since it allows us to "map" from an array with arbitrary contents to an index that can be used as tensor coordinates.

Definition at line 49 of file vtkGenerateIndexArray.h.


Public Types

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

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetArrayName (const char *)
virtual char * GetArrayName ()
virtual void SetFieldType (int)
virtual int GetFieldType ()
virtual void SetReferenceArrayName (const char *)
virtual char * GetReferenceArrayName ()

Static Public Member Functions

static vtkGenerateIndexArrayNew ()
static int IsTypeOf (const char *type)
static vtkGenerateIndexArraySafeDownCast (vtkObject *o)

Protected Member Functions

 vtkGenerateIndexArray ()
 ~vtkGenerateIndexArray ()
virtual int ProcessRequest (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Protected Attributes

char * ArrayName
int FieldType
char * ReferenceArrayName

Member Typedef Documentation

Reimplemented from vtkDataObjectAlgorithm.

Definition at line 54 of file vtkGenerateIndexArray.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
ROW_DATA 
POINT_DATA 
CELL_DATA 
VERTEX_DATA 
EDGE_DATA 

Definition at line 76 of file vtkGenerateIndexArray.h.


Constructor & Destructor Documentation

vtkGenerateIndexArray::vtkGenerateIndexArray (  )  [protected]

vtkGenerateIndexArray::~vtkGenerateIndexArray (  )  [protected]


Member Function Documentation

static vtkGenerateIndexArray* vtkGenerateIndexArray::New (  )  [static]

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

Reimplemented from vtkDataObjectAlgorithm.

virtual const char* vtkGenerateIndexArray::GetClassName (  )  [virtual]

Reimplemented from vtkDataObjectAlgorithm.

static int vtkGenerateIndexArray::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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkDataObjectAlgorithm.

virtual int vtkGenerateIndexArray::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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkDataObjectAlgorithm.

static vtkGenerateIndexArray* vtkGenerateIndexArray::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkDataObjectAlgorithm.

void vtkGenerateIndexArray::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 vtkDataObjectAlgorithm.

virtual void vtkGenerateIndexArray::SetArrayName ( const char *   )  [virtual]

Control the output index array name (default: "index").

virtual char* vtkGenerateIndexArray::GetArrayName (  )  [virtual]

Control the output index array name (default: "index").

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

Control the location where the index array will be stored

virtual int vtkGenerateIndexArray::GetFieldType (  )  [virtual]

Control the location where the index array will be stored

virtual void vtkGenerateIndexArray::SetReferenceArrayName ( const char *   )  [virtual]

Specifies an optional reference array for index-generation.

virtual char* vtkGenerateIndexArray::GetReferenceArrayName (  )  [virtual]

Specifies an optional reference array for index-generation.

virtual int vtkGenerateIndexArray::ProcessRequest ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
) [protected, virtual]

see vtkAlgorithm for details

Reimplemented from vtkDataObjectAlgorithm.

virtual int vtkGenerateIndexArray::RequestDataObject ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkDataObjectAlgorithm.

int vtkGenerateIndexArray::RequestData ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
) [protected, virtual]

Reimplemented from vtkDataObjectAlgorithm.


Member Data Documentation

Definition at line 105 of file vtkGenerateIndexArray.h.

Definition at line 106 of file vtkGenerateIndexArray.h.

Definition at line 107 of file vtkGenerateIndexArray.h.


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

Generated on Wed Jun 3 19:03:51 2009 for VTK by  doxygen 1.5.6