diff --git a/Classification/include/CGAL/Point_set_classifier.h b/Classification/include/CGAL/Point_set_classifier.h index 8b6885e7b90..99b4e4a4c8b 100644 --- a/Classification/include/CGAL/Point_set_classifier.h +++ b/Classification/include/CGAL/Point_set_classifier.h @@ -190,13 +190,46 @@ public: /// \endcond - template, - typename ColorMap = CGAL::Default_property_map, - typename EchoMap = CGAL::Default_property_map > - void generate_attributes (std::size_t nb_scales = 1, + template + const T& get_parameter (const T& t) + { + return t; + } + + template + void generate_attributes (std::size_t nb_scales, VectorMap normal_map = VectorMap(), ColorMap color_map = ColorMap(), EchoMap echo_map = EchoMap()) + { + typedef typename Default::Get::type + Vmap; + typedef typename Default::Get::type + Cmap; + typedef typename Default::Get::type + Emap; + + generate_attributes_impl (nb_scales, + get_parameter(normal_map), + get_parameter(color_map), + get_parameter(echo_map)); + } + + + template + Default_property_map + get_parameter (const Default&) + { + return Default_property_map(); + } + + template + void generate_attributes_impl (std::size_t nb_scales, + VectorMap normal_map, + ColorMap color_map, + EchoMap echo_map) { m_bbox = CGAL::bounding_box (boost::make_transform_iterator (m_input.begin(), @@ -224,6 +257,7 @@ public: generate_echo_based_attributes (echo_map); } + /// \cond SKIP_IN_MANUAL virtual ~Point_set_classifier() { @@ -620,13 +654,32 @@ public: \param color_map Property map to access the colors of the input points (if any). \param echo_map Property map to access the echo values of the input points (if any). */ - template, - typename ColorMap = CGAL::Default_property_map, - typename EchoMap = CGAL::Default_property_map > + template bool load_configuration (std::istream& input, VectorMap normal_map = VectorMap(), ColorMap color_map = ColorMap(), EchoMap echo_map = EchoMap()) + { + typedef typename Default::Get::type + Vmap; + typedef typename Default::Get::type + Cmap; + typedef typename Default::Get::type + Emap; + + return load_configuration_impl (input, + get_parameter(normal_map), + get_parameter(color_map), + get_parameter(echo_map)); + } + + template + bool load_configuration_impl (std::istream& input, + VectorMap normal_map, + ColorMap color_map, + EchoMap echo_map) { typedef Classification::Attribute::Echo_scatter Echo_scatter; typedef Classification::Attribute::Hsv Hsv;