FreeMat: vtkVoidArray

FreeMat

- Main Page
- Related Pages

vtkVoidArray

Section: Visualization Toolkit Common Classes

# Usage

vtkVoidArray is an array of pointers to void. It provides methods for insertion and retrieval of these pointers values, and will automatically resize itself to hold new data.

To create an instance of class vtkVoidArray, simply invoke its constructor as follows

      obj = vtkVoidArray

# Methods

The class vtkVoidArray has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkVoidArray class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkVoidArray = obj.NewInstance ()`
- `vtkVoidArray = obj.SafeDownCast (vtkObject o)`
- `int = obj.Allocate (vtkIdType sz, vtkIdType ext)` - Allocate memory for this array. Delete old storage only if necessary. Note that the parameter ext is no longer used.
- `obj.Initialize ()` - Release storage and reset array to initial state.
- `int = obj.GetDataType ()` - Return the size of the data contained in the array.
- `int = obj.GetDataTypeSize ()` - Set the number of void* pointers held in the array.
- `obj.SetNumberOfPointers (vtkIdType number)` - Get the number of void* pointers held in the array.
- `vtkIdType = obj.GetNumberOfPointers ()` - Get the void* pointer at the ith location.
- `obj.Reset ()` - Resize the array to just fit the inserted memory. Reclaims extra memory.
- `obj.Squeeze ()` - Get the address of a particular data index. Performs no checks to verify that the memory has been allocated etc.
- `obj.DeepCopy (vtkVoidArray va)` - Deep copy of another void array.