VTK
|
A dataset structured as a tree where each node has exactly 2^n children. More...
#include <vtkHyperOctree.h>
Public Types | |
typedef vtkDataSet | Superclass |
![]() | |
enum | FieldDataType { DATA_OBJECT_FIELD =0, POINT_DATA_FIELD =1, CELL_DATA_FIELD =2 } |
typedef vtkDataObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
int | GetDataObjectType () |
void | CopyStructure (vtkDataSet *ds) |
int | GetDimension () |
void | SetDimension (int dim) |
vtkIdType | GetNumberOfCells () |
vtkIdType | GetNumberOfLeaves () |
vtkIdType | GetNumberOfPoints () |
vtkIdType | GetMaxNumberOfPoints (int level) |
vtkIdType | GetMaxNumberOfPointsOnBoundary (int level) |
vtkIdType | GetMaxNumberOfCellsOnBoundary (int level) |
vtkIdType | GetNumberOfLevels () |
vtkHyperOctreeCursor * | NewCellCursor () |
void | SubdivideLeaf (vtkHyperOctreeCursor *leaf) |
void | CollapseTerminalNode (vtkHyperOctreeCursor *node) |
virtual double * | GetPoint (vtkIdType ptId) |
virtual void | GetPoint (vtkIdType id, double x[3]) |
virtual vtkCell * | GetCell (vtkIdType cellId) |
virtual void | GetCell (vtkIdType cellId, vtkGenericCell *cell) |
virtual int | GetCellType (vtkIdType cellId) |
virtual void | GetPointCells (vtkIdType ptId, vtkIdList *cellIds) |
virtual vtkIdType | FindPoint (double x[3]) |
void | Initialize () |
virtual int | GetMaxCellSize () |
vtkDataSetAttributes * | GetLeafData () |
unsigned long | GetActualMemorySize () |
virtual void | SetSize (double, double, double) |
virtual void | SetSize (double[3]) |
virtual double * | GetSize () |
virtual void | GetSize (double &, double &, double &) |
virtual void | GetSize (double[3]) |
virtual void | SetOrigin (double, double, double) |
virtual void | SetOrigin (double[3]) |
virtual double * | GetOrigin () |
virtual void | GetOrigin (double &, double &, double &) |
virtual void | GetOrigin (double[3]) |
virtual void | GetCellPoints (vtkIdType cellId, vtkIdList *ptIds) |
virtual void | GetCellPoints (vtkIdType cellId, vtkIdType &npts, vtkIdType *&pts) |
virtual void | GetCellNeighbors (vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) |
virtual vtkIdType | FindCell (double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) |
virtual vtkIdType | FindCell (double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) |
void | ShallowCopy (vtkDataObject *src) |
void | DeepCopy (vtkDataObject *src) |
void | GetPointsOnFace (vtkHyperOctreeCursor *sibling, int face, int level, vtkHyperOctreePointsGrabber *grabber) |
void | GetPointsOnParentFaces (int faces[3], int level, vtkHyperOctreeCursor *cursor, vtkHyperOctreePointsGrabber *grabber) |
void | GetPointsOnEdge (vtkHyperOctreeCursor *sibling, int level, int axis, int k, int j, vtkHyperOctreePointsGrabber *grabber) |
void | GetPointsOnParentEdge (vtkHyperOctreeCursor *cursor, int level, int axis, int k, int j, vtkHyperOctreePointsGrabber *grabber) |
void | GetPointsOnEdge2D (vtkHyperOctreeCursor *sibling, int edge, int level, vtkHyperOctreePointsGrabber *grabber) |
void | GetPointsOnParentEdge2D (vtkHyperOctreeCursor *cursor, int edge, int level, vtkHyperOctreePointsGrabber *grabber) |
void | SetDualGridFlag (int flag) |
virtual int | GetDualGridFlag () |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | CopyAttributes (vtkDataSet *ds) |
virtual void | GetCellBounds (vtkIdType cellId, double bounds[6]) |
virtual void | GetCellTypes (vtkCellTypes *types) |
unsigned long int | GetMTime () |
vtkCellData * | GetCellData () |
vtkPointData * | GetPointData () |
virtual void | Squeeze () |
double * | GetBounds () |
void | GetBounds (double bounds[6]) |
double * | GetCenter () |
void | GetCenter (double center[3]) |
double | GetLength () |
void | Initialize () |
virtual void | GetScalarRange (double range[2]) |
double * | GetScalarRange () |
unsigned long | GetActualMemorySize () |
int | CheckAttributes () |
virtual void | GenerateGhostLevelArray () |
virtual vtkFieldData * | GetAttributesAsFieldData (int type) |
virtual vtkIdType | GetNumberOfElements (int type) |
vtkIdType | FindPoint (double x, double y, double z) |
virtual vtkCell * | FindAndGetCell (double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) |
int | GetDataObjectType () |
void | ShallowCopy (vtkDataObject *src) |
void | DeepCopy (vtkDataObject *src) |
Static Public Member Functions | |
static vtkInformationIntegerKey * | LEVELS () |
static vtkInformationIntegerKey * | DIMENSION () |
static vtkInformationDoubleVectorKey * | SIZES () |
static vtkHyperOctree * | New () |
static int | IsTypeOf (const char *type) |
static vtkHyperOctree * | SafeDownCast (vtkObject *o) |
static vtkHyperOctree * | GetData (vtkInformation *info) |
static vtkHyperOctree * | GetData (vtkInformationVector *v, int i=0) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkDataSet * | SafeDownCast (vtkObject *o) |
static vtkDataSet * | GetData (vtkInformation *info) |
static vtkDataSet * | GetData (vtkInformationVector *v, int i=0) |
Protected Attributes | |
int | Dimension |
double | Size [3] |
double | Origin [3] |
vtkHyperOctreeInternal * | CellTree |
vtkHyperOctreeCursor * | TmpChild |
vtkPoints * | LeafCenters |
vtkIdTypeArray * | CornerLeafIds |
vtkPoints * | CornerPoints |
vtkIdTypeArray * | LeafCornerIds |
int | NeighborhoodTraversalTable [216] |
vtkLine * | Line |
vtkPixel * | Pixel |
vtkVoxel * | Voxel |
vtkCellLinks * | Links |
int | DualGridFlag |
![]() | |
vtkCellData * | CellData |
vtkPointData * | PointData |
vtkTimeStamp | ComputeTime |
double | Bounds [6] |
double | Center [3] |
double | ScalarRange [2] |
vtkTimeStamp | ScalarRangeComputeTime |
Friends | |
class | vtkHyperOctreeLightWeightCursor |
A dataset structured as a tree where each node has exactly 2^n children.
An hyperoctree is a dataset where each node has either exactly 2^n children or no child at all if the node is a leaf. `n' is the dimension of the dataset (1 (binary tree), 2 (quadtree) or 3 (octree) ). The class name comes from the following paper:
@ARTICLE{yau-srihari-1983, author={Mann-May Yau and Sargur N. Srihari}, title={A Hierarchical Data Structure for Multidimensional Digital Images}, journal={Communications of the ACM}, month={July}, year={1983}, volume={26}, number={7}, pages={504--515} }
Each node is a cell. Attributes are associated with cells, not with points. The geometry is implicitly given by the size of the root node on each axis and position of the center and the orientation. (TODO: review center position and orientation). The geometry is then not limited to an hybercube but can have a rectangular shape. Attributes are associated with leaves. For LOD (Level-Of-Detail) purpose, attributes can be computed on none-leaf nodes by computing the average values from its children (which can be leaves or not).
By construction, an hyperoctree is efficient in memory usage when the geometry is sparse. The LOD feature allows to cull quickly part of the dataset.
A couple of filters can be applied on this dataset: contour, outline, geometry.
3D case (octree) for each node, each child index (from 0 to 7) is encoded in the following orientation. It is easy to access each child as a cell of a grid. Note also that the binary representation is relevant, each bit code a side: bit 0 encodes -x side (0) or +x side (1) bit 1 encodes -y side (0) or +y side (1) bit 2 encodes -z side (0) or +z side (2)
+y +-+-+ ^ |2|3| | +-+-+ O +z +-> +x |0|1| +-+-+
+y +-+-+ ^ |6|7| | +-+-+ O +z +-> +x |4|5| +-+-+
The cases with fewer dimensions are consistent with the octree case:
Quadtree: in counter-clockwise
3: +y +x edges
+y +-+-+ ^ |2|3| | +-+-+ O+-> +x |0|1| +-+-+
Binary tree:
+0+1+ O+-> +x
Definition at line 141 of file vtkHyperOctree.h.
typedef vtkDataSet vtkHyperOctree::Superclass |
Definition at line 149 of file vtkHyperOctree.h.
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
static |
|
virtual |
Reimplemented from vtkDataSet.
|
static |
|
virtual |
Reimplemented from vtkDataSet.
|
static |
void vtkHyperOctree::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
int vtkHyperOctree::GetDataObjectType | ( | ) |
Return what type of dataset this is.
|
virtual |
Copy the geometric and topological structure of an input rectilinear grid object.
Implements vtkDataSet.
int vtkHyperOctree::GetDimension | ( | ) |
Return the dimension of the tree (1D:binary tree(2 children), 2D:quadtree(4 children), 3D:octree (8 children))
void vtkHyperOctree::SetDimension | ( | int | dim | ) |
Set the dimension of the tree with `dim'. See GetDimension() for details.
|
virtual |
Return the number of cells in the dual grid.
Implements vtkDataSet.
vtkIdType vtkHyperOctree::GetNumberOfLeaves | ( | ) |
Get the number of leaves in the tree.
|
virtual |
Return the number of points in the dual grid.
Implements vtkDataSet.
vtkIdType vtkHyperOctree::GetMaxNumberOfPoints | ( | int | level | ) |
Return the number of points corresponding to an hyperoctree starting at level `level' where all the leaves at at the last level. In this case, the hyperoctree is like a uniform grid. So this number is the number of points of the uniform grid.
vtkIdType vtkHyperOctree::GetMaxNumberOfPointsOnBoundary | ( | int | level | ) |
Return the number of points corresponding to the boundary of an hyperoctree starting at level `level' where all the leaves at at the last level. In this case, the hyperoctree is like a uniform grid. So this number is the number of points of on the boundary of the uniform grid. For an octree, the boundary are the faces. For a quadtree, the boundary are the edges.
vtkIdType vtkHyperOctree::GetMaxNumberOfCellsOnBoundary | ( | int | level | ) |
Return the number of cells corresponding to the boundary of a cell of level `level' where all the leaves at at the last level.
vtkIdType vtkHyperOctree::GetNumberOfLevels | ( | ) |
Return the number of levels.
|
virtual |
Set the size on each axis.
|
virtual |
Set the size on each axis.
|
virtual |
Return the size on each axis.
|
virtual |
Return the size on each axis.
|
virtual |
Return the size on each axis.
|
virtual |
Set the origin (position of corner (0,0,0) of the root.
|
virtual |
Set the origin (position of corner (0,0,0) of the root.
|
virtual |
Set the origin (position of corner (0,0,0) of the root.
|
virtual |
Set the origin (position of corner (0,0,0) of the root.
|
virtual |
Set the origin (position of corner (0,0,0) of the root.
vtkHyperOctreeCursor* vtkHyperOctree::NewCellCursor | ( | ) |
Create a new cursor: an object that can traverse the cell of an hyperoctree.
void vtkHyperOctree::SubdivideLeaf | ( | vtkHyperOctreeCursor * | leaf | ) |
Subdivide node pointed by cursor, only if its a leaf. At the end, cursor points on the node that used to be leaf.
void vtkHyperOctree::CollapseTerminalNode | ( | vtkHyperOctreeCursor * | node | ) |
Collapse a node for which all children are leaves. At the end, cursor points on the leaf that used to be a node.
|
virtual |
Get point coordinates with ptId such that: 0 <= ptId < NumberOfPoints. THIS METHOD IS NOT THREAD SAFE.
Implements vtkDataSet.
|
virtual |
Copy point coordinates into user provided array x[3] for specified point id. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Reimplemented from vtkDataSet.
|
virtual |
Get cell with cellId such that: 0 <= cellId < NumberOfCells. THIS METHOD IS NOT THREAD SAFE.
Implements vtkDataSet.
|
virtual |
Get cell with cellId such that: 0 <= cellId < NumberOfCells. This is a thread-safe alternative to the previous GetCell() method. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Implements vtkDataSet.
|
virtual |
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Implements vtkDataSet.
Topological inquiry to get points defining cell. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Implements vtkDataSet.
|
virtual |
Topological inquiry to get points defining cell. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Topological inquiry to get cells using point. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Implements vtkDataSet.
|
virtual |
Topological inquiry to get all cells using list of points exclusive of cell specified (e.g., cellId). Note that the list consists of only cells that use ALL the points provided. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Reimplemented from vtkDataSet.
|
virtual |
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.) THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Implements vtkDataSet.
|
virtual |
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. THIS METHOD IS NOT THREAD SAFE.
Implements vtkDataSet.
|
virtual |
This is a version of the above method that can be used with multithreaded applications. A vtkGenericCell must be passed in to be used in internal calls that might be made to GetCell() THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
Implements vtkDataSet.
void vtkHyperOctree::Initialize | ( | ) |
Restore data object to initial state, THIS METHOD IS NOT THREAD SAFE.
|
virtual |
Convenience method returns largest cell size in dataset. This is generally used to allocate memory for supporting data structures. This is the number of points of a cell. THIS METHOD IS THREAD SAFE
Implements vtkDataSet.
void vtkHyperOctree::ShallowCopy | ( | vtkDataObject * | src | ) |
Shallow and Deep copy.
void vtkHyperOctree::DeepCopy | ( | vtkDataObject * | src | ) |
Shallow and Deep copy.
void vtkHyperOctree::GetPointsOnFace | ( | vtkHyperOctreeCursor * | sibling, |
int | face, | ||
int | level, | ||
vtkHyperOctreePointsGrabber * | grabber | ||
) |
Get the points of node `sibling' on its face `face'.
void vtkHyperOctree::GetPointsOnParentFaces | ( | int | faces[3], |
int | level, | ||
vtkHyperOctreeCursor * | cursor, | ||
vtkHyperOctreePointsGrabber * | grabber | ||
) |
Get the points of the parent node of `cursor' on its faces `faces' at level `level' or deeper.
void vtkHyperOctree::GetPointsOnEdge | ( | vtkHyperOctreeCursor * | sibling, |
int | level, | ||
int | axis, | ||
int | k, | ||
int | j, | ||
vtkHyperOctreePointsGrabber * | grabber | ||
) |
Get the points of node `sibling' on its edge `axis','k','j'. If axis==0, the edge is X-aligned and k gives the z coordinate and j the y-coordinate. If axis==1, the edge is Y-aligned and k gives the x coordinate and j the z coordinate. If axis==2, the edge is Z-aligned and k gives the y coordinate and j the x coordinate.
void vtkHyperOctree::GetPointsOnParentEdge | ( | vtkHyperOctreeCursor * | cursor, |
int | level, | ||
int | axis, | ||
int | k, | ||
int | j, | ||
vtkHyperOctreePointsGrabber * | grabber | ||
) |
Get the points of the parent node of `cursor' on its edge `axis','k','j' at level `level' or deeper. If axis==0, the edge is X-aligned and k gives the z coordinate and j the y-coordinate. If axis==1, the edge is Y-aligned and k gives the x coordinate and j the z coordinate. If axis==2, the edge is Z-aligned and k gives the y coordinate and j the x coordinate.
void vtkHyperOctree::GetPointsOnEdge2D | ( | vtkHyperOctreeCursor * | sibling, |
int | edge, | ||
int | level, | ||
vtkHyperOctreePointsGrabber * | grabber | ||
) |
Get the points of node `sibling' on its edge `edge'.
void vtkHyperOctree::GetPointsOnParentEdge2D | ( | vtkHyperOctreeCursor * | cursor, |
int | edge, | ||
int | level, | ||
vtkHyperOctreePointsGrabber * | grabber | ||
) |
Get the points of the parent node of `cursor' on its edge `edge' at level `level' or deeper. (edge=0 for -X, 1 for +X, 2 for -Y, 3 for +Y)
vtkDataSetAttributes* vtkHyperOctree::GetLeafData | ( | ) |
A generic way to set the leaf data attributes. This can be either point data for dual or cell data for normal grid.
void vtkHyperOctree::SetDualGridFlag | ( | int | flag | ) |
Switch between returning leaves as cells, or the dual grid.
|
virtual |
Switch between returning leaves as cells, or the dual grid.
unsigned long vtkHyperOctree::GetActualMemorySize | ( | ) |
Return the actual size of the data in kilobytes. This number is valid only after the pipeline has updated. The memory size returned is guaranteed to be greater than or equal to the memory required to represent the data (e.g., extra space in arrays, etc. are not included in the return value). THIS METHOD IS THREAD SAFE.
|
static |
Retrieve an instance of this class from an information object.
|
static |
Retrieve an instance of this class from an information object.
|
protectedvirtual |
Compute the data bounding box from data points. THIS METHOD IS NOT THREAD SAFE.
Reimplemented from vtkDataSet.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
friend |
Definition at line 480 of file vtkHyperOctree.h.
|
protected |
Definition at line 470 of file vtkHyperOctree.h.
|
protected |
Definition at line 472 of file vtkHyperOctree.h.
|
protected |
Definition at line 473 of file vtkHyperOctree.h.
|
protected |
Definition at line 475 of file vtkHyperOctree.h.
|
protected |
Definition at line 477 of file vtkHyperOctree.h.
|
protected |
Definition at line 487 of file vtkHyperOctree.h.
|
protected |
Definition at line 488 of file vtkHyperOctree.h.
|
protected |
Definition at line 493 of file vtkHyperOctree.h.
|
protected |
Definition at line 494 of file vtkHyperOctree.h.
|
protected |
Definition at line 513 of file vtkHyperOctree.h.
|
protected |
Definition at line 518 of file vtkHyperOctree.h.
|
protected |
Definition at line 519 of file vtkHyperOctree.h.
|
protected |
Definition at line 520 of file vtkHyperOctree.h.
|
protected |
Definition at line 522 of file vtkHyperOctree.h.
|
protected |
Definition at line 531 of file vtkHyperOctree.h.