MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
MinimalDistancePointClouds.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13
17
18#pragma once
19
21
22#include "mlVector3.h"
23
24
26
27class TileSphere;
28class TileSphereHashTable;
29
34{
35public:
40
42 void setPointSets(const std::vector<ml::Vector3>& pointCloud1, const std::vector<ml::Vector3>& pointCloud2);
45 void setFirstPointSet(const std::vector<ml::Vector3>& pointCloud);
49
50
56 void setParams(int entries, int partition);
58 void setError(float error);
59
62 void computeDistance(float*& point1, float*& point2);
66
67
72
74 void verbose(bool onOff);
75
76
77private:
79 float* _pointSet1;
81 float* _pointSet2;
83 size_t _size1, _size2;
85 unsigned int _sphereIndex;
87 TileSphereHashTable* _hashTable;
88
90 TileSphere* _tileSphere1;
92 TileSphere* _tileSphere2;
93
95 float _error;
96
98 bool _verbose;
99
101 int _entries, _partition;
102
104 TileSphere* generateTree(float* pointSet, size_t size);
105
107 void getBB(float* pointSet, size_t size, float& minX, float& maxX, float& minY, float& maxY, float& minZ,
108 float& maxZ);
109};
110
#define MLPOINTCLOUDUTILS_EXPORT
The MinimalDistancePointClouds implements a fast nearest pair search algorithm described by Sean Quin...
void setParams(int entries, int partition)
Sets fix values for both objects for _entries and _partition.
void computeDistance(ml::Vector3 &point1, ml::Vector3 &point2)
Returns two points with minimal distance as Vector3.
void computeDistance(float *&point1, float *&point2)
Returns a copy of the both points with the minimal distance.
void setFirstPointSet(const std::vector< ml::Vector3 > &pointCloud)
Sets only the first point set anew.
void setNumEntries(int entries)
This parameter describes how many points can be put as maximum into one sub sphere,...
void setPointSets(const std::vector< ml::Vector3 > &pointCloud1, const std::vector< ml::Vector3 > &pointCloud2)
This method passes the two point clouds in the form of two standard vectors.
void setError(float error)
Describes the maintainable error. 0 = 0% and 1 = 100%. The default value is 0.
MinimalDistancePointClouds()
Constructor.
void setFirstSinglePoint(const ml::Vector3 &point)
Sets only the first point set anew, which consists only of a single point.
int getUniqueIndex()
Returns a unique index for each tile sphere.
TileSphereHashTable * getHashTable()
Returns a pointer to the hash table.
virtual ~MinimalDistancePointClouds()
Destructor.
void verbose(bool onOff)
Dumps the console with additional debugging info.
TileSphereHashTable is used in the classes MinimalDistancePointClouds and TileSphere.
TileSphere is used in the class MinimalDistancePointClouds.
Definition TileSphere.h:37
Target mlrange_cast(Source arg)
Generic version of checked ML casts.