MeVisLab Toolbox Reference
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
25ML_START_NAMESPACE
26
27class TileSphere;
28class TileSphereHashTable;
29
34{
35public:
36
41
43 void setPointSets(const std::vector<ml::Vector3>& pointCloud1, const std::vector<ml::Vector3>& pointCloud2);
46 void setFirstPointSet(const std::vector<ml::Vector3>& pointCloud);
49 void setFirstSinglePoint(const ml::Vector3& point);
50
51
55 void setNumEntries(int entries);
57 void setParams(int entries, int partition);
59 void setError(float error);
60
63 void computeDistance(float* &point1, float* &point2);
66 void computeDistance(ml::Vector3& point1, ml::Vector3& point2);
67
68
73
75 void verbose(bool onOff);
76
77
78private:
79
81 float* _pointSet1;
83 float* _pointSet2;
85 size_t _size1, _size2;
87 unsigned int _sphereIndex;
89 TileSphereHashTable* _hashTable;
90
92 TileSphere* _tileSphere1;
94 TileSphere* _tileSphere2;
95
97 float _error;
98
100 bool _verbose;
101
103 int _entries, _partition;
104
106 TileSphere* generateTree(float* pointSet, size_t size);
107
109 void getBB(float* pointSet, size_t size, float& minX, float& maxX, float& minY, float& maxY, float& minZ, float& maxZ);
110};
111
112ML_END_NAMESPACE
#define MLPOINTCLOUDUTILS_EXPORT
void setParams(int entries, int partition)
Sets fix values for both objects for _entries and _partition.
void computeDistance(ml::Vector3 &point1, ml::Vector3 &point2)
void computeDistance(float *&point1, float *&point2)
void setFirstPointSet(const std::vector< ml::Vector3 > &pointCloud)
void setNumEntries(int entries)
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)
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.
Tvec3< MLdouble > Vector3
A vector with three components of type double.
Definition mlVector3.h:286