region growing based algorithm. More...
#include <region_growing.h>
Public Member Functions | |
void | filter () |
simply runs the algorithm | |
vector< int > | get_region_indices (void) |
Provide acces to the result indices. | |
PointIndices | get_region_point_indices (void) |
Provide acces to the result indices. | |
region_growing () | |
void | set_input_cloud (typename PointCloud< T >::Ptr cloud_in) |
Sets the input point cloud data. | |
void | set_input_seeds (typename PointCloud< T1 >::Ptr seeds_in) |
Sets the input point cloud seeds. | |
~region_growing () | |
Public Attributes | |
int | min_neighbors |
Number of neighbors to consider the point. | |
float | radius |
The radius for search. | |
Private Member Functions | |
void | extract_region_indices () |
extract region_indices from cloud | |
void | process_flags () |
Process flags to check if it is ok to run. | |
Private Attributes | |
PointCloud< T >::Ptr | cloud |
Input cloud data for searching. | |
TYPE_flags | flags |
Flags set. | |
PointCloud< T > | region |
Output region cloud data. | |
std::vector< int > | region_indices |
indices from a region | |
PointIndices | region_point_indices |
Point indices from a region. | |
std::vector< int > | search_list |
search indices list | |
PointCloud< T1 >::Ptr | seeds |
Input seeds for starting points. |
region growing based algorithm.
Definition at line 75 of file region_growing.h.
region_growing< T, T1 >::region_growing | ( | ) | [inline] |
Definition at line 78 of file region_growing.h.
region_growing< T, T1 >::~region_growing | ( | ) | [inline] |
Definition at line 90 of file region_growing.h.
void region_growing< T, T1 >::extract_region_indices | ( | ) | [private] |
extract region_indices from cloud
void region_growing< T, T1 >::filter | ( | ) | [inline] |
simply runs the algorithm
Step 0 check if we are ok to run the algorithm
STEP 1 Create an empty queue indice list
STEP 2 Create a kdtree representation of cloud input
STEP i Create a bool vector with the indice points processed
STEP 3 Let's make a fisrt search on all seed points
STEP 4 The queue list will be all the points on region_indices in the begining
STEP 4.1 Make a search on each point and check what points are already processed and if not add it to queue list
4.1.2 For each neighbor found do the following
4.1.3 Check if the point is already processed and if not added to queue list
Setup flags and reset pointers
Definition at line 107 of file region_growing.hpp.
vector< int > region_growing< T, T1 >::get_region_indices | ( | void | ) | [inline] |
Provide acces to the result indices.
Definition at line 76 of file region_growing.hpp.
PointIndices region_growing< T, T1 >::get_region_point_indices | ( | void | ) | [inline] |
Provide acces to the result indices.
Definition at line 89 of file region_growing.hpp.
void region_growing< T, T1 >::process_flags | ( | ) | [inline, private] |
Process flags to check if it is ok to run.
Definition at line 59 of file region_growing.hpp.
void region_growing< T, T1 >::set_input_cloud | ( | typename PointCloud< T >::Ptr | cloud_in | ) | [inline] |
Sets the input point cloud data.
Definition at line 43 of file region_growing.hpp.
void region_growing< T, T1 >::set_input_seeds | ( | typename PointCloud< T1 >::Ptr | seeds_in | ) | [inline] |
Sets the input point cloud seeds.
Definition at line 51 of file region_growing.hpp.
PointCloud<T>::Ptr region_growing< T, T1 >::cloud [private] |
Input cloud data for searching.
Definition at line 139 of file region_growing.h.
TYPE_flags region_growing< T, T1 >::flags [private] |
Flags set.
Definition at line 127 of file region_growing.h.
int region_growing< T, T1 >::min_neighbors |
Number of neighbors to consider the point.
Definition at line 102 of file region_growing.h.
float region_growing< T, T1 >::radius |
The radius for search.
Definition at line 99 of file region_growing.h.
PointCloud<T> region_growing< T, T1 >::region [private] |
Output region cloud data.
Definition at line 145 of file region_growing.h.
std::vector<int> region_growing< T, T1 >::region_indices [private] |
indices from a region
Definition at line 130 of file region_growing.h.
PointIndices region_growing< T, T1 >::region_point_indices [private] |
Point indices from a region.
Definition at line 133 of file region_growing.h.
std::vector<int> region_growing< T, T1 >::search_list [private] |
search indices list
Definition at line 136 of file region_growing.h.
PointCloud<T1>::Ptr region_growing< T, T1 >::seeds [private] |
Input seeds for starting points.
Definition at line 142 of file region_growing.h.