vtkHyperOctree

Section: Visualization Toolkit Filtering Classes

Usage

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:

\verbatim @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} } \endverbatim

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) - the -z side first - 0: -y -x sides - 1: -y +x sides - 2: +y -x sides - 3: +y +x sides \verbatim +y +-+-+ ^ |2|3| | +-+-+ O +z +-> +x |0|1| +-+-+ \endverbatim

- then the +z side, in counter-clockwise - 4: -y -x sides - 5: -y +x sides - 6: +y -x sides - 7: +y +x sides \verbatim +y +-+-+ ^ |6|7| | +-+-+ O +z +-> +x |4|5| +-+-+ \endverbatim

The cases with fewer dimensions are consistent with the octree case:

* Quadtree: in counter-clockwise - 0: -y -x edges - 1: -y +x edges - 2: +y -x edges - 3: +y +x edges \verbatim +y +-+-+ ^ |2|3| | +-+-+ O+-> +x |0|1| +-+-+ \endverbatim

* Binary tree: \verbatim +0+1+ O+-> +x \endverbatim

To create an instance of class vtkHyperOctree, simply invoke its constructor as follows

  obj = vtkHyperOctree

Methods

The class vtkHyperOctree has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkHyperOctree class.