- the maximum distance from the furthest vertex of a segment to a line
-
Type:
GeomTraits::FT - Default: 1
|
CGAL 6.2 - Shape Detection
|
#include <CGAL/Shape_detection/Region_growing/Segment_set/Line_segment_region.h>
Region type based on the line of the first segment selected.
This class uses the supporting line of the first segment picked for the region and expands it for all segments with a direction close to that of the first segment (close being defined by the maximum_distance parameter) and such that endpoints are not far from that supporting line (far being defined by the maximum_angle or cosine_of_maximum_angle parameter).
| GeomTraits | a model of Kernel |
| Item_ | a descriptor representing a given segment. Must be a model of Hashable. |
| SegmentMap | a model of ReadablePropertyMap whose key type is Item_ and value type is GeomTraits::Segment_2 or GeomTraits::Segment_3 |
RegionType Types | |
| using | Segment_map = SegmentMap |
| using | Segment_type = typename Segment_map::value_type |
| using | FT = typename GeomTraits::FT |
| Number type. | |
| using | Item = Item_ |
| Item type. | |
| using | Region = std::vector< Item > |
| using | Primitive = typename GeomTraits::Line_2 or typename GeomTraits::Line_3 |
| using | Region_unordered_map = std::unordered_map< Item, std::size_t, internal::hash_item< Item > > |
| using | Region_index_map = boost::associative_property_map< Region_unordered_map > |
Initialization | |
| template<typename NamedParameters = parameters::Default_named_parameters> | |
| Line_segment_region (const NamedParameters &np=parameters::default_values()) | |
| initializes all internal data structures. | |
Access | |
| Region_index_map | region_index_map () |
implements RegionType::region_index_map(). | |
| Primitive | primitive () const |
implements RegionType::primitive(). | |
| bool | is_part_of_region (const Item query, const Region &) const |
implements RegionType::is_part_of_region(). | |
| bool | is_valid_region (const Region ®ion) const |
implements RegionType::is_valid_region(). | |
| bool | update (const Region ®ion) |
implements RegionType::update(). | |
| CGAL::Shape_detection::Segment_set::Line_segment_region< GeomTraits, Item_, SegmentMap >::Line_segment_region | ( | const NamedParameters & | np = parameters::default_values() | ) |
initializes all internal data structures.
| NamedParameters | a sequence of Named Parameters |
| np | a sequence of Named Parameters among the ones listed below |
| |
| |
| |
| |
| |
|
maximum_distance >= 0 maximum_angle >= 0 && maximum_angle <= 90 cosine_of_maximum_angle >= 0 && cosine_of_maximum_angle <= 1 minimum_region_size > 0 | bool CGAL::Shape_detection::Segment_set::Line_segment_region< GeomTraits, Item_, SegmentMap >::is_part_of_region | ( | const Item | query, |
| const Region & | |||
| ) | const |
implements RegionType::is_part_of_region().
This function determines if a segment with the index query is within the maximum_distance from the corresponding line and if the angle between the direction of this segment and the line's direction is within the maximum_angle. If both conditions are satisfied, it returns true, otherwise false.
| query | item of the query segment |
| bool CGAL::Shape_detection::Segment_set::Line_segment_region< GeomTraits, Item_, SegmentMap >::is_valid_region | ( | const Region & | region | ) | const |
implements RegionType::is_valid_region().
This function controls if the region contains at least minimum_region_size segments.
| region | Segments of the region represented as Items. |
| Primitive CGAL::Shape_detection::Segment_set::Line_segment_region< GeomTraits, Item_, SegmentMap >::primitive | ( | ) | const |
implements RegionType::primitive().
This function provides the support line of the seed segment.
| Region_index_map CGAL::Shape_detection::Segment_set::Line_segment_region< GeomTraits, Item_, SegmentMap >::region_index_map | ( | ) |
implements RegionType::region_index_map().
This function creates an empty property map that maps iterators on the input range Item to std::size_t.
| bool CGAL::Shape_detection::Segment_set::Line_segment_region< GeomTraits, Item_, SegmentMap >::update | ( | const Region & | region | ) |
implements RegionType::update().
This function uses the support line of the seed segment as primitive.
| region | Segments of the region represented as Items. |
true if the line fitting succeeded and false otherwiseregion.size() > 0