Section: Visualization Toolkit Common Classes
To create an instance of class vtkIdList, simply invoke its constructor as follows
obj = vtkIdList
obj
is an instance of the vtkIdList class.
obj.Initialize ()
int = obj.Allocate (vtkIdType sz, int strategy)
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkIdList = obj.NewInstance ()
vtkIdList = obj.SafeDownCast (vtkObject o)
vtkIdType = obj.GetNumberOfIds ()
- Return the number of id's in the list.
vtkIdType = obj.GetId (vtkIdType i)
- Return the id at location i.
obj.SetNumberOfIds (vtkIdType number)
- Specify the number of ids for this object to hold. Does an
allocation as well as setting the number of ids.
obj.SetId (vtkIdType i, vtkIdType vtkid)
- 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().
obj.InsertId (vtkIdType i, vtkIdType vtkid)
- Set the id at location i. Does range checking and allocates memory
as necessary.
vtkIdType = obj.InsertNextId (vtkIdType vtkid)
- Add the id specified to the end of the list. Range checking is performed.
vtkIdType = obj.InsertUniqueId (vtkIdType vtkid)
- If id is not already in list, insert it and return location in
list. Otherwise return just location in list.
vtkIdType = obj.GetPointer (vtkIdType i)
- Get a pointer to a particular data index.
vtkIdType = obj.WritePointer (vtkIdType i, vtkIdType 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.
obj.Reset ()
- Reset to an empty state.
obj.Squeeze ()
- Free any unused memory.
obj.DeepCopy (vtkIdList ids)
- Copy an id list by explicitly copying the internal array.
obj.DeleteId (vtkIdType vtkid)
- Delete specified id from list. Will remove all occurrences of id in list.
vtkIdType = obj.IsId (vtkIdType vtkid)
- Return -1 if id specified is not contained in the list; otherwise return
the position in the list.
obj.IntersectWith (vtkIdList &otherIds)
- Intersect this list with another vtkIdList. Updates current list according
to result of intersection operation.