FLImaging 6.5.13.1
KDTreeGroup.h
1#pragma once
2
11#include "TRect.h"
12
14namespace FLImaging
15{
17 namespace Base
18 {
19 template<typename T>
20 class CFLArray;
21
22 template<template<typename> class T1, typename T2>
23 class CInternalKDTreeGroup;
24
44 template<template<typename> class T1, typename T2>
45 class FL_EXPORT CKDTreeGroup : public CFLBase
46 {
47 public:
56
70 CKDTreeGroup(const CFLArray<T1<T2>>& flaVertices, const CFLArray<int64_t>& flaGroupNumbers);
71
85 CKDTreeGroup(const CFLArray<T1<T2>>* pFlaVertices, const CFLArray<int64_t>* pFlaGroupNumbers);
86
94 virtual ~CKDTreeGroup();
95
107 const CResult Clear();
108
126 const CResult Build(const CFLArray<T1<T2>>& flaVertices, const CFLArray<int64_t>& flaGroupNumbers);
127
145 const CResult Build(const CFLArray<T1<T2>>* pFlaVertices, const CFLArray<int64_t>* pFlaGroupNumbers);
146
158 int64_t GetCount() const;
159
160
178 const CResult GetNearestNeighborsPoints(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints) const;
179
197 const CResult GetNearestNeighborsIndices(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<uint64_t>& flaResultIndices) const;
198
216 const CResult GetNearestNeighborsIndices(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<uint32_t>& flaResultIndices) const;
217
237 const CResult GetNearestNeighborsPointsAndIndices(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices) const;
238
258 const CResult GetNearestNeighborsPointsAndIndices(const T1<T2>& tpPoint, int32_t i32NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices) const;
259
260
278 const CResult GetPointsInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints) const;
279
297 const CResult GetIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<uint64_t>& flaResultIndices) const;
298
316 const CResult GetIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<uint32_t>& flaResultIndices) const;
317
337 const CResult GetPointsAndIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices) const;
338
358 const CResult GetPointsAndIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices) const;
359
360
361
362
380 const CResult GetPointsInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints) const;
381
399 const CResult GetIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<uint64_t>& flaResultIndices) const;
400
418 const CResult GetIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<uint32_t>& flaResultIndices) const;
419
439 const CResult GetPointsAndIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices) const;
440
460 const CResult GetPointsAndIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices) const;
461
462
463 const CResult AddExcludedGroupNumber(int64_t i64GroupNumber);
464 const CResult RemoveExcludedGroupNumber(int64_t i64GroupNumber);
465 const CResult ClearExcludedGroupNumbers();
466
467
468
482 const CResult OperateAdd(const T1<T2>& tpVector);
483
497 const CResult OperateMultiply(const T1<T2>& tpVector);
498
499 DeclareGetClassType();
500
501
502 protected:
503
504 CInternalKDTreeGroup<T1, T2>* m_pInternal;
505
506 friend class CInternalKDTreeGroup<T1, T2>;
507 };
508 }
509}
Template type array class.
Definition RangeTree.h:19
Top-level base class of FLImaging.
Definition FLBase.h:36
KDTreeGroup class. Binary Search Tree of K dimensions. .
Definition KDTreeGroup.h:46
const CResult OperateAdd(const T1< T2 > &tpVector)
Add the input vector to all nodes.
const CResult GetPointsAndIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices) const
Searches for vertices contained within the input radius and return the coordinates and indices of the...
const CResult Build(const CFLArray< T1< T2 > > *pFlaVertices, const CFLArray< int64_t > *pFlaGroupNumbers)
Build data.
const CResult GetIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< uint32_t > &flaResultIndices) const
Searches for vertices contained within the input radius and returns the indices of the found vertices...
CKDTreeGroup(const CFLArray< T1< T2 > > &flaVertices, const CFLArray< int64_t > &flaGroupNumbers)
Constructor.
const CResult GetNearestNeighborsPointsAndIndices(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices) const
Search for the nearest vertices from the given vertex and return the coordinates and indices of the s...
const CResult GetIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< uint32_t > &flaResultIndices) const
Searches for vertices contained within the input range and returns the indices of the found vertices.
const CResult GetNearestNeighborsIndices(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< uint32_t > &flaResultIndices) const
Searches for the nearest vertex from the given vertex and returns the index of the found vertex.
virtual ~CKDTreeGroup()
Destructor.
const CResult GetNearestNeighborsPoints(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints) const
Searches for the nearest vertex from the given vertex and returns the coordinates of the found vertex...
const CResult GetPointsAndIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices) const
Searches for vertices contained within the input radius and return the coordinates and indices of the...
const CResult GetIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< uint64_t > &flaResultIndices) const
Searches for vertices contained within the input range and returns the indices of the found vertices.
const CResult GetNearestNeighborsPointsAndIndices(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices) const
Search for the nearest vertices from the given vertex and return the coordinates and indices of the s...
const CResult GetPointsAndIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices) const
Searches for vertices contained within the input range and return the coordinates and indices of the ...
const CResult GetPointsInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints) const
Search for the vertices contained within the given radius and return the coordinates of the found ver...
const CResult OperateMultiply(const T1< T2 > &tpVector)
Multiply the input vector element-wise with all nodes.
const CResult GetIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< uint64_t > &flaResultIndices) const
Searches for vertices contained within the input radius and returns the indices of the found vertices...
const CResult Build(const CFLArray< T1< T2 > > &flaVertices, const CFLArray< int64_t > &flaGroupNumbers)
Build data.
const CResult Clear()
Clear data.
int64_t GetCount() const
Retrieves the number of elements in the constructed data.
const CResult GetPointsAndIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices) const
Searches for vertices contained within the input range and return the coordinates and indices of the ...
CKDTreeGroup(const CFLArray< T1< T2 > > *pFlaVertices, const CFLArray< int64_t > *pFlaGroupNumbers)
Constructor.
const CResult GetNearestNeighborsIndices(const T1< T2 > &tpPoint, int32_t i32NearestNeighborsCount, CFLArray< uint64_t > &flaResultIndices) const
Searches for the nearest vertex from the given vertex and returns the index of the found vertex.
const CResult GetPointsInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints) const
Search for the vertices contained within the given radius and return the coordinates of the found ver...
FLImaging module execution result object.
Definition ResultsDef.h:1514