65 #include "vtkCommonDataModelModule.h" 102 vtkSetMacro(MinCells,
int);
103 vtkGetMacro(MinCells,
int);
113 vtkGetMacro(NumberOfRegionsOrLess,
int);
114 vtkSetMacro(NumberOfRegionsOrLess,
int);
123 vtkGetMacro(NumberOfRegionsOrMore,
int);
124 vtkSetMacro(NumberOfRegionsOrMore,
int);
133 vtkGetMacro(FudgeFactor,
double);
134 vtkSetMacro(FudgeFactor,
double);
154 void OmitXPartitioning();
159 void OmitYPartitioning();
164 void OmitZPartitioning();
169 void OmitXYPartitioning();
174 void OmitYZPartitioning();
179 void OmitZXPartitioning();
184 void OmitNoPartitioning();
212 virtual void RemoveDataSet(
int index);
214 virtual void RemoveAllDataSets();
220 int GetNumberOfDataSets();
256 void GetBounds(
double* bounds);
266 void SetNewBounds(
double* bounds);
272 vtkGetMacro(NumberOfRegions,
int);
278 void GetRegionBounds(
int regionID,
double bounds[6]);
283 void GetRegionDataBounds(
int regionID,
double bounds[6]);
290 void PrintVerboseTree();
296 void PrintRegion(
int id);
310 void CreateCellLists(
int dataSetIndex,
int* regionReqList,
int reqListSize);
311 void CreateCellLists(
vtkDataSet*
set,
int* regionReqList,
int reqListSize);
312 void CreateCellLists(
int* regionReqList,
int listSize);
313 void CreateCellLists();
323 vtkSetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
324 vtkGetMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
325 vtkBooleanMacro(IncludeRegionBoundaryCells,
vtkTypeBool);
331 void DeleteCellLists();
349 vtkIdList* GetBoundaryCellList(
int regionID);
388 int GetRegionContainingCell(
int set,
vtkIdType cellID);
389 int GetRegionContainingCell(
vtkIdType cellID);
400 int* AllGetRegionContainingCell();
405 int GetRegionContainingPoint(
double x,
double y,
double z);
428 int MinimalNumberOfConvexSubRegions(
vtkIntArray* regionIdList,
double** convexRegionBounds);
437 int ViewOrderAllRegionsInDirection(
438 const double directionOfProjection[3],
vtkIntArray* orderedList);
447 int ViewOrderRegionsInDirection(
457 int ViewOrderAllRegionsFromPosition(
458 const double directionOfProjection[3],
vtkIntArray* orderedList);
467 int ViewOrderRegionsFromPosition(
484 void BuildLocatorFromPoints(
vtkPointSet* pointset);
485 void BuildLocatorFromPoints(
vtkPoints* ptArray);
486 void BuildLocatorFromPoints(
vtkPoints** ptArray,
int numPtArrays);
512 vtkIdType FindPoint(
double x,
double y,
double z);
521 vtkIdType FindClosestPoint(
double* x,
double& dist2);
522 vtkIdType FindClosestPoint(
double x,
double y,
double z,
double& dist2);
530 vtkIdType FindClosestPointWithinRadius(
double radius,
const double x[3],
double& dist2);
538 vtkIdType FindClosestPointInRegion(
int regionId,
double* x,
double& dist2);
539 vtkIdType FindClosestPointInRegion(
int regionId,
double x,
double y,
double z,
double& dist2);
548 void FindPointsWithinRadius(
double R,
const double x[3],
vtkIdList* result);
558 void FindClosestNPoints(
int N,
const double x[3],
vtkIdList* result);
592 vtkBooleanMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
593 vtkSetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
594 vtkGetMacro(GenerateRepresentationUsingDataBounds,
vtkTypeBool);
600 virtual void PrintTiming(ostream& os,
vtkIndent indent);
606 virtual int NewGeometry();
613 virtual int NewGeometry(
vtkDataSet** sets,
int numDataSets);
620 virtual void InvalidateGeometry();
635 void FindPointsInArea(
double* area,
vtkIdTypeArray* ids,
bool clearArray =
true);
646 int ProcessUserDefinedCuts(
double* bounds);
648 void SetCuts(
vtkBSPCuts* cuts,
int userDefined);
655 void UpdateBuildTime();
664 int DivideTest(
int numberOfPoints,
int level);
680 static void DeleteAllDescendants(
vtkKdNode* nd);
682 void BuildRegionList();
683 virtual int SelectCutDirection(
vtkKdNode* kd);
704 int GetNumberOfCells();
711 int GetDataSetsNumberOfCells(
int set1,
int set2);
731 float* ComputeCellCenters();
732 float* ComputeCellCenters(
int set);
742 void UpdateProgress(
double amount);
748 vtkSetClampMacro(Progress,
double, 0.0, 1.0);
749 vtkGetMacro(Progress,
double);
763 void UpdateSubOperationProgress(
double amount);
765 static void _SetNewBounds(
vtkKdNode* kd,
double* b,
int* fixDim);
768 static void SetDataBoundsToSpatialBounds(
vtkKdNode* kd);
769 static void ZeroNumberOfPoints(
vtkKdNode* kd);
772 void FindPointsWithinRadius(
vtkKdNode* node,
double R2,
const double x[3],
vtkIdList* ids);
783 int DivideRegion(
vtkKdNode* kd,
float* c1,
int* ids,
int nlevels);
785 void DoMedianFind(
vtkKdNode* kd,
float* c1,
int* ids,
int d1,
int d2,
int d3);
799 void InitializeCellLists();
802 void ComputeCellCenter(
vtkCell* cell,
double*
center,
double* weights);
805 void _generateRepresentationDataBounds(
809 void _generateRepresentationWholeSpace(
814 void _printTree(
int verbose);
816 int SearchNeighborsForDuplicate(
817 int regionId,
float*
point,
int** pointsSoFar,
int* len,
float tolerance,
float tolerance2);
819 int SearchRegionForDuplicate(
float*
point,
int* pointsSoFar,
int len,
float tolerance2);
821 int _FindClosestPointInRegion(
int regionId,
double x,
double y,
double z,
double& dist2);
823 int FindClosestPointInSphere(
824 double x,
double y,
double z,
double radius,
int skipRegion,
double& dist2);
826 int _ViewOrderRegionsInDirection(
832 int _ViewOrderRegionsFromPosition(
836 vtkIntArray* IdsOfInterest,
const double pos[3],
int nextId);
841 void SetInputDataInfo(
int i,
int dims[3],
double origin[3],
double spacing[3]);
842 int CheckInputDataInfo(
int i,
int dims[3],
double origin[3],
double spacing[3]);
843 void ClearLastBuildCache();
845 static void __printTree(
vtkKdNode* kd,
int depth,
int verbose);
847 static int MidValue(
int dim,
float* c1,
int nvals,
double& coord);
849 static int Select(
int dim,
float* c1,
int* ids,
int nvals,
double& coord);
850 static float FindMaxLeftHalf(
int dim,
float* c1,
int K);
851 static void _Select(
int dim,
float* X,
int* ids,
int L,
int R,
int K);
854 static int SelfOrder(
int id,
vtkKdNode* kd);
855 static int findRegion(
vtkKdNode* node,
float x,
float y,
float z);
856 static int findRegion(
vtkKdNode* node,
double x,
double y,
double z);
860 static void AddNewRegions(
vtkKdNode* kd,
float* c1,
int midpt,
int dim,
double coord);
862 void NewPartitioningRequest(
int req);
868 double CellBoundsCache[6];
912 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