Skip to content

Commit 3a38775

Browse files
authored
Merge pull request #1569 from dcoeurjo/rel1.2
Release 1.2
2 parents bfe4363 + a74b1d9 commit 3a38775

File tree

12 files changed

+161
-20
lines changed

12 files changed

+161
-20
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif()
1818
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
1919
set(DGtal_VERSION_MAJOR 1)
2020
set(DGtal_VERSION_MINOR 2)
21-
set(DGtal_VERSION_PATCH beta)
21+
set(DGtal_VERSION_PATCH 0)
2222
set(DGTAL_VERSION "${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH}")
2323
set(PROJECT_VERSION "${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH}")
2424
set(VERSION ${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH})

ChangeLog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# DGtal 1.2 (dev)
1+
# DGtal 1.2
22

33
## New Features / Critical Changes
44

5+
- *New Feature*
6+
- DGtal now has a python binding `pip install dgtal`! For all
7+
details on the list of classes available in python, you can have a
8+
look to: Pablo Hernandez-Cerdan [#1528](https://github.com/DGtal-team/DGtal/pull/1528)
9+
510
- *Geometry Package*
611
- New normal vector estimation using plane-probing approaches.
712
(Jocelyn Meyron, Tristan Roussillon,

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ results and potential efficiency of the proposed work.
1919
Quick Install
2020
=============
2121

22-
* Linux:
23-
* [Arch, CentOS, Fedora, openSUSE, RHEL, SL](http://software.opensuse.org//download.html?project=home%3Acopyme%3ADGtal&package=libDGtal)
24-
* [Debian, Ubuntu, etc.](http://software.opensuse.org//download.html?project=home%3Acopyme%3ADGtal&package=dgtal)
25-
2622
* MacOS (using [homebrew](http://brew.sh)):
2723

2824
brew tap DGtal-team/DGtal
@@ -31,7 +27,7 @@ Quick Install
3127

3228
(```brew options dgtal``` to enable optional features)
3329

34-
* Windows: no binary package, please compile the library.
30+
* Linux and windows: no binary package, please compile the library.
3531

3632

3733
Additional instructions are available in the
@@ -68,5 +64,5 @@ More Information
6864
* Release 0.9 [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.31884.svg)](http://dx.doi.org/10.5281/zenodo.31884)
6965
* Release 0.8 [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11586.svg)](https://doi.org/10.5281/zenodo.11586)
7066
* Continuous Integration (Linux/MacOS) [![Build Status](https://travis-ci.org/DGtal-team/DGtal.svg?branch=master)](https://travis-ci.org/DGtal-team/DGtal)
71-
* Continuous Integration (Windows) [![Build status](https://ci.appveyor.com/api/projects/status/7labe8ft0jf30ng7/branch/master?svg=true)](https://ci.appveyor.com/project/kerautret/dgtal-8op01/branch/master)
67+
* Continuous Integration (Windows) [![Build status](https://ci.appveyor.com/api/projects/status/7labe8ft0jf30ng7/branch/master?svg=true)](https://ci.appveyor.com/project/kerautret/dgtal-8op01/branch/master)
7268

cmake/FetchExternalDeps.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ if (BUILD_TESTING)
2020
FetchContent_Declare(
2121
Catch2
2222
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
23-
GIT_TAG v2.13.3
23+
GIT_TAG v2.13.6
2424
)
2525

26-
message(STATUS " Catch2 (v2.13.3)")
26+
message(STATUS " Catch2 (v2.13.6)")
2727
FetchContent_MakeAvailable(Catch2)
2828

2929
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/contrib)

examples/doc-examples/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ set(DGTAL_DOC_EX_SRC
33
kernelDomain
44
range
55
labelledMapBestParameters
6-
exampleCatch
76
)
87

8+
9+
if (BUILD_TESTING)
10+
add_executable(exampleCatch exampleCatch.cpp)
11+
target_link_libraries (exampleCatch DGtal)
12+
endif()
13+
14+
915
if( WITH_VISU3D_QGLVIEWER )
1016
set(DGTAL_DOC_EX_SRC_QGL
1117
)

examples/tutorial-examples/volDTGranulo-template.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@
4343
#include "DGtal/io/readers/VolReader.h"
4444
#include "DGtal/io/writers/VolWriter.h"
4545

46-
#include "DGtal/images/imagesSetsUtils/SimpleThresholdForegroundPredicate.h"
46+
#include "DGtal/images/SimpleThresholdForegroundPredicate.h"
4747
#include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
4848
#include "DGtal/shapes/implicit/ImplicitBall.h"
4949
#include "DGtal/base/BasicFunctors.h"
5050
//! [volGranulo-basicIncludes]
5151

5252
//! [volGranulo-viewerIncludes]
53-
#include <QtGui/qapplication.h>
5453
#include "DGtal/io/viewers/Viewer3D.h"
5554
#include "DGtal/io/colormaps/GradientColorMap.h"
5655
//! [volGranulo-viewerIncludes]

src/DGtal/base/Common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
// Inclusions
4444

4545
#ifdef WITH_VISU3D_QGLVIEWER
46+
#ifdef APPLE
47+
/* Defined before OpenGL and GLUT includes to avoid deprecation messages */
48+
#define GL_SILENCE_DEPRECATION
49+
#endif
4650
#pragma GCC diagnostic push
4751
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
4852
#pragma clang diagnostic push

src/DGtal/doc/mainpage.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ at the [DGtalTools online
4646
documentation](https://dgtal-team.github.io/doctools-nightly) for additional
4747
information.
4848

49-
49+
@note From release 1.2, DGtal has a (partial) python binding. For more information, cf \ref packagePython
5050

5151

5252
@section package_description DGtal Packages

src/DGtal/doc/packagePython.dox

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/**
2+
* This program is free software: you can redistribute it and/or modify
3+
* it under the terms of the GNU Lesser General Public License as
4+
* published by the Free Software Foundation, either version 3 of the
5+
* License, or (at your option) any later version.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
* GNU General Public License for more details.
11+
*
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
14+
*
15+
**/
16+
17+
/**
18+
* @file packagePython.dox
19+
* @author David Coeurjolly (\c david.coeurjolly@liris.cnrs.fr )
20+
* Laboratoire d'InfoRmatique en Image et Systèmes d'information - LIRIS (CNRS, UMR 5205), CNRS, France
21+
*
22+
* @date 2021/06/01
23+
*
24+
* Documentation file for feature Introduction
25+
*
26+
* This file is part of the DGtal library.
27+
*/
28+
29+
/*
30+
* Useful to avoid writing DGtal:: in front of every class.
31+
* Do not forget to add an entry in src/DGtal/base/Config.h.in !
32+
*/
33+
namespace DGtal {
34+
//----------------------------------------
35+
/*!
36+
@page packagePython DGtal python binding
37+
38+
39+
@managers Pablo Hernandez-Cerdan, David Coeurjolly
40+
@since 1.2
41+
42+
43+
@b Package @b Overview
44+
45+
Since release 1.2, DGtal has a partial python binding using
46+
[pybind11](https://github.com/pybind/pybind11). To install the python
47+
package, just use:
48+
@code
49+
pip install dgtal
50+
@endcode
51+
52+
Then, you can import the module in python:
53+
54+
@code
55+
import dgtal
56+
....
57+
@endcode
58+
59+
At this point, only a partial support is available (some base, kernel,
60+
image, topology classes). For a complete review of the available
61+
tools, have a look to this
62+
[Pull-Request](https://github.com/DGtal-team/DGtal/pull/1528).
63+
64+
Just a quick example (Euler characteristics and simple point detection on random sets):
65+
66+
@code
67+
import dgtal
68+
import random
69+
70+
Point = dgtal.kernel.Point3D
71+
Domain = dgtal.kernel.DomainZ3i
72+
Set = dgtal._dgtal.kernel.DigitalSetZ3i
73+
74+
dom = Domain( Point(0,0,0), Point(10,10,10))
75+
mySet = Set(dom)
76+
77+
# Random set
78+
for i in range(50*50):
79+
mySet.insert(Point(random.randint(0,10),random.randint(0,10),random.randint(0,10)))
80+
81+
# Digital Object (with topology)
82+
Object = dgtal.topology.Object26_6
83+
Topo = Object.TDigitalTopology
84+
FAdj = Topo.TForegroundAdjacency
85+
BAdj = Topo.TBackgroundAdjacency
86+
fadj = FAdj()
87+
badj = BAdj()
88+
topo = Topo(fadj, badj)
89+
obj = Object(topo,mySet)
90+
91+
#Counting the simple points
92+
cptSimple=0
93+
for p in mySet:
94+
if obj.isSimple(p):
95+
cptSimple += 1
96+
print("Number of simple points: "+str(cptSimple)+ " / " + str(mySet.size()))
97+
98+
# Cubical Complex
99+
kspace = dgtal.topology.KSpace3D()
100+
ccomplex = dgtal.topology.CubicalComplex3D(kspace)
101+
ccomplex.construct(mySet)
102+
103+
print("Euler characteristic: "+str(ccomplex.euler()))
104+
@endcode
105+
106+
107+
*/
108+
109+
}

src/DGtal/geometry/surfaces/ArithmeticalDSSComputerOnSurfels.ih

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ DGtal::ArithmeticalDSSComputerOnSurfels<TKSpace,TIterator,TInteger,adjacency>::g
512512
}
513513
else if (p1 == linel2)
514514
{
515-
aPoint == p2;
515+
aPoint = p2;
516516
}
517517
else if (p2 == linel1)
518518
{

src/DGtal/io/viewers/Viewer3D.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
#ifdef WIN32
4949
#include <windows.h>
5050
#endif
51+
5152
#ifdef APPLE
53+
/* Defined before OpenGL and GLUT includes to avoid deprecation messages */
54+
#define GL_SILENCE_DEPRECATION
5255
#include <OpenGL/gl.h>
5356
#include <OpenGL/glu.h>
5457
#else

tests/kernel/testIntegerConverter.cpp

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,21 @@ SCENARIO( "IntegerConverter< 1, int32 >", "[integer_conversions]" )
6161
typedef IntegerConverter< 1, DGtal::int32_t > Converter;
6262
DGtal::int32_t small_int32 = 0x12345678;
6363
DGtal::int64_t small_int64 = 0x12345678L;
64+
#ifdef WITH_BIGINTEGER
6465
DGtal::BigInteger small_bigint = 0x12345678;
66+
#endif
6567
WHEN( "Converting small integers" ) {
6668
DGtal::int32_t a = Converter::cast( small_int32 );
6769
DGtal::int32_t b = Converter::cast( small_int64 );
70+
#ifdef WITH_BIGINTEGER
6871
DGtal::int32_t c = Converter::cast( small_bigint );
72+
#endif
6973
THEN( "Their values are all identical" ) {
7074
REQUIRE( a == small_int32 );
7175
REQUIRE( a == b );
76+
#ifdef WITH_BIGINTEGER
7277
REQUIRE( a == c );
78+
#endif
7379
}
7480
}
7581
WHEN( "Converting medium integers" ) {
@@ -86,28 +92,40 @@ SCENARIO( "IntegerConverter< 1, int64 >", "[integer_conversions]" )
8692
typedef IntegerConverter< 1, DGtal::int64_t > Converter;
8793
DGtal::int32_t medium_int32 = DGtal::int32_t( 0x123456789ABCDEFL );
8894
DGtal::int64_t medium_int64 = 0x123456789ABCDEFL;
89-
DGtal::BigInteger medium_bigint = 0x123456789ABCDEFL;
95+
#ifdef WITH_BIGINTEGER
96+
DGtal::BigInteger medium_bigint = 0x123456789ABCDEFL;
97+
#endif
9098
WHEN( "Converting 64bits integers" ) {
9199
DGtal::int64_t a = Converter::cast( medium_int32 );
92100
DGtal::int64_t b = Converter::cast( medium_int64 );
93-
DGtal::int64_t c = Converter::cast( medium_bigint );
94-
THEN( "Only bigger integers are identical" ) {
101+
#ifdef WITH_BIGINTEGER
102+
DGtal::int64_t c = Converter::cast( medium_bigint );
103+
#endif
104+
THEN( "Only bigger integers are identical" ) {
95105
REQUIRE( a == medium_int32 );
96106
REQUIRE( a != b );
97107
REQUIRE( b == medium_int64 );
98-
REQUIRE( b == c );
99-
}
108+
#ifdef WITH_BIGINTEGER
109+
REQUIRE( b == c );
110+
#endif
111+
}
100112
THEN( "It gives the same results with NumberTraits" ) {
101113
DGtal::int64_t ap = NumberTraits<DGtal::int32_t>::castToInt64_t( medium_int32 );
102114
DGtal::int64_t bp = NumberTraits<DGtal::int64_t>::castToInt64_t( medium_int64 );
115+
#ifdef WITH_BIGINTEGER
103116
DGtal::int64_t cp = NumberTraits<DGtal::BigInteger>::castToInt64_t( medium_bigint );
117+
#endif
104118
REQUIRE( a == ap );
105119
REQUIRE( b == bp );
120+
#ifdef WITH_BIGINTEGER
106121
REQUIRE( c == cp );
122+
#endif
107123
}
108124
}
109125
}
110126

127+
128+
#ifdef WITH_BIGINTEGER
111129
SCENARIO( "IntegerConverter< 1, BigInteger >", "[integer_conversions]" )
112130
{
113131
typedef IntegerConverter< 1, DGtal::BigInteger > Converter;
@@ -132,3 +150,4 @@ SCENARIO( "IntegerConverter< 1, BigInteger >", "[integer_conversions]" )
132150
}
133151
}
134152
}
153+
#endif

0 commit comments

Comments
 (0)