Man Page for vtkRectilinearGrid
Table of Contents

NAME

vtkRectilinearGrid - a datset that is topologically regular with variable spacing in the three coordinate directions

SYNOPSIS


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

class VTK_EXPORT vtkRectilinearGrid : public vtkDataSet

vtkRectilinearGrid();
vtkRectilinearGrid(const vtkRectilinearGrid& v);
~vtkRectilinearGrid();
static vtkRectilinearGrid *New() {return new vtkRectilinearGrid;};
const char *GetClassName() {return "vtkRectilinearGrid";};
char *GetDataType() {return "vtkRectilinearGrid";};
void PrintSelf(ostream& os, vtkIndent indent);
vtkDataSet *MakeObject() {return new vtkRectilinearGrid(*this);};
void CopyStructure(vtkDataSet *ds);
void Initialize();
int GetNumberOfCells();
int GetNumberOfPoints();
float *GetPoint(int ptId);
void GetPoint(int id, float x[3]);
vtkCell *GetCell(int cellId);
int FindPoint(float x[3]);
int FindCell(float x[3], vtkCell *cell, int cellId, float tol2, int& subId,
float pcoords[3], float *weights);
vtkCell *FindAndGetCell(float x[3], vtkCell *cell, int cellId,
float tol2, int& subId, float pcoords[3], float *weights);
int GetCellType(int cellId);
void GetCellPoints(int cellId, vtkIdList& ptIds);
void GetPointCells(int ptId, vtkIdList& cellIds);
void ComputeBounds();

int GetMaxCellSize() {return 8;};
voxel is the largest
void SetDimensions(int i, int j, int k);
void SetDimensions(int dim[3]);
int *GetDimensions();
void GetDimensions(int data[3]);
int ComputeStructuredCoordinates(float x[3], int ijk[3], float pcoords[3]);
int GetDataDimension();
int ComputePointId(int ijk[3]);
int ComputeCellId(int ijk[3]);
int *GetDimensions();
void GetDimensions(int data[3]);
vtkScalars *GetXCoordinates();
vtkScalars *GetXCoordinates();
vtkScalars *GetYCoordinates();
vtkScalars *GetYCoordinates();
vtkScalars *GetZCoordinates();

DESCRIPTION

vtkRectilinearGrid is a data object that is a concrete implementation of vtkDataSet. vtkRectilinearGrid represents a geometric structure that is topologically regular with variable spacing in the three coordinate directions x-y-z.

To define a vtkRectilinearGrid, you must specify the dimensions of the data and provide three arrays of values specifying the coordinates along the x-y-z axes. The coordinate arrays are specified using three vtkScalars objects (one for x, one for y, one for z).

CAVEATS

Make sure that the dimensions of the grid match the number of coordinates in the x-y-z directions. If not, unpredictable results (including program failure) may result. Also, you must supply coordinates in all three directions, even if the dataset topology is 2D, 1D, or 0D. Finally, the coordinates values in each direction must be montonically increasing.

SUMMARY

int *GetDimensions()
void GetDimensions(int data[3])
Get dimensions of this rectilinear grid dataset.

int *GetDimensions()
void GetDimensions(int data[3])
Specify the grid coordinates in the x-direction.

int *GetDimensions()
void GetDimensions(int data[3])
Specify the grid coordinates in the y-direction.

int *GetDimensions()
void GetDimensions(int data[3])
Specify the grid coordinates in the z-direction.

int ComputePointId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the point id.

int ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.

void CopyStructure(vtkDataSet *ds)
Copy the geometric and topological structure of an input rectilinear grid object.

void SetDimensions(int i, int j, int k)
Set dimensions of rectilinear grid dataset.

void SetDimensions(int dim[3])
Set dimensions of rectilinear grid dataset.

int ComputeStructuredCoordinates(float x[3], int ijk[3], float pcoords[3])
Convenience function computes the structured coordinates for a point x[3]. The cell is specified by the array ijk[3], and the parametric coordinates in the cell are specified with pcoords[3]. The function returns a 0 if the point x is outside of the grid, and a 1 if inside the grid.


Table of Contents