\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 5.0.2 - Shape Detection
RegionType Concept Reference

Definition

A concept that describes the set of methods used by the CGAL::Shape_detection::Region_growing to maintain a region.

A region is represented by a set of indices of the items, which are included in this region.

Has Models:

Public Member Functions

bool is_part_of_region (const std::size_t index_from, const std::size_t index_to, const std::vector< std::size_t > &indices)
 checks if the item with the index index_to, which is a neighbor of the item with the index index_from, can be added to the region represented by indices. More...
 
bool is_valid_region (const std::vector< std::size_t > &indices)
 checks if the region represented by indices satisfies all necessary conditions. More...
 
void update (const std::vector< std::size_t > &indices)
 enables to update any information that is maintained with the region represented by indices. More...
 

Member Function Documentation

◆ is_part_of_region()

bool RegionType::is_part_of_region ( const std::size_t  index_from,
const std::size_t  index_to,
const std::vector< std::size_t > &  indices 
)

checks if the item with the index index_to, which is a neighbor of the item with the index index_from, can be added to the region represented by indices.

CGAL::Shape_detection::Region_growing calls this function each time when trying to add a new item to a region. If this function returns true, the item with the index index_to, is added to the region, otherwise ignored.

◆ is_valid_region()

bool RegionType::is_valid_region ( const std::vector< std::size_t > &  indices)

checks if the region represented by indices satisfies all necessary conditions.

CGAL::Shape_detection::Region_growing calls this function at the end of each propagation phase. If this function returns true, the region is accepted, otherwise rejected. If the region is rejected, all its items are released and available for region growing again.

◆ update()

void RegionType::update ( const std::vector< std::size_t > &  indices)

enables to update any information that is maintained with the region represented by indices.

CGAL::Shape_detection::Region_growing calls this function each time when a new seed item is selected. In this case, indices.size() = 1. This function is also called periodically when enlarging the region. In this case, indices.size() > 1.