FreeMat: vtkUnstructuredGrid

FreeMat

- Main Page
- Related Pages

vtkUnstructuredGrid

Section: Visualization Toolkit Filtering Classes

# Usage

vtkUnstructuredGrid is a data object that is a concrete implementation of vtkDataSet. vtkUnstructuredGrid represents any combinations of any cell types. This includes 0D (e.g., points), 1D (e.g., lines, polylines), 2D (e.g., triangles, polygons), and 3D (e.g., hexahedron, tetrahedron).

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

      obj = vtkUnstructuredGrid

# Methods

The class vtkUnstructuredGrid 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 vtkUnstructuredGrid class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkUnstructuredGrid = obj.NewInstance ()`
- `vtkUnstructuredGrid = obj.SafeDownCast (vtkObject o)`
- `int = obj.GetDataObjectType ()` - Standard vtkDataSet API methods. See vtkDataSet for more information.
- `obj.Allocate (vtkIdType numCells, int extSize)` - Standard vtkDataSet API methods. See vtkDataSet for more information.
- `vtkIdType = obj.InsertNextCell (int type, vtkIdList ptIds)` - Insert/create cell in object by type and list of point ids defining cell topology.
- `obj.Reset ()`
- `obj.CopyStructure (vtkDataSet ds)`
- `vtkIdType = obj.GetNumberOfCells ()`
- `vtkCell = obj.GetCell (vtkIdType cellId)`
- `obj.GetCell (vtkIdType cellId, vtkGenericCell cell)`
- `obj.GetCellBounds (vtkIdType cellId, double bounds[6])`
- `obj.GetCellPoints (vtkIdType cellId, vtkIdList ptIds)`
- `obj.GetPointCells (vtkIdType ptId, vtkIdList cellIds)`
- `int = obj.GetCellType (vtkIdType cellId)`
- `vtkUnsignedCharArray = obj.GetCellTypesArray ()`
- `vtkIdTypeArray = obj.GetCellLocationsArray ()`
- `obj.Squeeze ()`
- `obj.Initialize ()`
- `int = obj.GetMaxCellSize ()`
- `obj.BuildLinks ()`
- `vtkCellLinks = obj.GetCellLinks ()`
- `obj.SetCells (int type, vtkCellArray cells)` - Special methods specific to vtkUnstructuredGrid for defining the cells composing the dataset.
- `obj.SetCells (int types, vtkCellArray cells)` - Special methods specific to vtkUnstructuredGrid for defining the cells composing the dataset.
- `obj.SetCells (vtkUnsignedCharArray cellTypes, vtkIdTypeArray cellLocations, vtkCellArray cells)` - Special methods specific to vtkUnstructuredGrid for defining the cells composing the dataset.
- `vtkCellArray = obj.GetCells ()` - Special methods specific to vtkUnstructuredGrid for defining the cells composing the dataset.
- `obj.RemoveReferenceToCell (vtkIdType ptId, vtkIdType cellId)` - Special methods specific to vtkUnstructuredGrid for defining the cells composing the dataset.
- `obj.AddReferenceToCell (vtkIdType ptId, vtkIdType cellId)` - Special methods specific to vtkUnstructuredGrid for defining the cells composing the dataset.
- `obj.ResizeCellList (vtkIdType ptId, int size)` - Special methods specific to vtkUnstructuredGrid for defining the cells composing the dataset.
- `obj.GetCellNeighbors (vtkIdType cellId, vtkIdList ptIds, vtkIdList cellIds)` - Topological inquiry to get all cells using list of points exclusive of cell specified (e.g., cellId). THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
- `int = obj.GetUpdateExtent ()` - We need this here to avoid hiding superclass method
- `obj.GetUpdateExtent (int extent[6])` - We need this here to avoid hiding superclass method
- `int = obj.GetPiece ()` - Set / Get the piece and the number of pieces. Similar to extent in 3D.
- `int = obj.GetNumberOfPieces ()` - Set / Get the piece and the number of pieces. Similar to extent in 3D.
- `int = obj.GetGhostLevel ()` - Get the ghost level.
- `long = obj.GetActualMemorySize ()` - Return the actual size of the data in kilobytes. This number is valid only after the pipeline has updated. The memory size returned is guaranteed to be greater than or equal to the memory required to represent the data (e.g., extra space in arrays, etc. are not included in the return value). THIS METHOD IS THREAD SAFE.
- `obj.ShallowCopy (vtkDataObject src)` - Shallow and Deep copy.
- `obj.DeepCopy (vtkDataObject src)` - Shallow and Deep copy.
- `obj.GetIdsOfCellsOfType (int type, vtkIdTypeArray array)` - Fill vtkIdTypeArray container with list of cell Ids. This method traverses all cells and, for a particular cell type, inserts the cell Id into the container.
- `int = obj.IsHomogeneous ()` - Traverse cells and determine if cells are all of the same type.
- `obj.RemoveGhostCells (int level)` - This method will remove any cell that has a ghost level array value greater or equal to level.