pcl::OrganizedFastMesh< PointInT > Class Template Reference
Module surface

Simple triangulation/surface reconstruction for organized point clouds. More...

`#include <pcl/surface/organized_fast_mesh.h>`

Inheritance diagram for pcl::OrganizedFastMesh< PointInT >:

## Public Types

enum | TriangulationType { TRIANGLE_RIGHT_CUT, TRIANGLE_LEFT_CUT, TRIANGLE_ADAPTIVE_CUT, QUAD_MESH }
typedef boost::shared_ptr< OrganizedFastMesh< PointInT > > | Ptr
typedef boost::shared_ptr< const OrganizedFastMesh< PointInT > > | ConstPtr
typedef pcl::PointCloud< PointInT >::Ptr | PointCloudPtr
typedef std::vector< pcl::Vertices > | Polygons
Public Types inherited from pcl::MeshConstruction< PointInT >
typedef boost::shared_ptr< MeshConstruction< PointInT > > | Ptr
typedef boost::shared_ptr< const MeshConstruction< PointInT > > | ConstPtr
Public Types inherited from pcl::PCLSurfaceBase< PointInT >
typedef boost::shared_ptr< PCLSurfaceBase< PointInT > > | Ptr
typedef boost::shared_ptr< const PCLSurfaceBase< PointInT > > | ConstPtr
typedef pcl::search::Search< PointInT > | KdTree
typedef pcl::search::Search< PointInT >::Ptr | KdTreePtr
Public Types inherited from pcl::PCLBase< PointInT >
typedef pcl::PointCloud< PointInT > | PointCloud
typedef PointCloud::Ptr | PointCloudPtr
typedef PointCloud::ConstPtr | PointCloudConstPtr
typedef boost::shared_ptr< PointIndices > | PointIndicesPtr
typedef boost::shared_ptr< PointIndices const > | PointIndicesConstPtr

## Public Member Functions

| OrganizedFastMesh ()
| Constructor. More...
virtual | ~OrganizedFastMesh ()
| Destructor. More...
void | setMaxEdgeLength (float max_edge_length)
| Set a maximum edge length. More...
void | setTrianglePixelSize (int triangle_size)
| Set the edge length (in pixels) used for constructing the fixed mesh. More...
void | setTrianglePixelSizeRows (int triangle_size)
| Set the edge length (in pixels) used for iterating over rows when constructing the fixed mesh. More...
void | setTrianglePixelSizeColumns (int triangle_size)
| Set the edge length (in pixels) used for iterating over columns when constructing the fixed mesh. More...
void | setTriangulationType (TriangulationType type)
| Set the triangulation type (see TriangulationType) More...
void | storeShadowedFaces (bool enable)
| Store shadowed faces or not. More...
Public Member Functions inherited from pcl::MeshConstruction< PointInT >
| MeshConstruction ()
| Constructor. More...
virtual | ~MeshConstruction ()
| Destructor. More...
virtual void | reconstruct (pcl::PolygonMesh &output)
| Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> More...
virtual void | reconstruct (std::vector< pcl::Vertices > &polygons)
| Base method for mesh construction for all points given in <setInputCloud (), setIndices ()> More...
Public Member Functions inherited from pcl::PCLSurfaceBase< PointInT >
| PCLSurfaceBase ()
| Empty constructor. More...
virtual | ~PCLSurfaceBase ()
| Empty destructor. More...
void | setSearchMethod (const KdTreePtr &tree)
| Provide an optional pointer to a search object. More...
KdTreePtr | getSearchMethod ()
| Get a pointer to the search method used. More...
Public Member Functions inherited from pcl::PCLBase< PointInT >
| PCLBase ()
| Empty constructor. More...
| PCLBase (const PCLBase &base)
| Copy constructor. More...
virtual | ~PCLBase ()
| Destructor. More...
virtual void | setInputCloud (const PointCloudConstPtr &cloud)
| Provide a pointer to the input dataset. More...
PointCloudConstPtr const | getInputCloud () const
| Get a pointer to the input point cloud dataset. More...
virtual void | setIndices (const IndicesPtr &indices)
| Provide a pointer to the vector of indices that represents the input data. More...
virtual void | setIndices (const IndicesConstPtr &indices)
| Provide a pointer to the vector of indices that represents the input data. More...
virtual void | setIndices (const PointIndicesConstPtr &indices)
| Provide a pointer to the vector of indices that represents the input data. More...
virtual void | setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
| Set the indices for the points laying within an interest region of the point cloud. More...
IndicesPtr const | getIndices ()
| Get a pointer to the vector of indices used. More...
IndicesConstPtr const | getIndices () const
| Get a pointer to the vector of indices used. More...
const PointInT & | operator[] (size_t pos) const
| Override PointCloud operator[] to shorten code. More...

## Protected Member Functions

void | reconstructPolygons (std::vector< pcl::Vertices > &polygons)
| Perform the actual polygonal reconstruction. More...
virtual void | performReconstruction (std::vector< pcl::Vertices > &polygons)
| Create the surface. More...
void | performReconstruction (pcl::PolygonMesh &output)
| Create the surface. More...
void | addTriangle (int a, int b, int c, int idx, std::vector< pcl::Vertices > &polygons)
| Add a new triangle to the current polygon mesh. More...
void | addQuad (int a, int b, int c, int d, int idx, std::vector< pcl::Vertices > &polygons)
| Add a new quad to the current polygon mesh. More...
void | resetPointData (const int &point_index, pcl::PolygonMesh &mesh, const float &value=0.0f, int field_x_idx=0, int field_y_idx=1, int field_z_idx=2)
| Set (all) coordinates of a particular point to the specified value. More...
bool | isShadowed (const PointInT &point_a, const PointInT &point_b)
| Check if a point is shadowed by another point. More...
bool | isValidTriangle (const int &a, const int &b, const int &c)
| Check if a triangle is valid. More...
bool | isShadowedTriangle (const int &a, const int &b, const int &c)
| Check if a triangle is shadowed. More...
bool | isValidQuad (const int &a, const int &b, const int &c, const int &d)
| Check if a quad is valid. More...
bool | isShadowedQuad (const int &a, const int &b, const int &c, const int &d)
| Check if a triangle is shadowed. More...
void | makeQuadMesh (std::vector< pcl::Vertices > &polygons)
| Create a quad mesh. More...
void | makeRightCutMesh (std::vector< pcl::Vertices > &polygons)
| Create a right cut mesh. More...
void | makeLeftCutMesh (std::vector< pcl::Vertices > &polygons)
| Create a left cut mesh. More...
void | makeAdaptiveCutMesh (std::vector< pcl::Vertices > &polygons)
| Create an adaptive cut mesh. More...
Protected Member Functions inherited from pcl::PCLSurfaceBase< PointInT >
virtual std::string | getClassName () const
| Abstract class get name method. More...
Protected Member Functions inherited from pcl::PCLBase< PointInT >
bool | initCompute ()
| This method should get called before starting the actual computation. More...
bool | deinitCompute ()
| This method should get called after finishing the actual computation. More...

## Protected Attributes

float | max_edge_length_squared_
| max (squared) length of edge More...
int | triangle_pixel_size_rows_
| size of triangle edges (in pixels) for iterating over rows. More...
int | triangle_pixel_size_columns_
| size of triangle edges (in pixels) for iterating over columns More...
TriangulationType | triangulation_type_
| Type of meshing scheme (quads vs. More...
bool | store_shadowed_faces_
| Whether or not shadowed faces are stored, e.g., for exploration. More...
float | cos_angle_tolerance_
| (Cosine of the) angle tolerance used when checking whether or not an edge between two points is shadowed. More...
Protected Attributes inherited from pcl::MeshConstruction< PointInT >
bool | check_tree_
| A flag specifying whether or not the derived reconstruction algorithm needs the search object tree. More...
Protected Attributes inherited from pcl::PCLSurfaceBase< PointInT >
KdTreePtr | tree_
| A pointer to the spatial search object. More...
Protected Attributes inherited from pcl::PCLBase< PointInT >
PointCloudConstPtr | input_
| The input point cloud dataset. More...
IndicesPtr | indices_
| A pointer to the vector of point indices to use. More...
bool | use_indices_
| Set to true if point indices are used. More...
bool | fake_indices_
| If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...

## Detailed Description

### template<typename PointInT>
class pcl::OrganizedFastMesh< PointInT >

Simple triangulation/surface reconstruction for organized point clouds.

Neighboring points (pixels in image space) are connected to construct a triangular (or quad) mesh.

Note
  If you use this code in any academic work, please cite: D. Holz and S. Behnke. Fast Range Image Segmentation and Smoothing using Approximate Surface Reconstruction and Region Growing. In Proceedings of the 12th International Conference on Intelligent Autonomous Systems (IAS), Jeju Island, Korea, June 26-29 2012. http://purl.org/holz/papers/holz_2012_ias.pdf

Author
  Dirk Holz, Radu B. Rusu

Definition at line 65 of file organized_fast_mesh.h.

## Member Typedef Documentation

template<typename PointInT >

typedef boost::shared_ptr<const OrganizedFastMesh<PointInT> > pcl::OrganizedFastMesh< PointInT >::ConstPtr

Definition at line 69 of file organized_fast_mesh.h.

template<typename PointInT >

typedef pcl::PointCloud<PointInT>::Ptr pcl::OrganizedFastMesh< PointInT >::PointCloudPtr

Definition at line 74 of file organized_fast_mesh.h.

template<typename PointInT >

typedef std::vector<pcl::Vertices> pcl::OrganizedFastMesh< PointInT >::Polygons

Definition at line 76 of file organized_fast_mesh.h.

template<typename PointInT >

typedef boost::shared_ptr<OrganizedFastMesh<PointInT> > pcl::OrganizedFastMesh< PointInT >::Ptr

Definition at line 68 of file organized_fast_mesh.h.

## Member Enumeration Documentation

template<typename PointInT >

enum pcl::OrganizedFastMesh::TriangulationType

Enumerator
TRIANGLE_RIGHT_CUT |
TRIANGLE_LEFT_CUT |
TRIANGLE_ADAPTIVE_CUT |
QUAD_MESH |

Definition at line 78 of file organized_fast_mesh.h.

## Constructor & Destructor Documentation

template<typename PointInT >

pcl::OrganizedFastMesh< PointInT >::OrganizedFastMesh | ( |  | ) |

inline

Constructor.

Triangulation type defaults to QUAD_MESH.

Definition at line 87 of file organized_fast_mesh.h.

References pcl::MeshConstruction< PointInT >::check_tree_.

template<typename PointInT >

virtual pcl::OrganizedFastMesh< PointInT >::~OrganizedFastMesh | ( |  | ) |

inline virtual

Destructor.

Definition at line 99 of file organized_fast_mesh.h.

## Member Function Documentation

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::addQuad | ( | int | a,
|  | int | b,
|  | int | c,
|  | int | d,
|  | int | idx,
|  | std::vector< pcl::Vertices > & | polygons
| ) |  |

inline protected

Add a new quad to the current polygon mesh.

Parameters

  [in] | a | index of the first vertex
  [in] | b | index of the second vertex
  [in] | c | index of the third vertex
  [in] | d | index of the fourth vertex
  [in] | idx | the index in the set of polygon vertices (assumes idx is valid in polygons)
  [out] | polygons | the polygon mesh to be updated

Definition at line 227 of file organized_fast_mesh.h.

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::addTriangle | ( | int | a,
|  | int | b,
|  | int | c,
|  | int | idx,
|  | std::vector< pcl::Vertices > & | polygons
| ) |  |

inline protected

Add a new triangle to the current polygon mesh.

Parameters

  [in] | a | index of the first vertex
  [in] | b | index of the second vertex
  [in] | c | index of the third vertex
  [in] | idx | the index in the set of polygon vertices (assumes idx is valid in polygons)
  [out] | polygons | the polygon mesh to be updated

Definition at line 209 of file organized_fast_mesh.h.

template<typename PointInT >

bool pcl::OrganizedFastMesh< PointInT >::isShadowed | ( | const PointInT & | point_a,
|  | const PointInT & | point_b
| ) |  |

inline protected

Check if a point is shadowed by another point.

Parameters

  [in] | point_a | the first point
  [in] | point_b | the second point

Definition at line 260 of file organized_fast_mesh.h.

References pcl::OrganizedFastMesh< PointInT >::cos_angle_tolerance_.

Referenced by pcl::OrganizedFastMesh< PointInT >::isShadowedQuad(), and pcl::OrganizedFastMesh< PointInT >::isShadowedTriangle().

template<typename PointInT >

bool pcl::OrganizedFastMesh< PointInT >::isShadowedQuad | ( | const int & | a,
|  | const int & | b,
|  | const int & | c,
|  | const int & | d
| ) |  |

inline protected

Check if a triangle is shadowed.

Parameters

  [in] | a | index of the first vertex
  [in] | b | index of the second vertex
  [in] | c | index of the third vertex
  [in] | d | index of the fourth vertex

Definition at line 325 of file organized_fast_mesh.h.

References pcl::PCLBase< PointInT >::input_, pcl::OrganizedFastMesh< PointInT >::isShadowed(), pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeQuadMesh(), and pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh().

template<typename PointInT >

bool pcl::OrganizedFastMesh< PointInT >::isShadowedTriangle | ( | const int & | a,
|  | const int & | b,
|  | const int & | c
| ) |  |

inline protected

Check if a triangle is shadowed.

Parameters

  [in] | a | index of the first vertex
  [in] | b | index of the second vertex
  [in] | c | index of the third vertex

Definition at line 294 of file organized_fast_mesh.h.

References pcl::PCLBase< PointInT >::input_, and pcl::OrganizedFastMesh< PointInT >::isShadowed().

template<typename PointInT >

bool pcl::OrganizedFastMesh< PointInT >::isValidQuad | ( | const int & | a,
|  | const int & | b,
|  | const int & | c,
|  | const int & | d
| ) |  |

inline protected

Check if a quad is valid.

Parameters

  [in] | a | index of the first vertex
  [in] | b | index of the second vertex
  [in] | c | index of the third vertex
  [in] | d | index of the fourth vertex

Definition at line 309 of file organized_fast_mesh.h.

References pcl::PCLBase< PointInT >::input_, and pcl::isFinite().

template<typename PointInT >

bool pcl::OrganizedFastMesh< PointInT >::isValidTriangle | ( | const int & | a,
|  | const int & | b,
|  | const int & | c
| ) |  |

inline protected

Check if a triangle is valid.

Parameters

  [in] | a | index of the first vertex
  [in] | b | index of the second vertex
  [in] | c | index of the third vertex

Definition at line 280 of file organized_fast_mesh.h.

References pcl::PCLBase< PointInT >::input_, and pcl::isFinite().

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh | ( | std::vector< pcl::Vertices > & | polygons | ) |

protected

Create an adaptive cut mesh.

Parameters

  [out] | polygons | the resultant mesh

Definition at line 209 of file organized_fast_mesh.hpp.

Referenced by pcl::OrganizedFastMesh< PointInT >::isShadowedQuad().

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh | ( | std::vector< pcl::Vertices > & | polygons | ) |

protected

Create a left cut mesh.

Parameters

  [out] | polygons | the resultant mesh

Definition at line 168 of file organized_fast_mesh.hpp.

Referenced by pcl::OrganizedFastMesh< PointInT >::isShadowedQuad().

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::makeQuadMesh | ( | std::vector< pcl::Vertices > & | polygons | ) |

protected

Create a quad mesh.

Parameters

  [out] | polygons | the resultant mesh

Definition at line 90 of file organized_fast_mesh.hpp.

Referenced by pcl::OrganizedFastMesh< PointInT >::isShadowedQuad().

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh | ( | std::vector< pcl::Vertices > & | polygons | ) |

protected

Create a right cut mesh.

Parameters

  [out] | polygons | the resultant mesh

Definition at line 127 of file organized_fast_mesh.hpp.

Referenced by pcl::OrganizedFastMesh< PointInT >::isShadowedQuad().

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::performReconstruction | ( | std::vector< pcl::Vertices > & | polygons | ) |

protected virtual

Create the surface.

Parameters

  [out] | polygons | the resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.

Implements pcl::MeshConstruction< PointInT >.

Definition at line 69 of file organized_fast_mesh.hpp.

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::performReconstruction | ( | pcl::PolygonMesh & | output | ) |

protected virtual

Create the surface.

Simply uses image indices to create an initial polygonal mesh for organized point clouds. indices_ are ignored!

Parameters

  [out] | output | the resultant polygonal mesh

Implements pcl::MeshConstruction< PointInT >.

Definition at line 48 of file organized_fast_mesh.hpp.

References pcl::PolygonMesh::cloud, pcl::getFieldIndex(), pcl::isFinite(), and pcl::PolygonMesh::polygons.

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::reconstructPolygons | ( | std::vector< pcl::Vertices > & | polygons | ) |

protected

Perform the actual polygonal reconstruction.

Parameters

  [out] | polygons | the resultant polygons

Definition at line 76 of file organized_fast_mesh.hpp.

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::resetPointData | ( | const int & | point_index,
|  | pcl::PolygonMesh & | mesh,
|  | const float & | value = `0.0f`,
|  | int | field_x_idx = `0`,
|  | int | field_y_idx = `1`,
|  | int | field_z_idx = `2`
| ) |  |

inline protected

Set (all) coordinates of a particular point to the specified value.

Parameters

  [in] | point_index | index of point
  [out] | mesh | to modify
  [in] | value | value to use when re-setting
  [in] | field_x_idx | the X coordinate of the point
  [in] | field_y_idx | the Y coordinate of the point
  [in] | field_z_idx | the Z coordinate of the point

Definition at line 246 of file organized_fast_mesh.h.

References pcl::PolygonMesh::cloud, pcl::PCLPointCloud2::data, pcl::PCLPointCloud2::fields, and pcl::PCLPointCloud2::point_step.

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::setMaxEdgeLength | ( | float | max_edge_length | ) |

inline

Set a maximum edge length.

TODO: Implement!

Parameters

  [in] | max_edge_length | the maximum edge length

Definition at line 105 of file organized_fast_mesh.h.

References pcl::OrganizedFastMesh< PointInT >::max_edge_length_squared_.

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSize | ( | int | triangle_size | ) |

inline

Set the edge length (in pixels) used for constructing the fixed mesh.

Parameters

  [in] | triangle_size | edge length in pixels (Default: 1 = neighboring pixels are connected)

Definition at line 115 of file organized_fast_mesh.h.

References pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeColumns(), and pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeRows().

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeColumns | ( | int | triangle_size | ) |

inline

Set the edge length (in pixels) used for iterating over columns when constructing the fixed mesh.

Parameters

  [in] | triangle_size | edge length in pixels (Default: 1 = neighboring pixels are connected)

Definition at line 136 of file organized_fast_mesh.h.

References pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_columns_.

Referenced by pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSize().

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeRows | ( | int | triangle_size | ) |

inline

Set the edge length (in pixels) used for iterating over rows when constructing the fixed mesh.

Parameters

  [in] | triangle_size | edge length in pixels (Default: 1 = neighboring pixels are connected)

Definition at line 126 of file organized_fast_mesh.h.

References pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_rows_.

Referenced by pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSize().

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::setTriangulationType | ( | TriangulationType | type | ) |

inline

Set the triangulation type (see TriangulationType)

Parameters

  [in] | type | quad mesh, triangle mesh with fixed left, right cut, or adaptive cut (splits a quad w.r.t. the depth (z) of the points)

Definition at line 146 of file organized_fast_mesh.h.

References pcl::OrganizedFastMesh< PointInT >::triangulation_type_.

template<typename PointInT >

void pcl::OrganizedFastMesh< PointInT >::storeShadowedFaces | ( | bool | enable | ) |

inline

Store shadowed faces or not.

Parameters

  [in] | enable | set to true to store shadowed faces

Definition at line 155 of file organized_fast_mesh.h.

References pcl::OrganizedFastMesh< PointInT >::store_shadowed_faces_.

## Member Data Documentation

template<typename PointInT >

float pcl::OrganizedFastMesh< PointInT >::cos_angle_tolerance_

protected

(Cosine of the) angle tolerance used when checking whether or not an edge between two points is shadowed.

Definition at line 177 of file organized_fast_mesh.h.

Referenced by pcl::OrganizedFastMesh< PointInT >::isShadowed().

template<typename PointInT >

float pcl::OrganizedFastMesh< PointInT >::max_edge_length_squared_

protected

max (squared) length of edge

Definition at line 162 of file organized_fast_mesh.h.

Referenced by pcl::OrganizedFastMesh< PointInT >::setMaxEdgeLength().

template<typename PointInT >

bool pcl::OrganizedFastMesh< PointInT >::store_shadowed_faces_

protected

Whether or not shadowed faces are stored, e.g., for exploration.

Definition at line 174 of file organized_fast_mesh.h.

Referenced by pcl::OrganizedFastMesh< PointInT >::storeShadowedFaces().

template<typename PointInT >

int pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_columns_

protected

size of triangle edges (in pixels) for iterating over columns

Definition at line 168 of file organized_fast_mesh.h.

Referenced by pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeColumns().

template<typename PointInT >

int pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_rows_

protected

size of triangle edges (in pixels) for iterating over rows.

Definition at line 165 of file organized_fast_mesh.h.

Referenced by pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeRows().

template<typename PointInT >

TriangulationType pcl::OrganizedFastMesh< PointInT >::triangulation_type_

protected

Type of meshing scheme (quads vs.

triangles, left cut vs. right cut ...

Definition at line 171 of file organized_fast_mesh.h.

Referenced by pcl::OrganizedFastMesh< PointInT >::setTriangulationType().

The documentation for this class was generated from the following files:

- /build/pcl-6_P28C/pcl-1.7.2/surface/include/pcl/surface/organized_fast_mesh.h
- /build/pcl-6_P28C/pcl-1.7.2/surface/include/pcl/surface/impl/organized_fast_mesh.hpp