Go to the documentation of this file.
42 #ifndef vtkRectilinearGrid_h
43 #define vtkRectilinearGrid_h
45 #include "vtkCommonDataModelModule.h"
84 vtkIdType GetNumberOfCells() VTK_OVERRIDE;
85 vtkIdType GetNumberOfPoints() VTK_OVERRIDE;
90 void GetCellBounds(
vtkIdType cellId,
double bounds[6]) VTK_OVERRIDE;
94 int& subId,
double pcoords[3],
double *weights) VTK_OVERRIDE;
96 vtkIdType cellId,
double tol2,
int& subId,
97 double pcoords[3],
double *weights) VTK_OVERRIDE;
99 double tol2,
int& subId,
double pcoords[3],
100 double *weights) VTK_OVERRIDE;
108 int GetMaxCellSize() VTK_OVERRIDE {
return 8;};
132 vtkGetVectorMacro(Dimensions,
int,3);
138 int GetDataDimension();
163 void GetPoint(
const int i,
const int j,
const int k,
double p[3]);
196 void SetExtent(
int x1,
int x2,
int y1,
int y2,
int z1,
int z2);
197 vtkGetVector6Macro(Extent,
int);
228 void Crop(
const int* updateExtent) VTK_OVERRIDE;
258 double PointReturn[3];
276 if (this->Dimensions[i] <= 0)
280 if (this->Dimensions[i] > 1)
282 nCells *= (this->Dimensions[i]-1);
292 return this->Dimensions[0]*this->Dimensions[1]*this->Dimensions[2];
represent and manipulate 3D points
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
static int GetDataDimension(int dataDescription)
Return the topological dimension of the data (e.g., 0, 1, 2, or 3D).
int ComputeStructuredCoordinates(double x[3], int ijk[3], double pcoords[3])
Convenience function computes the structured coordinates for a point x[3].
void Initialize() override
Restore object to initial state.
a dataset that is topologically regular with variable spacing in the three coordinate directions
void ComputeBounds() override
Compute the data bounding box from data points.
vtkIdType FindPoint(double x[3]) override
void GetPoint(const int i, const int j, const int k, double p[3])
Given the IJK-coordinates of the point, it returns the corresponding xyz-coordinates.
static vtkRectilinearGrid * GetData(vtkInformationVector *v, int i=0)
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Topological inquiry to get cells using point.
vtkIdType GetNumberOfPoints() override
Determine the number of points composing the dataset.
abstract superclass for arrays of numeric data
virtual void SetZCoordinates(vtkDataArray *)
Specify the grid coordinates in the z-direction.
a cell that represents a 3D point
void SetDimensions(int dim[3])
void GetPoint(const int i, const int j, const int k, double pnt[3])
cell represents a 1D line
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
This is a version of the above method that can be used with multithreaded applications.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
static vtkRectilinearGrid * New()
static vtkIdType ComputePointId(int dim[3], int ijk[3], int dataDescription=VTK_EMPTY)
Given a location in structured coordinates (i-j-k), and the dimensions of the structured dataset,...
~vtkRectilinearGrid() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds, int dataDescription, int dim[3])
Get the points defining a cell.
vtkIdType FindPoint(double x, double y, double z)
Locate the closest point to the global coordinate x.
void SetDimensions(int i, int j, int k)
Set dimensions of rectilinear grid dataset.
void SetExtent(int extent[6])
Different ways to set the extent of the data array.
abstract class to specify cell behavior
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Topological inquiry to get points defining cell.
int GetDataDimension()
Return the dimensionality of the data.
virtual void SetXCoordinates(vtkDataArray *)
Specify the grid coordinates in the x-direction.
int GetDataObjectType() override
Return what type of dataset this is.
static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3])
Get the cells using a point.
a simple class to control print indentation
virtual void SetYCoordinates(vtkDataArray *)
Specify the grid coordinates in the y-direction.
list of point or cell ids
vtkIdType ComputePointId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the point id.
vtkIdType ComputeCellId(int ijk[3])
Given a location in structured coordinates (i-j-k), return the cell id.
static vtkRectilinearGrid * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
static vtkIdType ComputeCellId(int dim[3], int ijk[3], int dataDescription=VTK_EMPTY)
Given a location in structured coordinates (i-j-k), and the dimensions of the structured dataset,...
abstract class to specify dataset behavior
vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Locate cell based on global coordinate x and tolerance squared.
void Crop(const int *updateExtent) override
Reallocates and copies to set the Extent to the UpdateExtent.
void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2)
a cell that represents an orthogonal quadrilateral
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input rectilinear grid object.
provides thread-safe access to cells
general representation of visualization data
vtkCell * FindAndGetCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override
Locate the cell that contains a point and return the cell.
#define VTK_RECTILINEAR_GRID
void GetPoints(vtkPoints *pnts)
Given a user-supplied vtkPoints container object, this method fills in all the points of the Rectilin...
a cell that represents a 3D orthogonal parallelepiped