62 #include "vtkCommonDataModelModule.h" 99 vtkSetMacro(MinCells,
int);
100 vtkGetMacro(MinCells,
int);
110 vtkGetMacro(NumberOfRegionsOrLess,
int);
111 vtkSetMacro(NumberOfRegionsOrLess,
int);
120 vtkGetMacro(NumberOfRegionsOrMore,
int);
121 vtkSetMacro(NumberOfRegionsOrMore,
int);
130 vtkGetMacro(FudgeFactor,
double);
131 vtkSetMacro(FudgeFactor,
double);
151 void OmitXPartitioning();
156 void OmitYPartitioning();
161 void OmitZPartitioning();
166 void OmitXYPartitioning();
171 void OmitYZPartitioning();
176 void OmitZXPartitioning();
181 void OmitNoPartitioning();
209 virtual void RemoveDataSet(
int index);
211 virtual void RemoveAllDataSets();
217 int GetNumberOfDataSets();
253 void GetBounds(
double* bounds);
263 void SetNewBounds(
double* bounds);
269 vtkGetMacro(NumberOfRegions,
int);
275 void GetRegionBounds(
int regionID,
double bounds[6]);
280 void GetRegionDataBounds(
int regionID,
double bounds[6]);
287 void PrintVerboseTree();
293 void PrintRegion(
int id);
307 void CreateCellLists(
int dataSetIndex,
int* regionReqList,
int reqListSize);
308 void CreateCellLists(
vtkDataSet*
set,
int* regionReqList,
int reqListSize);
309 void CreateCellLists(
int* regionReqList,
int listSize);
310 void CreateCellLists();
320 vtkSetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
321 vtkGetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
322 vtkBooleanMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
328 void DeleteCellLists();
346 vtkIdList* GetBoundaryCellList(
int regionID);
385 int GetRegionContainingCell(
int set,
vtkIdType cellID);
386 int GetRegionContainingCell(
vtkIdType cellID);
397 int* AllGetRegionContainingCell();
402 int GetRegionContainingPoint(
double x,
double y,
double z);
425 int MinimalNumberOfConvexSubRegions(
vtkIntArray* regionIdList,
double** convexRegionBounds);
434 int ViewOrderAllRegionsInDirection(
435 const double directionOfProjection[3],
vtkIntArray* orderedList);
444 int ViewOrderRegionsInDirection(
454 int ViewOrderAllRegionsFromPosition(
455 const double directionOfProjection[3],
vtkIntArray* orderedList);
464 int ViewOrderRegionsFromPosition(
481 void BuildLocatorFromPoints(
vtkPointSet* pointset);
482 void BuildLocatorFromPoints(
vtkPoints* ptArray);
483 void BuildLocatorFromPoints(
vtkPoints** ptArray,
int numPtArrays);
509 vtkIdType FindPoint(
double x,
double y,
double z);
518 vtkIdType FindClosestPoint(
double* x,
double& dist2);
519 vtkIdType FindClosestPoint(
double x,
double y,
double z,
double& dist2);
527 vtkIdType FindClosestPointWithinRadius(
double radius,
const double x[3],
double& dist2);
535 vtkIdType FindClosestPointInRegion(
int regionId,
double* x,
double& dist2);
536 vtkIdType FindClosestPointInRegion(
int regionId,
double x,
double y,
double z,
double& dist2);
545 void FindPointsWithinRadius(
double R,
const double x[3],
vtkIdList* result);
555 void FindClosestNPoints(
int N,
const double x[3],
vtkIdList* result);
589 vtkBooleanMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
590 vtkSetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
591 vtkGetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
597 virtual void PrintTiming(ostream& os,
vtkIndent indent);
603 virtual int NewGeometry();
610 virtual int NewGeometry(
vtkDataSet** sets,
int numDataSets);
617 virtual void InvalidateGeometry();
632 void FindPointsInArea(
double* area,
vtkIdTypeArray* ids,
bool clearArray =
true);
643 int ProcessUserDefinedCuts(
double* bounds);
645 void SetCuts(
vtkBSPCuts* cuts,
int userDefined);
652 void UpdateBuildTime();
661 int DivideTest(
int numberOfPoints,
int level);
677 static void DeleteAllDescendants(
vtkKdNode* nd);
679 void BuildRegionList();
680 virtual int SelectCutDirection(
vtkKdNode* kd);
701 int GetNumberOfCells();
708 int GetDataSetsNumberOfCells(
int set1,
int set2);
728 float* ComputeCellCenters();
729 float* ComputeCellCenters(
int set);
739 void UpdateProgress(
double amount);
745 vtkSetClampMacro(Progress,
double, 0.0, 1.0);
746 vtkGetMacro(Progress,
double);
760 void UpdateSubOperationProgress(
double amount);
762 static void _SetNewBounds(
vtkKdNode* kd,
double* b,
int* fixDim);
765 static void SetDataBoundsToSpatialBounds(
vtkKdNode* kd);
766 static void ZeroNumberOfPoints(
vtkKdNode* kd);
769 void FindPointsWithinRadius(
vtkKdNode* node,
double R2,
const double x[3],
vtkIdList* ids);
780 int DivideRegion(
vtkKdNode* kd,
float* c1,
int* ids,
int nlevels);
782 void DoMedianFind(
vtkKdNode* kd,
float* c1,
int* ids,
int d1,
int d2,
int d3);
796 void InitializeCellLists();
799 void ComputeCellCenter(
vtkCell* cell,
double*
center,
double* weights);
802 void _generateRepresentationDataBounds(
806 void _generateRepresentationWholeSpace(
811 void _printTree(
int verbose);
813 int SearchNeighborsForDuplicate(
814 int regionId,
float*
point,
int** pointsSoFar,
int* len,
float tolerance,
float tolerance2);
816 int SearchRegionForDuplicate(
float*
point,
int* pointsSoFar,
int len,
float tolerance2);
818 int _FindClosestPointInRegion(
int regionId,
double x,
double y,
double z,
double& dist2);
820 int FindClosestPointInSphere(
821 double x,
double y,
double z,
double radius,
int skipRegion,
double& dist2);
823 int _ViewOrderRegionsInDirection(
829 int _ViewOrderRegionsFromPosition(
833 vtkIntArray* IdsOfInterest,
const double pos[3],
int nextId);
838 void SetInputDataInfo(
int i,
int dims[3],
double origin[3],
double spacing[3]);
839 int CheckInputDataInfo(
int i,
int dims[3],
double origin[3],
double spacing[3]);
840 void ClearLastBuildCache();
842 static void __printTree(
vtkKdNode* kd,
int depth,
int verbose);
844 static int MidValue(
int dim,
float* c1,
int nvals,
double& coord);
846 static int Select(
int dim,
float* c1,
int* ids,
int nvals,
double& coord);
847 static float FindMaxLeftHalf(
int dim,
float* c1,
int K);
848 static void _Select(
int dim,
float* X,
int* ids,
int L,
int R,
int K);
851 static int SelfOrder(
int id,
vtkKdNode* kd);
852 static int findRegion(
vtkKdNode* node,
float x,
float y,
float z);
853 static int findRegion(
vtkKdNode* node,
double x,
double y,
double z);
857 static void AddNewRegions(
vtkKdNode* kd,
float* c1,
int midpt,
int dim,
double coord);
859 void NewPartitioningRequest(
int req);
865 double CellBoundsCache[6];
909 void operator=(
const vtkKdTree&) =
delete;
virtual void BuildLocator()=0
Build the locator from the input dataset.
vtkTypeBool IncludeRegionBoundaryCells
vtkDataSet ** LastInputDataSets
maintain an unordered list of dataset objects
This class represents a single spatial region in an 3D axis aligned binary spatial partitioning...
Perform calculations (mostly intersection calculations) on regions of a 3D binary spatial partitionin...
This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.
abstract class to specify dataset behavior
int NumberOfLocatorPoints
static int ComputeLevel(vtkKdNode *kd)
abstract base class for objects that accelerate spatial searches
void PrintSelf(ostream &os, vtkIndent indent) override
Standard type and print methods.
int NumberOfRegionsOrLess
abstract class for specifying dataset behavior
vtkDataSet * GetDataSet() override
Return the 0'th data set.
dynamic, self-adjusting array of vtkIdType
concrete dataset represents vertices, lines, polygons, and triangle strips
virtual void FreeSearchStructure()=0
Free the memory required for the spatial data structure.
double * LastInputDataInfo
Timer support and logging.
virtual void SetDataSet(vtkDataSet *)
Build the locator from the points/cells defining this dataset.
abstract class to specify cell behavior
unsigned long * LastDataSetObserverTags
dynamic, self-adjusting array of int
virtual vtkDataSet * GetDataSet()
Build the locator from the points/cells defining this dataset.
a simple class to control print indentation
list of point or cell ids
vtkIdType * LastNumPoints
vtkTypeBool GenerateRepresentationUsingDataBounds
object to represent cell connectivity
vtkIdList ** boundaryCells
a Kd-tree spatial decomposition of a set of points
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
int * LocatorRegionLocation
vtkDataSetCollection * DataSets
virtual void GenerateRepresentation(int level, vtkPolyData *pd)=0
Method to build a representation at a particular level.
vtkBSPIntersections * BSPCalculator
represent and manipulate 3D points
int NumberOfRegionsOrMore