Skip to content

Commit 40e195e

Browse files
authored
Merge branch 'master' into NoInstall
2 parents 3500b9d + c3da8b2 commit 40e195e

File tree

9 files changed

+174
-101
lines changed

9 files changed

+174
-101
lines changed

.github/actions/dgtal-config/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
if: ${{ runner.os == 'Linux' && inputs.config-name == 'default' }}
3232
shell: bash
3333
run: |
34-
echo "DGTAL_CMAKE_CONFIG=-DDGTAL_WITH_CGAL=true -DDGTAL_WITH_LIBIGL=true -DDGTAL_WITH_FFTW3=true -DDGTAL_WITH_HDF5=true -DDGTAL_WITH_OPENMP=true -DDGTAL_WITH_POLYSCOPE_VIEWER=true -DDGTAL_WITH_CAIRO=true -DDGTAL_WITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DDGTAL_WARNING_AS_ERROR=ON -G Ninja" >> "$GITHUB_ENV"
34+
echo "DGTAL_CMAKE_CONFIG -DDGTAL_WITH_CGAL=true -DDGTAL_WITH_LIBIGL=true -DDGTAL_WITH_FFTW3=true -DDGTAL_WITH_HDF5=true -DDGTAL_WITH_OPENMP=true -DDGTAL_WITH_POLYSCOPE_VIEWER=true -DDGTAL_WITH_CAIRO=true -DDGTAL_WITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DDGTAL_WARNING_AS_ERROR=ON -G Ninja" >> "$GITHUB_ENV"
3535
3636
- name: "Default MacOS"
3737
if: ${{ runner.os == 'macOS' && inputs.config-name == 'default' }}
@@ -72,5 +72,5 @@ runs:
7272
working-directory: ${{ inputs.dgtal }}
7373
run: |
7474
echo "cmake-config=$(echo $DGTAL_CMAKE_CONFIG)" >> "$GITHUB_OUTPUT"
75-
echo "cmake-test-blacklist='(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)'" >> "$GITHUB_OUTPUT"
75+
echo "cmake-test-blacklist='(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels|testStern)'" >> "$GITHUB_OUTPUT"
7676
echo "cmake-test-whitelist='$( ${{ inputs.dgtal }}/.github/actions/dgtal-config/get_whitelist.sh )'" >> "$GITHUB_OUTPUT"

CMakeLists.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,21 @@
22
# Project definition
33
# -----------------------------------------------------------------------------
44
cmake_minimum_required (VERSION 3.20)
5-
project (DGtal VERSION 2.1.0)
6-
set(DGTAL_VERSION 2.1.0) # TODO: Set version through VERSION file
5+
6+
# Reading version
7+
file(READ "VERSION" version_file_raw)
8+
string(REGEX REPLACE "[\r\n]" "" version_file "${version_file_raw}")
9+
string(REGEX MATCHALL "([0-9]+)" version_parts ${version_file})
10+
11+
set(DGtal_VERSION ${version_file})
12+
list(GET version_parts 0 DGtal_VERSION_MAJOR)
13+
list(GET version_parts 1 DGtal_VERSION_MINOR)
14+
list(GET version_parts 2 DGtal_VERSION_PATCH)
15+
16+
set(PROJECT_VERSION ${DGtal_VERSION})
17+
set(VERSION ${DGtal_VERSION})
18+
19+
project (DGtal VERSION ${DGtal_VERSION})
720

821
# Allow for cmake 3.5. This is required indirectly by polyscope (via glad)
922
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
- *IO*
66
- Polyscope viewer upgraded from 2.4 to 2.5 (David Coeurjolly, [#1796](https://github.com/DGtal-team/DGtal/pull/1796)). Reverting to 2.4 due to build issues (David Coeurjolly, [#1797](https://github.com/DGtal-team/DGtal/pull/1797))
77

8+
- *Documentation*
9+
- Refactoring of the volumetric examples in the Shortcuts (David Coeurjolly, [#1807](https://github.com/DGtal-team/DGtal/pull/1807)).
10+
11+
812
## Bug fixes
913

1014
- *Arithmetics*
@@ -14,6 +18,7 @@
1418
- Fix issue [#1797](https://github.com/DGtal-team/DGtal/pull/1797), assertions raised in testCellGeometry and testDigitalConvexity because of improper digital space extent (Jacques-Olivier Lachaud, [#1801](https://github.com/DGtal-team/DGtal/pull/1801))
1519

1620
- *Build*
21+
- Version is now extracted from the `VERSION` file for CMake and Python builds (Bastien Doignies, [#1810](https://github.com/DGtal-team/DGtal/pull/1810))
1722
- Replacing the global compilation flags when `DGTAL_WARNINGS_AS_ERRORS` is set, with per target `target_compile_options` to avoid errors on Boost warnings (David Coeurjolly, [#1793](https://github.com/DGtal-team/DGtal/pull/1793))
1823
- Fixing the `make install` command for boost (issue #1794) (Bastien Doignies, [#1793](https://github.com/DGtal-team/DGtal/pull/1793))
1924
- Adding option not to install targets to avoid crashes when boost is fetched through multiple channels ([#1809](https://github.com/DGtal-team/DGtal/pull/1809))

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.0

examples/tutorial-examples/shortcuts-geometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ int main( int /* argc */, char** /* argv */ )
461461
std::back_inserter(sites),
462462
*bimage);
463463

464-
// Compute VoronoiMap and get distances from sites
464+
// Compute VoronoiMap and get distances from sites (L_1 and L_2 metrics)
465465
auto vmap1 = SHG3::getDistanceTransformation<1>(bimage->domain(), sites, params);
466466
auto vmap2 = SHG3::getDistanceTransformation<2>(bimage->domain(), sites, params);
467467

pyproject.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ build-backend = "scikit_build_core.build"
44

55
[project]
66
name = "DGtal"
7-
version = "2.1.0"
7+
dynamic = ["version"]
8+
# version = "2.1.0"
89
description = "DGtal is an open-source, cross-platform library providing Digital Geometry Tools and Algorithm"
910

1011
authors = [
@@ -27,6 +28,17 @@ classifiers = [
2728
"Operating System :: MacOS"
2829
]
2930

31+
[tool.scikit-build.metadata.version]
32+
provider = "scikit_build_core.metadata.regex"
33+
input = "VERSION"
34+
regex = '''(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)'''
35+
result = "{major}.{minor}.{patch}"
36+
37+
38+
[[tool.scikit-build.generate]]
39+
path = "VERSION"
40+
template = '''version = ${version}'''
41+
3042
[project.urls]
3143
Homepage = "https://www.dgtal.org/"
3244

src/DGtal/doc/packagePython.dox

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ namespace DGtal {
3939
@managers David Coeurjolly
4040
@since 1.2
4141

42+
[TOC]
4243

4344
@b Package @b Overview
4445

@@ -75,7 +76,7 @@ import dgtal
7576
....
7677
@endcode
7778

78-
@section code_example Examples
79+
@section code_example_python Examples
7980

8081
@subsection topology_example Topology example (Euler characteristics)
8182

@@ -119,7 +120,7 @@ ccomplex.construct(mySet)
119120
print("Euler characteristic: "+str(ccomplex.euler()))
120121
@endcode
121122

122-
@subsection shortcuts_examples Geometrical Estimators (Curvature and normals)
123+
@subsection shortcuts_examples_python Geometrical Estimators (Curvature and normals)
123124

124125
This example loads a binary image and computes integral invariant estimators and displays them within an interactive viewer. It mostly follows Shortcuts examples with a one-to-one mapping. A few other utilities are provided not to loop over elements in python.
125126

@@ -180,7 +181,7 @@ ps.show()
180181
# SH3.saveOBJ(surface, [], colors, "al.obj")
181182
@endcode
182183

183-
@section documentation Documentation
184+
@section documentation_python Documentation
184185

185186
@subsection base_topology_kernel Base, Topology and Kernel
186187

@@ -196,16 +197,16 @@ In this section, we provide a list of functions and classes that can be used in
196197
| DT4_8, DT8_4, DT6_16, DT18_6, DT6_26, DT26_6 | DGtal::DigitalTopology | DigitalTopology(foreground, background) |
197198
| Object4_8, Object8_4, Object6_18, Object18_6, Object6_26, Object26_6 | DGtal::Object | Object(topology, domain, points, connectedness) |
198199

199-
@subsection shortcuts Shortcuts
200+
@subsection shortcuts_python Python Shortcuts
200201

201-
Most shortcuts (see. \subpage moduleShortcuts) also have their binding. These are available under:
202+
Most shortcuts (see. \ref moduleShortcuts) also have their binding. These are available under:
202203

203204
@code
204205
from dgtal import SH3 #Import both shortcuts and geometry shortcuts
205206
SH3.a_function_or_classes..
206207
@endcode
207208

208-
@subsubsection shortcuts_classes Classes
209+
@subsubsection shortcuts_classes_python Classes
209210

210211
Objects within this module are not expected to be manipulated by the user. They are meant to be passed around to the next functions and are prefixed by two underscores. We reference them for completeness
211212

@@ -223,7 +224,7 @@ Objects within this module are not expected to be manipulated by the user. They
223224
| SurfelRange | DGtal::Shortcuts::SurfelRange | | std::vector<SCell>. See documentation of kernel binding above. |
224225
| ScalarStatistic | DGtal::Shortcuts::ScalarStatistic | samples(): number of samples / size(): number of samples / mean(): mean / variance(): biased variance / unbiasedVariance(): unbiased variance / min(): min / max(): max / values: list of values | Not to be created. |
225226

226-
@subsubsection shortcuts_functions Functions
227+
@subsubsection shortcuts_functions_python Functions
227228

228229
Static functions are also bound. For overloads, we only indicate the main parameters, not the whole signature. Refer to the C++ functions for complete signature (1 to 1 match).
229230

@@ -267,7 +268,7 @@ Static functions are also bound. For overloads, we only indicate the main parame
267268
| %SH3.getScalarsAbsoluteDifference | ShortcutsGeometry::getScalarsAbsoluteDifference | All. |
268269
| %SH3.getStatistic | ShortcutsGeometry::getStatistic | All. |
269270

270-
@subsubsection shortcuts_helpers Helpers functions
271+
@subsubsection shortcuts_helpers_python Helpers functions
271272

272273
Looping through objects is slow in python and digital objects may be large. For this reason, we also provide a few helper functions for ease of usage and faster code:
273274

src/DGtal/doc/tutorials/moduleShortcuts.dox

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ namespace DGtal {
66

77
/**
88

9-
@page moduleShortcuts Shortcuts (for the impatient developper)
9+
@page moduleShortcuts Shortcuts
1010

11-
@writers Jacques-Olivier Lachaud
11+
@writers Jacques-Olivier Lachaud, Bastien Doignies, David Coeurjolly
1212

1313
@since 1.0
1414

@@ -465,38 +465,38 @@ Shortcuts::Point is Z3i::KSpace::Point.
465465
-# General methods
466466
- Shortcuts::defaultParameters: returns the set of all shorcut parameters.
467467

468-
-# ImplicitShape3D methods
468+
-# Shortcuts::ImplicitShape3D methods
469469
- Shortcuts::getPolynomialList: returns the list of polynomial shapes predefined for implicit shapes
470470
- Shortcuts::parametersImplicitShape3D: parameters related to 3D implicit shapes (polynomial)
471471
- Shortcuts::makeImplicitShape3D: builds a 3D implicit shape
472472

473-
-# KSpace methods
473+
-# Shortcuts::KSpace methods
474474
- Shortcuts::parametersKSpace: parameters related to Khalimsky spaces (closed)
475475
- Shortcuts::getKSpace: overloaded methods for building a Khalimsky space from a domain or an image, from a bounding box, from a digitization process, or from a (indexed or not) digital surface.
476476
- Shortcuts::refKSpace: overloaded methods for referencing the Khalimsky space of a (indexed or not) digital surface.
477477
- Shortcuts::getCellEmbedder: returns the canonic cell embedder of the given space.
478478
- Shortcuts::getSCellEmbedder: returns the canonic signed cell embedder of the given space.
479479

480-
-# DigitizedImplicitShape3D methods
480+
-# Shortcuts::DigitizedImplicitShape3D methods
481481
- Shortcuts::parametersDigitizedImplicitShape3D: parameters related to shape digitization (bounding box, sampling)
482482
- Shortcuts::makeDigitizedImplicitShape3D: digitizes an implicit shape.
483483

484-
-# BinaryImage methods
484+
-# Shortcuts::BinaryImage methods
485485
- Shortcuts::parametersBinaryImage: parameters related to binary images (noise, threshold).
486486
- Shortcuts::makeBinaryImage: many overloaded methods for creating from scratch, vectorizing shape digitization, loading, copying/noisifying binary images, thresholding gray-scale images.
487487
- Shortcuts::saveBinaryImage: saves a binary image to a file.
488488

489-
-# GrayScaleImage methods
489+
-# Shortcuts::GrayScaleImage methods
490490
- Shortcuts::makeGrayScaleImage: overloaded methods for creating from scratch or from binary image, or for loading gray scale images, or for creating a gray-scale image from a float or double image.
491491
- Shortcuts::saveGrayScaleImage: saves a gray scale image to a file.
492492

493-
-# FloatImage methods
493+
-# Shortcuts::FloatImage methods
494494
- Shortcuts::makeFloatImage: overloaded methods for creating a float image from a domain or from an implicit shape.
495495

496-
-# DoubleImage methods
496+
-# Shortcuts::DoubleImage methods
497497
- Shortcuts::makeDoubleImage: overloaded methods for creating a double image from a domain or from an implicit shape.
498498

499-
-# DigitalSurface methods
499+
-# Shortcuts::DigitalSurface methods
500500
- Shortcuts::parametersDigitalSurface: parameters related to digital surfaces (surfel adjacency, components, internal heuristics)
501501
- Shortcuts::getCellEmbedder: returns the canonic cell embedder of the given (indexed or not) digital surface
502502
- Shortcuts::getSCellEmbedder: returns the canonic signed cell embedder of the given (indexed or not) digital surface.
@@ -510,10 +510,10 @@ Shortcuts::Point is Z3i::KSpace::Point.
510510
- Shortcuts::getPointelRange: returns the pointels of a digital surface in the default order and optionnaly the map Pointel -> Index giving the indices of each pointel, or simply the pointels around a surfel.
511511
- Shortcuts::saveOBJ: several overloaded functions that save geometric elements as an OBJ file. You may save a digital surface as an OBJ file, with optionally positions, normals and colors information
512512

513-
-# RealVectors methods
513+
-# Shortcuts::RealVectors methods
514514
- Shortcuts::saveVectorFieldOBJ: saves a vector field as an OBJ file (vectors are represented by tubes).
515515

516-
-# Mesh services
516+
-# Shortcuts::Mesh services
517517
- Shortcuts::parametersMesh: parameters related to mesh, triangulated or polygonal surfaces.
518518
- Shortcuts::makeTriangulatedSurface: builds the dual triangulated surface approximating an arbitrary digital surface, or the triangulated surface covering a given mesh, or subdivide a polygonal surface into a triangulated surface, or builds the marching cubes triangulated surface approximating an isosurface in a gray-scale image.
519519
- Shortcuts::makePolygonalSurface: builds a polygonal surface from a mesh, or builds the marching cubes polygonal surface approximating an isosurface in a gray-scale image.
@@ -523,7 +523,7 @@ Shortcuts::Point is Z3i::KSpace::Point.
523523
- Shortcuts::makeSurfaceMesh: load a surface mesh from file
524524
- Shortcuts::saveOBJ: saves a triangulated or polygonal surface or a mesh as an OBJ file, with optionnaly normals and colors information.
525525

526-
-# Utilities
526+
-# ShortcutsGeometry::Mesh utilities
527527
- Shortcuts::parametersUtilities: parameters related to colormaps.
528528
- Shortcuts::getColorMap: returns the specified colormap.
529529
- Shortcuts::getZeroTickedColorMap: returns the specified colormap with a tic around zero.
@@ -535,7 +535,7 @@ Shortcuts::Point is Z3i::KSpace::Point.
535535
- Shortcuts::outputPrimalIdxDigitalSurfaceAsObj: outputs any indexed digital surface in standard OBJ file format as its primal quadrangulated mesh.
536536
- Shortcuts::outputDualDigitalSurfaceAsObj: outputs any digital surface in standard OBJ file format as its dual polygonal or triangulated mesh.
537537

538-
-# ShapeGeometry services
538+
-# Shape Geometry services
539539
- ShortcutsGeometry::parametersShapeGeometry: parameters related to implicit shape geometry.
540540
- ShortcutsGeometry::getPositions: returns the positions on the 3D implicit shape close to the specified surfels.
541541
- ShortcutsGeometry::getNormalVectors: returns the vectors normal to the 3D implicit shape close to the specified surfels.
@@ -547,7 +547,7 @@ Shortcuts::Point is Z3i::KSpace::Point.
547547
- ShortcutsGeometry::getSecondPrincipalDirections: returns the second principal directions along the 3D implicit shape close to the specified surfels.
548548
- ShortcutsGeometry::getPrincipalCurvaturesAndDirections: returns the first and second principal curvatures and directions along the 3D implicit shape close to the specified surfels.
549549

550-
-# GeometryEstimation services
550+
-# Geometry Estimation services
551551
- ShortcutsGeometry::parametersGeometryEstimation: parameters related to geometric estimators.
552552
- ShortcutsGeometry::getTrivialNormalVectors: returns the trivial (Trivial) normal vectors to the given surfel range
553553
- ShortcutsGeometry::getCTrivialNormalVectors: returns the convolved trivial (CTrivial) normal vectors to the given surfel range
@@ -560,18 +560,25 @@ Shortcuts::Point is Z3i::KSpace::Point.
560560
- ShortcutsGeometry::getCNCGaussianCurvatures: returns the Corrected Normal Current (CNC) gaussian curvatures onto the given faces (as ids of the mesh).
561561
- ShortcutsGeometry::getCNCPrincipalCurvaturesAndDirections: returns the Corrected Normal Current (CNC) principal curvatures values and directions for the given face range (as ids of the mesh).
562562
- ShortcutsGeometry::orientVectors: reorient a range of vectors so as to point in the same half-space as another range of vectors.
563-
- ShortcutsGeometry::getScalarsAbsoluteDifference: return the range of scalars that is the difference of two range of scalars
564-
- ShortcutsGeometry::getVectorsAngleDeviation: return the range of scalars that form the angle deviations between two range of vectors
565-
- ShortcutsGeometry::getStatistic: return the statistic of the given range of values.
566-
- ShortcutsGeometry::getVoronoiMap: return the voronoi map on a domain from a list of sites
567-
- ShortcutsGeometry::getDistanceTransformation: return the distance to the closest voronoi site on a domain from a list of sites
568-
- ShortcutsGeometry::getDirectionToClosestSite: return the list of vector to the closest site
563+
564+
-# Volumetric services
565+
- ShortcutsGeometry::getVoronoiMap: return the Voronoi map on a domain from a list of sites
566+
- ShortcutsGeometry::getDistanceTransformation: return the distance transformation on a domain from a list of sites
567+
- ShortcutsGeometry::getDirectionToClosestSite: return the list of vectors to the closest site
569568
- ShortcutsGeometry::getDistanceToClosestSite: return the distance to the closest site
569+
- ShortcutsGeometry::getRAwDistanceToClosestSite: return the (raw) distance to the closest site. Raw distance means an exact representation of the distance value from integers dropping the 1/p exponent for Lp metrics (i.e. squared distance for the Euclidean L2 metric)
570570

571-
-# ATApproximation services
571+
-# AT Approximation services
572572
- ShortcutsGeometry::parametersATApproximation: parameters related to piecewise-smooth AT approximation.
573573
- ShortcutsGeometry::getATVectorFieldApproximation: returns the piecewise-smooth approximation of the given vector field, and optionnaly returns the locii of discontinuity
574574

575+
-# Misc. services
576+
- ShortcutsGeometry::getScalarsAbsoluteDifference: return the range of scalars that is the difference of two range of scalars
577+
- ShortcutsGeometry::getVectorsAngleDeviation: return the range of scalars that form the angle deviations between two range of vectors
578+
- ShortcutsGeometry::getStatistic: return the statistic of the given range of values.
579+
580+
581+
575582

576583
@subsection dgtal_shortcuts_ssec3_4 Parameters
577584

0 commit comments

Comments
 (0)