CGAL 5.6 - Shape Detection
RegionType Concept Reference

Definition

Public Types

typedef unspecified_type Primitive
 The parameters of the primitive covering the region.
 
typedef unspecified_type Item
 The reference type to the elements of the input range, e.g., a const_iterator of the input range.
 
typedef std::vector< ItemRegion
 
typedef unspecified_type Region_index_map
 a model of ReadWritePropertyMap whose key type is Item and value type is std::size_t. More...
 

Public Member Functions

bool is_part_of_region (const Item i, const Region &region)
 checks if the item i can be added to the region represented by region. More...
 
bool is_valid_region (const Region &region)
 checks if region satisfies all necessary conditions. More...
 
Primitive primitive () const
 provides the last primitive that has been fitted with the region.
 
bool update (const Region &region)
 enables to update any information about the region represented by the collection of Items region. More...
 

Member Typedef Documentation

◆ Region_index_map

a model of ReadWritePropertyMap whose key type is Item and value type is std::size_t.

This map associates item of the input range to the index of the region it belongs to.

Member Function Documentation

◆ is_part_of_region()

bool RegionType::is_part_of_region ( const Item  i,
const Region &  region 
)

checks if the item i can be added to the region represented by region.

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 i, is added to the region, otherwise ignored.

◆ is_valid_region()

bool RegionType::is_valid_region ( const Region &  region)

checks if region 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()

bool RegionType::update ( const Region &  region)

enables to update any information about the region represented by the collection of Items region.

CGAL::Shape_detection::Region_growing calls this function each time when a new seed item is selected. This case can be identified by checking the condition region.size() == 1. This function is also called periodically when enlarging the region. This case can be identified by checking the condition region.size() > 1.

This function also returns a Boolean at the first call when a new region with one seed item is being created. When it is true, the new region is further propagated, otherwise, it is rejected.