VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkGenerateIndexArray Class Reference

#include <vtkGenerateIndexArray.h>

Inherits vtkDataObjectAlgorithm.

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 int IsA (const char *type)
 
vtkGenerateIndexArrayNewInstance () const
 
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 ()
 
virtual void SetPedigreeID (int)
 
virtual int GetPedigreeID ()
 

Static Public Member Functions

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

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 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
 
int PedigreeID
 

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 50 of file vtkGenerateIndexArray.h.

Member Typedef Documentation

typedef vtkDataObjectAlgorithm vtkGenerateIndexArray::Superclass

Definition at line 55 of file vtkGenerateIndexArray.h.

Member Enumeration Documentation

anonymous enum
Enumerator
ROW_DATA 
POINT_DATA 
CELL_DATA 
VERTEX_DATA 
EDGE_DATA 

Definition at line 84 of file vtkGenerateIndexArray.h.

Constructor & Destructor Documentation

vtkGenerateIndexArray::vtkGenerateIndexArray ( )
protected
vtkGenerateIndexArray::~vtkGenerateIndexArray ( )
protected

Member Function Documentation

static vtkGenerateIndexArray* vtkGenerateIndexArray::New ( )
static
static int vtkGenerateIndexArray::IsTypeOf ( const char *  type)
static
virtual int vtkGenerateIndexArray::IsA ( const char *  type)
virtual
static vtkGenerateIndexArray* vtkGenerateIndexArray::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkGenerateIndexArray::NewInstanceInternal ( ) const
protectedvirtual
vtkGenerateIndexArray* vtkGenerateIndexArray::NewInstance ( ) const
void vtkGenerateIndexArray::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
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 void vtkGenerateIndexArray::SetPedigreeID ( int  )
virtual

Specifies whether the index array should be marked as pedigree ids. Default: false.

virtual int vtkGenerateIndexArray::GetPedigreeID ( )
virtual

Specifies whether the index array should be marked as pedigree ids. Default: false.

virtual int vtkGenerateIndexArray::ProcessRequest ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtual
virtual int vtkGenerateIndexArray::RequestDataObject ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtual
int vtkGenerateIndexArray::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protected

Member Data Documentation

char* vtkGenerateIndexArray::ArrayName
protected

Definition at line 113 of file vtkGenerateIndexArray.h.

int vtkGenerateIndexArray::FieldType
protected

Definition at line 114 of file vtkGenerateIndexArray.h.

char* vtkGenerateIndexArray::ReferenceArrayName
protected

Definition at line 115 of file vtkGenerateIndexArray.h.

int vtkGenerateIndexArray::PedigreeID
protected

Definition at line 116 of file vtkGenerateIndexArray.h.


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