Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c7fe36a
Feature graph initial commit
ange-clement Apr 10, 2026
f3c299e
Initial API for Feature graph
ange-clement Apr 16, 2026
dee6f63
Updated API for Feature graph
ange-clement Apr 17, 2026
6953ea2
API Changes
ange-clement Apr 22, 2026
b85a0b7
Regularization parameters
ange-clement Apr 27, 2026
bf7c751
Fix missing quote + Use stars for doc
ange-clement May 6, 2026
43701aa
Changed "// @" to "/// @"
ange-clement May 6, 2026
106d1bb
Temporarily moved doc folder
ange-clement May 7, 2026
b175e0a
Moved measures to namespace Feature_graph
ange-clement May 7, 2026
a5a7b7a
Fixed missing link
ange-clement May 7, 2026
c0d790f
Add GPL License
ange-clement May 7, 2026
cc3669a
Moved the documentation and created minimum files
ange-clement May 7, 2026
a104997
Added package dependencies
ange-clement May 19, 2026
62b468a
Added package to list + dependencies
ange-clement May 20, 2026
e3af8ba
Revert "Added package to list + dependencies"
ange-clement May 20, 2026
df86aa4
Added package to list + dependencies
ange-clement May 20, 2026
38866d9
Added dummy manual page
ange-clement Jun 3, 2026
f059139
Fix empty example
ange-clement Jun 3, 2026
d83a764
First simple fixes
ange-clement Jun 9, 2026
0ee5861
First fix of the rest of the first review
ange-clement Jun 10, 2026
7cd79d4
Removed wrong model
ange-clement Jun 11, 2026
d619c87
Fix second pass
ange-clement Jun 17, 2026
4279785
Detect_features: unwrap of the parameters.
ange-clement Jun 19, 2026
2da740b
Removed concept FeatureImage_3
ange-clement Jun 19, 2026
49a34d3
Merge branch 'main' of https://github.com/CGAL/cgal into Feature_grap…
ange-clement Jun 25, 2026
d58ce24
Merge branch 'main' of https://github.com/CGAL/cgal into Feature_grap…
ange-clement Jun 29, 2026
f2d550f
Added an example
ange-clement Jul 3, 2026
7c64c5e
Made the example compiles
ange-clement Jul 3, 2026
2de78f0
Removed whitespace
ange-clement Jul 3, 2026
140b954
Removed whitespace 2 : electric boogaloo
ange-clement Jul 3, 2026
0526708
Feature_graph : Include Named_function_parameters for example
ange-clement Jul 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Documentation/doc/Documentation/packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
\package_listing{Surface_mesh_approximation}
\package_listing{Heat_method_3}
\package_listing{Surface_mesh_topology}
\package_listing{Feature_graph}

\cgalPackageSection{PartPointSetProcessing,Point Set Processing}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
namespace CGAL {

namespace Feature_graph {

/*!
* \ingroup PkgFeatureGraphNormalEstimator, PkgFeatureGraphSharpnessEstimator
*
* \brief Class that evaluates the Ambriosio-Tortorelli normals and sharpness measure from an image.
* Two estimators can then be retrieved to access the normal and sharpness estimations.
*
* \tparam Vector_3 the type of the normal vector model of `Kernel::Vector_3`.
*
*/
template <typename Vector_3>
struct Image_AmbrosioTortorelli
{
public:
/// \name Types
/// @{

/*!
* The type of the normal vector.
*/
typedef Vector_3 Normal_type;

/*!
* The type of the estimator that allow the user to retrieve the sharpness values.
* \cgalModels{SharpnessEstimator}
*/
typedef unspecified_type Sharpness_estimator;
/*!
* The type of the estimator that allow the user to retrieve the normals.
* \cgalModels{NormalEstimator}
*/
typedef unspecified_type Normal_estimator;

/// @}

/// \name Constructor
/// @{

/*!
* evaluates the normal and sharpness values using the Ambrosio-Tortorelli energy optimization.
*
* \param image the image domain.
* \param selection_threshold a threshold on the sharpness value.
* Elements with a sharpness value lower than this threshold are considered flat
* and will be given a negative value.
*/
Image_AmbrosioTortorelli(const CGAL::Image_3& image, const Sharpness_estimator::Sharpness_number_type& selection_threshold = Sharpness_estimator::Sharpness_number_type(0.25));

/// @}

/// \name Estimators
/// @{

/*!
* returns the estimator that allow the user to retrieve the sharpness values.
*/
Sharpness_estimator sharpness_estimator() const;
/*!
* returns the estimator that allow the user to retrieve the normals.
*/
Normal_estimator normal_estimator() const;

/// @}
};

} /* namespace Feature_graph */

} /* namespace CGAL */
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
namespace CGAL {

namespace Feature_graph {

/*!
* \ingroup PkgFeatureGraphNormalEstimator
*
* \brief Estimator that assign a normal on elements of a surface.
*
* \tparam Vector_3 the type of the normal vector model of `Kernel::Vector_3`.
*
* \cgalModels{NormalEstimator}
*/
template <typename Vector_3>
struct Surface_normal_estimator
{
public:
/// \name Types
/// @{

/*!
* The type of the normal vector.
*/
typedef Vector_3 Normal_type;

/// @}

/// \name Constructor
/// @{

/*!
* Constructor that pre-computes the normals on the surface.
*
* \tparam PolygonMesh a model of `FaceListGraph` that represents a surface mesh.
*
* \param pmesh the surface where the normals are evaluated.
*/
template <typename PolygonMesh>
Surface_normal_estimator(const PolygonMesh& pmesh);

/// @}

/// \name Estimator
/// @{

/*!
* returns the normal vector of the surface element identified by a dimension and a descriptor.
*
* \tparam DimensionTag a tag that represent the element type.
* Can be `CGAL::Dimension_tag<0>`, `CGAL::Dimension_tag<1>` or `CGAL::Dimension_tag<2>`
* \tparam Descriptor the type of descriptor used to identify the element to evaluate,
* which can be a vertex, an edge, or a facet according to the DimensionTag.
* If the domain is of type `CGAL::Image_3`, it is a `std::size_t` for element with
* dimension 0, 1 and 2. If the domain is a model of `FaceListGraph`, it is a
* `vertex_descriptor` (resp. `halfedge_descriptor`; `face_descriptor `) for element with
* dimension 0 (resp. 1 ; 2).
* \tparam Domain the type of the surface where the element is embedded.
* Can be a `CGAL::Image_3`, or a model of `FaceListGraph` that represents a surface mesh.
*
* \param element_descriptor the descriptor of the element on the surface.
* \param domain the domain that contains the elements.
*/
template <typename DimensionTag, typename Descriptor, typename Domain>
Normal_type operator()(const Descriptor& element_descriptor, const Domain& domain) const;

/// @}
};

} /* namespace Feature_graph */

} /* namespace CGAL */
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
namespace CGAL {

namespace Feature_graph {

/*!
* \ingroup PkgFeatureGraphSharpnessEstimator
*
* \brief Estimator that assign a sharpness value on elements of a surface.
*
* \cgalModels{SharpnessEstimator}
*/
struct Surface_sharpness_estimator
{
public:
/// \name Types
/// @{

/*!
* The type of the sharpness value.
*/
typedef double Sharpness_number_type;

/// @}

/// \name Constructor
/// @{

/*!
* Constructor that pre-computes the normals on the surface.
*
* \tparam PolygonMesh a model of `FaceListGraph` that represents a surface.
* \tparam FT a model of `RealEmbeddable`
*
* \param pmesh the surface where the normals are evaluated.
* \param selection_threshold a threshold on the sharpness value.
* Elements with a sharpness value lower than this threshold are considered flat
* and will be given a negative value.
*/
template <typename PolygonMesh>
Surface_sharpness_estimator(const PolygonMesh& pmesh, const Sharpness_number_type& selection_threshold);

/// @}

/// \name Estimator
/// @{

/*!
* returns the sharpness value of the surface element described by a type and a descriptor.
*
* \tparam DimensionTag a tag that represent the element type.
* Can be `CGAL::Dimension_tag<0>`, `CGAL::Dimension_tag<1>` or `CGAL::Dimension_tag<2>`
* \tparam Descriptor the type of descriptor used to identify the element to evaluate,
* which can be a vertex, an edge, or a facet according to the DimensionTag.
* If the domain is of type `CGAL::Image_3`, it is a `std::size_t` for element with
* dimension 0, 1 and 2. If the domain is a model of `FaceListGraph`, it is a
* `vertex_descriptor` (resp. `halfedge_descriptor`; `face_descriptor `) for element with
* dimension 0 (resp. 1 ; 2).
* \tparam Domain the type of the surface where the element is embedded.
* Can be a `CGAL::Image_3`, or a model of `FaceListGraph` that represents a surface mesh.
*
* \param element_descriptor the descriptor of the element on the surface.
* \param domain the domain that contains the elements.
*/
template <typename DimensionTag, typename Descriptor, typename Domain>
Sharpness_number_type operator()(const Descriptor& element_descriptor, const Domain& domain) const;

/// @}
};

} /* namespace Feature_graph */

} /* namespace CGAL */
Loading
Loading