FLImaging 6.5.8.1
LeastSquares3D.h
1#pragma once
8#include "FLFigureForwardDeclaration.h"
9#include "DefinitionsMathematics.h"
10
12namespace FLImaging
13{
15 namespace Foundation
16 {
17 template<typename T>
18 class CInternalLeastSquares3D;
19
25 template<typename T>
26 class FL_EXPORT CLeastSquares3D : public Base::CFLBase
27 {
28 public:
36
44
56 const CResult Clear();
57
75 const CResult Set(const Base::TPoint3<T>* pTpArrXYZ, int32_t i32Count);
76
95
114
134 const CResult Set(T* pTArrX, T* pTArrY, T* pTArrZ, int32_t i32Count);
135
154
173
192
211
230
249
268
287
307 const CResult Assign(int32_t* pI32X, int32_t* pI32Y, int32_t* pI32Z, int32_t i32Count);
308
328 const CResult Assign(int64_t* pI64X, int64_t* pI64Y, int64_t* pI64Z, int32_t i32Count);
329
349 const CResult Assign(float* pF32X, float* pF32Y, float* pF32Z, int32_t i32Count);
350
370 const CResult Assign(double* pF64X, double* pF64Y, double* pF64Z, int32_t i32Count);
371
389 const CResult Assign(const CFLPoint3<float>* pData, int32_t i32Count);
390
408 const CResult Assign(const CFLPoint3<double>* pData, int32_t i32Count);
409
427 const CResult Add(int32_t i32X, int32_t i32Y, int32_t i32Z);
428
446 const CResult Add(int64_t i64X, int64_t i64Y, int64_t i64Z);
447
465 const CResult Add(float f32X, float f32Y, float f32Z);
466
484 const CResult Add(double f64X, double f64Y, double f64Z);
485
501 const CResult Add(const CFLPoint3<double>& flpData);
502
518 const CResult Add(const CFLPoint3<float>& flpData);
519
535 const CResult Add(const CFLPoint3<double>* pFlpData);
536
552 const CResult Add(const CFLPoint3<float>* pFlpData);
553
569 const CResult Add(const Base::TPoint3<double>& tpData);
570
586 const CResult Add(const Base::TPoint3<float>& tpData);
587
603 const CResult Add(const Base::TPoint3<int64_t>& tpData);
604
620 const CResult Add(const Base::TPoint3<int32_t>& tpData);
621
637 const CResult Add(const Base::TPoint3<double>* pTpData);
638
654 const CResult Add(const Base::TPoint3<float>* pTpData);
655
671 const CResult Add(const Base::TPoint3<int64_t>* pTpData);
672
688 const CResult Add(const Base::TPoint3<int32_t>* pTpData);
689
708
727
746
765
784
803
822
841
861 const CResult Add(double* pArrX, double* pArrY, double* pArrZ, int32_t i32Count);
862
882 const CResult Add(float* pArrX, float* pArrY, float* pArrZ, int32_t i32Count);
883
903 const CResult Add(int64_t* pArrX, int64_t* pArrY, int64_t* pArrZ, int32_t i32Count);
904
924 const CResult Add(int32_t* pArrX, int32_t* pArrY, int32_t* pArrZ, int32_t i32Count);
925
939 Base::TPoint3<T>* Get(size_t stIndex) const;
940
960 const CResult Get(size_t stIndex, T** ppTArrX, T** ppTArrY, T** ppTArrZ) const;
961
971 size_t GetCount();
972
998 const CResult GetPlane(T& tA, T& tB, T& tC, T& tD, int64_t i64OutlierThresholdCount = 0, double f64OutlierThreshold = 3.) const;
999
1025 const CResult GetSphere(T& tU, T& tV, T& tW, T& tR, int64_t i64OutlierThresholdCount = 0, double f64OutlierThreshold = 3.) const;
1026
1050 const CResult GetLine(CFLPoint3<T>& flpDirectionVector, CFLPoint3<T>& flpBasePosition, int64_t i64OutlierThresholdCount = 0, double f64OutlierThreshold = 3.) const;
1051
1075 const CResult GetLine(CFLPoint3<T>* pFlpDirectionVector, CFLPoint3<T>* pFlpBasePosition, int64_t i64OutlierThresholdCount = 0, double f64OutlierThreshold = 3.) const;
1076
1077 SupportToDuplicateObject(CLeastSquares3D, *this);
1078 DeclareGetClassType();
1079
1080 private:
1081 CInternalLeastSquares3D<T>* m_pInternal;
1082 };
1083
1086 }
1087}
1088
Template type array class.
Definition RangeTree.h:19
Top-level base class of FLImaging.
Definition FLBase.h:36
Simplified class representing a 3-D point.
Definition TPoint3.h:37
FLImaging module execution result object.
Definition ResultsDef.h:1514
A class representing a 3D point.
Definition FLPoint3.h:36
3D least squares calculation class
Definition LeastSquares3D.h:27
const CResult Add(const Base::TPoint3< double > &tpData)
Add data.
const CResult Assign(const Base::CFLArray< Base::TPoint3< float > > &flaData)
A function that allocates data and creates a copy of the array.
Base::TPoint3< T > * Get(size_t stIndex) const
Get the data of the specified index.
CLeastSquares3D()
Default constructor.
const CResult Assign(const Base::CFLArray< Base::TPoint3< int64_t > > *pFlaData)
A function that allocates data and creates a copy of the array.
const CResult GetLine(CFLPoint3< T > *pFlpDirectionVector, CFLPoint3< T > *pFlpBasePosition, int64_t i64OutlierThresholdCount=0, double f64OutlierThreshold=3.) const
A function to find the straight line that has the minimum distance difference between each point Get ...
const CResult Get(size_t stIndex, T **ppTArrX, T **ppTArrY, T **ppTArrZ) const
Get the data of the specified index.
const CResult Add(int32_t *pArrX, int32_t *pArrY, int32_t *pArrZ, int32_t i32Count)
Copy and add data.
const CResult Assign(int32_t *pI32X, int32_t *pI32Y, int32_t *pI32Z, int32_t i32Count)
A function that allocates data and creates a copy of the array.
const CResult Add(const CFLPoint3< double > &flpData)
Add data.
const CResult Assign(const CFLPoint3< double > *pData, int32_t i32Count)
A function that allocates data and creates a copy of the array.
const CResult Add(int32_t i32X, int32_t i32Y, int32_t i32Z)
Add data.
const CResult Add(float *pArrX, float *pArrY, float *pArrZ, int32_t i32Count)
Copy and add data.
const CResult Assign(int64_t *pI64X, int64_t *pI64Y, int64_t *pI64Z, int32_t i32Count)
A function that allocates data and creates a copy of the array.
const CResult Add(const Base::TPoint3< int32_t > &tpData)
Add data.
const CResult Add(const Base::TPoint3< int32_t > *pTpData)
Add data.
const CResult Assign(const Base::CFLArray< Base::TPoint3< double > > *pFlaData)
A function that allocates data and creates a copy of the array.
const CResult Add(const Base::CFLArray< Base::TPoint3< int32_t > > *pFlaData)
Add data.
const CResult Add(float f32X, float f32Y, float f32Z)
Add data.
const CResult Assign(const CFLPoint3< float > *pData, int32_t i32Count)
A function that allocates data and creates a copy of the array.
const CResult Assign(const Base::CFLArray< Base::TPoint3< int64_t > > &flaData)
A function that allocates data and creates a copy of the array.
const CResult Assign(const Base::CFLArray< Base::TPoint3< int32_t > > *pFlaData)
A function that allocates data and creates a copy of the array.
const CResult Add(double f64X, double f64Y, double f64Z)
Add data.
const CResult Assign(double *pF64X, double *pF64Y, double *pF64Z, int32_t i32Count)
A function that allocates data and creates a copy of the array.
const CResult GetLine(CFLPoint3< T > &flpDirectionVector, CFLPoint3< T > &flpBasePosition, int64_t i64OutlierThresholdCount=0, double f64OutlierThreshold=3.) const
A function to find the straight line that has the minimum distance difference between each point Get ...
const CResult Add(const Base::CFLArray< Base::TPoint3< int32_t > > &flaData)
Add data.
const CResult Set(const Base::CFLArray< Base::TPoint3< T > > *pFlaData)
As a function that allocates data, it allocates only the array pointer address of the parameter witho...
const CResult Add(double *pArrX, double *pArrY, double *pArrZ, int32_t i32Count)
Copy and add data.
const CResult Add(const Base::TPoint3< float > &tpData)
Add data.
const CResult Assign(const Base::CFLArray< Base::TPoint3< double > > &flaData)
A function that allocates data and creates a copy of the array.
const CResult Assign(const Base::CFLArray< Base::TPoint3< float > > *pFlaData)
A function that allocates data and creates a copy of the array.
const CResult Add(const Base::TPoint3< int64_t > *pTpData)
Add data.
const CResult Assign(const Base::CFLArray< Base::TPoint3< int32_t > > &flaData)
A function that allocates data and creates a copy of the array.
const CResult GetPlane(T &tA, T &tB, T &tC, T &tD, int64_t i64OutlierThresholdCount=0, double f64OutlierThreshold=3.) const
A function to find the surface with the minimum distance difference between each point Get the coeffi...
const CResult Add(const CFLPoint3< float > *pFlpData)
Add data.
const CResult Add(const Base::CFLArray< Base::TPoint3< double > > &flaData)
Add data.
const CResult Add(const Base::CFLArray< Base::TPoint3< int64_t > > *pFlaData)
Add data.
const CResult Add(const Base::TPoint3< float > *pTpData)
Add data.
const CResult Assign(float *pF32X, float *pF32Y, float *pF32Z, int32_t i32Count)
A function that allocates data and creates a copy of the array.
const CResult Add(const Base::TPoint3< int64_t > &tpData)
Add data.
const CResult Add(const Base::CFLArray< Base::TPoint3< float > > *pFlaData)
Add data.
const CResult GetSphere(T &tU, T &tV, T &tW, T &tR, int64_t i64OutlierThresholdCount=0, double f64OutlierThreshold=3.) const
A function to find the sphere with the minimum distance difference between each point Get the coeffic...
const CResult Set(const Base::CFLArray< Base::TPoint3< T > > &flaData)
As a function that allocates data, it allocates only the array pointer address of the parameter witho...
const CResult Set(T *pTArrX, T *pTArrY, T *pTArrZ, int32_t i32Count)
As a function that allocates data, it allocates only the array pointer address of the parameter witho...
const CResult Add(const Base::CFLArray< Base::TPoint3< double > > *pFlaData)
Add data.
const CResult Add(const Base::CFLArray< Base::TPoint3< float > > &flaData)
Add data.
const CResult Clear()
Initialize the parameters.
const CResult Add(const Base::CFLArray< Base::TPoint3< int64_t > > &flaData)
Add data.
const CResult Add(const Base::TPoint3< double > *pTpData)
Add data.
virtual ~CLeastSquares3D()
Default destructor.
const CResult Set(const Base::TPoint3< T > *pTpArrXYZ, int32_t i32Count)
As a function that allocates data, it allocates only the array pointer address of the parameter witho...
const CResult Add(int64_t *pArrX, int64_t *pArrY, int64_t *pArrZ, int32_t i32Count)
Copy and add data.
const CResult Add(int64_t i64X, int64_t i64Y, int64_t i64Z)
Add data.
const CResult Add(const CFLPoint3< double > *pFlpData)
Add data.
size_t GetCount()
Get the number of data.
const CResult Add(const CFLPoint3< float > &flpData)
Add data.