creates a vtkPKdTree using the partitioning information provided by a vtkExtentTranslator.
More...
Inherits vtkObject.
|
| vtkKdTreeGenerator () |
|
| ~vtkKdTreeGenerator () |
|
void | FormRegions () |
| Obtains information from the extent translator about the partitioning of the input dataset among processes. More...
|
|
int | FormTree (vtkKdNode *parent, vtkKdTreeGeneratorVector ®ions_ids) |
|
int | CanPartition (int division_point, int dimension, vtkKdTreeGeneratorVector &ids, vtkKdTreeGeneratorVector &left, vtkKdTreeGeneratorVector &right) |
|
bool | ConvertToBounds (vtkKdNode *node) |
|
|
void | SetExtentTranslator (vtkExtentTranslator *) |
| Get/Set the extent translator. More...
|
|
virtual vtkExtentTranslator * | GetExtentTranslator () |
| Get/Set the extent translator. More...
|
|
|
virtual void | SetWholeExtent (int, int, int, int, int, int) |
| Get/Set the whole extent of the data. More...
|
|
virtual void | SetWholeExtent (int [6]) |
| Get/Set the whole extent of the data. More...
|
|
virtual int * | GetWholeExtent () |
| Get/Set the whole extent of the data. More...
|
|
virtual void | GetWholeExtent (int &, int &, int &, int &, int &, int &) |
| Get/Set the whole extent of the data. More...
|
|
virtual void | GetWholeExtent (int [6]) |
| Get/Set the whole extent of the data. More...
|
|
|
virtual void | SetOrigin (double, double, double) |
|
virtual void | SetOrigin (double [3]) |
|
virtual void | SetSpacing (double, double, double) |
|
virtual void | SetSpacing (double [3]) |
|
creates a vtkPKdTree using the partitioning information provided by a vtkExtentTranslator.
generates the KdTree
vtkKdTreeGenerator is used to generate a KdTree using the partitioning information garnered from a vtkExtentTranslator (or subclass). Since we need spatial bounds for the KdTree, we assume that structured data corresponding to the vtkExtentTranslator is an ImageData with the provided spacing and origin. The algorithm used can be summarized as under:
- Inputs: * Extent Translator, * Number of Pieces
- Determine the bounds for every piece/region using the extent translator.
- Given a set of pieces (number of pieces > 1), we iteratively determine the plane along which the the pieces can be split into two non-intersecting non-empty groups.
- If number of pieces in a set of regions = 1, then we create a leaf node representing that region.
- If number of pieces > 1, a new non-leaf node is creates with children as the subtree generated by repeating the same process on the two non-intersecting, non-empty groups of pieces.
vtkKdTreeGenerator also needs to determine the assignment of regions to the processors. Since vtkPKdTree assigns Ids to the leaf nodes in inorder, we can determine the assignment by assigning temporary ids to all leaf nodes indication the piece number they represent and simply traversing the tree in inorder, and recording only the leaf IDs.
Definition at line 59 of file vtkKdTreeGenerator.h.