CGAL 6.1 - Shape Detection
|
#include <CGAL/Shape_detection/Region_growing/Region_growing.h>
Main class/entry point for running the region growing algorithm.
This version of the region growing algorithm enables to detect regions in a set of user-defined items
NeighborQuery
parameter class andRegionType
parameter class,SeedRange
defining the seeding order of items and skipping unnecessary items.NeighborQuery | a model of NeighborQuery |
RegionType | a model of RegionType |
RegionMap | a model of ReadWritePropertyMap whose key type is Item and value type is std::size_t . |
Types | |
using | Item = typename RegionType::Item |
Item type. | |
using | Region = std::vector< Item > |
using | Primitive_and_region = std::pair< typename Region_type::Primitive, Region > |
Primitive and region type. | |
using | Region_map = RegionMap |
Item to region property map. | |
Initialization (RegionMap is the default type) | |
template<typename InputRange , typename ItemMap = Default> | |
Region_growing (const InputRange &input_range, NeighborQuery &neighbor_query, RegionType ®ion_type, ItemMap item_map=ItemMap()) | |
initializes the region growing algorithm. | |
template<typename InputRange , typename SeedRange , typename ItemMap = Default> | |
Region_growing (const InputRange &input_range, SeedRange &seed_range, NeighborQuery &neighbor_query, RegionType ®ion_type, ItemMap item_map=ItemMap()) | |
initializes the region growing algorithm. | |
Initialization (RegionMap is a user provided type) | |
template<typename InputRange , typename ItemMap = Default> | |
Region_growing (const InputRange &input_range, NeighborQuery &neighbor_query, RegionType ®ion_type, Region_map rm, ItemMap item_map=ItemMap()) | |
initializes the region growing algorithm. | |
template<typename InputRange , typename SeedRange , typename ItemMap = Default> | |
Region_growing (const InputRange &input_range, SeedRange &seed_range, NeighborQuery &neighbor_query, RegionType ®ion_type, Region_map rm, ItemMap item_map=ItemMap()) | |
initializes the region growing algorithm. | |
Detection | |
template<typename PrimitiveAndRegionOutputIterator = Emptyset_iterator> | |
PrimitiveAndRegionOutputIterator | detect (PrimitiveAndRegionOutputIterator region_out=PrimitiveAndRegionOutputIterator()) |
runs the region growing algorithm and fills an output iterator with the fitted primitive and their region. | |
const Region_map & | region_map () |
provides a property map that provides the region index (or std::size_t(-1)) for each input element. | |
Unassigned Items | |
template<typename InputRange , typename ItemOutputIterator , typename ItemMap = Default> | |
ItemOutputIterator | unassigned_items (const InputRange &input_range, ItemOutputIterator output, ItemMap item_map=ItemMap()) const |
fills an output iterator with all unassigned items. | |
CGAL::Shape_detection::Region_growing< NeighborQuery, RegionType, RegionMap >::Region_growing | ( | const InputRange & | input_range, |
NeighborQuery & | neighbor_query, | ||
RegionType & | region_type, | ||
ItemMap | item_map = ItemMap() |
||
) |
initializes the region growing algorithm.
InputRange | a model of ConstRange |
ItemMap | a model of ReadablePropertyMap with InputRange::const_iterator as key type and Item as value type. A default can be deduced using the value type of InputRange and Item to be either CGAL::Dereference_property_map or CGAL::Identity_property_map . |
input_range | a range of input items for region growing. |
neighbor_query | an instance of NeighborQuery that is used internally to access item's neighbors |
region_type | an instance of RegionType that is used internally to control if items form a valid region type |
item_map | an instance of the property map to retrieve items from input values |
input_range.size() > 0
CGAL::Shape_detection::Region_growing< NeighborQuery, RegionType, RegionMap >::Region_growing | ( | const InputRange & | input_range, |
SeedRange & | seed_range, | ||
NeighborQuery & | neighbor_query, | ||
RegionType & | region_type, | ||
ItemMap | item_map = ItemMap() |
||
) |
initializes the region growing algorithm.
InputRange | a model of ConstRange |
SeedRange | a model of ConstRange with Item as value type |
ItemMap | a model of ReadablePropertyMap with InputRange::const_iterator as key type and Item as value type. A default can be deduced using the value type of InputRange and Item to be either CGAL::Dereference_property_map or CGAL::Identity_property_map . |
input_range | a range of input items for region growing |
neighbor_query | an instance of NeighborQuery that is used internally to access item's neighbors |
region_type | an instance of RegionType that is used internally to control if items form a valid region type |
seed_range | a vector of Item that is used as seeds for the region growing. Defaults to the full input_range. |
item_map | an instance of the property map to retrieve items from input values |
input_range.size() > 0
CGAL::Shape_detection::Region_growing< NeighborQuery, RegionType, RegionMap >::Region_growing | ( | const InputRange & | input_range, |
NeighborQuery & | neighbor_query, | ||
RegionType & | region_type, | ||
Region_map | rm, | ||
ItemMap | item_map = ItemMap() |
||
) |
initializes the region growing algorithm.
InputRange | a model of ConstRange |
ItemMap | a model of ReadablePropertyMap with InputRange::const_iterator as key type and Item as value type. A default can be deduced using the value type of InputRange and Item to be either CGAL::Dereference_property_map or CGAL::Identity_property_map . |
input_range | a range of input items for region growing. |
neighbor_query | an instance of NeighborQuery that is used internally to access item's neighbors |
region_type | an instance of RegionType that is used internally to control if items form a valid region type |
item_map | an instance of the property map to retrieve items from input values |
rm | external property map that will be filled when calling detect() |
input_range.size() > 0
CGAL::Shape_detection::Region_growing< NeighborQuery, RegionType, RegionMap >::Region_growing | ( | const InputRange & | input_range, |
SeedRange & | seed_range, | ||
NeighborQuery & | neighbor_query, | ||
RegionType & | region_type, | ||
Region_map | rm, | ||
ItemMap | item_map = ItemMap() |
||
) |
initializes the region growing algorithm.
InputRange | a model of ConstRange |
SeedRange | a model of ConstRange with Item as value type |
ItemMap | a model of ReadablePropertyMap with InputRange::const_iterator as key type and Item as value type. A default can be deduced using the value type of InputRange and Item to be either CGAL::Dereference_property_map or CGAL::Identity_property_map . |
input_range | a range of input items for region growing |
neighbor_query | an instance of NeighborQuery that is used internally to access item's neighbors |
region_type | an instance of RegionType that is used internally to control if items form a valid region type |
seed_range | a vector of Item that is used as seeds for the region growing. Defaults to the full input_range. |
item_map | an instance of the property map to retrieve items from input values |
rm | external property map that will be filled when calling detect() |
input_range.size() > 0
runs the region growing algorithm and fills an output iterator with the fitted primitive and their region.
PrimitiveAndRegionOutputIterator | a model of OutputIterator whose value type is Primitive_and_region |
region_out | an output iterator of type PrimitiveAndRegionOutputIterator . |
const Region_map & CGAL::Shape_detection::Region_growing< NeighborQuery, RegionType, RegionMap >::region_map | ( | ) |
provides a property map that provides the region index (or std::size_t(-1)) for each input element.
ItemOutputIterator CGAL::Shape_detection::Region_growing< NeighborQuery, RegionType, RegionMap >::unassigned_items | ( | const InputRange & | input_range, |
ItemOutputIterator | output, | ||
ItemMap | item_map = ItemMap() |
||
) | const |
fills an output iterator with all unassigned items.
ItemOutputIterator | a model of OutputIterator whose value type is Item |
InputRange | a model of ConstRange |
ItemMap | a model of ReadablePropertyMap with InputRange::const_iterator as key type and Item as value type. A default can be deduced using the value type of InputRange and Item to be either CGAL::Dereference_property_map or CGAL::Identity_property_map . |
input_range | a range of input items for region growing |
output | an iterator of type PrimitiveAndRegionOutputIterator . |
item_map | an instance of the property map to retrieve items from input values |