Skip to content

Commit

Permalink
Merge branch 'master' into fix_pointvector
Browse files Browse the repository at this point in the history
  • Loading branch information
rolanddenis committed Mar 6, 2019
2 parents 84e0c76 + 091bbfe commit 34a3712
Show file tree
Hide file tree
Showing 84 changed files with 1,259 additions and 1,009 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ Mohamed Mellouli <mohamed.mellouli@edu.esiee.fr>
Jean-David Génevaux <jean-david.genevaux@liris.cnrs.fr>
Thomas Caissard <thomas.caissard@liris.cnrs.fr>
Boris Mansencal <boris.mansencal@labri.fr>
Raphael Lenain <raphael.lenain@univ-poitiers.fr>
21 changes: 20 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,32 @@
- New LpMetric class (model of CMetricSpace) for distance computations in R^n.
(David Coeurjolly, [#1388](https://github.com/DGtal-team/DGtal/pull/1388))

- *Documentation*
- Improving KhalimskySpace related classes documentations by displaying
a short description in the member list.
(Roland Denis, [#1398](https://github.com/DGtal-team/DGtal/pull/1398))

## Bug Fixes

- *Configuration/General*
- Continuous integration AppVeyor fix
[#1326](https://github.com/DGtal-team/DGtal/pull/1326)
- Fixing documentation checks and updating Travis scripts
(Roland Denis, [#1335](https://github.com/DGtal-team/DGtal/pull/1335))
- Fixing warning of Clang when including GraphicsMagick v1.3.31
(Roland Denis, [#1366](https://github.com/DGtal-team/DGtal/pull/1366))
- Fix compilation warnings with gcc 8.2.1
(Boris Mansencal, [#1384](https://github.com/DGtal-team/DGtal/pull/1384))
- Fix compilation with Visual Studio (15.9.5) and some io tests
(Boris Mansencal, [#1380](https://github.com/DGtal-team/DGtal/pull/1380))
- Fixing & updating Travis: documentation deployement and DGtalTools job
(Roland Denis, [#1383](https://github.com/DGtal-team/DGtal/pull/1383))

- Various warnings fixed on Xcode (David Coeurjolly,
[#1389](https://github.com/DGtal-team/DGtal/pull/1389))
- Fix compilation and adding debug version for the generated file with Visual Studio
(Raphael Lenain, [#1395](https://github.com/DGtal-team/DGtal/pull/1395))


- *Base*
- Fixing wrong members in PredicateCombiner (David Coeurjolly,
[#1321](https://github.com/DGtal-team/DGtal/pull/1321))
Expand All @@ -78,12 +91,15 @@
- *IO*
- Improve ITKReader, testITKio and testITKReader (Boris Mansencal,
[#1379](https://github.com/DGtal-team/DGtal/pull/1379))
[#1394](https://github.com/DGtal-team/DGtal/pull/1394))
- Fix wrong typedef for double case in ITKReader (Adrien Krähenbühl,
[#1259](https://github.com/DGtal-team/DGtal/pull/1322))
- Fix safeguard when using ImageMagick without cmake activation (David Coeurjolly,
[#1344](https://github.com/DGtal-team/DGtal/pull/1344))
- Fix Color::Green definition (David Coeurjolly,
[#1385](https://github.com/DGtal-team/DGtal/pull/1385))
- Fix Visual Studio ContourHelper tests.
(Bertrand Kerautret, [#1386](https://github.com/DGtal-team/DGtal/pull/1386))

- *Documentation*
- Replacing html internal links by ref command in Digital Topology module
Expand Down Expand Up @@ -134,6 +150,9 @@
testParDirCollapse. (Jacques-Olivier Lachaud,
[#1390](https://github.com/DGtal-team/DGtal/pull/1390))

- Move operators outside of functions namespace in VoxelComplexFunctions.
(Pablo Hernandez, [#1392](https://github.com/DGtal-team/DGtal/pull/1392))

- *Miscellaneous*
- Fix Small bug in Integral Invariant Volume Estimator in 2D
(Thomas Caissard, [#1316](https://github.com/DGtal-team/DGtal/pull/1316))
Expand Down
13 changes: 12 additions & 1 deletion cmake/Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ foreach(p LIB BIN INCLUDE DATA)
endif()
endforeach()

# -----------------------------------------------------------------------------
# Visual Studio : to distinguish between debug and release lib
# -----------------------------------------------------------------------------
IF (MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
ENDIF (MSVC)

# -----------------------------------------------------------------------------
# Doxygen targets
# -----------------------------------------------------------------------------
Expand All @@ -52,7 +59,11 @@ ADD_CUSTOM_TARGET(uninstall
# -----------------------------------------------------------------------------
# Parsing cmake options
# -----------------------------------------------------------------------------
OPTION(BUILD_SHARED_LIBS "Build shared libraries." ON)
IF (MSVC)
OPTION(BUILD_SHARED_LIBS "Build shared libraries." OFF)
ELSE (MSVC)
OPTION(BUILD_SHARED_LIBS "Build shared libraries." ON)
ENDIF (MSVC)
OPTION(BUILD_TESTING "Build testing." OFF)
OPTION(DEBUG_VERBOSE "Verbose debug messages." OFF)
OPTION(VERBOSE "Verbose messages." OFF)
Expand Down
14 changes: 7 additions & 7 deletions cmake/DGtalConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ENDIF(@COLOR_WITH_ALPHA_ARITH_DGTAL@)
# When user or compiler have not set any std flag.
try_compile( CPP11_COMPATIBLE_FLAG_SET_BY_USER
${CMAKE_BINARY_DIR}/CMakeTmp
@DGTAL_CMAKE_DIR@/cpp11_check.cpp
"@DGTAL_CMAKE_DIR@/cpp11_check.cpp"
CMAKE_FLAGS "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}"
OUTPUT_VARIABLE OUTPUT
)
Expand Down Expand Up @@ -120,7 +120,7 @@ ENDIF(@HDF5_FOUND_DGTAL@)
if (@QGLVIEWER_FOUND_DGTAL@)
add_definitions("-DWITH_VISU3D_QGLVIEWER ")
set(WITH_VISU3D_QGLVIEWER 1)
set(DGTAL_INCLUDE_DIRS ${DGTAL_INCLUDE_DIRS} @QGLVIEWER_INCLUDE_DIR@)
set(DGTAL_INCLUDE_DIRS ${DGTAL_INCLUDE_DIRS} "@QGLVIEWER_INCLUDE_DIR@")
endif (@QGLVIEWER_FOUND_DGTAL@)

#-- We force the Qt rediscovering
Expand All @@ -130,7 +130,7 @@ if (@QT4_FOUND_DGTAL@)
add_definitions("-DWITH_QT4")
set(WITH_QT4 1)
include(${QT_USE_FILE})
set(DGTAL_INCLUDE_DIRS ${DGTAL_INCLUDE_DIRS} ${QT_INCLUDE_DIR})
set(DGTAL_INCLUDE_DIRS ${DGTAL_INCLUDE_DIRS} "${QT_INCLUDE_DIR}")
endif (@QT4_FOUND_DGTAL@)

if (@QT5_FOUND_DGTAL@)
Expand All @@ -139,9 +139,9 @@ if (@QT5_FOUND_DGTAL@)
set(WITH_QT5 1)
set(Qt5_DIR @Qt5_DIR@)
set(DGTAL_INCLUDE_DIRS ${DGTAL_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5OpenGL_INCLUDE_DIRS}
${Qt5Xml_INCLUDE_DIRS})
"${Qt5Widgets_INCLUDE_DIRS}"
"${Qt5OpenGL_INCLUDE_DIRS}"
"${Qt5Xml_INCLUDE_DIRS}")
endif (@QT5_FOUND_DGTAL@)

IF(@OPENMP_FOUND_DGTAL@)
Expand All @@ -156,7 +156,7 @@ ENDIF(@OPENMP_FOUND_DGTAL@)
IF(@EIGEN_FOUND_DGTAL@)
ADD_DEFINITIONS("-DWITH_EIGEN ")
SET(WITH_EIGEN 1)
SET(DGTAL_INCLUDE_DIRS ${DGTAL_INCLUDE_DIRS} @EIGEN3_INCLUDE_DIR@ )
SET(DGTAL_INCLUDE_DIRS ${DGTAL_INCLUDE_DIRS} "@EIGEN3_INCLUDE_DIR@" )
ENDIF(@EIGEN_FOUND_DGTAL@)


Expand Down
8 changes: 6 additions & 2 deletions cmake/FindFFTW3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ find_library (FFTW3_LONG_THREADS_LIBRARIES NAMES fftw3l_threads )
# Gathering FFTW3 libraries
set (FFTW3_LIBRARIES ${FFTW3_FLOAT_LIBRARIES} ${FFTW3_DOUBLE_LIBRARIES} ${FFTW3_LONG_LIBRARIES})
set (FFTW3_THREADS_LIBRARIES ${FFTW3_FLOAT_THREADS_LIBRARIES} ${FFTW3_DOUBLE_THREADS_LIBRARIES} ${FFTW3_LONG_THREADS_LIBRARIES})
set (FFTW3_DEP_LIBRARIES m)
if (NOT MSVC)
set (FFTW3_DEP_LIBRARIES m)
endif (NOT MSVC)

# Telling which FFT precisions are found.
include(FindPackageHandleStandardArgs)
Expand All @@ -36,7 +38,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3_LONG DEFAULT_MSG FFTW3_INCLUDE_DIR FFT
# Adding threaded version of FFTW3
if (FFTW3_THREADS_LIBRARIES)
set (FFTW3_LIBRARIES ${FFTW3_LIBRARIES} ${FFTW3_THREADS_LIBRARIES})
set (FFTW3_DEP_LIBRARIES ${FFTW3_DEP_LIBRARIES} pthread)
if (NOT MSVC)
set (FFTW3_DEP_LIBRARIES ${FFTW3_DEP_LIBRARIES} pthread)
endif (NOT MSVC)
endif (FFTW3_THREADS_LIBRARIES)


Expand Down
4 changes: 2 additions & 2 deletions cmake/TargetDoxygenDox.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ IF (DOXYGEN_FOUND)
SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\Doc\\html\\index.hhp")
STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
# MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}")
ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE})
ADD_DEPENDENCIES (winhelp doc)
ADD_CUSTOM_TARGET(winhelp-dox ${HTML_HELP_COMPILER} ${HHP_FILE})
ADD_DEPENDENCIES (winhelp-dox dox)

IF (NOT TARGET_DOC_SKIP_INSTALL)
# install windows help?
Expand Down
2 changes: 1 addition & 1 deletion examples/geometry/curves/estimation/exampleCurvature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ estimatorOnShapeDigitization( const string& name,
std::cout << i << " " << estimations.at(i) << std::endl;
}
}
catch ( InputException e )
catch ( InputException& e )
{
std::cerr << "[estimatorOnShapeDigitization]"
<< " error in finding a bel." << std::endl;
Expand Down
5 changes: 5 additions & 0 deletions examples/geometry/tools/determinant/exampleInHalfPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ advice()
//! [FunctorDefinition30]
Functor *a = new Functor();
BOOST_VERIFY(a);
delete a;
}

{
Expand All @@ -131,6 +132,7 @@ advice()
//! [FunctorDefinition52]
Functor *a = new Functor();
BOOST_VERIFY(a);
delete a;
//NB. using double as coordinate type is slightly faster than using DGtal::int64_t
//typedef PointVector<2, double> Point;
}
Expand All @@ -144,6 +146,7 @@ advice()
//! [FunctorDefinition62]
Functor *a= new Functor();
BOOST_VERIFY( a);
delete a;
}

{
Expand All @@ -157,6 +160,7 @@ advice()
Functor *a = new Functor();
BOOST_VERIFY(a == a);
//! [FunctorDefinition62bis]
delete a;
}

#ifdef WITH_BIGINTEGER
Expand All @@ -169,6 +173,7 @@ advice()
Functor *a= new Functor();
BOOST_VERIFY( a);
//! [FunctorDefinition62plus]
delete a;
}
#endif

Expand Down
4 changes: 2 additions & 2 deletions examples/topology/ctopo-2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int main( int /*argc*/, char** /*argv*/ )
new CustomColors( Color( 255, 255, 0 ),
Color( 192, 192, 0 ) ));

GradientColorMap<int> cmap_grad( 0, (const int)vectBdrySCell.size() );
GradientColorMap<int> cmap_grad( 0, (int)vectBdrySCell.size() );
cmap_grad.addColor( Color( 50, 50, 255 ) );
cmap_grad.addColor( Color( 255, 0, 0 ) );
cmap_grad.addColor( Color( 255, 255, 10 ) );
Expand Down Expand Up @@ -138,7 +138,7 @@ int main( int /*argc*/, char** /*argv*/ )
std::vector< std::vector<Z2i::SCell> > vectContoursBdrySCell;
Surfaces<Z2i::KSpace>::extractAll2DSCellContours( vectContoursBdrySCell,
ks, SAdj, set2d );
GradientColorMap<int> cmap_grad3( 0, (const int)vectContoursBdrySCell.size() );
GradientColorMap<int> cmap_grad3( 0, (int)vectContoursBdrySCell.size() );
cmap_grad3.addColor( Color( 50, 50, 255 ) );
cmap_grad3.addColor( Color( 255, 0, 0 ) );
cmap_grad3.addColor( Color( 20, 200, 0 ) );
Expand Down
4 changes: 4 additions & 0 deletions examples/tutorial-examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ SET(DGTAL_TUTO_EXAMPLES_SRC


FOREACH(FILE ${DGTAL_TUTO_EXAMPLES_SRC})
if(MSVC)
set_source_files_properties( ${FILE} PROPERTIES COMPILE_FLAGS "/bigobj" )
endif(MSVC)

add_executable(${FILE} ${FILE})
target_link_libraries (${FILE} DGtal )
ENDFOREACH(FILE)
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorial-examples/FMMErosion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ int main( int argc, char** argv )
bel = Surfaces<KSpace>::findABel( ks, binaryImage, domain.size() );
trace.info() << "starting bel: " << bel << std::endl;

} catch (DGtal::InputException i) {
} catch (DGtal::InputException& i) {
trace.emphase() << "starting bel not found" << std::endl;
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorial-examples/freemanChainFromImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int main()
//! [freemanChainFromImage-extraction]


GradientColorMap<int> cmap_grad( 0, (const int)vectContoursBdryPointels.size() );
GradientColorMap<int> cmap_grad( 0, (int)vectContoursBdryPointels.size() );
cmap_grad.addColor( Color( 50, 50, 255 ) );
cmap_grad.addColor( Color( 255, 0, 0 ) );
cmap_grad.addColor( Color( 255, 255, 10 ) );
Expand Down
30 changes: 15 additions & 15 deletions examples/tutorial-examples/shortcuts-geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int main( int /* argc */, char** /* argv */ )
bool ok = SH3::saveOBJ( surface, SH3::RealVectors(), colors,
"al-H-II.obj" );
//! [dgtal_shortcuts_ssec2_1_6s]
++nb, nbok += ok ? 1 : 0;
++nb; nbok += ok ? 1 : 0;
}
trace.endBlock();

Expand All @@ -84,7 +84,7 @@ int main( int /* argc */, char** /* argv */ )
std::transform( curv.cbegin(), curv.cend(), colors.begin(), cmap );
bool ok = SH3::saveOBJ( surface, SH3::RealVectors(), colors,
"al-G-II.obj" );
++nb, nbok += ok ? 1 : 0;
++nb; nbok += ok ? 1 : 0;
}
trace.endBlock();

Expand Down Expand Up @@ -112,12 +112,12 @@ int main( int /* argc */, char** /* argv */ )
trace.info() << " min(G)=" << stat_gauss.min()
<< " avg(G)=" << stat_gauss.mean()
<< " max(G)=" << stat_gauss.max() << std::endl;
++nb, nbok += positions.size() == surfels.size() ? 1 : 0;
++nb, nbok += normals.size() == surfels.size() ? 1 : 0;
++nb, nbok += mean_curvs.size() == surfels.size() ? 1 : 0;
++nb, nbok += gauss_curvs.size() == surfels.size() ? 1 : 0;
++nb, nbok += stat_mean.min() > 0.08 ? 1 : 0;
++nb, nbok += stat_gauss.min() > 0.0064 ? 1 : 0;
++nb; nbok += positions.size() == surfels.size() ? 1 : 0;
++nb; nbok += normals.size() == surfels.size() ? 1 : 0;
++nb; nbok += mean_curvs.size() == surfels.size() ? 1 : 0;
++nb; nbok += gauss_curvs.size() == surfels.size() ? 1 : 0;
++nb; nbok += stat_mean.min() > 0.08 ? 1 : 0;
++nb; nbok += stat_gauss.min() > 0.0064 ? 1 : 0;
}
trace.endBlock();

Expand All @@ -144,7 +144,7 @@ int main( int /* argc */, char** /* argv */ )
SH3::RealVectors(), SH3::Colors(),
"goursat-quad-proj.obj" );
//! [dgtal_shortcuts_ssec2_2_6s]
++nb, nbok += ok ? 1 : 0;
++nb; nbok += ok ? 1 : 0;
}
trace.endBlock();

Expand All @@ -166,7 +166,7 @@ int main( int /* argc */, char** /* argv */ )
bool ok = SH3::saveOBJ( surface, SH3::RealVectors(), colors,
"goursat-H.obj" );
//! [dgtal_shortcuts_ssec2_2_7s]
++nb, nbok += ok ? 1 : 0;
++nb; nbok += ok ? 1 : 0;
}
trace.endBlock();

Expand Down Expand Up @@ -200,7 +200,7 @@ int main( int /* argc */, char** /* argv */ )
<< " L2=" << SHG3::getScalarsNormL2 ( t_curv, ii_curv )
<< std::endl;
//! [dgtal_shortcuts_ssec2_2_8s]
++nb, nbok += ( ok_t && ok_ii && ok_err ) ? 1 : 0;
++nb; nbok += ( ok_t && ok_ii && ok_err ) ? 1 : 0;
}
trace.endBlock();

Expand All @@ -220,7 +220,7 @@ int main( int /* argc */, char** /* argv */ )
bool ok = SH3::saveOBJ( surface, vcm_normals, SH3::Colors(),
"goursat-primal-vcm.obj" );
//! [dgtal_shortcuts_ssec2_2_9s]
++nb, nbok += ok ? 1 : 0;
++nb; nbok += ok ? 1 : 0;
}
trace.endBlock();

Expand Down Expand Up @@ -250,7 +250,7 @@ int main( int /* argc */, char** /* argv */ )
colors[ i ] = cmap( ii_mean_curv[ match[ i ] ] );
bool ok_H = SH3::saveOBJ( surface, SH3::RealVectors(), colors, "goursat-imp-H-ii.obj" );
//! [dgtal_shortcuts_ssec2_2_10s]
++nb, nbok += ( ok_H && ii_mean_curv.size() == ii_mean_curv2.size() ) ? 1 : 0;
++nb; nbok += ( ok_H && ii_mean_curv.size() == ii_mean_curv2.size() ) ? 1 : 0;
}
trace.endBlock();

Expand Down Expand Up @@ -282,8 +282,8 @@ int main( int /* argc */, char** /* argv */ )
[&] (const SH3::Cell& c){ return ppos[ c2i[ c ] ];},
SH3::RealVectors(), SH3::Colors(),
proj_fname );
++nb, nbok += ok ? 1 : 0;
++nb, nbok += proj_ok ? 1 : 0;
++nb; nbok += ok ? 1 : 0;
++nb; nbok += proj_ok ? 1 : 0;
}
}
trace.endBlock();
Expand Down
Loading

0 comments on commit 34a3712

Please sign in to comment.