Man Page for vtkIdList
Table of Contents

NAME

vtkIdList - list of point or cell ids

SYNOPSIS


#include "/opt/vtk-c++/common/vtkIdList.h"

class VTK_EXPORT vtkIdList : public vtkObject

vtkIdList(const int sz=512, const int ext=1000);
~vtkIdList();
int Allocate(const int sz=512, const int ext=1000) {return this->Ia->Allocate(sz,ext);};
const char *GetClassName() {return "vtkIdList";};
void PrintSelf(ostream& os, vtkIndent indent);
vtkIdList &operator=(const vtkIdList& ids) {*(this->Ia) = *(ids.Ia); return *this;};
static vtkIdList *New() {return new vtkIdList(8);};
void Squeeze() {this->Ia->Squeeze();};
int GetNumberOfIds();
int GetId(const int i);
void SetNumberOfIds(const int number);
void SetId(const int i, const int id);
void InsertId(const int i, const int id);
int InsertNextId(const int id);
int InsertUniqueId(const int id);
int *GetPointer(const int id);
int *WritePointer(const int id, const int number);
void Reset() {this->Ia->Reset();};
void DeleteId(int Id);
void IntersectWith(vtkIdList& otherIds);
int IsId(int id);

DESCRIPTION

vtkIdList is used to represent and pass data id's between objects. vtkIdList may represent any type of integer id, but usually represents point and cell ids.

SUMMARY

int GetNumberOfIds()
Return the number of id's in the list.

int GetId(const int i)
Return the id at location i.

void SetNumberOfIds(const int number)
Specify the number of ids for this object to hold. Does an allocation as well as setting the MaxId ivar. Used in conjunction with SetValue() method for fast insertion.

void SetId(const int i, const int id)
Set the id at location i. Doesn't do range checking so it's a bit faster than InsertId. Make sure you use SetNumberOfIds() to allocate memory prior to using

SetId().

void InsertId(const int i, const int id)
Set the id at location i. Does range checking and allocates memory as necessary.

int InsertNextId(const int id)
Add the id specified to the end of the list. Range checking is performed.

int InsertUniqueId(const int id)
If id is not already in list, insert it and return location in list. Otherwise return just location in list.

int *GetPointer(const int i)
Get a pointer to a particular data index.

int *WritePointer(const int i, const int number)
Get a pointer to a particular data index. Make sure data is allocated for the number of items requested. Set MaxId according to the number of data values requested.

int IsId(int id)
Return 1 if id specified is contained in list; 0 otherwise.

void DeleteId(int Id)
Delete specified id from list. Will replace all occurences of id in list.

void IntersectWith(vtkIdList& otherIds)
Intersect this list with another vtkIdList. Updates current list according to result of intersection operation.


Table of Contents