DataSet
Introduction
vtkDataSet is an abstract class that specifies an interface for dataset objects. vtkDataSet also provides methods to provide information about the data, such as center, bounding box, and representative length.
In vtk a dataset consists of a structure (geometry and topology) and attribute data. The structure is defined implicitly or explicitly as a collection of cells. The geometry of the structure is contained in point coordinates plus the cell interpolation functions. The topology of the dataset structure is defined by cell types and how the cells share their defining points.
Attribute data in vtk is either point data (data at points) or cell data (data at cells). Typically filters operate on point data, but some may operate on cell data, both cell and point data, either one, or none.
Methods
computeBounds
Compute the (X, Y, Z) bounds of the data.
extend
Method used to decorate a given object (publicAPI+model) with vtkDataSet characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IDataSetInitialValues | No | (default: {}) |
getBounds
Get the bounds for this dataset as [xmin, xmax, ymin, ymax, zmin, zmax].
getBoundsByReference
Get the bounds for this dataset by reference.
getCellBounds
Get the bounding box of a cell with the given cellId.
| Argument | Type | Required | Description |
|---|---|---|---|
cellId | Number | Yes | - The id of the cell |
getCellData
Get dataset's cell data
getCenter
Returns the center of the bounding box as [x, y, z].
getFieldData
Get dataset's field data
getLength
Returns the length of the diagonal of the bounding box.
getLength2
Returns the squared length of the diagonal of the bounding box.
getPointData
Get dataset's point data.
initialize
Initialize the field, cell and point data.
newInstance
Method used to create a new instance of vtkDataSet.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IDataSetInitialValues | No | for pre-setting some of its content |
setCellData
Set dataset's cell data
| Argument | Type | Required | Description |
|---|---|---|---|
cellData | vtkDataSetAttributes | Yes |
setFieldData
Set dataset's field data
| Argument | Type | Required | Description |
|---|---|---|---|
fieldData | vtkDataSetAttributes | Yes |
setPointData
Set dataset's point data.
| Argument | Type | Required | Description |
|---|---|---|---|
pointData | vtkDataSetAttributes | Yes |