Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Member Functions | Protected Attributes
pcl::DistanceMap Class Reference

Represents a distance map obtained from a distance transformation. More...

#include <pcl/recognition/distance_map.h>

Public Member Functions

 DistanceMap ()
 Constructor. More...
 
virtual ~DistanceMap ()=default
 Destructor. More...
 
std::size_t getWidth () const
 Returns the width of the map. More...
 
std::size_t getHeight () const
 Returns the height of the map. More...
 
float * getData ()
 Returns a pointer to the beginning of map. More...
 
void resize (const std::size_t width, const std::size_t height)
 Resizes the map to the specified size. More...
 
float & operator() (const std::size_t col_index, const std::size_t row_index)
 Operator to access an element of the map. More...
 
const float & operator() (const std::size_t col_index, const std::size_t row_index) const
 Operator to access an element of the map. More...
 

Protected Attributes

std::vector< float > data_
 The storage for the distance map data. More...
 
std::size_t width_ {0}
 The width of the map. More...
 
std::size_t height_ {0}
 The height of the map. More...
 

Detailed Description

Represents a distance map obtained from a distance transformation.

Author
Stefan Holzer

Definition at line 46 of file distance_map.h.

Constructor & Destructor Documentation

◆ DistanceMap()

pcl::DistanceMap::DistanceMap ( )
inline

Constructor.

Definition at line 50 of file distance_map.h.

◆ ~DistanceMap()

virtual pcl::DistanceMap::~DistanceMap ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getData()

float* pcl::DistanceMap::getData ( )
inline

Returns a pointer to the beginning of map.

Definition at line 70 of file distance_map.h.

References data_.

Referenced by pcl::ColorModality< PointInT >::computeDistanceMap(), and pcl::SurfaceNormalModality< PointInT >::computeDistanceMap().

◆ getHeight()

std::size_t pcl::DistanceMap::getHeight ( ) const
inline

Returns the height of the map.

Definition at line 63 of file distance_map.h.

References height_.

◆ getWidth()

std::size_t pcl::DistanceMap::getWidth ( ) const
inline

Returns the width of the map.

Definition at line 56 of file distance_map.h.

References width_.

◆ operator()() [1/2]

float& pcl::DistanceMap::operator() ( const std::size_t  col_index,
const std::size_t  row_index 
)
inline

Operator to access an element of the map.

Parameters
[in]col_indexthe column index of the element to access.
[in]row_indexthe row index of the element to access.

Definition at line 92 of file distance_map.h.

References data_, and width_.

◆ operator()() [2/2]

const float& pcl::DistanceMap::operator() ( const std::size_t  col_index,
const std::size_t  row_index 
) const
inline

Operator to access an element of the map.

Parameters
[in]col_indexthe column index of the element to access.
[in]row_indexthe row index of the element to access.

Definition at line 102 of file distance_map.h.

References data_, and width_.

◆ resize()

void pcl::DistanceMap::resize ( const std::size_t  width,
const std::size_t  height 
)
inline

Resizes the map to the specified size.

Parameters
[in]widththe new width of the map.
[in]heightthe new height of the map.

Definition at line 80 of file distance_map.h.

References data_, height_, and width_.

Referenced by pcl::ColorModality< PointInT >::computeDistanceMap(), and pcl::SurfaceNormalModality< PointInT >::computeDistanceMap().

Member Data Documentation

◆ data_

std::vector<float> pcl::DistanceMap::data_
protected

The storage for the distance map data.

Definition at line 109 of file distance_map.h.

Referenced by getData(), operator()(), and resize().

◆ height_

std::size_t pcl::DistanceMap::height_ {0}
protected

The height of the map.

Definition at line 113 of file distance_map.h.

Referenced by getHeight(), and resize().

◆ width_

std::size_t pcl::DistanceMap::width_ {0}
protected

The width of the map.

Definition at line 111 of file distance_map.h.

Referenced by getWidth(), operator()(), and resize().


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