VTK
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
vtkPKdTree Class Reference

Build a k-d tree decomposition of a list of points. More...

#include <vtkPKdTree.h>

Inheritance diagram for vtkPKdTree:
[legend]
Collaboration diagram for vtkPKdTree:
[legend]

Public Types

typedef vtkKdTree Superclass
 
- Public Types inherited from vtkKdTree
typedef vtkLocator Superclass
 
- Public Types inherited from vtkLocator
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkPKdTreeNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void PrintTiming (ostream &os, vtkIndent indent)
 
void PrintTables (ostream &os, vtkIndent indent)
 
void BuildLocator ()
 
vtkIdType GetTotalNumberOfCells ()
 
int CreateProcessCellCountData ()
 
int CreateGlobalDataArrayBounds ()
 
int AssignRegions (int *map, int numRegions)
 
int AssignRegionsRoundRobin ()
 
int AssignRegionsContiguous ()
 
int GetRegionAssignmentList (int procId, vtkIntArray *list)
 
int GetProcessAssignedToRegion (int regionId)
 
int HasData (int processId, int regionId)
 
int GetProcessCellCountForRegion (int processId, int regionId)
 
int GetTotalProcessesInRegion (int regionId)
 
int GetProcessListForRegion (int regionId, vtkIntArray *processes)
 
int GetProcessesCellCountForRegion (int regionId, int *count, int len)
 
int GetTotalRegionsForProcess (int processId)
 
int GetRegionListForProcess (int processId, vtkIntArray *regions)
 
int GetRegionsCellCountForProcess (int ProcessId, int *count, int len)
 
int GetCellArrayGlobalRange (const char *name, float range[2])
 
int GetPointArrayGlobalRange (const char *name, float range[2])
 
int GetCellArrayGlobalRange (const char *name, double range[2])
 
int GetPointArrayGlobalRange (const char *name, double range[2])
 
int GetCellArrayGlobalRange (int arrayIndex, double range[2])
 
int GetPointArrayGlobalRange (int arrayIndex, double range[2])
 
int GetCellArrayGlobalRange (int arrayIndex, float range[2])
 
int GetPointArrayGlobalRange (int arrayIndex, float range[2])
 
void SetController (vtkMultiProcessController *c)
 
virtual vtkMultiProcessControllerGetController ()
 
virtual int GetRegionAssignment ()
 
const intGetRegionAssignmentMap ()
 
virtual int GetRegionAssignmentMapLength ()
 
void GetAllProcessesBorderingOnPoint (float x, float y, float z, vtkIntArray *list)
 
vtkIdType GetCellListsForProcessRegions (int ProcessId, int set, vtkIdList *inRegionCells, vtkIdList *onBoundaryCells)
 
vtkIdType GetCellListsForProcessRegions (int ProcessId, vtkDataSet *set, vtkIdList *inRegionCells, vtkIdList *onBoundaryCells)
 
vtkIdType GetCellListsForProcessRegions (int ProcessId, vtkIdList *inRegionCells, vtkIdList *onBoundaryCells)
 
int ViewOrderAllProcessesInDirection (const double directionOfProjection[3], vtkIntArray *orderedList)
 
int ViewOrderAllProcessesFromPosition (const double cameraPosition[3], vtkIntArray *orderedList)
 
- Public Member Functions inherited from vtkKdTree
vtkKdTreeNewInstance () const
 
virtual int GetNumberOfRegionsOrLess ()
 
virtual void SetNumberOfRegionsOrLess (int)
 
virtual int GetNumberOfRegionsOrMore ()
 
virtual void SetNumberOfRegionsOrMore (int)
 
virtual double GetFudgeFactor ()
 
virtual void SetFudgeFactor (double)
 
virtual vtkBSPCutsGetCuts ()
 
void SetCuts (vtkBSPCuts *cuts)
 
void OmitXPartitioning ()
 
void OmitYPartitioning ()
 
void OmitZPartitioning ()
 
void OmitXYPartitioning ()
 
void OmitYZPartitioning ()
 
void OmitZXPartitioning ()
 
void OmitNoPartitioning ()
 
virtual void SetDataSet (vtkDataSet *set)
 
virtual void AddDataSet (vtkDataSet *set)
 
int GetNumberOfDataSets ()
 
vtkDataSetGetDataSet (int n)
 
vtkDataSetGetDataSet ()
 
int GetDataSetIndex (vtkDataSet *set)
 
void GetBounds (double *bounds)
 
void SetNewBounds (double *bounds)
 
void GetRegionBounds (int regionID, double bounds[6])
 
void GetRegionDataBounds (int regionID, double bounds[6])
 
void PrintRegion (int id)
 
void CreateCellLists (int dataSetIndex, int *regionReqList, int reqListSize)
 
void CreateCellLists (vtkDataSet *set, int *regionReqList, int reqListSize)
 
void CreateCellLists (int *regionReqList, int listSize)
 
void CreateCellLists ()
 
void DeleteCellLists ()
 
vtkIdListGetCellList (int regionID)
 
vtkIdListGetBoundaryCellList (int regionID)
 
intAllGetRegionContainingCell ()
 
int GetRegionContainingPoint (double x, double y, double z)
 
int MinimalNumberOfConvexSubRegions (vtkIntArray *regionIdList, double **convexRegionBounds)
 
vtkIdTypeArrayBuildMapForDuplicatePoints (float tolerance)
 
void FindPointsWithinRadius (double R, const double x[3], vtkIdList *result)
 
void FindClosestNPoints (int N, const double x[3], vtkIdList *result)
 
vtkIdTypeArrayGetPointsInRegion (int regionId)
 
void FreeSearchStructure ()
 
void GenerateRepresentation (int level, vtkPolyData *pd)
 
void GenerateRepresentation (int *regionList, int len, vtkPolyData *pd)
 
virtual int NewGeometry ()
 
virtual int NewGeometry (vtkDataSet **sets, int numDataSets)
 
virtual void InvalidateGeometry ()
 
void FindPointsInArea (double *area, vtkIdTypeArray *ids, bool clearArray=true)
 
virtual void TimingOn ()
 
virtual void TimingOff ()
 
virtual void SetTiming (int)
 
virtual int GetTiming ()
 
virtual void SetMinCells (int)
 
virtual int GetMinCells ()
 
virtual void RemoveDataSet (int index)
 
virtual void RemoveDataSet (vtkDataSet *set)
 
virtual void RemoveAllDataSets ()
 
virtual vtkDataSetCollectionGetDataSets ()
 
virtual int GetNumberOfRegions ()
 
void PrintTree ()
 
void PrintVerboseTree ()
 
virtual void SetIncludeRegionBoundaryCells (int)
 
virtual int GetIncludeRegionBoundaryCells ()
 
virtual void IncludeRegionBoundaryCellsOn ()
 
virtual void IncludeRegionBoundaryCellsOff ()
 
vtkIdType GetCellLists (vtkIntArray *regions, int set, vtkIdList *inRegionCells, vtkIdList *onBoundaryCells)
 
vtkIdType GetCellLists (vtkIntArray *regions, vtkDataSet *set, vtkIdList *inRegionCells, vtkIdList *onBoundaryCells)
 
vtkIdType GetCellLists (vtkIntArray *regions, vtkIdList *inRegionCells, vtkIdList *onBoundaryCells)
 
int GetRegionContainingCell (vtkDataSet *set, vtkIdType cellID)
 
int GetRegionContainingCell (int set, vtkIdType cellID)
 
int GetRegionContainingCell (vtkIdType cellID)
 
int ViewOrderAllRegionsInDirection (const double directionOfProjection[3], vtkIntArray *orderedList)
 
int ViewOrderRegionsInDirection (vtkIntArray *regionIds, const double directionOfProjection[3], vtkIntArray *orderedList)
 
int ViewOrderAllRegionsFromPosition (const double directionOfProjection[3], vtkIntArray *orderedList)
 
int ViewOrderRegionsFromPosition (vtkIntArray *regionIds, const double directionOfProjection[3], vtkIntArray *orderedList)
 
void BuildLocatorFromPoints (vtkPointSet *pointset)
 
void BuildLocatorFromPoints (vtkPoints *ptArray)
 
void BuildLocatorFromPoints (vtkPoints **ptArray, int numPtArrays)
 
vtkIdType FindPoint (double *x)
 
vtkIdType FindPoint (double x, double y, double z)
 
vtkIdType FindClosestPoint (double *x, double &dist2)
 
vtkIdType FindClosestPoint (double x, double y, double z, double &dist2)
 
vtkIdType FindClosestPointWithinRadius (double radius, const double x[3], double &dist2)
 
vtkIdType FindClosestPointInRegion (int regionId, double *x, double &dist2)
 
vtkIdType FindClosestPointInRegion (int regionId, double x, double y, double z, double &dist2)
 
virtual void GenerateRepresentationUsingDataBoundsOn ()
 
virtual void GenerateRepresentationUsingDataBoundsOff ()
 
virtual void SetGenerateRepresentationUsingDataBounds (int)
 
virtual int GetGenerateRepresentationUsingDataBounds ()
 
- Public Member Functions inherited from vtkLocator
vtkLocatorNewInstance () const
 
virtual void Update ()
 
virtual void Initialize ()
 
virtual void SetMaxLevel (int)
 
virtual int GetMaxLevel ()
 
virtual int GetLevel ()
 
virtual void SetAutomatic (int)
 
virtual int GetAutomatic ()
 
virtual void AutomaticOn ()
 
virtual void AutomaticOff ()
 
virtual void SetTolerance (double)
 
virtual double GetTolerance ()
 
virtual unsigned long GetBuildTime ()
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
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)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPKdTreeSafeDownCast (vtkObjectBase *o)
 
static vtkPKdTreeNew ()
 
- Static Public Member Functions inherited from vtkKdTree
static int IsTypeOf (const char *type)
 
static vtkKdTreeSafeDownCast (vtkObjectBase *o)
 
static vtkKdTreeNew ()
 
static vtkKdNodeCopyTree (vtkKdNode *kd)
 
- Static Public Member Functions inherited from vtkLocator
static int IsTypeOf (const char *type)
 
static vtkLocatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Static Public Attributes

static const int NoRegionAssignment
 
static const int ContiguousAssignment
 
static const int UserDefinedAssignment
 
static const int RoundRobinAssignment
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkPKdTree ()
 
 ~vtkPKdTree ()
 
void SingleProcessBuildLocator ()
 
int MultiProcessBuildLocator (double *bounds)
 
- Protected Member Functions inherited from vtkKdTree
 vtkKdTree ()
 
 ~vtkKdTree ()
 
void SetCalculator (vtkKdNode *kd)
 
int ProcessUserDefinedCuts (double *bounds)
 
void SetCuts (vtkBSPCuts *cuts, int userDefined)
 
void UpdateBuildTime ()
 
int DivideTest (int numberOfPoints, int level)
 
void BuildRegionList ()
 
virtual int SelectCutDirection (vtkKdNode *kd)
 
void SetActualLevel ()
 
void GetRegionsAtLevel (int level, vtkKdNode **nodes)
 
int GetNumberOfCells ()
 
int GetDataSetsNumberOfCells (int set1, int set2)
 
void ComputeCellCenter (vtkDataSet *set, int cellId, float *center)
 
void ComputeCellCenter (vtkDataSet *set, int cellId, double *center)
 
floatComputeCellCenters ()
 
floatComputeCellCenters (int set)
 
floatComputeCellCenters (vtkDataSet *set)
 
void UpdateProgress (double amount)
 
void UpdateSubOperationProgress (double amount)
 
void FindPointsWithinRadius (vtkKdNode *node, double R2, const double x[3], vtkIdList *ids)
 
void AddAllPointsInRegion (vtkKdNode *node, vtkIdList *ids)
 
void FindPointsInArea (vtkKdNode *node, double *area, vtkIdTypeArray *ids)
 
void AddAllPointsInRegion (vtkKdNode *node, vtkIdTypeArray *ids)
 
int DivideRegion (vtkKdNode *kd, float *c1, int *ids, int nlevels)
 
void DoMedianFind (vtkKdNode *kd, float *c1, int *ids, int d1, int d2, int d3)
 
void SelfRegister (vtkKdNode *kd)
 
void InitializeCellLists ()
 
vtkIdListGetList (int regionId, vtkIdList **which)
 
void ComputeCellCenter (vtkCell *cell, double *center, double *weights)
 
void GenerateRepresentationDataBounds (int level, vtkPolyData *pd)
 
void _generateRepresentationDataBounds (vtkKdNode *kd, vtkPoints *pts, vtkCellArray *polys, int level)
 
void GenerateRepresentationWholeSpace (int level, vtkPolyData *pd)
 
void _generateRepresentationWholeSpace (vtkKdNode *kd, vtkPoints *pts, vtkCellArray *polys, int level)
 
void AddPolys (vtkKdNode *kd, vtkPoints *pts, vtkCellArray *polys)
 
void _printTree (int verbose)
 
int SearchNeighborsForDuplicate (int regionId, float *point, int **pointsSoFar, int *len, float tolerance, float tolerance2)
 
int SearchRegionForDuplicate (float *point, int *pointsSoFar, int len, float tolerance2)
 
int _FindClosestPointInRegion (int regionId, double x, double y, double z, double &dist2)
 
int FindClosestPointInSphere (double x, double y, double z, double radius, int skipRegion, double &dist2)
 
int _ViewOrderRegionsInDirection (vtkIntArray *IdsOfInterest, const double dop[3], vtkIntArray *orderedList)
 
int _ViewOrderRegionsFromPosition (vtkIntArray *IdsOfInterest, const double pos[3], vtkIntArray *orderedList)
 
void NewParitioningRequest (int req)
 
void SetInputDataInfo (int i, int dims[3], double origin[3], double spacing[3])
 
int CheckInputDataInfo (int i, int dims[3], double origin[3], double spacing[3])
 
void ClearLastBuildCache ()
 
void NewPartitioningRequest (int req)
 
 vtkKdTree (const vtkKdTree &)
 
void operator= (const vtkKdTree &)
 
virtual void SetProgress (double)
 
virtual double GetProgress ()
 
- Protected Member Functions inherited from vtkLocator
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkLocator ()
 
 ~vtkLocator ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Protected Types inherited from vtkKdTree
enum  { XDIM = 0, YDIM = 1, ZDIM = 2 }
 
- Static Protected Member Functions inherited from vtkKdTree
static void DeleteAllDescendants (vtkKdNode *nd)
 
static void GetLeafNodeIds (vtkKdNode *node, vtkIntArray *ids)
 
static void _SetNewBounds (vtkKdNode *kd, double *b, int *fixDim)
 
static void CopyChildNodes (vtkKdNode *to, vtkKdNode *from)
 
static void CopyKdNode (vtkKdNode *to, vtkKdNode *from)
 
static void SetDataBoundsToSpatialBounds (vtkKdNode *kd)
 
static void ZeroNumberOfPoints (vtkKdNode *kd)
 
static int __ViewOrderRegionsInDirection (vtkKdNode *node, vtkIntArray *list, vtkIntArray *IdsOfInterest, const double dir[3], int nextId)
 
static int __ViewOrderRegionsFromPosition (vtkKdNode *node, vtkIntArray *list, vtkIntArray *IdsOfInterest, const double pos[3], int nextId)
 
static int __ConvexSubRegions (int *ids, int len, vtkKdNode *tree, vtkKdNode **nodes)
 
static int FoundId (vtkIntArray *idArray, int id)
 
static void __printTree (vtkKdNode *kd, int depth, int verbose)
 
static int MidValue (int dim, float *c1, int nvals, double &coord)
 
static int Select (int dim, float *c1, int *ids, int nvals, double &coord)
 
static float FindMaxLeftHalf (int dim, float *c1, int K)
 
static void _Select (int dim, float *X, int *ids, int L, int R, int K)
 
static int ComputeLevel (vtkKdNode *kd)
 
static int SelfOrder (int id, vtkKdNode *kd)
 
static int findRegion (vtkKdNode *node, float x, float y, float z)
 
static int findRegion (vtkKdNode *node, double x, double y, double z)
 
static vtkKdNode ** _GetRegionsAtLevel (int level, vtkKdNode **nodes, vtkKdNode *kd)
 
static void AddNewRegions (vtkKdNode *kd, float *c1, int midpt, int dim, double coord)
 
- Protected Attributes inherited from vtkKdTree
vtkBSPIntersectionsBSPCalculator
 
int UserDefinedCuts
 
int ValidDirections
 
vtkKdNodeTop
 
vtkKdNode ** RegionList
 
vtkTimerLogTimerLog
 
vtkDataSetCollectionDataSets
 
double ProgressScale
 
double ProgressOffset
 
int NumberOfRegionsOrLess
 
int NumberOfRegionsOrMore
 
int IncludeRegionBoundaryCells
 
double CellBoundsCache [6]
 
int GenerateRepresentationUsingDataBounds
 
struct _cellList CellList
 
intCellRegionList
 
int MinCells
 
int NumberOfRegions
 
int Timing
 
double FudgeFactor
 
int NumberOfLocatorPoints
 
floatLocatorPoints
 
intLocatorIds
 
intLocatorRegionLocation
 
float MaxWidth
 
int LastNumDataSets
 
int LastDataCacheSize
 
vtkDataSet ** LastInputDataSets
 
unsigned long * LastDataSetObserverTags
 
intLastDataSetType
 
doubleLastInputDataInfo
 
doubleLastBounds
 
vtkIdTypeLastNumPoints
 
vtkIdTypeLastNumCells
 
vtkBSPCutsCuts
 
double Progress
 
- Protected Attributes inherited from vtkLocator
vtkDataSetDataSet
 
int Automatic
 
double Tolerance
 
int MaxLevel
 
int Level
 
vtkTimeStamp BuildTime
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

Build a k-d tree decomposition of a list of points.

Build, in parallel, a k-d tree decomposition of one or more vtkDataSets distributed across processors. We assume each process has read in one portion of a large distributed data set. When done, each process has access to the k-d tree structure, can obtain information about which process contains data for each spatial region, and can depth sort the spatial regions.

This class can also assign spatial regions to processors, based on one of several region assignment schemes. By default a contiguous, convex region is assigned to each process. Several queries return information about how many and what cells I have that lie in a region assigned to another process.

See also
vtkKdTree

Definition at line 54 of file vtkPKdTree.h.

Member Typedef Documentation

Definition at line 57 of file vtkPKdTree.h.

Constructor & Destructor Documentation

vtkPKdTree::vtkPKdTree ( )
protected
vtkPKdTree::~vtkPKdTree ( )
protected

Member Function Documentation

static int vtkPKdTree::IsTypeOf ( const char *  type)
static
virtual int vtkPKdTree::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkKdTree.

static vtkPKdTree* vtkPKdTree::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkPKdTree::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkKdTree.

vtkPKdTree* vtkPKdTree::NewInstance ( ) const
void vtkPKdTree::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkKdTree.

void vtkPKdTree::PrintTiming ( ostream &  os,
vtkIndent  indent 
)
virtual

Print timing of k-d tree build

Reimplemented from vtkKdTree.

void vtkPKdTree::PrintTables ( ostream &  os,
vtkIndent  indent 
)
static vtkPKdTree* vtkPKdTree::New ( )
static
void vtkPKdTree::BuildLocator ( )
virtual

Build the spatial decomposition. Call this explicitly after changing any parameters affecting the build of the tree. It must be called by all processes in the parallel application, or it will hang.

Reimplemented from vtkKdTree.

vtkIdType vtkPKdTree::GetTotalNumberOfCells ( )
inline

Get the total number of cells distributed across the data files read by all processes. You must have called BuildLocator before calling this method.

Definition at line 74 of file vtkPKdTree.h.

int vtkPKdTree::CreateProcessCellCountData ( )

Create tables of counts of cells per process per region. These tables can be accessed with queries like "HasData", "GetProcessCellCountForRegion", and so on. You must have called BuildLocator() beforehand. This method must be called by all processes or it will hang. Returns 1 on error, 0 when no error.

int vtkPKdTree::CreateGlobalDataArrayBounds ( )

A convenience function which compiles the global bounds of the data arrays across processes. These bounds can be accessed with "GetCellArrayGlobalRange" and "GetPointArrayGlobalRange". This method must be called by all processes or it will hang. Returns 1 on error, 0 when no error.

void vtkPKdTree::SetController ( vtkMultiProcessController c)

Set/Get the communicator object

virtual vtkMultiProcessController* vtkPKdTree::GetController ( )
virtual

Set/Get the communicator object

virtual int vtkPKdTree::GetRegionAssignment ( )
virtual

The PKdTree class can assign spatial regions to processors after building the k-d tree, using one of several partitioning criteria. These functions Set/Get whether this assignment is computed. The default is "Off", no assignment is computed. If "On", and no assignment scheme is specified, contiguous assignment will be computed. Specifying an assignment scheme (with AssignRegions*()) automatically turns on RegionAssignment.

int vtkPKdTree::AssignRegions ( int map,
int  numRegions 
)

Assign spatial regions to processes via a user defined map. The user-supplied map is indexed by region ID, and provides a process ID for each region.

int vtkPKdTree::AssignRegionsRoundRobin ( )

Let the PKdTree class assign a process to each region in a round robin fashion. If the k-d tree has not yet been built, the regions will be assigned after BuildLocator executes.

int vtkPKdTree::AssignRegionsContiguous ( )

Let the PKdTree class assign a process to each region by assigning contiguous sets of spatial regions to each process. The set of regions assigned to each process will always have a union that is a convex space (a box). If the k-d tree has not yet been built, the regions will be assigned after BuildLocator executes.

const int* vtkPKdTree::GetRegionAssignmentMap ( )
inline

Returns the region assignment map where index is the region and value is the processes id for that region.

Definition at line 132 of file vtkPKdTree.h.

virtual int vtkPKdTree::GetRegionAssignmentMapLength ( )
virtual

/ Returns the number of regions in the region assignment map.

int vtkPKdTree::GetRegionAssignmentList ( int  procId,
vtkIntArray list 
)

Writes the list of region IDs assigned to the specified process. Regions IDs start at 0 and increase by 1 from there. Returns the number of regions in the list.

void vtkPKdTree::GetAllProcessesBorderingOnPoint ( float  x,
float  y,
float  z,
vtkIntArray list 
)

The k-d tree spatial regions have been assigned to processes. Given a point on the boundary of one of the regions, this method creates a list of all processes whose region boundaries include that point. This may be required when looking for processes that have cells adjacent to the cells of a given process.

int vtkPKdTree::GetProcessAssignedToRegion ( int  regionId)

Returns the ID of the process assigned to the region.

int vtkPKdTree::HasData ( int  processId,
int  regionId 
)

Returns 1 if the process has data for the given region, 0 otherwise.

int vtkPKdTree::GetProcessCellCountForRegion ( int  processId,
int  regionId 
)

Returns the number of cells the specified process has in the specified region.

int vtkPKdTree::GetTotalProcessesInRegion ( int  regionId)

Returns the total number of processes that have data falling within this spatial region.

int vtkPKdTree::GetProcessListForRegion ( int  regionId,
vtkIntArray processes 
)

Adds the list of processes having data for the given region to the supplied list, returns the number of processes added.

int vtkPKdTree::GetProcessesCellCountForRegion ( int  regionId,
int count,
int  len 
)

Writes the number of cells each process has for the region to the supplied list of length len. Returns the number of cell counts written. The order of the cell counts corresponds to the order of process IDs in the process list returned by GetProcessListForRegion.

int vtkPKdTree::GetTotalRegionsForProcess ( int  processId)

Returns the total number of spatial regions that a given process has data for.

int vtkPKdTree::GetRegionListForProcess ( int  processId,
vtkIntArray regions 
)

Adds the region IDs for which this process has data to the supplied vtkIntArray. Retruns the number of regions.

int vtkPKdTree::GetRegionsCellCountForProcess ( int  ProcessId,
int count,
int  len 
)

Writes to the supplied integer array the number of cells this process has for each region. Returns the number of cell counts written. The order of the cell counts corresponds to the order of region IDs in the region list returned by GetRegionListForProcess.

vtkIdType vtkPKdTree::GetCellListsForProcessRegions ( int  ProcessId,
int  set,
vtkIdList inRegionCells,
vtkIdList onBoundaryCells 
)

After regions have been assigned to processes, I may want to know which cells I have that are in the regions assigned to a particular process. This method takes a process ID and two vtkIdLists. It writes to the first list the IDs of the cells contained in the process' regions. (That is, their cell centroid is contained in the region.) To the second list it write the IDs of the cells which intersect the process' regions but whose cell centroid lies elsewhere. The total number of cell IDs written to both lists is returned. Either list pointer passed in can be NULL, and it will be ignored. If there are multiple data sets, you must specify which data set you wish cell IDs for. The caller should delete these two lists when done. This method uses the cell lists created in vtkKdTree::CreateCellLists(). If the cell lists for the process' regions do not exist, this method will first build the cell lists for all regions by calling CreateCellLists(). You must remember to DeleteCellLists() when done with all calls to this method, as cell lists can require a great deal of memory.

vtkIdType vtkPKdTree::GetCellListsForProcessRegions ( int  ProcessId,
vtkDataSet set,
vtkIdList inRegionCells,
vtkIdList onBoundaryCells 
)

After regions have been assigned to processes, I may want to know which cells I have that are in the regions assigned to a particular process. This method takes a process ID and two vtkIdLists. It writes to the first list the IDs of the cells contained in the process' regions. (That is, their cell centroid is contained in the region.) To the second list it write the IDs of the cells which intersect the process' regions but whose cell centroid lies elsewhere. The total number of cell IDs written to both lists is returned. Either list pointer passed in can be NULL, and it will be ignored. If there are multiple data sets, you must specify which data set you wish cell IDs for. The caller should delete these two lists when done. This method uses the cell lists created in vtkKdTree::CreateCellLists(). If the cell lists for the process' regions do not exist, this method will first build the cell lists for all regions by calling CreateCellLists(). You must remember to DeleteCellLists() when done with all calls to this method, as cell lists can require a great deal of memory.

vtkIdType vtkPKdTree::GetCellListsForProcessRegions ( int  ProcessId,
vtkIdList inRegionCells,
vtkIdList onBoundaryCells 
)

After regions have been assigned to processes, I may want to know which cells I have that are in the regions assigned to a particular process. This method takes a process ID and two vtkIdLists. It writes to the first list the IDs of the cells contained in the process' regions. (That is, their cell centroid is contained in the region.) To the second list it write the IDs of the cells which intersect the process' regions but whose cell centroid lies elsewhere. The total number of cell IDs written to both lists is returned. Either list pointer passed in can be NULL, and it will be ignored. If there are multiple data sets, you must specify which data set you wish cell IDs for. The caller should delete these two lists when done. This method uses the cell lists created in vtkKdTree::CreateCellLists(). If the cell lists for the process' regions do not exist, this method will first build the cell lists for all regions by calling CreateCellLists(). You must remember to DeleteCellLists() when done with all calls to this method, as cell lists can require a great deal of memory.

int vtkPKdTree::ViewOrderAllProcessesInDirection ( const double  directionOfProjection[3],
vtkIntArray orderedList 
)

Return a list of all processes in order from front to back given a vector direction of projection. Use this to do visibility sorts in parallel projection mode. `orderedList' will be resized to the number of processes. The return value is the number of processes.

Precondition
orderedList_exists: orderedList!=0
int vtkPKdTree::ViewOrderAllProcessesFromPosition ( const double  cameraPosition[3],
vtkIntArray orderedList 
)

Return a list of all processes in order from front to back given a camera position. Use this to do visibility sorts in perspective projection mode. `orderedList' will be resized to the number of processes. The return value is the number of processes.

Precondition
orderedList_exists: orderedList!=0
int vtkPKdTree::GetCellArrayGlobalRange ( const char *  name,
float  range[2] 
)

An added feature of vtkPKdTree is that it will calculate the the global range of field arrays across all processes. You call CreateGlobalDataArrayBounds() to do this calculation. Then the following methods return the ranges. Returns 1 on error, 0 otherwise.

int vtkPKdTree::GetPointArrayGlobalRange ( const char *  name,
float  range[2] 
)
int vtkPKdTree::GetCellArrayGlobalRange ( const char *  name,
double  range[2] 
)
int vtkPKdTree::GetPointArrayGlobalRange ( const char *  name,
double  range[2] 
)
int vtkPKdTree::GetCellArrayGlobalRange ( int  arrayIndex,
double  range[2] 
)
int vtkPKdTree::GetPointArrayGlobalRange ( int  arrayIndex,
double  range[2] 
)
int vtkPKdTree::GetCellArrayGlobalRange ( int  arrayIndex,
float  range[2] 
)
int vtkPKdTree::GetPointArrayGlobalRange ( int  arrayIndex,
float  range[2] 
)
void vtkPKdTree::SingleProcessBuildLocator ( )
protected
int vtkPKdTree::MultiProcessBuildLocator ( double bounds)
protected

Member Data Documentation

const int vtkPKdTree::NoRegionAssignment
static

Definition at line 104 of file vtkPKdTree.h.

const int vtkPKdTree::ContiguousAssignment
static

Definition at line 108 of file vtkPKdTree.h.

const int vtkPKdTree::UserDefinedAssignment
static

Definition at line 109 of file vtkPKdTree.h.

const int vtkPKdTree::RoundRobinAssignment
static

Definition at line 110 of file vtkPKdTree.h.


The documentation for this class was generated from the following file: