 |
VTK
9.0.1
|
Go to the documentation of this file.
49 #ifndef vtkExplicitStructuredGrid_h
50 #define vtkExplicitStructuredGrid_h
52 #include "vtkCommonDataModelModule.h"
122 void GetDimensions(
int dim[3]);
130 void GetCellDims(
int cellDims[3]);
145 void SetExtent(
int x0,
int x1,
int y0,
int y1,
int z0,
int z1);
147 vtkGetVector6Macro(Extent,
int);
190 void ComputeCellStructuredCoords(
191 vtkIdType cellId,
int& i,
int& j,
int& k,
bool adjustForExtent =
true);
201 vtkIdType ComputeCellId(
int i,
int j,
int k,
bool adjustForExtent =
true);
212 vtkSetStringMacro(FacesConnectivityFlagsArrayName);
213 vtkGetStringMacro(FacesConnectivityFlagsArrayName);
257 void Crop(
const int* updateExtent)
override;
382 vtkIdType cellId,
int& i,
int& j,
int& k,
bool adjustForExtent)
403 int ijk[] = { i, j, k };
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Topological inquiry to get points defining cell.
vtkNew< vtkHexahedron > Hexahedron
virtual void GenerateGhostArray(int zeroExt[6])
Normally called by pipeline executives or algorithms only.
bool HasAnyBlankCells() override
Returns true if one or more cells are blanked, false otherwise.
vtkCell * GetCell(vtkIdType cellId) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
int FindConnectedFaces(int foundFaces[3])
Find a connected face for each axis if any.
void GetDimensions(int dim[3])
static vtkExplicitStructuredGrid * GetData(vtkInformationVector *v, int i=0)
virtual void Crop(vtkExplicitStructuredGrid *input, const int *updateExtent, bool generateOriginalCellIds)
void SetDimensions(int i, int j, int k)
Set/Get the dimensions of this structured dataset in term of number of points along each direction.
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input poly data object.
void Crop(const int *updateExtent) override
Reallocates and copies to set the Extent to the UpdateExtent.
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
a cell that represents a linear 3D hexahedron
static vtkExplicitStructuredGrid * New()
Standard methods for instantiation, type information, and printing.
static void ComputeSwapFlag(int foundFaces[3], int swap[3])
Compute a swap flag based if a face have been found.
vtkNew< vtkEmptyCell > EmptyCell
static void CheckConnectedFaces(int &nFoundFaces, int foundFaces[3])
Check a list of connected faces and remove invalid face or extrapolate missing faces.
void ReorderCellsPoints(const int *ptsMap, const int transformFlag[3])
Reorder all cells points based on a transformFlag for each axis and a points map.
static void GetCellDimensionsFromExtent(const int ext[6], int celldims[3], int dataDescription=VTK_EMPTY)
Returns the cell dimensions, i.e., the number of cells along the i,j,k for the grid with the given gr...
static void ComputeCellStructuredCoords(const vtkIdType cellId, const int dim[3], int ijk[3], int dataDescription=VTK_EMPTY)
Given a cellId and grid dimensions 'dim', get the structured coordinates (i-j-k).
vtkExplicitStructuredGrid()
vtkIdType ComputeCellId(int i, int j, int k, bool adjustForExtent=true)
Given a location in structured coordinates (i-j-k), return the cell id.
an empty cell used as a place-holder during processing
static void ComputeMirrorFlag(int foundFaces[3], int mirror[3])
Compute a mirror flag based if a face have been found.
void GenerateGhostArray(int zeroExt[6], bool cellOnly) override
void Initialize() override
Standard vtkDataSet API methods.
virtual void InternalCopy(vtkExplicitStructuredGrid *src)
Internal method used by DeepCopy and ShallowCopy.
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkIdType GetNumberOfCells() override
Determine the number of cells composing the dataset.
vtkIdType * GetCellPoints(vtkIdType cellId)
Get direct raw pointer to the 8 points indices of an hexahedra.
void ComputeFacesConnectivityFlagsArray()
Compute the faces connectivity flags array.
void GetCell(vtkIdType, vtkCell *)
Internal method used by GetCell.
static void GetDimensionsFromExtent(const int ext[6], int dims[3], int dataDescription=VTK_EMPTY)
Computes the structured grid dimensions based on the given extent.
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Topological inquiry to get cells using point.
unsigned char IsCellGhost(vtkIdType cellId)
Return non-zero value if specified cell is a ghost cell.
void GetCellDims(int cellDims[3])
Computes the cell dimensions according to internal point dimensions.
void CheckAndReorderFaces()
Check faces are numbered correctly regarding ijk numbering If not this will reorganize cell points or...
static vtkExplicitStructuredGrid * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
an abstract base class for classes that build topological links from points to cells
void ComputeCellStructuredCoords(vtkIdType cellId, int &i, int &j, int &k, bool adjustForExtent=true)
Given a cellId, get the structured coordinates (i-j-k).
abstract class to specify cell behavior
void SetDimensions(int dim[3])
int GetMaxCellSize() override
Convenience method returns largest cell size in dataset.
a simple class to control print indentation
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
object to represent cell connectivity
void BuildLinks()
Create/Get upward links from points to cells that use each point.
int GetDataObjectType() override
Return what type of dataset this is.
list of point or cell ids
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
void UnBlankCell(vtkIdType cellId)
int GetExtentType() override
The extent type is a 3D extent.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kilobytes.
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
abstract class to specify dataset behavior
#define VTK_EXPLICIT_STRUCTURED_GRID
char * FacesConnectivityFlagsArrayName
abstract class for specifying dataset behavior
void BlankCell(vtkIdType cellId)
Methods for supporting blanking of cells.
provides thread-safe access to cells
void GetCellNeighbors(vtkIdType cellId, vtkIdType neighbors[6], int *wholeExtent=nullptr)
Get cell neighbors of the cell for every faces.
structured grid with explicit topology and geometry
void InternalCheckAndReorderFaces(bool swap)
Internal method used by CheckAndReorderFaces.
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
static void ComputeCellStructuredCoordsForExtent(const vtkIdType cellIdx, const int ext[6], int ijk[3], int dataDescription=VTK_EMPTY)
Given the global grid extent and the linear index of a cell within the grid extent,...
void SetExtent(int x0, int x1, int y0, int y1, int z0, int z1)
Set/Get the extent of this structured dataset in term of number of points along each direction.
void SetCells(vtkCellArray *cells)
Set/Get the cell array defining hexahedron.
int GetDataDimension()
Return the dimensionality of the data.
static vtkIdType ComputeCellId(const int dim[3], const int ijk[3], int dataDescription=VTK_EMPTY)
Given a location in structured coordinates (i-j-k), and the dimensions of the structured dataset,...
static vtkIdType ComputeCellIdForExtent(const int extent[6], const int ijk[3], int dataDescription=VTK_EMPTY)
Given a location in structured coordinates (i-j-k), and the extent of the structured dataset,...
void DeepCopy(vtkDataObject *src) override
general representation of visualization data
vtkAbstractCellLinks * Links
~vtkExplicitStructuredGrid() override
unsigned char IsCellVisible(vtkIdType cellId)
Return non-zero value if specified cell is visible.
void GetCellPoints(vtkIdType cellId, vtkIdType &npts, vtkIdType *&pts)
More efficient method to obtain cell points.
void SetExtent(int extent[6])
bool HasAnyGhostCells()
Returns true if one or more cells are ghost, false otherwise.
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void ComputeScalarRange() override
Compute the range of the scalars and cache it into ScalarRange only if the cache became invalid (Scal...