|
virtual vtkTypeBool | IsA (const char *type) |
| Return 1 if this class is the same type of (or a subclass of) the named class. More...
|
|
vtkHyperTree * | NewInstance () const |
|
void | PrintSelf (ostream &, vtkIndent) override |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
void | Initialize (unsigned char, unsigned char, unsigned char) |
| Restore the initial state: only one vertice is then a leaf: the root cell for the hypertree. More...
|
|
virtual void | InitializeForReader (vtkIdType numberOfLevels, vtkIdType nbVertices, vtkIdType nbVerticesOfLastLevel, vtkBitArray *isParent, vtkBitArray *isMasked, vtkBitArray *outIsMasked)=0 |
| Restore a state from read data, without using a cursor Call after create hypertree with initialize. More...
|
|
virtual void | GetByLevelForWriter (vtkBitArray *inIsMasked, vtkTypeInt64Array *nbVerticesbyLevel, vtkBitArray *isParent, vtkBitArray *isMasked, vtkIdList *ids)=0 |
| Initialize a state from write data. More...
|
|
void | CopyStructure (vtkHyperTree *ht) |
| Copy the structure by sharing the decomposition description of the tree. More...
|
|
virtual vtkHyperTree * | Freeze (const char *mode)=0 |
| Return a freeze instance (a priori compact but potentially unmodifiable). More...
|
|
void | SetTreeIndex (vtkIdType treeIndex) |
| Set/Get tree index in hypertree grid. More...
|
|
vtkIdType | GetTreeIndex () const |
|
unsigned int | GetNumberOfLevels () const |
| Return the number of levels. More...
|
|
vtkIdType | GetNumberOfVertices () const |
| Return the number of all vertices (coarse and fine) in the tree. More...
|
|
vtkIdType | GetNumberOfNodes () const |
| Return the number of nodes (coarse) in the tree. More...
|
|
vtkIdType | GetNumberOfLeaves () const |
| Return the number of leaf (fine) in the tree. More...
|
|
int | GetBranchFactor () const |
| Return the branch factor of the tree. More...
|
|
int | GetDimension () const |
| Return the spatial dimension of the tree. More...
|
|
vtkIdType | GetNumberOfChildren () const |
| Return the number of children per node of the tree. More...
|
|
void | GetScale (double s[3]) const |
| Set/Get scale of the tree in each direction for the ground level (0). More...
|
|
double | GetScale (unsigned int d) const |
|
std::shared_ptr< vtkHyperTreeGridScales > | InitializeScales (const double *scales, bool reinitialize=false) const |
| In an hypertree, all cells are the same size by level. More...
|
|
virtual unsigned long | GetActualMemorySizeBytes ()=0 |
| Return memory used in bytes. More...
|
|
unsigned int | GetActualMemorySize () |
| Return memory used in kibibytes (1024 bytes). More...
|
|
virtual bool | IsGlobalIndexImplicit ()=0 |
| Return if implicit global index maping has been used. More...
|
|
virtual void | SetGlobalIndexStart (vtkIdType start)=0 |
| Set the start implicit global index mapping for the first cell in the current tree. More...
|
|
vtkIdType | GetGlobalIndexStart () const |
| Get the start global index for the current tree for implicit global index mapping. More...
|
|
virtual void | SetGlobalIndexFromLocal (vtkIdType index, vtkIdType global)=0 |
| Set the mapping between a node index in tree and a explicit global index mapping. More...
|
|
virtual vtkIdType | GetGlobalIndexFromLocal (vtkIdType index) const =0 |
| Get the global id of a local node identified by index. More...
|
|
virtual vtkIdType | GetGlobalNodeIndexMax () const =0 |
| Return the maximum value reached by global index mapping (implicit or explicit). More...
|
|
virtual bool | IsLeaf (vtkIdType index) const =0 |
| Return if a vertice identified by index in tree as being leaf. More...
|
|
virtual void | SubdivideLeaf (vtkIdType index, unsigned int level)=0 |
| Subdivide a vertice, only if its a leaf. More...
|
|
virtual bool | IsTerminalNode (vtkIdType index) const =0 |
| Return if a vertice identified by index in tree as a terminal node. More...
|
|
virtual vtkIdType | GetElderChildIndex (unsigned int index_parent) const =0 |
| Return the elder child index, local index node of first child, of node, coarse cell, identified by index_parent. More...
|
|
virtual const unsigned int * | GetElderChildIndexArray (size_t &nbElements) const =0 |
| Return the elder child index array, internals of the tree structure Should be used with great care, for consulting and not modifying. More...
|
|
void | SetScales (std::shared_ptr< vtkHyperTreeGridScales > scales) const |
| In an hypertree, all cells are the same size by level. More...
|
|
bool | HasScales () const |
| Return the existence scales. More...
|
|
std::shared_ptr< vtkHyperTreeGridScales > | GetScales () const |
| Return all scales. More...
|
|
| vtkBaseTypeMacro (vtkObject, vtkObjectBase) |
|
virtual void | DebugOn () |
| Turn debugging output on. More...
|
|
virtual void | DebugOff () |
| Turn debugging output off. More...
|
|
bool | GetDebug () |
| Get the value of the debug flag. More...
|
|
void | SetDebug (bool debugFlag) |
| Set the value of the debug flag. More...
|
|
virtual void | Modified () |
| Update the modification time for this object. More...
|
|
virtual vtkMTimeType | GetMTime () |
| Return this object's modified time. More...
|
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
|
vtkCommand * | GetCommand (unsigned long tag) |
|
void | RemoveObserver (vtkCommand *) |
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
|
void | RemoveObservers (const char *event, vtkCommand *) |
|
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
|
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
|
void | RemoveObserver (unsigned long tag) |
|
void | RemoveObservers (unsigned long event) |
|
void | RemoveObservers (const char *event) |
|
void | RemoveAllObservers () |
|
vtkTypeBool | HasObserver (unsigned long event) |
|
vtkTypeBool | HasObserver (const char *event) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| Allow user to set the AbortFlagOn() with the return value of the callback method. More...
|
|
int | InvokeEvent (unsigned long event, void *callData) |
| This method invokes an event and return whether the event was aborted or not. More...
|
|
int | InvokeEvent (const char *event, void *callData) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
const char * | GetClassName () const |
| Return the class name as a string. More...
|
|
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
| Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
|
|
virtual void | Delete () |
| Delete a VTK object. More...
|
|
virtual void | FastDelete () |
| Delete a reference to this object. More...
|
|
void | InitializeObjectBase () |
|
void | Print (ostream &os) |
| Print an object to an ostream. More...
|
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
|
virtual void | Register (vtkObjectBase *o) |
| Increase the reference count (mark as used by another object). More...
|
|
virtual void | UnRegister (vtkObjectBase *o) |
| Decrease the reference count (release by another object). More...
|
|
int | GetReferenceCount () |
| Return the current reference count of this object. More...
|
|
void | SetReferenceCount (int) |
| Sets the reference count. More...
|
|
bool | GetIsInMemkind () const |
| A local state flag that remembers whether this object lives in the normal or extended memory space. More...
|
|
A data object structured as a tree.
An hypertree grid is a dataobject containing a rectilinear grid of elements that can be either null or a hypertree. An hypertree is a dataobject describing a decomposition tree. A VERTICE is an element of this tree. A NODE, also called COARSE cell, is a specific vertice which is refined and than has either exactly f^d children, where f in {2,3} is the branching factor, the same value for all trees in this hypertree grid, and d in {1,2,3} is the spatial dimension. It is called coarse because there are smaller child cells. A LEAF, also called FINE cell, is a vertice without children, not refined. It is called fine because in the same space there are no finer cells. In a tree, we can find coarse cells smaller than fine cell but not in the same space.
Such trees have particular names for f=2:
- bintree (d=1),
- quadtree (d=2),
- octree (d=3).
The original octree class name came 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}
* }
*
Attributes are associated with (all) cells, not with points. The attributes that are associated with coarses, it's used for LoD (Level-of-Detail). The attributes on coarse cells can be given by the code or/and computed by the use of a specifc filter exploiting the values from its children (which can be leaves or not).
The geometry is implicitly given by the size of the root node on each axis and position of the origin. In fact, in 3D, the geometry is then not limited to a cube but can have a rectangular shape.
By construction, an hypertree is efficient in memory usage. The LoD feature allows for quick culling of part of the dataobject.
This is an abstract class used as a superclass by a custom templated compact class. Other versions of this code could be made available to meet other needs without questioning cursors and filters. All methods are pure virtual. This is done to hide templates.
- Case octree with f=2, d=3:
- For each node (coarse cell), 8 children are encoded in a child index (from 0 to 7) in the following orientation described in hypertree grid. It is easy to access each child as a cell of a grid. Note also that the binary representation is relevant, each bit codes 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 (1) -z side is first, in counter-clockwise order: 0: -y -x sides 1: -y +x sides 2: +y -x sides 3: +y +x sides +z side is last, in counter-clockwise order: 4: -y -x sides 5: -y +x sides 6: +y -x sides 7: +y +x sides
* +y
* +-+-+ ^
* |2|3| |
* +-+-+ O +z +-> +x
* |0|1|
* +-+-+
* +y
* +-+-+ ^
* |6|7| |
* +-+-+ 1 +z +-> +x
* |4|5|
* +-+-+
*
- Case quadtree with f=2, d=2:
- Just use 2 bits.
* +y
* +-+-+ ^
* |2|3| |
* +-+-+ +-> +x
* |0|1|
* +-+-+
*
- Case bintree with f=2, d=1:
- Just use 1 bits.
* O+-> +x
*
It's more difficult with f=3.
- Thanks:
- This class was written by Philippe Pebay, Joachim Pouderoux, and Charles Law, Kitware 2013 This class was modified by Guenole Harel and Jacques-Bernard Lekien 2014 This class was modified by Philippe Pebay, 2016 Among others, this class was simplified, optimized (memory), documented and completed for to improve IO XML by Jacques-Bernard Lekien 2018-19 This work was supported by Commissariat a l'Energie Atomique CEA, DAM, DIF, F-91297 Arpajon, France.
Definition at line 176 of file vtkHyperTree.h.