FLImaging 6.7.1.3
KDTreeGroup.h
1#pragma once
2
12
13#include "TRect.h"
14
16namespace FLImaging
17{
19 namespace Base
20 {
21 template<typename T>
22 class CFLArray;
23
24 template<template<typename> class T1, typename T2>
25 class CInternalKDTreeGroup;
26
49 template<template<typename> class T1, typename T2>
50 class FL_EXPORT CKDTreeGroup : public CFLBase
51 {
52 public:
61
75 CKDTreeGroup(const CFLArray<T1<T2>>& flaVertices, const CFLArray<int64_t>& flaGroupNumbers);
76
90 CKDTreeGroup(const CFLArray<T1<T2>>* pFlaVertices, const CFLArray<int64_t>* pFlaGroupNumbers);
91
99 virtual ~CKDTreeGroup();
100
112 const CResult Clear();
113
131 const CResult Build(const CFLArray<T1<T2>>& flaVertices, const CFLArray<int64_t>& flaGroupNumbers);
132
150 const CResult Build(const CFLArray<T1<T2>>* pFlaVertices, const CFLArray<int64_t>* pFlaGroupNumbers);
151
163 int64_t GetCount() const;
164
165
166
184 const CResult GetNearestNeighborsPoints(const T1<T2>& tpPoint, int64_t i64NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints) const;
185
203 const CResult GetNearestNeighborsIndices(const T1<T2>& tpPoint, int64_t i64NearestNeighborsCount, CFLArray<uint64_t>& flaResultIndices) const;
204
222 const CResult GetNearestNeighborsIndices(const T1<T2>& tpPoint, int64_t i64NearestNeighborsCount, CFLArray<uint32_t>& flaResultIndices) const;
223
243 const CResult GetNearestNeighborsPointsAndIndices(const T1<T2>& tpPoint, int64_t i64NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices) const;
244
264 const CResult GetNearestNeighborsPointsAndIndices(const T1<T2>& tpPoint, int64_t i64NearestNeighborsCount, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices) const;
265
266
286 const CResult GetPointsInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints, int64_t i64Count = -1) const;
287
307 const CResult GetIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<uint64_t>& flaResultIndices, int64_t i64Count = -1) const;
308
328 const CResult GetIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<uint32_t>& flaResultIndices, int64_t i64Count = -1) const;
329
351 const CResult GetPointsAndIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices, int64_t i64Count = -1) const;
352
374 const CResult GetPointsAndIndicesInRange(const T1<T2>& tpLowerBound, const T1<T2>& tpUpperBound, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices, int64_t i64Count = -1) const;
375
376
377
378
379
399 const CResult GetPointsInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints, int64_t i64Count = -1) const;
400
420 const CResult GetIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<uint64_t>& flaResultIndices, int64_t i64Count = -1) const;
421
441 const CResult GetIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<uint32_t>& flaResultIndices, int64_t i64Count = -1) const;
442
464 const CResult GetPointsAndIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint64_t>& flaResultIndices, int64_t i64Count = -1) const;
465
487 const CResult GetPointsAndIndicesInRadius(const T1<T2>& tpCenter, T2 tRadius, CFLArray<T1<T2>>& flaResultPoints, CFLArray<uint32_t>& flaResultIndices, int64_t i64Count = -1) const;
488
489
490
504 const CResult AddExcludedGroupNumber(int64_t i64GroupNumber);
505
519 const CResult RemoveExcludedGroupNumber(int64_t i64GroupNumber);
520
533
534
535
549 const CResult OperateAdd(const T1<T2>& tpVector);
550
564 const CResult OperateMultiply(const T1<T2>& tpVector);
565
566 DeclareGetClassType();
567
568
569 protected:
570
571 CInternalKDTreeGroup<T1, T2>* m_pInternal;
572
573 friend class CInternalKDTreeGroup<T1, T2>;
574 };
575 }
576}
Template type array class.
Definition FLArray.h:53
CFLBase()
Default constructor.
const CResult OperateAdd(const T1< T2 > &tpVector)
Add the input vector to all nodes.
const CResult GetNearestNeighborsPoints(const T1< T2 > &tpPoint, int64_t i64NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints) const
Searches for the nearest neighboring points from the input point and returns the specified number of ...
const CResult Build(const CFLArray< T1< T2 > > *pFlaVertices, const CFLArray< int64_t > *pFlaGroupNumbers)
Build data.
CKDTreeGroup(const CFLArray< T1< T2 > > &flaVertices, const CFLArray< int64_t > &flaGroupNumbers)
Constructor.
const CResult GetIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< uint32_t > &flaResultIndices, int64_t i64Count=-1) const
Searches for points within the specified radius from the input center and returns up to the specified...
const CResult GetIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< uint64_t > &flaResultIndices, int64_t i64Count=-1) const
Searches for points within the specified radius from the input center and returns up to the specified...
const CResult GetIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< uint32_t > &flaResultIndices, int64_t i64Count=-1) const
Searches for points within the specified range and returns up to the specified number of indices.
const CResult ClearExcludedGroupNumbers()
Clears all group numbers from the exclusion list. All points will be included in search results regar...
const CResult GetNearestNeighborsPointsAndIndices(const T1< T2 > &tpPoint, int64_t i64NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices) const
Searches for the nearest neighboring points from the input point and returns the specified number of ...
const CResult GetNearestNeighborsIndices(const T1< T2 > &tpPoint, int64_t i64NearestNeighborsCount, CFLArray< uint64_t > &flaResultIndices) const
Searches for the nearest neighboring points from the input point and returns the specified number of ...
virtual ~CKDTreeGroup()
Destructor.
const CResult GetPointsInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints, int64_t i64Count=-1) const
Searches for points within the specified radius from the input center and returns up to the specified...
const CResult GetPointsAndIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices, int64_t i64Count=-1) const
Searches for points within the specified radius from the input center and returns up to the specified...
const CResult GetNearestNeighborsPointsAndIndices(const T1< T2 > &tpPoint, int64_t i64NearestNeighborsCount, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices) const
Searches for the nearest neighboring points from the input point and returns the specified number of ...
const CResult GetPointsAndIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint64_t > &flaResultIndices, int64_t i64Count=-1) const
Searches for points within the specified range and returns up to the specified number of both point c...
const CResult GetPointsAndIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices, int64_t i64Count=-1) const
Searches for points within the specified range and returns up to the specified number of both point c...
const CResult GetIndicesInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< uint64_t > &flaResultIndices, int64_t i64Count=-1) const
Searches for points within the specified range and returns up to the specified number of indices.
const CResult GetPointsInRange(const T1< T2 > &tpLowerBound, const T1< T2 > &tpUpperBound, CFLArray< T1< T2 > > &flaResultPoints, int64_t i64Count=-1) const
Searches for points within the specified range and returns up to the specified number of point coordi...
const CResult AddExcludedGroupNumber(int64_t i64GroupNumber)
Adds the specified group number to the exclusion list. Points belonging to this group will be exclude...
const CResult OperateMultiply(const T1< T2 > &tpVector)
Multiply the input vector element-wise with all nodes.
const CResult Build(const CFLArray< T1< T2 > > &flaVertices, const CFLArray< int64_t > &flaGroupNumbers)
Build data.
const CResult GetNearestNeighborsIndices(const T1< T2 > &tpPoint, int64_t i64NearestNeighborsCount, CFLArray< uint32_t > &flaResultIndices) const
Searches for the nearest neighboring points from the input point and returns the specified number of ...
const CResult Clear()
Clear data.
int64_t GetCount() const
Retrieves the number of elements in the constructed data.
CKDTreeGroup(const CFLArray< T1< T2 > > *pFlaVertices, const CFLArray< int64_t > *pFlaGroupNumbers)
Constructor.
const CResult GetPointsAndIndicesInRadius(const T1< T2 > &tpCenter, T2 tRadius, CFLArray< T1< T2 > > &flaResultPoints, CFLArray< uint32_t > &flaResultIndices, int64_t i64Count=-1) const
Searches for points within the specified radius from the input center and returns up to the specified...
const CResult RemoveExcludedGroupNumber(int64_t i64GroupNumber)
Removes the specified group number from the exclusion list. Points in this group will no longer be ex...
FLImaging module execution result object.
Definition ResultsDef.h:1596
Definition AESCryptography.h:18