Man Page for vtkDataSet
Table of Contents

NAME

vtkDataSet - abstract class to specify dataset behavior

SYNOPSIS


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

class VTK_EXPORT vtkDataSet : public vtkObject

vtkDataSet();
vtkDataSet(const vtkDataSet& ds);
const char *GetClassName() {return "vtkDataSet";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual void Update();
virtual void ForceUpdate();
virtual vtkDataSet *MakeObject() = 0;
virtual void CopyStructure(vtkDataSet *ds) = 0;
virtual char *GetDataType() = 0;
virtual int GetNumberOfPoints() = 0;
virtual int GetNumberOfCells() = 0;
virtual float *GetPoint(int ptId) = 0;
virtual void GetPoint(int id, float x[3]);
virtual vtkCell *GetCell(int cellId) = 0;
virtual int GetCellType(int cellId) = 0;
virtual void GetCellTypes(vtkCellTypes *types);
virtual void GetCellPoints(int cellId, vtkIdList& ptIds) = 0;
virtual void GetPointCells(int ptId, vtkIdList& cellIds) = 0;
virtual void GetCellNeighbors(int cellId, vtkIdList& ptIds, vtkIdList& cellIds);
virtual int FindPoint(float x[3]) = 0;
virtual int FindCell(float x[3], vtkCell *cell, int cellId, float tol2,
int& subId, float pcoords[3], float *weights) = 0;
virtual vtkCell *FindAndGetCell(float x[3], vtkCell *cell, int cellId, float tol2,
int& subId, float pcoords[3], float *weights);
unsigned long int GetMTime();
void ReleaseData();
int ShouldIReleaseData();
void SetDataReleased(int);
int GetDataReleased();
void SetReleaseDataFlag(int);
int GetReleaseDataFlag();
void ReleaseDataFlagOn();
void ReleaseDataFlagOff();
void SetGlobalReleaseDataFlag(int val);
void GlobalReleaseDataFlagOn() {this->SetGlobalReleaseDataFlag(1);};
void GlobalReleaseDataFlagOff() {this->SetGlobalReleaseDataFlag(0);};
int GetGlobalReleaseDataFlag();
vtkPointData *GetPointData() {return &this->PointData;};
virtual void Squeeze();
void SetSource(vtkSource*);
void SetSource(vtkSource& );
vtkSource *GetSource();
virtual void ComputeBounds();
float *GetBounds();
void GetBounds(float bounds[6]);
float *GetCenter();
void GetCenter(float center[3]);
float GetLength();
virtual void Initialize();
float *GetScalarRange();
virtual int GetMaxCellSize() = 0;

DESCRIPTION

vtkDataSet is an abstract class that specifies an interface for data objects. (Data objects are synonymous with datasets.) vtkDataSet also provides methods to provide informations about the data, such as center, bounding box, and representative length.

SEE ALSO

vtkPointSet vtkStructuredPoints

SUMMARY

virtual void Update();
Provides opportunity for data to insure internal consistency before access. Also causes owning filter (if
any) to update itself.

virtual void ForceUpdate();
Force the data to update itself no matter what.

virtual vtkDataSet *MakeObject() = 0;
Create concrete instance of this dataset.

virtual void CopyStructure(vtkDataSet *ds) = 0;
Copy the geometric and topological structure of an object. Note that the invoking object and the object pointed to by the parameter ds must be of the same type.

virtual char *GetDataType() = 0;
Return class name of data type. This is one of vtkStructuredGrid, vtkStructuredPoints, vtkUnstructuredGrid, vtkPolyData.

virtual int GetNumberOfPoints() = 0;
Determine number of points composing dataset.

virtual int GetNumberOfCells() = 0;
Determine number of cells composing dataset.

virtual float *GetPoint(int ptId) = 0;
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints.

virtual void GetPoint(int id, float x[3]);
Copy point coordinates into user provided array x[3] for specified point id.

virtual vtkCell *GetCell(int cellId) = 0;
Get cell with cellId such that: 0 <= cellId < NumberOfCells.

virtual int GetCellType(int cellId) = 0;
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.

virtual void GetCellTypes(vtkCellTypes *types);
Get a list of types of cells in a dataset. The list consists of an array of types (not necessarily in any order), with a single entry per type. For example a dataset 5 triangles, 3 lines, and 100 hexahedra would result a list of three entries, corresponding to the types VTK_TRIANGLE, VTK_LINE, and VTK_HEXAHEDRON.

virtual void GetCellPoints(int cellId, vtkIdList& ptIds) = 0;
Topological inquiry to get points defining cell.

virtual void GetPointCells(int ptId, vtkIdList& cellIds) = 0;
Topological inquiry to get cells using point.

virtual void GetCellNeighbors(int cellId, vtkIdList& ptIds, vtkIdList& cellIds);
Topological inquiry to get all cells using list of points exclusive of cell specified (e.g., cellId).

virtual int FindPoint(float x[3]) = 0;
Locate the closest point to the global coordinate x. Return the point id. If point id < 0; then no point found. (This may arise when point is outside of dataset.)

virtual int FindCell(float x[3], vtkCell *cell, int cellId, float tol2,
Locate cell based on global coordinate x and tolerance squared. If cell and cellId is non-NULL, then search starts from this cell and looks at immediate neighbors. Returns cellId >= 0 if inside, < 0 otherwise. The parametric coordinates are provided in pcoords[3]. The interpolation weights are returned in weights[]. (The number of weights is equal to the number of points in the found cell). Tolerance is used to control how close the point is to be considered "in" the cell.

virtual vtkCell *FindAndGetCell(float x[3], vtkCell *cell, int cellId, float tol2,
Locate the cell that contains a point and return the cell. Also returns the subcell id, parametric coordinates and weights for subsequent interpolation. This method combines the derived class methods int FindCell and vtkCell *GetCell. Derived classes may provide a more efficient implementation. See for example vtkStructuredPoints.

void SetDataReleased(int)
Release data back to system to conserve memory resource. Used during visualization network execution. Return flag indicating whether data should be released after use by a filter. Set/Get the DataReleased ivar.

void SetReleaseDataFlag(int)
Turn on/off flag to control whether this object's data is released after being used by a filter.

virtual void Squeeze();
Turn on/off flag to control whether every object releases its data after being used by a filter. return pointer to this dataset's point data Reclaim any extra memory used to store data.

void SetSource(vtkSource*)
void SetSource(vtkSource& )
Specify the filter creating this dataset.

virtual int GetMaxCellSize() = 0;
Convenience method to get the range of the scalar data (if there is any scalar data). Otherwise the method will return (0,1). Convenience method returns largest cell size in dataset. This is generally used to allocate memory for supporting data structures.

vtkDataSet ()
Constructor with default bounds (0,1, 0,1, 0,1).

vtkDataSet (const vtkDataSet& ds) : PointData(ds.PointData) Copy constructor.

void ComputeBounds()
Compute the data bounding box from data points.

float *GetBounds()
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).

float *GetCenter()
Get the center of the bounding box.

float GetLength()
Return the length of the diagonal of the bounding box.


Table of Contents