diff --git a/.kdev4/DGtal.kdev4 b/.kdev4/DGtal.kdev4 new file mode 100755 index 0000000000..52976dfc82 --- /dev/null +++ b/.kdev4/DGtal.kdev4 @@ -0,0 +1,80 @@ +[Buildset] +BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\n\x00D\x00G\x00t\x00a\x00l) + +[CMake] +Build Directory Count=1 +Current Build Directory Index=0 +ProjectRootRelative=./ + +[CMake][CMake Build Directory 0] +Build Directory Path=file:///home/kacper/projects/DGtal/build +Build Type=Debug +CMake Binary=file:///usr/bin/cmake +Environment Profile= +Extra Arguments= +Install Directory=file:///usr/local + +[Defines And Includes][Compiler] +Name=GCC +Path=gcc +Type=GCC + +[Launch] +Launch Configurations=Launch Configuration 0,Launch Configuration 1,Launch Configuration 2 + +[Launch][Launch Configuration 0] +Configured Launch Modes=execute +Configured Launchers=nativeAppLauncher +Name=testParametricCurves3D +Type=Native Application + +[Launch][Launch Configuration 0][Data] +Arguments= +Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00) +Dependency Action=Nothing +EnvironmentGroup=default +Executable=file:///home/kacper/projects/DGtal/build/tests/curves/testParametricCurves3D +External Terminal=konsole --noclose --workdir %workdir -e %exe +Project Target=DGtal,tests,geometry,curves,testLambdaMST3D +Use External Terminal=true +Working Directory=file:///home/kacper/projects/DGtal/build/tests/curves/ +isExecutable=false + +[Launch][Launch Configuration 1] +Configured Launch Modes=execute +Configured Launchers=nativeAppLauncher +Name=lmst2D_test +Type=Native Application + +[Launch][Launch Configuration 1][Data] +Arguments= +Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00) +Dependency Action=Nothing +EnvironmentGroup= +Executable=file:///home/kacper/projects/DGtal/build/tests/geometry/curves/estimation/testLambdaMST2D +External Terminal=konsole --noclose --workdir %workdir -e %exe +Project Target= +Use External Terminal=true +Working Directory= +isExecutable=true + +[Launch][Launch Configuration 2] +Configured Launch Modes=execute +Configured Launchers=nativeAppLauncher +Name=lmst3D_test +Type=Native Application + +[Launch][Launch Configuration 2][Data] +Arguments= +Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00) +Dependency Action=Nothing +EnvironmentGroup= +Executable=file:///home/kacper/projects/DGtal/build/tests/geometry/curves/estimation/testLambdaMST3D +External Terminal=konsole --noclose --workdir %workdir -e %exe +Project Target= +Use External Terminal=true +Working Directory= +isExecutable=true + +[Project] +VersionControlSupport=kdevgit diff --git a/.travis.yml b/.travis.yml old mode 100644 new mode 100755 diff --git a/.travis/dgtal_rsa.enc b/.travis/dgtal_rsa.enc old mode 100644 new mode 100755 diff --git a/AUTHORS b/AUTHORS old mode 100644 new mode 100755 diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/CTestConfig.cmake b/CTestConfig.cmake old mode 100644 new mode 100755 diff --git a/ChangeLog.md b/ChangeLog.md old mode 100644 new mode 100755 diff --git a/DGtal.kdev4 b/DGtal.kdev4 new file mode 100755 index 0000000000..9c46e1f114 --- /dev/null +++ b/DGtal.kdev4 @@ -0,0 +1,3 @@ +[Project] +Manager=KDevCMakeManager +Name=DGtal diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/appveyor.yml b/appveyor.yml old mode 100644 new mode 100755 diff --git a/cmake/BuildExamples.cmake b/cmake/BuildExamples.cmake old mode 100644 new mode 100755 diff --git a/cmake/CheckCPP11.cmake b/cmake/CheckCPP11.cmake old mode 100644 new mode 100755 diff --git a/cmake/CheckCoverage.cmake b/cmake/CheckCoverage.cmake old mode 100644 new mode 100755 diff --git a/cmake/CheckDGtalDependencies.cmake b/cmake/CheckDGtalDependencies.cmake old mode 100644 new mode 100755 diff --git a/cmake/CheckDGtalOptionalDependencies.cmake b/cmake/CheckDGtalOptionalDependencies.cmake old mode 100644 new mode 100755 diff --git a/cmake/Common.cmake b/cmake/Common.cmake old mode 100644 new mode 100755 diff --git a/cmake/CpackCtest.cmake b/cmake/CpackCtest.cmake old mode 100644 new mode 100755 diff --git a/cmake/DGtalConfig.cmake.in b/cmake/DGtalConfig.cmake.in old mode 100644 new mode 100755 diff --git a/cmake/DGtalConfigGenerator.cmake b/cmake/DGtalConfigGenerator.cmake old mode 100644 new mode 100755 diff --git a/cmake/DGtalConfigVersion.cmake.in b/cmake/DGtalConfigVersion.cmake.in old mode 100644 new mode 100755 diff --git a/cmake/FindBenchmark.cmake b/cmake/FindBenchmark.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindCOIN3D.cmake b/cmake/FindCOIN3D.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindCairo.cmake b/cmake/FindCairo.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindEigen3.cmake b/cmake/FindEigen3.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindGMP.cmake b/cmake/FindGMP.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindMagick.cmake b/cmake/FindMagick.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindPatate.cmake b/cmake/FindPatate.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindQGLVIEWER.cmake b/cmake/FindQGLVIEWER.cmake old mode 100644 new mode 100755 diff --git a/cmake/FindSOQT.cmake b/cmake/FindSOQT.cmake old mode 100644 new mode 100755 diff --git a/cmake/GeneratorSpecific.cmake b/cmake/GeneratorSpecific.cmake old mode 100644 new mode 100755 diff --git a/cmake/Install.cmake b/cmake/Install.cmake old mode 100644 new mode 100755 diff --git a/cmake/OSDependentSettings.cmake b/cmake/OSDependentSettings.cmake old mode 100644 new mode 100755 diff --git a/cmake/TargetDistclean.cmake b/cmake/TargetDistclean.cmake old mode 100644 new mode 100755 diff --git a/cmake/TargetDoxygenDoc.cmake b/cmake/TargetDoxygenDoc.cmake old mode 100644 new mode 100755 diff --git a/cmake/TargetDoxygenDox.cmake b/cmake/TargetDoxygenDox.cmake old mode 100644 new mode 100755 diff --git a/cmake/TargetUninstall.cmake.in b/cmake/TargetUninstall.cmake.in old mode 100644 new mode 100755 diff --git a/cmake/doxygen.cmake b/cmake/doxygen.cmake old mode 100644 new mode 100755 diff --git a/cmake/src/ITKcpp11Bug/CMakeLists.txt b/cmake/src/ITKcpp11Bug/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/cmake/src/ITKcpp11Bug/itkcpp11.cpp b/cmake/src/ITKcpp11Bug/itkcpp11.cpp old mode 100644 new mode 100755 diff --git a/cmake/src/cpp11/array.cpp b/cmake/src/cpp11/array.cpp new file mode 100755 index 0000000000..2badbce2f2 --- /dev/null +++ b/cmake/src/cpp11/array.cpp @@ -0,0 +1,23 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#include +#include + +int main() +{ + std::array myarray; +} diff --git a/cmake/src/cpp11/auto.cpp b/cmake/src/cpp11/auto.cpp new file mode 100755 index 0000000000..835c73934b --- /dev/null +++ b/cmake/src/cpp11/auto.cpp @@ -0,0 +1,34 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#include +#include + +using namespace std; + + +int main() +{ + auto x = 7; + auto s= "blam"; + + std::vector t(20); + + for (auto p = t.begin(); p!=t.end(); ++p) + std::cout << *p << "\n"; + + return 1; +} diff --git a/cmake/src/cpp11/forward_list.cpp b/cmake/src/cpp11/forward_list.cpp new file mode 100755 index 0000000000..6ff15d0352 --- /dev/null +++ b/cmake/src/cpp11/forward_list.cpp @@ -0,0 +1,25 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#include +#include + +int main() +{ + std::forward_list mylist; + mylist.push_front (19); + mylist.push_front (34); +} diff --git a/cmake/src/cpp11/initializer_list.cpp b/cmake/src/cpp11/initializer_list.cpp new file mode 100755 index 0000000000..76f1012a9e --- /dev/null +++ b/cmake/src/cpp11/initializer_list.cpp @@ -0,0 +1,35 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#include + +template +void f(std::initializer_list init) +{ + std::cout<<"{"; + for (const T *p = init.begin (); p != init.end (); ++p) + std::cout<<*p<<", "; + std::cout<<"}"<. + * + **/ + +#include +#include + +using namespace std; + +struct T {}; +void f( T&& t, int& i ) { i += 1; } +void f( T& t, int& i ) { i += 2; } + +struct U { + U( const std::vector & v ) : myV( v ) { + former_size = v.size(); + } + U( std::vector && v ) : myV( std::move( v ) ) { + former_size = v.size(); + } + int former_size; + std::vector myV; +}; + +int main() +{ + // Checking rvalue reference. + int i = 0; + T t; + f( t, i ); f( T(), i ); + bool ok1 = ( i == 3 ); + std::cout << "rvalue reference is " << ( ok1 ? "ok" : "ko" ) << std::endl; + + // initializer list are not in my clang++ 3.0 + std::vector v; + v.push_back( 1 ); v.push_back( 1 ); + for ( int j = 0; j < 10; ++j ) v.push_back( v.back() + v[ v.size() - 2 ] ); + + // Checking std::move + U u1( v ); + std::cout << "u1.former_size=" << u1.former_size << " == u1.size()=" << u1.myV.size() << std::endl; + U u2( std::vector( 5 ) ); + std::cout << "u2.former_size=" << u2.former_size << " != u2.size()=" << u2.myV.size() << std::endl; + bool ok2 = u2.former_size == 0; + return ( ok1 && ok2 )? 0 : 1; +} diff --git a/cmake/src/gmp/gmpstream.cpp b/cmake/src/gmp/gmpstream.cpp old mode 100644 new mode 100755 diff --git a/doc/concepts.dot b/doc/concepts.dot old mode 100644 new mode 100755 diff --git a/doc/doxy.config.Board.in b/doc/doxy.config.Board.in old mode 100644 new mode 100755 diff --git a/doc/doxy.config.dox.in b/doc/doxy.config.dox.in old mode 100644 new mode 100755 diff --git a/doc/doxy.config.in b/doc/doxy.config.in old mode 100644 new mode 100755 diff --git a/doc/images/0cellsRange.png b/doc/images/0cellsRange.png old mode 100644 new mode 100755 diff --git a/doc/images/3dKSSurfaceExtractionExport.pdf b/doc/images/3dKSSurfaceExtractionExport.pdf new file mode 100755 index 0000000000..e64adb8053 Binary files /dev/null and b/doc/images/3dKSSurfaceExtractionExport.pdf differ diff --git a/doc/images/ArrowsRange.png b/doc/images/ArrowsRange.png old mode 100644 new mode 100755 diff --git a/doc/images/ClosedCurveProcessedAsClosed.png b/doc/images/ClosedCurveProcessedAsClosed.png old mode 100644 new mode 100755 diff --git a/doc/images/ClosedCurveProcessedAsOpen.png b/doc/images/ClosedCurveProcessedAsOpen.png old mode 100644 new mode 100755 diff --git a/doc/images/DisconnectedCurveDecomposition.png b/doc/images/DisconnectedCurveDecomposition.png old mode 100644 new mode 100755 diff --git a/doc/images/accflower-R30-r10-k5.png b/doc/images/accflower-R30-r10-k5.png old mode 100644 new mode 100755 diff --git a/doc/images/algo1.png b/doc/images/algo1.png old mode 100644 new mode 100755 diff --git a/doc/images/angle.png b/doc/images/angle.png old mode 100644 new mode 100755 diff --git a/doc/images/backpath.png b/doc/images/backpath.png old mode 100644 new mode 100755 diff --git a/doc/images/ball-R30.png b/doc/images/ball-R30.png old mode 100644 new mode 100755 diff --git a/doc/images/beetle-10.png b/doc/images/beetle-10.png old mode 100644 new mode 100755 diff --git a/doc/images/digital-surface-bfv-al100.png b/doc/images/digital-surface-bfv-al100.png old mode 100644 new mode 100755 diff --git a/doc/images/digital-surface-bfv-cat.png b/doc/images/digital-surface-bfv-cat.png old mode 100644 new mode 100755 diff --git a/doc/images/digital-surface-bfv-lobster.png b/doc/images/digital-surface-bfv-lobster.png old mode 100644 new mode 100755 diff --git a/doc/images/doc-kernel/shapes/accflower001.png b/doc/images/doc-kernel/shapes/accflower001.png old mode 100644 new mode 100755 diff --git a/doc/images/doc-kernel/shapes/ellipse001.png b/doc/images/doc-kernel/shapes/ellipse001.png old mode 100644 new mode 100755 diff --git a/doc/images/doc-kernel/shapes/flower001.png b/doc/images/doc-kernel/shapes/flower001.png old mode 100644 new mode 100755 diff --git a/doc/images/doc-kernel/shapes/square001.png b/doc/images/doc-kernel/shapes/square001.png old mode 100644 new mode 100755 diff --git a/doc/images/doc-kernel/shapes/triangle001.png b/doc/images/doc-kernel/shapes/triangle001.png old mode 100644 new mode 100755 diff --git a/doc/images/dsl-standard.png b/doc/images/dsl-standard.png old mode 100644 new mode 100755 diff --git a/doc/images/ellipse-A30-a10.png b/doc/images/ellipse-A30-a10.png old mode 100644 new mode 100755 diff --git a/doc/images/flower-R30-r10-k5.png b/doc/images/flower-R30-r10-k5.png old mode 100644 new mode 100755 diff --git a/doc/images/greedy-plane-segmentation-al-150-w1-1.png b/doc/images/greedy-plane-segmentation-al-150-w1-1.png old mode 100644 new mode 100755 diff --git a/doc/images/greedy-plane-segmentation-ex2.png b/doc/images/greedy-plane-segmentation-ex2.png old mode 100644 new mode 100755 diff --git a/doc/images/hashtree.png b/doc/images/hashtree.png old mode 100644 new mode 100755 diff --git a/doc/images/logoDGtal.svg b/doc/images/logoDGtal.svg old mode 100644 new mode 100755 diff --git a/doc/images/logo_DGtal.png b/doc/images/logo_DGtal.png old mode 100644 new mode 100755 diff --git a/doc/images/lpball-R30-p0.5.png b/doc/images/lpball-R30-p0.5.png old mode 100644 new mode 100755 diff --git a/doc/images/lpball-R30-p2.5.png b/doc/images/lpball-R30-p2.5.png old mode 100644 new mode 100755 diff --git a/doc/images/metrics/image-ball-0.80000000000000004.png b/doc/images/metrics/image-ball-0.80000000000000004.png old mode 100644 new mode 100755 diff --git a/doc/images/metrics/image-ball-1.3999999999999999.png b/doc/images/metrics/image-ball-1.3999999999999999.png old mode 100644 new mode 100755 diff --git a/doc/images/metrics/image-ball-1.png b/doc/images/metrics/image-ball-1.png old mode 100644 new mode 100755 diff --git a/doc/images/metrics/image-ball-2.png b/doc/images/metrics/image-ball-2.png old mode 100644 new mode 100755 diff --git a/doc/images/metrics/image-ball-4.png b/doc/images/metrics/image-ball-4.png old mode 100644 new mode 100755 diff --git a/doc/images/metrics/image-ball-43.100000000000001.png b/doc/images/metrics/image-ball-43.100000000000001.png old mode 100644 new mode 100755 diff --git a/doc/images/metrics/image-ball-8.png b/doc/images/metrics/image-ball-8.png old mode 100644 new mode 100755 diff --git a/doc/images/mpolynomial-crixxi.png b/doc/images/mpolynomial-crixxi.png old mode 100644 new mode 100755 diff --git a/doc/images/mpolynomial-durchblick.png b/doc/images/mpolynomial-durchblick.png old mode 100644 new mode 100755 diff --git a/doc/images/plant054.png b/doc/images/plant054.png old mode 100644 new mode 100755 diff --git a/doc/images/plant075.png b/doc/images/plant075.png old mode 100644 new mode 100755 diff --git a/doc/images/segmentComputersGraph.png b/doc/images/segmentComputersGraph.png old mode 100644 new mode 100755 diff --git a/doc/images/segmentComputersHierarchy.png b/doc/images/segmentComputersHierarchy.png old mode 100644 new mode 100755 diff --git a/doc/images/simpleSet-color.png b/doc/images/simpleSet-color.png old mode 100644 new mode 100755 diff --git a/doc/images/simpleSet-grid.png b/doc/images/simpleSet-grid.png old mode 100644 new mode 100755 diff --git a/doc/images/simpleSet-paving.png b/doc/images/simpleSet-paving.png old mode 100644 new mode 100755 diff --git a/doc/images/simpleSet.png b/doc/images/simpleSet.png old mode 100644 new mode 100755 diff --git a/doc/images/square-w30.png b/doc/images/square-w30.png old mode 100644 new mode 100755 diff --git a/doc/images/suivi-gordon.fig b/doc/images/suivi-gordon.fig old mode 100644 new mode 100755 diff --git a/doc/images/suivi-gordon.png b/doc/images/suivi-gordon.png old mode 100644 new mode 100755 diff --git a/doc/images/suivi-parcours-largeur.fig b/doc/images/suivi-parcours-largeur.fig old mode 100644 new mode 100755 diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/ConfigExamples.h.in b/examples/ConfigExamples.h.in old mode 100644 new mode 100755 diff --git a/examples/arithmetic/CMakeLists.txt b/examples/arithmetic/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/arithmetic/approximation.cpp b/examples/arithmetic/approximation.cpp old mode 100644 new mode 100755 diff --git a/examples/arithmetic/convergents-biginteger.cpp b/examples/arithmetic/convergents-biginteger.cpp old mode 100644 new mode 100755 diff --git a/examples/arithmetic/convergents.cpp b/examples/arithmetic/convergents.cpp old mode 100644 new mode 100755 diff --git a/examples/arithmetic/extended-euclid.cpp b/examples/arithmetic/extended-euclid.cpp old mode 100644 new mode 100755 diff --git a/examples/arithmetic/fraction.cpp b/examples/arithmetic/fraction.cpp old mode 100644 new mode 100755 diff --git a/examples/arithmetic/lower-integer-convex-hull.cpp b/examples/arithmetic/lower-integer-convex-hull.cpp old mode 100644 new mode 100755 diff --git a/examples/arithmetic/pattern.cpp b/examples/arithmetic/pattern.cpp old mode 100644 new mode 100755 diff --git a/examples/dec/CMakeLists.txt b/examples/dec/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/dec/DECExamplesCommon.h b/examples/dec/DECExamplesCommon.h old mode 100644 new mode 100755 diff --git a/examples/dec/exampleDECSurface.cpp b/examples/dec/exampleDECSurface.cpp old mode 100644 new mode 100755 diff --git a/examples/dec/exampleDiscreteExteriorCalculusChladni.cpp b/examples/dec/exampleDiscreteExteriorCalculusChladni.cpp old mode 100644 new mode 100755 diff --git a/examples/dec/exampleDiscreteExteriorCalculusSolve.cpp b/examples/dec/exampleDiscreteExteriorCalculusSolve.cpp old mode 100644 new mode 100755 diff --git a/examples/dec/exampleDiscreteExteriorCalculusUsage.cpp b/examples/dec/exampleDiscreteExteriorCalculusUsage.cpp old mode 100644 new mode 100755 diff --git a/examples/dec/examplePropagation.cpp b/examples/dec/examplePropagation.cpp old mode 100644 new mode 100755 diff --git a/examples/dec/propagation.gp b/examples/dec/propagation.gp old mode 100644 new mode 100755 diff --git a/examples/doc-examples/CMakeLists.txt b/examples/doc-examples/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/doc-examples/DGtalCatch.h b/examples/doc-examples/DGtalCatch.h old mode 100644 new mode 100755 diff --git a/examples/doc-examples/catch.hpp b/examples/doc-examples/catch.hpp old mode 100644 new mode 100755 diff --git a/examples/doc-examples/demo-kernel-1.cpp b/examples/doc-examples/demo-kernel-1.cpp old mode 100644 new mode 100755 diff --git a/examples/doc-examples/exampleCatch.cpp b/examples/doc-examples/exampleCatch.cpp old mode 100644 new mode 100755 diff --git a/examples/doc-examples/kernelDomain.cpp b/examples/doc-examples/kernelDomain.cpp old mode 100644 new mode 100755 diff --git a/examples/doc-examples/labelledMapBestParameters.cpp b/examples/doc-examples/labelledMapBestParameters.cpp old mode 100644 new mode 100755 diff --git a/examples/doc-examples/range.cpp b/examples/doc-examples/range.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/CMakeLists.txt b/examples/geometry/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/CMakeLists.txt b/examples/geometry/curves/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/convex-and-concave-parts.cpp b/examples/geometry/curves/convex-and-concave-parts.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/estimation/CMakeLists.txt b/examples/geometry/curves/estimation/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/estimation/exampleCurvature.cpp b/examples/geometry/curves/estimation/exampleCurvature.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/estimation/exampleLMST2D.cpp b/examples/geometry/curves/estimation/exampleLMST2D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/estimation/exampleLMST3D.cpp b/examples/geometry/curves/estimation/exampleLMST3D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleArithDSS3d.cpp b/examples/geometry/curves/exampleArithDSS3d.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleArithDSSIterator.cpp b/examples/geometry/curves/exampleArithDSSIterator.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleArithmeticalDSL.cpp b/examples/geometry/curves/exampleArithmeticalDSL.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleArithmeticalDSS.cpp b/examples/geometry/curves/exampleArithmeticalDSS.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleArithmeticalDSSComputer.cpp b/examples/geometry/curves/exampleArithmeticalDSSComputer.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleDSLSubsegment.cpp b/examples/geometry/curves/exampleDSLSubsegment.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleFrechetShortcut.cpp b/examples/geometry/curves/exampleFrechetShortcut.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleGridCurve2d.cpp b/examples/geometry/curves/exampleGridCurve2d.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleGridCurve3d-2.cpp b/examples/geometry/curves/exampleGridCurve3d-2.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleGridCurve3d.cpp b/examples/geometry/curves/exampleGridCurve3d.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleNaive3DDSSComputer.cpp b/examples/geometry/curves/exampleNaive3DDSSComputer.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleStabbingCircleComputer.cpp b/examples/geometry/curves/exampleStabbingCircleComputer.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/exampleStabbingLineComputer.cpp b/examples/geometry/curves/exampleStabbingLineComputer.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/freemanChainDisplay.cpp b/examples/geometry/curves/freemanChainDisplay.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/curves/greedy-dss-decomposition.cpp b/examples/geometry/curves/greedy-dss-decomposition.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/CMakeLists.txt b/examples/geometry/surfaces/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/dvcm-2d-curvature.cpp b/examples/geometry/surfaces/dvcm-2d-curvature.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/dvcm-3d.cpp b/examples/geometry/surfaces/dvcm-3d.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/exampleEstimatorFromSurfelFunctors.cpp b/examples/geometry/surfaces/exampleEstimatorFromSurfelFunctors.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/exampleIntegralInvariantCurvature2D.cpp b/examples/geometry/surfaces/exampleIntegralInvariantCurvature2D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/exampleIntegralInvariantCurvature3D.cpp b/examples/geometry/surfaces/exampleIntegralInvariantCurvature3D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/greedy-plane-segmentation-ex2.cpp b/examples/geometry/surfaces/greedy-plane-segmentation-ex2.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/greedy-plane-segmentation-ex3.cpp b/examples/geometry/surfaces/greedy-plane-segmentation-ex3.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/surfaces/greedy-plane-segmentation.cpp b/examples/geometry/surfaces/greedy-plane-segmentation.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/tools/CMakeLists.txt b/examples/geometry/tools/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/geometry/tools/determinant/CMakeLists.txt b/examples/geometry/tools/determinant/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/geometry/tools/determinant/exampleInHalfPlane.cpp b/examples/geometry/tools/determinant/exampleInHalfPlane.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/tools/examplePreimage.cpp b/examples/geometry/tools/examplePreimage.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/volumes/CMakeLists.txt b/examples/geometry/volumes/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/geometry/volumes/distance/CMakeLists.txt b/examples/geometry/volumes/distance/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/geometry/volumes/distance/distancetransform2D.cpp b/examples/geometry/volumes/distance/distancetransform2D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/volumes/distance/distancetransform3D.cpp b/examples/geometry/volumes/distance/distancetransform3D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/volumes/distance/exampleFMM2D.cpp b/examples/geometry/volumes/distance/exampleFMM2D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/volumes/distance/exampleFMM3D.cpp b/examples/geometry/volumes/distance/exampleFMM3D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/volumes/distance/voronoimap2D.cpp b/examples/geometry/volumes/distance/voronoimap2D.cpp old mode 100644 new mode 100755 diff --git a/examples/geometry/volumes/dvcm-2d.cpp b/examples/geometry/volumes/dvcm-2d.cpp old mode 100644 new mode 100755 diff --git a/examples/graph/CMakeLists.txt b/examples/graph/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/graph/graphTraversal.cpp b/examples/graph/graphTraversal.cpp old mode 100644 new mode 100755 diff --git a/examples/graph/volDistanceTraversal.cpp b/examples/graph/volDistanceTraversal.cpp old mode 100644 new mode 100755 diff --git a/examples/images/CMakeLists.txt b/examples/images/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/images/exampleConstImageAdapter.cpp b/examples/images/exampleConstImageAdapter.cpp old mode 100644 new mode 100755 diff --git a/examples/images/exampleImageFactoryFromHDF5.cpp b/examples/images/exampleImageFactoryFromHDF5.cpp old mode 100644 new mode 100755 diff --git a/examples/images/exampleRigidtransformation2d.cpp b/examples/images/exampleRigidtransformation2d.cpp old mode 100644 new mode 100755 diff --git a/examples/images/exampleRigidtransformation3d.cpp b/examples/images/exampleRigidtransformation3d.cpp old mode 100644 new mode 100755 diff --git a/examples/images/exampleTiledImage.cpp b/examples/images/exampleTiledImage.cpp old mode 100644 new mode 100755 diff --git a/examples/images/extract2DImagesFrom3D.cpp b/examples/images/extract2DImagesFrom3D.cpp old mode 100644 new mode 100755 diff --git a/examples/images/extract2DImagesFrom3DandVisu.cpp b/examples/images/extract2DImagesFrom3DandVisu.cpp old mode 100644 new mode 100755 diff --git a/examples/images/extract2DSlicesImagesFrom3D.cpp b/examples/images/extract2DSlicesImagesFrom3D.cpp old mode 100644 new mode 100755 diff --git a/examples/images/imageBasicSubsampling.cpp b/examples/images/imageBasicSubsampling.cpp old mode 100644 new mode 100755 diff --git a/examples/images/quasiaffinetransform2D.cpp b/examples/images/quasiaffinetransform2D.cpp new file mode 100755 index 0000000000..337dbc6d2f --- /dev/null +++ b/examples/images/quasiaffinetransform2D.cpp @@ -0,0 +1,55 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file quasiaffinetransform2D.cpp + * @ingroup Examples + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, France + * + * @date 2014/08/16 + * + * An example file named quasiaffinetransform2D. + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +#include +#include "ConfigExamples.h" +#include "DGtal/helpers/StdDefs.h" +#include "DGtal/base/Common.h" +#include "DGtal/images/QuasiAffineTransform2D.h" +/////////////////////////////////////////////////////////////////////////////// + +using namespace std; +using namespace DGtal; + +/////////////////////////////////////////////////////////////////////////////// + +int main( int argc, char** argv ) +{ + trace.beginBlock ( "Example quasiaffinetransform2D" ); + trace.info() << "Args:"; + for ( int i = 0; i < argc; ++i ) + trace.info() << " " << argv[ i ]; + trace.info() << endl; + + trace.endBlock(); + return 0; +} +// // +/////////////////////////////////////////////////////////////////////////////// diff --git a/examples/images/raw2HDF5.cpp b/examples/images/raw2HDF5.cpp old mode 100644 new mode 100755 diff --git a/examples/io/CMakeLists.txt b/examples/io/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/io/boards/CMakeLists.txt b/examples/io/boards/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard2D-1-points.cpp b/examples/io/boards/dgtalBoard2D-1-points.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard2D-2-sets.cpp b/examples/io/boards/dgtalBoard2D-2-sets.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard2D-3-custom-classes.cpp b/examples/io/boards/dgtalBoard2D-3-custom-classes.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard2D-3-custom-points.cpp b/examples/io/boards/dgtalBoard2D-3-custom-points.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard2D-4-colormaps.cpp b/examples/io/boards/dgtalBoard2D-4-colormaps.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3D-1-points.cpp b/examples/io/boards/dgtalBoard3D-1-points.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3D-2-ks.cpp b/examples/io/boards/dgtalBoard3D-2-ks.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3D-6-clipping.cpp b/examples/io/boards/dgtalBoard3D-6-clipping.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-0-demo-kernel-2.cpp b/examples/io/boards/dgtalBoard3DTo2D-0-demo-kernel-2.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-1-points.cpp b/examples/io/boards/dgtalBoard3DTo2D-1-points.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-2-sets.cpp b/examples/io/boards/dgtalBoard3DTo2D-2-sets.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-2bis-sets.cpp b/examples/io/boards/dgtalBoard3DTo2D-2bis-sets.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-3-objects.cpp b/examples/io/boards/dgtalBoard3DTo2D-3-objects.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-4-modes.cpp b/examples/io/boards/dgtalBoard3DTo2D-4-modes.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-5-custom.cpp b/examples/io/boards/dgtalBoard3DTo2D-5-custom.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-6.cpp b/examples/io/boards/dgtalBoard3DTo2D-6.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/dgtalBoard3DTo2D-KSCell.cpp b/examples/io/boards/dgtalBoard3DTo2D-KSCell.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/exampleBezierCurve.cpp b/examples/io/boards/exampleBezierCurve.cpp old mode 100644 new mode 100755 diff --git a/examples/io/boards/logoDGtal.cpp b/examples/io/boards/logoDGtal.cpp old mode 100644 new mode 100755 diff --git a/examples/io/digitalSetFromPointList.cpp b/examples/io/digitalSetFromPointList.cpp old mode 100644 new mode 100755 diff --git a/examples/io/digitalSetFromVol.cpp b/examples/io/digitalSetFromVol.cpp old mode 100644 new mode 100755 diff --git a/examples/io/display3DToOFF.cpp b/examples/io/display3DToOFF.cpp old mode 100644 new mode 100755 diff --git a/examples/io/meshFromOFF.cpp b/examples/io/meshFromOFF.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewDualSurface.cpp b/examples/io/viewDualSurface.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/CMakeLists.txt b/examples/io/viewers/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/io/viewers/demo-kernel-2.cpp b/examples/io/viewers/demo-kernel-2.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-1-points.cpp b/examples/io/viewers/viewer3D-1-points.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-10-interaction.cpp b/examples/io/viewers/viewer3D-10-interaction.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-2-sets.cpp b/examples/io/viewers/viewer3D-2-sets.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-3-objects.cpp b/examples/io/viewers/viewer3D-3-objects.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-4-modes.cpp b/examples/io/viewers/viewer3D-4-modes.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-4bis-illustrationMode.cpp b/examples/io/viewers/viewer3D-4bis-illustrationMode.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-5-custom.cpp b/examples/io/viewers/viewer3D-5-custom.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-6-clipping.cpp b/examples/io/viewers/viewer3D-6-clipping.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-7-planes.cpp b/examples/io/viewers/viewer3D-7-planes.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-7-stdplane.cpp b/examples/io/viewers/viewer3D-7-stdplane.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-7bis-planes.cpp b/examples/io/viewers/viewer3D-7bis-planes.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-7bis-stdplane.cpp b/examples/io/viewers/viewer3D-7bis-stdplane.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-8-2DSliceImages.cpp b/examples/io/viewers/viewer3D-8-2DSliceImages.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-8bis-2Dimages.cpp b/examples/io/viewers/viewer3D-8bis-2Dimages.cpp old mode 100644 new mode 100755 diff --git a/examples/io/viewers/viewer3D-9-3Dimages.cpp b/examples/io/viewers/viewer3D-9-3Dimages.cpp old mode 100644 new mode 100755 diff --git a/examples/math/CMakeLists.txt b/examples/math/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/math/polynomial-derivative.cpp b/examples/math/polynomial-derivative.cpp old mode 100644 new mode 100755 diff --git a/examples/math/polynomial-read.cpp b/examples/math/polynomial-read.cpp old mode 100644 new mode 100755 diff --git a/examples/math/polynomial2-derivative.cpp b/examples/math/polynomial2-derivative.cpp old mode 100644 new mode 100755 diff --git a/examples/samples/Al.100.vol b/examples/samples/Al.100.vol old mode 100644 new mode 100755 diff --git a/examples/samples/DCA.dat b/examples/samples/DCA.dat old mode 100644 new mode 100755 diff --git a/examples/samples/DSS.dat b/examples/samples/DSS.dat old mode 100644 new mode 100755 diff --git a/examples/samples/accflower-20-5-5-0.1.sdp b/examples/samples/accflower-20-5-5-0.1.sdp old mode 100644 new mode 100755 diff --git a/examples/samples/cat10.vol b/examples/samples/cat10.vol old mode 100644 new mode 100755 diff --git a/examples/samples/church-small.pgm b/examples/samples/church-small.pgm old mode 100644 new mode 100755 diff --git a/examples/samples/church.pgm b/examples/samples/church.pgm old mode 100644 new mode 100755 diff --git a/examples/samples/church.png b/examples/samples/church.png old mode 100644 new mode 100755 diff --git a/examples/samples/circle-43.sdp b/examples/samples/circle-43.sdp old mode 100644 new mode 100755 diff --git a/examples/samples/circleR10.pgm b/examples/samples/circleR10.pgm old mode 100644 new mode 100755 diff --git a/examples/samples/circleR10modif.pgm b/examples/samples/circleR10modif.pgm old mode 100644 new mode 100755 diff --git a/examples/samples/contourS.fc b/examples/samples/contourS.fc old mode 100644 new mode 100755 diff --git a/examples/samples/contourS.gif b/examples/samples/contourS.gif old mode 100644 new mode 100755 diff --git a/examples/samples/contourS.pgm b/examples/samples/contourS.pgm old mode 100644 new mode 100755 diff --git a/examples/samples/contourS.png b/examples/samples/contourS.png old mode 100644 new mode 100755 diff --git a/examples/samples/contourS2.fc b/examples/samples/contourS2.fc old mode 100644 new mode 100755 diff --git a/examples/samples/ellipse-20-7-0.4.sdp b/examples/samples/ellipse-20-7-0.4.sdp old mode 100644 new mode 100755 diff --git a/examples/samples/flower-30-8-3.sdp b/examples/samples/flower-30-8-3.sdp old mode 100644 new mode 100755 diff --git a/examples/samples/helix.dat b/examples/samples/helix.dat old mode 100644 new mode 100755 diff --git a/examples/samples/horopter.dat b/examples/samples/horopter.dat old mode 100644 new mode 100755 diff --git a/examples/samples/hyperhelix1.dat b/examples/samples/hyperhelix1.dat old mode 100644 new mode 100755 diff --git a/examples/samples/lobster.vol b/examples/samples/lobster.vol old mode 100644 new mode 100755 diff --git a/examples/samples/plant-frechet.dat b/examples/samples/plant-frechet.dat old mode 100644 new mode 100755 diff --git a/examples/samples/pointList3d.pl b/examples/samples/pointList3d.pl old mode 100644 new mode 100755 diff --git a/examples/samples/sinus.dat b/examples/samples/sinus.dat old mode 100644 new mode 100755 diff --git a/examples/samples/sinusplanar.dat b/examples/samples/sinusplanar.dat old mode 100644 new mode 100755 diff --git a/examples/samples/smallSquare.dat b/examples/samples/smallSquare.dat old mode 100644 new mode 100755 diff --git a/examples/samples/spheric1.dat b/examples/samples/spheric1.dat old mode 100644 new mode 100755 diff --git a/examples/samples/tref.off b/examples/samples/tref.off old mode 100644 new mode 100755 diff --git a/examples/samples/viviani.dat b/examples/samples/viviani.dat old mode 100644 new mode 100755 diff --git a/examples/shapes/CMakeLists.txt b/examples/shapes/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/shapes/exampleEuclideanShapesDecorator.cpp b/examples/shapes/exampleEuclideanShapesDecorator.cpp old mode 100644 new mode 100755 diff --git a/examples/shapes/mesh3DConstructionAndVisualisation.cpp b/examples/shapes/mesh3DConstructionAndVisualisation.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/3dBorderExtraction.cpp b/examples/topology/3dBorderExtraction.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/3dBorderExtractionImg.cpp b/examples/topology/3dBorderExtractionImg.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/3dKSSurfaceExtraction.cpp b/examples/topology/3dKSSurfaceExtraction.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/CMakeLists.txt b/examples/topology/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/topology/ctopo-1-3d.cpp b/examples/topology/ctopo-1-3d.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/ctopo-1.cpp b/examples/topology/ctopo-1.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/ctopo-1s-3d.cpp b/examples/topology/ctopo-1s-3d.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/ctopo-2-3d.cpp b/examples/topology/ctopo-2-3d.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/ctopo-2.cpp b/examples/topology/ctopo-2.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/ctopo-fillContours.cpp b/examples/topology/ctopo-fillContours.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/digitalSurfaceSlice.cpp b/examples/topology/digitalSurfaceSlice.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/frontierAndBoundary.cpp b/examples/topology/frontierAndBoundary.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/generateSimplicityTables2D.cpp b/examples/topology/generateSimplicityTables2D.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/generateSimplicityTables3D.cpp b/examples/topology/generateSimplicityTables3D.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/homotopicThinning3D.cpp b/examples/topology/homotopicThinning3D.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/khalimskySpaceScanner.cpp b/examples/topology/khalimskySpaceScanner.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/trackImplicitPolynomialSurfaceToOFF.cpp b/examples/topology/trackImplicitPolynomialSurfaceToOFF.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/volBreadthFirstTraversal.cpp b/examples/topology/volBreadthFirstTraversal.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/volMarchingCubes.cpp b/examples/topology/volMarchingCubes.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/volScanBoundary.cpp b/examples/topology/volScanBoundary.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/volToOFF.cpp b/examples/topology/volToOFF.cpp old mode 100644 new mode 100755 diff --git a/examples/topology/volTrackBoundary.cpp b/examples/topology/volTrackBoundary.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/AreaSurfaceEstimation-final.cpp b/examples/tutorial-examples/AreaSurfaceEstimation-final.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/AreaSurfaceEstimation-template.cpp b/examples/tutorial-examples/AreaSurfaceEstimation-template.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/CMakeLists.txt b/examples/tutorial-examples/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/FMMErosion.cpp b/examples/tutorial-examples/FMMErosion.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/fileGridCurveRanges.cpp b/examples/tutorial-examples/fileGridCurveRanges.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/freemanChainFromImage.cpp b/examples/tutorial-examples/freemanChainFromImage.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/imageGridCurveEstimator.cpp b/examples/tutorial-examples/imageGridCurveEstimator.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/imageSetDT.cpp b/examples/tutorial-examples/imageSetDT.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/polyhedralizer.cpp b/examples/tutorial-examples/polyhedralizer.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/shapeDTViewer.cpp b/examples/tutorial-examples/shapeDTViewer.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/shapeGridCurveEstimator.cpp b/examples/tutorial-examples/shapeGridCurveEstimator.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/volDTGranulo-template.cpp b/examples/tutorial-examples/volDTGranulo-template.cpp old mode 100644 new mode 100755 diff --git a/examples/tutorial-examples/volDTGranulo.cpp b/examples/tutorial-examples/volDTGranulo.cpp old mode 100644 new mode 100755 diff --git a/others/CMakeLists.txt b/others/CMakeLists.txt new file mode 100755 index 0000000000..af500b1f94 --- /dev/null +++ b/others/CMakeLists.txt @@ -0,0 +1,9 @@ +project(tan3DExpr) +cmake_minimum_required(VERSION 2.8) +include_directories(../..) +aux_source_directory(. SRC_LIST) +add_definitions("-std=c++0x") +find_package(DGtal 0.9 REQUIRED) + +add_executable(${PROJECT_NAME} ${SRC_LIST}) +target_link_libraries(${PROJECT_NAME} ${DGTAL_LIBRARIES}) diff --git a/others/testRunner.cpp b/others/testRunner.cpp new file mode 100755 index 0000000000..b5e5eeac6c --- /dev/null +++ b/others/testRunner.cpp @@ -0,0 +1,638 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "DGtal/curves/ParametricCurveDigitizer3D.h" +#include "DGtal/curves/parametric/EllipticHelix.h" +#include +#include "DGtal/curves/parametric/DecoratorCurveTransformation.h" +#include "DGtal/images/RigidTransformation3D.h" +#include "DGtal/geometry/curves/ArithmeticalDSSComputer.h" +#include "DGtal/geometry/curves/Naive3DDSSComputer.h" +#include "DGtal/geometry/curves/LambdaMST2D.h" +#include "DGtal/geometry/curves/LambdaMST3D.h" +#include "DGtal/geometry/curves/LambdaMST3DBy2D.h" +#include "DGtal/kernel/BasicPointFunctors.h" +#include +#include +#include +#include +#include + +using namespace std; +using namespace DGtal; +using namespace Z3i; +using namespace functors; + +template +void print3D ( TCurve & digitalCurve, Board3D<> & board ) +{ + for ( unsigned int i = 0; i < digitalCurve.size(); i++ ) + { + board.setFillColor ( Color ( 0, 0, 255, 100 ) ); + board << SetMode3D(digitalCurve[i].className(), ""); + board << digitalCurve[i]; + // board << SetMode3D(digitalCurve[i].className(), "PavingWired"); + // board << digitalCurve[i]; + } +} + +template +unsigned int findMainAxis ( const TCurve & curve, double t ) +{ + Z3i::RealVector value; + value[0] = std::fabs ( curve.xp ( t )[0] ); + value[1] = std::fabs ( curve.xp ( t )[1] ); + value[2] = std::fabs ( curve.xp ( t )[2] ); + + if ( std::isgreater ( value[0], value[1] ) && std::isgreater ( value[0], value[2] ) ) + return 0; + else if ( std::isgreater( value[1], value[0] ) && std::isgreater ( value[1], value[2] ) ) + return 1; + else if ( std::isgreater ( value[2], value[0] ) && std::isgreater ( value[2], value[1] ) ) + return 2; +} + +template +double distance ( TPoint const & a, TPoint const & b ) +{ + double dist = 0.; + for ( unsigned short i = 0; i < TPoint::dimension; i++ ) + { + dist += ( a[i] - b[i] ) * ( a[i] - b[i] ); + } + return std::sqrt ( dist ); +} + +template +Iterator closest_point ( TPoint const & p, Iterator begin, Iterator end ) +{ + double d = 0; + Iterator result = begin; + while (begin != end) + { + double d2 = distance( p, *begin ); + if (d2 < d) + { + d = d2; + result = begin; + } + ++begin; + } + return result; +} + +template +void printDSS3D ( TSegmentComp & segmenter, Board3D<> & board ) +{ + for ( typename TSegmentComp::SegmentComputerIterator it = segmenter.begin() ; it != segmenter.end(); ++it ) + { + board << SetMode3D((*it).className(), "BoundingBox"); + board.setFillColor ( Color ( 255, 255, 255, 255 ) ); + board << *it; + } +} + +template +void exportPINK ( double radius1, double radius2, double depth, const TDCurve & digitalCurve ) +{ + std::ofstream curve ( "curve" + std::to_string ( radius1 ) + "_" + std::to_string ( radius2 ) + "_" + std::to_string ( depth ) + ".list" ); // pink like format + curve << "B " << digitalCurve.size() << std::endl; + for (int i = 0; i < digitalCurve.size(); i++ ) + curve << digitalCurve.at(i)[0] << " " << digitalCurve.at(i)[1] << " " << digitalCurve.at(i)[2] << std::endl; + curve.close(); +} + +template +typename TCurve::const_iterator FindClosestPoint ( Z3i::RealPoint & x, TCurve & dCurve ) +{ + typename TCurve::const_iterator closestIt = dCurve.begin(); + double minDist = DBL_MAX; + for (typename TCurve::const_iterator it = dCurve.begin(); it != dCurve.end(); ++it ) + { + Z3i::Point y = *it; + double distance = std::sqrt ( ( (x[0] - y[0]) * (x[0] - y[0]) ) + ( (x[1] - y[1]) * (x[1] - y[1]) ) + ( (x[2] - y[2]) * (x[2] - y[2]) ) ); + if ( minDist > distance ) + { + minDist = distance; + closestIt = it; + } + } + return closestIt; +} + +template +bool isCloseCurve ( TCurve & curve ) +{ + TPoint & start = curve.front(); + TPoint & end = curve.back(); + for ( unsigned short i = 0; i < TPoint::dimension; i++ ) + { + if ( std::abs ( start[i] - end[i] ) > 1 ) + return false; + } + return true; +} + +//split to smaller classes +template < class TCurve > +class TestRunner +{ + private: //types + typedef ForwardRigidTransformation3D < Space, Identity, Space::RealPoint, Space::RealPoint > ForwardTrans; + typedef BackwardRigidTransformation3D < Space, Identity, Space::RealPoint, Space::RealPoint > BackwardTrans; + typedef DecoratorCurveTransformation < TCurve, ForwardTrans, BackwardTrans > MyRotatedCurve; + typedef ParametricCurveDigitizer3DDecorator < MyRotatedCurve > Digitizer; + typedef typename ParametricCurveDigitizer3D < MyRotatedCurve >::DigitalCurve MyDigitalCurve; + typedef std::vector< Z2i::Point > MyProjection; + typedef std::vector < Z2i::Point > Range; + typedef Range::const_iterator ConstIterator; + typedef ArithmeticalDSSComputer < typename MyProjection::const_iterator, int, 8 > SegmentComputer; + typedef ArithmeticalDSSComputer < SimpleConstRange::ConstCirculator, int, 8 > SegmentComputerCloseCurve; + typedef Naive3DDSSComputer < typename MyDigitalCurve::const_iterator, int, 8 > Naive3SegmentComputer; + typedef Naive3DDSSComputer < typename SimpleConstRange::ConstCirculator, int, 8 > Naive3SegmentComputerCloseCurve; + typedef SaturatedSegmentation Segmentation; + typedef SaturatedSegmentation SegmentationCloseCurve; + typedef SaturatedSegmentation SegmentationNaive3D; + typedef SaturatedSegmentation SegmentationNaive3DCloseCurve; + typedef Projector< SpaceND<2,int> > Projector2d; + + private: //members + float radius1, radius2, depth; + double angle; + Z3i::RealVector axis; + double mse2d, mse3d, mae2d, mae3d; + bool lengthFilter; + bool distanceFilter; + TCurve * realCurve; + ForwardTrans * trans; + BackwardTrans * inverse; + MyRotatedCurve * rotCurve; + MyDigitalCurve digitalCurve; + Naive3SegmentComputerCloseCurve * computer3DCloseCurve; + SegmentationNaive3DCloseCurve * segmenter3DCloseCurve; + Naive3SegmentComputer * computer3D; + SegmentationNaive3D * segmenter3D; + LambdaMST3D < SegmentationNaive3DCloseCurve > * lmst3D64CloseCurve; + LambdaMST3D < SegmentationNaive3D > * lmst3D64; + //!\todo add version with circulator + LambdaMST3DBy2D < typename MyDigitalCurve::const_iterator > * lmst64By2D; + LambdaMST3DBy2D < typename SimpleConstRange < typename MyDigitalCurve::const_iterator >::ConstCirculator > * lmst64By2DCloseCurve; + unsigned int lenMin; + Board3D<> & board; + Board2D board2d; + + double mint, maxt; + + void isInitialized() + { + if ( realCurve == nullptr || trans == nullptr || inverse == nullptr || rotCurve == nullptr ) + throw "Not initialized! First call; setCurveParams; setTransformationParams."; + } + + void remove3DSegements() + { + delete computer3DCloseCurve; + computer3DCloseCurve = nullptr; + delete segmenter3DCloseCurve; + segmenter3DCloseCurve = nullptr; + delete computer3D; + computer3D = nullptr; + delete segmenter3D; + segmenter3D = nullptr; + } + + void removeEstimators() + { + delete lmst64By2D; + lmst64By2D = nullptr; + delete lmst64By2DCloseCurve; + lmst64By2DCloseCurve = nullptr; + delete lmst3D64CloseCurve, + lmst3D64CloseCurve = nullptr, + delete lmst3D64; + lmst3D64 = nullptr; + } + + void initEstimators() + { + remove3DSegements(); + removeEstimators(); + + lmst64By2D = new LambdaMST3DBy2D < typename MyDigitalCurve::const_iterator >(); + lmst64By2DCloseCurve = new LambdaMST3DBy2D < typename SimpleConstRange < typename MyDigitalCurve::const_iterator >::ConstCirculator >(); + + computer3D = new Naive3SegmentComputer(); + segmenter3D = new SegmentationNaive3D ( digitalCurve.begin(), digitalCurve.end(), *computer3D ); + lmst3D64CloseCurve = new LambdaMST3D < SegmentationNaive3DCloseCurve >(); + lmst3D64 = new LambdaMST3D < SegmentationNaive3D >(); + lmst3D64->init ( digitalCurve.begin(), digitalCurve.end() ); + lmst3D64->attach ( *segmenter3D ); + if ( isCloseCurve ( digitalCurve ) ) + { + SimpleConstRange t_Range(digitalCurve.begin(), digitalCurve.end()); + computer3DCloseCurve = new Naive3SegmentComputerCloseCurve(); + segmenter3DCloseCurve = new SegmentationNaive3DCloseCurve ( t_Range.c(), --t_Range.c(), *computer3DCloseCurve ); + segmenter3DCloseCurve->setMode ( "MostCentered" ); + repairCover( digitalCurve, *segmenter3DCloseCurve ); + lmst3D64CloseCurve->init ( t_Range.c(), --t_Range.c() ); + lmst3D64CloseCurve->attach ( *segmenter3DCloseCurve ); + // printDSS3D( *segmenter3DCloseCurve, board ); + } + else + { + computer3D = new Naive3SegmentComputer(); + segmenter3D = new SegmentationNaive3D ( digitalCurve.begin(), digitalCurve.end(), *computer3D ); + // printDSS3D( *segmenter3D, board ); + } + } + + void findShortestValid2DMinimalSegment() + { + unsigned int lenXY = 0; unsigned int lenXZ = 0; unsigned int lenYZ = 0; + lenMin = UINT_MAX; + if ( isCloseCurve ( digitalCurve ) ) + { + typename SegmentationNaive3DCloseCurve::SegmentComputerIterator it = segmenter3DCloseCurve->begin(); + for (; it != segmenter3DCloseCurve->end(); ++it ) + { + (*it).get2DSegmentsLength ( lenXY, lenXZ, lenYZ ); + if ( ( lenXY > lenYZ && lenXZ > lenYZ ) && lenMin > std::min ( lenXY, lenXZ ) ) + lenMin = std::min ( lenXY, lenXZ ); + else if ( ( lenYZ > lenXZ && lenXY > lenXZ ) && lenMin > std::min ( lenXY, lenYZ ) ) + lenMin = std::min ( lenXY, lenYZ ); + else if ( ( lenYZ > lenXY && lenXZ > lenXY ) && lenMin > std::min ( lenXZ, lenYZ ) ) + lenMin = std::min ( lenXZ, lenYZ ); + } + } + else + { + typename SegmentationNaive3D::SegmentComputerIterator it = segmenter3D->begin(); + for (; it != segmenter3D->end(); ++it ) + { + (*it).get2DSegmentsLength ( lenXY, lenXZ, lenYZ ); + if ( ( lenXY > lenYZ && lenXZ > lenYZ ) && lenMin > std::min ( lenXY, lenXZ ) ) + lenMin = std::min ( lenXY, lenXZ ); + else if ( ( lenYZ > lenXZ && lenXY > lenXZ ) && lenMin > std::min ( lenXY, lenYZ ) ) + lenMin = std::min ( lenXY, lenYZ ); + else if ( ( lenYZ > lenXY && lenXZ > lenXY ) && lenMin > std::min ( lenXZ, lenYZ ) ) + lenMin = std::min ( lenXZ, lenYZ ); + } + } + } + + template + bool testCover ( TMyCurve const & curve, TSegmentComp & dssSegments ) + { + typename TSegmentComp::SegmentComputerIterator lastDSS = dssSegments.end(); + typename TMyCurve::const_iterator it = curve.begin(); + for (; it != curve.end(); ++it) + { + bool flag = false; + typename TSegmentComp::SegmentComputerIterator DSS = dssSegments.begin(); + for ( ; DSS != lastDSS; ++DSS ) + { + if ( DSS->isInDSS ( *it ) ) + flag = true; + } + if (!flag) + return false; + } + return true; + } + + template + void repairCover ( TMyCurve const & curve, TSegmentComp & dssSegments ) + { + if ( !testCover ( curve, dssSegments ) ) + { + dssSegments.setMode("First"); + if ( !testCover ( curve, dssSegments ) ) + { + dssSegments.setMode("Last"); + if ( !testCover ( curve, dssSegments ) ) + throw "Curve not covered!"; + } + } + } + + void initEstimatorsBy2D () + { + SimpleConstRange < typename MyDigitalCurve::const_iterator > t_Range ( digitalCurve.begin(), digitalCurve.end() ); + lmst64By2DCloseCurve->init ( t_Range.c(), --t_Range.c() ); + lmst64By2D->init ( digitalCurve.begin(), digitalCurve.end() ); + } + + void _test ( double & mse2d, double & mse3d, double & mse3dF, + double & mae2d, double & mae3d, double & mae3dF, + double & mse2DVar, double & mse3DVar, double & mse3DVarF ) + { + std::stringstream tr; + tr << "HelixMST3D_" << std::showpoint << std::setprecision(3) << radius1 << "_" << std::showpoint << std::setprecision(3) << radius2 << "_" << std::showpoint << std::setprecision(3) << depth << ".csv"; + std::ofstream curve3D ( tr.str() ); + tr.str(""); + tr << "HelixMST3DFiltered_" << std::showpoint << std::setprecision(3) << radius1 << "_" << std::showpoint << std::setprecision(3) << radius2 << "_" << std::showpoint << std::setprecision(3) << depth << ".csv"; + std::ofstream curve3DFiltered ( tr.str() ); + tr.str(""); + tr << "HelixMST2D_" << std::showpoint << std::setprecision(3) << radius1 << "_" << std::showpoint << std::setprecision(3) << radius2 << "_" << std::showpoint << std::setprecision(3) << depth << ".csv"; + std::ofstream projec ( tr.str() ); + tr.str(""); + tr << "HelixGroundTruth_" << std::showpoint << std::setprecision(3) << radius1 << "_" << std::showpoint << std::setprecision(3) << radius2 << "_" << std::showpoint << std::setprecision(3) << depth << ".csv"; + std::ofstream ground ( tr.str() ); + + Z3i::RealVector tanGroundTruth; + Z3i::RealPoint tangent3D; + Z3i::RealPoint tangent3DF; + PointVector<3, double> tanMST2D; + + std::vector mse2dPartial; + std::vector mse3dPartial; + std::vector mse3dFPartial; + std::vector discardedSet; + + bool flag = true; + unsigned char axis = -1, axisPrev = -1; + unsigned int counter = 0; + for ( double i = mint; i < maxt; i += 0.05 ) + { + Z3i::RealPoint realPoint = rotCurve->x ( i ); + tanGroundTruth = rotCurve->xp ( i ); + tanGroundTruth = tanGroundTruth.getNormalized(); + typename MyDigitalCurve::const_iterator it = FindClosestPoint < MyDigitalCurve > ( realPoint, digitalCurve ); + + std::cout << "Point: " << *it << std::endl; + + //omit ends for open curve -- they never have a good approximation + if ( !( isCloseCurve( digitalCurve ) ) && ( it == digitalCurve.begin() || it == digitalCurve.end() ) ) + continue; + + //Do not consider points which are too far from real curve. + if ( distance ( RealPoint ( *it ), realPoint ) >= std::sqrt ( 3 ) / 2. ) + continue; + + //check if director changed and manage discarded set. + axisPrev = axis; + axis = findMainAxis(*rotCurve, i); + if ( axis != axisPrev ) + { + if ( std::find ( discardedSet.begin(), discardedSet.end(), *it ) == discardedSet.end() ) + discardedSet.push_back ( *it ); + } + + if ( isCloseCurve( digitalCurve ) ) + { + // check if points are included in DSSs with points in discarded set. + if ( InDisartedSet < std::vector::const_iterator, SegmentationNaive3DCloseCurve, Z3i::Point > ( discardedSet.cbegin(), discardedSet.cend(), segmenter3DCloseCurve, *it ) ) + continue; + + lmst3D64CloseCurve->setLengthFilter ( 0 ); + lmst3D64CloseCurve->setDistanceFilter ( -1 ); + tangent3D = lmst3D64CloseCurve->eval(*it); + lmst3D64CloseCurve->setLengthFilter ( lenMin/2. ); + lmst3D64CloseCurve->setDistanceFilter ( lenMin/2. ); + tangent3DF = lmst3D64CloseCurve->eval(*it); + tanMST2D = lmst64By2DCloseCurve->eval(*it); + } + else + { + // check if points are included in DSSs with points in discarded set. + if ( InDisartedSet < std::vector::const_iterator, SegmentationNaive3D, Z3i::Point > ( discardedSet.cbegin(), discardedSet.cend(), segmenter3D, *it ) ) + continue; + + lmst3D64->setLengthFilter ( 0 ); + lmst3D64->setDistanceFilter ( -1 ); + tangent3D = lmst3D64->eval(*it); + lmst3D64->setLengthFilter ( lenMin/2. ); + lmst3D64->setDistanceFilter ( lenMin/2. ); + tangent3DF = lmst3D64->eval(*it); + tanMST2D = lmst64By2D->eval(*it); + } + if ( tangent3D.norm() != 0 ) + tangent3D = tangent3D.getNormalized(); + + if ( tanMST2D.norm() != 0 ) + tanMST2D = tanMST2D.getNormalized(); + + counter++; + double sinSquareReal = pow ( realPoint.crossProduct ( tanGroundTruth ).norm() / ( realPoint.norm() * tanGroundTruth.norm() ), 2 ); + double sinSquare3DMST = pow ( realPoint.crossProduct ( tangent3D ).norm() / ( realPoint.norm() * tangent3D.norm() ), 2 ); + double sinSquare3DMSTF = pow ( realPoint.crossProduct ( tangent3DF ).norm() / ( realPoint.norm() * tangent3DF.norm() ), 2 ); + double sinSquare3DMSTBy2D = pow ( realPoint.crossProduct ( tanMST2D ).norm() / ( realPoint.norm() * tanMST2D.norm() ), 2 ); + + double mse3DTmp = pow ( sinSquare3DMST - sinSquareReal, 2 ); + mse3d += mse3DTmp; + mse3dPartial.push_back ( mse3DTmp ); + double mse3DTmpF = pow ( sinSquare3DMSTF - sinSquareReal, 2 ); + mse3dF += mse3DTmpF; + mse3dFPartial.push_back ( mse3DTmpF ); + double mse2DTmp = pow ( sinSquare3DMSTBy2D - sinSquareReal, 2 ); + mse2d += mse2DTmp; + mse2dPartial.push_back ( mse2DTmp ); + mae3d += fabs ( sinSquare3DMST - sinSquareReal ); + mae3dF += fabs ( sinSquare3DMSTF - sinSquareReal ); + mae2d += fabs ( sinSquare3DMSTBy2D - sinSquareReal ); + + if ( tanMST2D.cosineSimilarity ( tanGroundTruth ) > M_PI_2 ) + tanMST2D = -tanMST2D; + if ( tangent3D.cosineSimilarity ( tanGroundTruth ) > M_PI_2 ) + { + tangent3D = -tangent3D; + tangent3DF = -tangent3DF; + } + curve3D << i << "," << tangent3D[0] << "," << tangent3D[1] << "," << tangent3D[2] << std::endl; + curve3DFiltered << i << "," << tangent3DF[0] << "," << tangent3DF[1] << "," << tangent3DF[2] << std::endl; + projec << i << "," << tanMST2D[0] << "," << tanMST2D[1] << "," << tanMST2D[2] << std::endl; + ground << i << "," << tanGroundTruth[0] << "," << tanGroundTruth[1] << "," << tanGroundTruth[2] << std::endl; + } + + mse2d /= (double)counter; + mse3d /= (double)counter; + mse3dF /= (double)counter; + mae2d /= (double)counter; + mae3d /= (double)counter; + mae3dF /= (double)counter; + + assert ( counter == mse2dPartial.size() ); + for ( unsigned int i = 0; i < mse2dPartial.size(); i++ ) + { + mse2DVar += pow ( mse2dPartial[i] - mse2d, 2 ); + mse3DVar += pow ( mse3dPartial[i] - mse3d, 2 ); + mse3DVarF += pow ( mse3dFPartial[i] - mse3dF, 2 ); + } + mse2DVar /= mse2dPartial.size(); + mse3DVar /= mse3dPartial.size(); + mse3DVarF /= mse3dFPartial.size(); + + curve3D.close(); + curve3DFiltered.close(); + projec.close(); + ground.close(); + } + + template + bool InDisartedSet ( const IteratorDisartedSet & dbegin, const IteratorDisartedSet & dend, + const TSegmentation * segmenter, const TPoint & point ) + { + typename TSegmentation::SegmentComputerIterator itt = segmenter->begin(); + bool flag = false; + for (; itt != segmenter->end(); ++itt ) + { + for ( IteratorDisartedSet it = dbegin; it != dend; ++it ) + if ( itt->isInDSS ( point ) && itt->isInDSS ( *it ) ) + return true; + } + return false; + } + +public: + TestRunner ( Board3D<> & p_board) : board(p_board) + { + radius1 = radius2 = depth = angle = mse2d = mae3d = mae2d = mae3d = 0.; + lengthFilter = false; + distanceFilter = false; + realCurve = nullptr; + trans = nullptr; + inverse = nullptr; + rotCurve = nullptr; + computer3DCloseCurve = nullptr; + segmenter3DCloseCurve = nullptr; + computer3D = nullptr; + segmenter3D = nullptr; + lmst3D64CloseCurve = nullptr; + lmst3D64 = nullptr; + lmst64By2D = nullptr; + std::vector v1,v2,v3; + v1.push_back(0); + v1.push_back(1); + v2.push_back(0); + v2.push_back(2); + v3.push_back(1); + v3.push_back(2); + } + + void setCurveParams ( float p_radius1, float p_radius2, float p_depth ) + { + radius1 = p_radius1; + radius2 = p_radius2; + depth = p_depth; + delete realCurve; + realCurve = new TCurve ( radius1, radius2, depth ); + } + + void setTransformationParams ( double p_angle, Z3i::RealVector p_axis ) + { + angle = p_angle; + axis = p_axis; + + delete trans; + delete inverse; + delete rotCurve; + + trans = new ForwardTrans ( RealPoint ( 0, 0, 0 ), axis, angle, RealVector (0,0,0) ); + inverse = new BackwardTrans ( RealPoint ( 0, 0, 0 ), axis, angle, RealVector (0,0,0) ); + rotCurve = new MyRotatedCurve ( *realCurve, *trans, *inverse ); + } + + void setLengthFilter (bool filter) + { + lengthFilter = filter; + } + + void setDistanceFilter (bool filter) + { + distanceFilter = filter; + } + + void digitizeCurve ( double tmin, double tmax, bool changeAxis, bool & status ) + { + isInitialized(); + mint = tmin; + maxt = tmax; + digitalCurve.clear(); + Digitizer digitizer; + digitizer.attach ( *rotCurve ); + digitizer.init ( digitalCurve ); + try + { + digitizer.digitize ( mint, maxt, 0.00001 ); + } catch (...) + { + status = false; + if ( maxt < ( tmax / 2. ) || digitalCurve.size() < 5 ) + throw "Curve too short."; + } + exportPINK ( radius1, radius2, depth, digitalCurve ); + // print3D ( digitalCurve, board ); + } + + /** + * @param mse2d mean square error of sin^2 between estimated tangent ( LambdaMST3DBy2D ) and point of real curve. + * @param mse3d mean square error of sin^2 between estimated tangent ( LambdaMST3D ) and point of real curve. + * @param mse3dF mean square error of sin^2 between estimated tangent ( LambdaMST3D filtered ) and point of real curve. + * + * @param mae2d mean absolute error of sin^2 between estimated tangent ( LambdaMST3DBy2D ) and point of real curve. + * @param mae3d mean absolute error of sin^2 between estimated tangent ( LambdaMST3D ) and point of real curve. + * @param mae3dF mean absolute error of sin^2 between estimated tangent ( LambdaMST3D filtered ) and point of real curve. + * + * @param mae2DVar variance of mean absolute error of sin^2 between estimated tangent ( LambdaMST3DBy2D ) and point of real curve. + * @param mae3DVar variance of mean absolute error of sin^2 between estimated tangent ( LambdaMST3D ) and point of real curve. + * @param mae3DVarF variance of mean absolute error of sin^2 between estimated tangent ( LambdaMST3D filtered ) and point of real curve. + */ + void runTest ( double & mse2d, double & mse3d, double & mse3dF, + double & mae2d, double & mae3d, double & mae3dF, + double & mse2DVar, double & mse3DVar, double & mse3DVarF ) + { + initEstimators(); + initEstimatorsBy2D (); + findShortestValid2DMinimalSegment(); + _test ( mse2d, mse3d, mse3dF, mae2d, mae3d, mae3dF, mse2DVar, mse3DVar, mse3DVarF ); + } + + ~TestRunner() + { + delete trans; + delete inverse; + delete rotCurve; + remove3DSegements(); + removeEstimators(); + } +}; + +int main ( int argc, char ** argv ) +{ + if ( argc < 5 ) + throw std::runtime_error ( "Too few arguments!" ); + // feenableexcept ( FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW ); + std::ofstream mse ( "mse_ell_helix.csv" ); + mse << "ln(h)" << "," << "ln(mse2d)" << "," << "ln(mse3d)" << "," << "ln(mse3dFiltered)" << "," + << "h" << "," << "mse2d" << "," << "mse3d" << "," << "mse3dFiltered" << "," + << "mae2d" << "," << "mae3d" << "," << "mae3dFiltered" << "," + << "mse2dVar" << "," << "mse3dVar" << "," << "mse3dVarFiltered" << std::endl; + double mse2d, mse3d, mse3dF, mae2d, mae3d, mae3dF, mse2dVar, mse3DVar, mse3DVarF; + Board3D<> board; + TestRunner< EllipticHelix < Z3i::Space > > testRunner ( board ); + for ( double i = 1.; i < std::atof ( argv[5] ); i += std::atof ( argv[4] ) ) + { + mse2d = mse3d = mse3dF = mae2d = mae3d = mae3dF = mse2dVar = mse3DVar = mse3DVarF = 0.; + bool status = true; + board.clear(); + std::stringstream tr; + tr << std::setprecision(3) << std::atof ( argv[1] ) * i << "_" << std::setprecision(3) << std::atof ( argv[2] ) * i << "_" << std::setprecision(3) << std::atof ( argv[3] ) * i; + testRunner.setCurveParams ( std::atof ( argv[1] ) * i, std::atof ( argv[2] ) * i,std::atof ( argv[3] ) * i ); + testRunner.setTransformationParams ( std::atof(argv[6]), Z3i::RealVector ( 0, 1, 0 ) ); + testRunner.digitizeCurve ( 0., 2. * M_PI - 0., true, status ); + testRunner.runTest ( mse2d, mse3d, mse3dF, mae2d, mae3d, mae3dF, mse2dVar, mse3DVar, mse3DVarF ); + board.saveOBJ( tr.str().c_str() ); + mse << std::log ( i ) << "," << std::log (mse2d) << "," << std::log ( mse3d ) << "," << std::log ( mse3dF ) + << "," << i << "," << mse2d << "," << mse3d << "," << mse3dF + << "," << mae2d << "," << mae3d << "," << mae3dF + << "," << mse2dVar << "," << mse3DVar << "," << mse3DVarF << "," << status << std::endl; + } + std::cout << "Done." << std::endl; + mse.close(); + return 0; +} \ No newline at end of file diff --git a/src/Board/Board.cpp b/src/Board/Board.cpp old mode 100644 new mode 100755 diff --git a/src/Board/Board.h b/src/Board/Board.h old mode 100644 new mode 100755 diff --git a/src/Board/Board.ih b/src/Board/Board.ih old mode 100644 new mode 100755 diff --git a/src/Board/LICENSE b/src/Board/LICENSE old mode 100644 new mode 100755 diff --git a/src/Board/ModuleSRC.txt b/src/Board/ModuleSRC.txt old mode 100644 new mode 100755 diff --git a/src/Board/PSFonts.cpp b/src/Board/PSFonts.cpp old mode 100644 new mode 100755 diff --git a/src/Board/PSFonts.h b/src/Board/PSFonts.h old mode 100644 new mode 100755 diff --git a/src/Board/Path.cpp b/src/Board/Path.cpp old mode 100644 new mode 100755 diff --git a/src/Board/Path.h b/src/Board/Path.h old mode 100644 new mode 100755 diff --git a/src/Board/Point.h b/src/Board/Point.h old mode 100644 new mode 100755 diff --git a/src/Board/Rect.cpp b/src/Board/Rect.cpp old mode 100644 new mode 100755 diff --git a/src/Board/Rect.h b/src/Board/Rect.h old mode 100644 new mode 100755 diff --git a/src/Board/ShapeList.cpp b/src/Board/ShapeList.cpp old mode 100644 new mode 100755 diff --git a/src/Board/ShapeList.h b/src/Board/ShapeList.h old mode 100644 new mode 100755 diff --git a/src/Board/ShapeList.ih b/src/Board/ShapeList.ih old mode 100644 new mode 100755 diff --git a/src/Board/Shapes.cpp b/src/Board/Shapes.cpp old mode 100644 new mode 100755 diff --git a/src/Board/Shapes.h b/src/Board/Shapes.h old mode 100644 new mode 100755 diff --git a/src/Board/Shapes.ih b/src/Board/Shapes.ih old mode 100644 new mode 100755 diff --git a/src/Board/Tools.cpp b/src/Board/Tools.cpp old mode 100644 new mode 100755 diff --git a/src/Board/Tools.h b/src/Board/Tools.h old mode 100644 new mode 100755 diff --git a/src/Board/Tools.ih b/src/Board/Tools.ih old mode 100644 new mode 100755 diff --git a/src/Board/Transforms.cpp b/src/Board/Transforms.cpp old mode 100644 new mode 100755 diff --git a/src/Board/Transforms.h b/src/Board/Transforms.h old mode 100644 new mode 100755 diff --git a/src/Board/Transforms.ih b/src/Board/Transforms.ih old mode 100644 new mode 100755 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/CPositiveIrreducibleFraction.h b/src/DGtal/arithmetic/CPositiveIrreducibleFraction.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/ClosedIntegerHalfPlane.h b/src/DGtal/arithmetic/ClosedIntegerHalfPlane.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/ClosedIntegerHalfPlane.ih b/src/DGtal/arithmetic/ClosedIntegerHalfPlane.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/IntegerComputer.h b/src/DGtal/arithmetic/IntegerComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/IntegerComputer.ih b/src/DGtal/arithmetic/IntegerComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/LatticePolytope2D.h b/src/DGtal/arithmetic/LatticePolytope2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/LatticePolytope2D.ih b/src/DGtal/arithmetic/LatticePolytope2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/LightSternBrocot.cpp b/src/DGtal/arithmetic/LightSternBrocot.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/LightSternBrocot.h b/src/DGtal/arithmetic/LightSternBrocot.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/LightSternBrocot.ih b/src/DGtal/arithmetic/LightSternBrocot.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/LighterSternBrocot.cpp b/src/DGtal/arithmetic/LighterSternBrocot.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/LighterSternBrocot.h b/src/DGtal/arithmetic/LighterSternBrocot.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/LighterSternBrocot.ih b/src/DGtal/arithmetic/LighterSternBrocot.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/ModuleSRC.txt b/src/DGtal/arithmetic/ModuleSRC.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/ModuloComputer.h b/src/DGtal/arithmetic/ModuloComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/ModuloComputer.ih b/src/DGtal/arithmetic/ModuloComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/Pattern.h b/src/DGtal/arithmetic/Pattern.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/Pattern.ih b/src/DGtal/arithmetic/Pattern.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/StandardDSLQ0.h b/src/DGtal/arithmetic/StandardDSLQ0.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/StandardDSLQ0.ih b/src/DGtal/arithmetic/StandardDSLQ0.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/SternBrocot.cpp b/src/DGtal/arithmetic/SternBrocot.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/SternBrocot.h b/src/DGtal/arithmetic/SternBrocot.h old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/SternBrocot.ih b/src/DGtal/arithmetic/SternBrocot.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/images/Sternbrocot.png b/src/DGtal/arithmetic/doc/images/Sternbrocot.png old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/images/dsl-standard-s.png b/src/DGtal/arithmetic/doc/images/dsl-standard-s.png old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/images/lower-animation.gif b/src/DGtal/arithmetic/doc/images/lower-animation.gif old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/images/lower-integer-convex-hull-cut-2.png b/src/DGtal/arithmetic/doc/images/lower-integer-convex-hull-cut-2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/images/lower-integer-convex-hull-cut.png b/src/DGtal/arithmetic/doc/images/lower-integer-convex-hull-cut.png old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/images/lower-integer-convex-hull.png b/src/DGtal/arithmetic/doc/images/lower-integer-convex-hull.png old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/moduleDigitalStraightness.dox b/src/DGtal/arithmetic/doc/moduleDigitalStraightness.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/moduleIntegerComputations.dox b/src/DGtal/arithmetic/doc/moduleIntegerComputations.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/moduleIrreducibleFraction.dox b/src/DGtal/arithmetic/doc/moduleIrreducibleFraction.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/moduleLatticePolytope2D.dox b/src/DGtal/arithmetic/doc/moduleLatticePolytope2D.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/packageArithmetic.dox b/src/DGtal/arithmetic/doc/packageArithmetic.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/arithmetic/doc/packageArithmeticConcepts.dox b/src/DGtal/arithmetic/doc/packageArithmeticConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Alias.h b/src/DGtal/base/Alias.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Assert.h b/src/DGtal/base/Assert.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/BasicArchetypes.h b/src/DGtal/base/BasicArchetypes.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/BasicBoolFunctors.h b/src/DGtal/base/BasicBoolFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/BasicBoolFunctors.ih b/src/DGtal/base/BasicBoolFunctors.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/BasicFunctors.h b/src/DGtal/base/BasicFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/BasicTypes.h b/src/DGtal/base/BasicTypes.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Bits.cpp b/src/DGtal/base/Bits.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Bits.h b/src/DGtal/base/Bits.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CBackInsertable.h b/src/DGtal/base/CBackInsertable.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CBidirectionalRange.h b/src/DGtal/base/CBidirectionalRange.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CBidirectionalRangeFromPoint.h b/src/DGtal/base/CBidirectionalRangeFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CBidirectionalRangeWithWritableIterator.h b/src/DGtal/base/CBidirectionalRangeWithWritableIterator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CBidirectionalRangeWithWritableIteratorFromPoint.h b/src/DGtal/base/CBidirectionalRangeWithWritableIteratorFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CConstBidirectionalRange.h b/src/DGtal/base/CConstBidirectionalRange.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CConstBidirectionalRangeFromPoint.h b/src/DGtal/base/CConstBidirectionalRangeFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CConstSinglePassRange.h b/src/DGtal/base/CConstSinglePassRange.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CConstSinglePassRangeFromPoint.h b/src/DGtal/base/CConstSinglePassRangeFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CLabel.h b/src/DGtal/base/CLabel.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CPredicate.h b/src/DGtal/base/CPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CQuantity.h b/src/DGtal/base/CQuantity.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CSTLAssociativeContainer.h b/src/DGtal/base/CSTLAssociativeContainer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CSinglePassRange.h b/src/DGtal/base/CSinglePassRange.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CSinglePassRangeFromPoint.h b/src/DGtal/base/CSinglePassRangeFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CSinglePassRangeWithWritableIterator.h b/src/DGtal/base/CSinglePassRangeWithWritableIterator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CSinglePassRangeWithWritableIteratorFromPoint.h b/src/DGtal/base/CSinglePassRangeWithWritableIteratorFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CUnaryFunctor.h b/src/DGtal/base/CUnaryFunctor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Circulator.h b/src/DGtal/base/Circulator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Clock.h b/src/DGtal/base/Clock.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Clock.ih b/src/DGtal/base/Clock.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Clone.h b/src/DGtal/base/Clone.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Common.cpp b/src/DGtal/base/Common.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Common.h b/src/DGtal/base/Common.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/ConceptUtils.h b/src/DGtal/base/ConceptUtils.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Config.h.in b/src/DGtal/base/Config.h.in old mode 100644 new mode 100755 diff --git a/src/DGtal/base/ConstAlias.h b/src/DGtal/base/ConstAlias.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/ConstIteratorAdapter.h b/src/DGtal/base/ConstIteratorAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/ConstRangeAdapter.h b/src/DGtal/base/ConstRangeAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/ConstRangeFromPointAdapter.h b/src/DGtal/base/ConstRangeFromPointAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CountedConstPtrOrConstPtr.h b/src/DGtal/base/CountedConstPtrOrConstPtr.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CountedConstPtrOrConstPtr.ih b/src/DGtal/base/CountedConstPtrOrConstPtr.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CountedPtr.h b/src/DGtal/base/CountedPtr.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CountedPtr.ih b/src/DGtal/base/CountedPtr.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CountedPtrOrPtr.h b/src/DGtal/base/CountedPtrOrPtr.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CountedPtrOrPtr.ih b/src/DGtal/base/CountedPtrOrPtr.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CowPtr.h b/src/DGtal/base/CowPtr.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/CowPtr.ih b/src/DGtal/base/CowPtr.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Exceptions.h b/src/DGtal/base/Exceptions.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/ExpressionTemplates.h b/src/DGtal/base/ExpressionTemplates.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/IndexedListWithBlocks.h b/src/DGtal/base/IndexedListWithBlocks.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/IndexedListWithBlocks.ih b/src/DGtal/base/IndexedListWithBlocks.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/InputIteratorWithRankOnSequence.h b/src/DGtal/base/InputIteratorWithRankOnSequence.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/InputIteratorWithRankOnSequence.ih b/src/DGtal/base/InputIteratorWithRankOnSequence.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/IteratorAdapter.h b/src/DGtal/base/IteratorAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/IteratorCirculatorTraits.h b/src/DGtal/base/IteratorCirculatorTraits.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/IteratorFunctions.h b/src/DGtal/base/IteratorFunctions.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/IteratorFunctions.ih b/src/DGtal/base/IteratorFunctions.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/LabelledMap.h b/src/DGtal/base/LabelledMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/LabelledMap.ih b/src/DGtal/base/LabelledMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Labels.h b/src/DGtal/base/Labels.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Labels.ih b/src/DGtal/base/Labels.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/ModuleSRC.txt b/src/DGtal/base/ModuleSRC.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/base/OldAlias.h b/src/DGtal/base/OldAlias.h new file mode 100755 index 0000000000..94f3ffdbaf --- /dev/null +++ b/src/DGtal/base/OldAlias.h @@ -0,0 +1,321 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file OldAlias.h + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France + * + * @date 2012/11/23 + * + * Header file for module OldAlias.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(OldAlias_RECURSES) +#error Recursive header files inclusion detected in OldAlias.h +#else // defined(OldAlias_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define OldAlias_RECURSES + +#if !defined OldAlias_h +/** Prevents repeated inclusion of headers. */ +#define OldAlias_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include "DGtal/base/Common.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + + namespace deprecated { + + ///////////////////////////////////////////////////////////////////////////// + // template class deprecated::Alias + /** + Description of template class 'deprecated::Alias'

\brief Aim: This class + encapsulates its parameter class so that to indicate to the user + that the object/pointer will be only aliased. Therefore the user + is reminded that the argument parameter is given to the function + without any additional cost and may be modified, while he is + aware that the lifetime of the argument parameter must be at + least as long as the object itself. Note that an instance of + deprecated::Alias is itself a light object (it holds only a pointer). + + It is used in methods or functions to encapsulate the parameter + types. + + @remark since 0.7. Use ::DGtal::Alias instead. + + @note The usage of \c deprecated::Alias instead of \c T \c & or \c T \c * + in parameters is \b recommended when the lifetime of the + parameter must exceed the lifetime of the called + method/function/constructor (often the case in constructor or + init methods). The usage of \c T \c & or \c T \c * instead of \c + deprecated::Alias is \b recommended when the lifetime of the parameter is + not required to exceed the lifetime of the called + method/function/constructor (often the case in standard methods, + where the parameter is only used at some point, but not + referenced after in some data member). + + @tparam T is any type. + + @see deprecated::ConstAlias + @see deprecated::Clone + + It can be used as follows. Consider this simple example where + class \e A is a big object. Then we define three classes \e B1, + \e B2 and \e B3, that uses some instance of \e A. + + @code + const int N = 10000; + struct A { ... + int table[N]; + }; + + // Each B1, B2 or B3 uses A, but we do not know if A will be copied + // or just referenced by only looking at the declaration of + // the method. Generally the ambiguity is removed by adding + // comments or, for the experienced developper, by looking at + // other parts of the code. + + // Only aliasing, but for a long lifetime. + struct B1 { + B1( const A & a ) // ambiguous, cost is O(1) here and lifetime of a should exceed constructor. + : myA( a ) {} + ... + const A & myA; + }; + // Copying as data member (stack or heap depending on B2 instance) + struct B2 { + B2( const A & a ) // ambiguous, cost is O(N) here + : myA( a ) {} + ... + A myA; + }; + // Copying on heap and data member pointing on it. + struct B3 { + B3( const A & a ) // ambiguous, cost is O(N) here + { myA = new A( a ); } + ~B3() + { if ( myA != 0 ) delete myA; } + ... + A* myA; + }; + @endcode + + Sometimes it is also very important that the developper that uses + the library is conscious that an object, say \a b, may require + that an instance \a a given as parameter should have a lifetime + longer than \a b itself (case for an instance of \a B1 + above). Classes Clone, OldAlias, ConstOldAlias exist for these + reasons. The classes above may be rewritten as follows. + + @code + // Aliasing for a long lifetime is visible. + struct B1 { + B1( ConstAlias a ) // not ambiguous, cost is O(1) here and lifetime of a should be long enough + : myA( a ) {} + ... + const A & myA; + // or Const A* myA; + }; + // Cloning as data member is visible. + struct B2 { + B2( Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ... + A myA; + }; + // Cloning on the heap requires call to allocate(), so that the user remembers calling \c delete. + struct B3_v1 { + B3_v1( Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a.allocate() ) {} + ~B3_v1() { if ( myA != 0 ) delete myA; } + ... + A* myA; + }; + // Cloning on the heap with CountedPtr mechanism is straightforward. + struct B3_v2 { + B3_v2( Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ~B3_v2() {} // CountedPtr takes care of delete. + ... + CountedPtr myA; + }; + // Cloning on the heap with CowPtr mechanism is straightforward. + struct B3_v3 { + B3_v3( Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ~B3_v3() {} // CountedPtr takes care of delete. + ... + CowPtr myA; + }; + ... + A a1; + B1 b( a1 ); // do not duplicate a1 + B2 bb( a1 ); // duplicate a1 + B2 bbb( &a1 ); // also duplicate a1 ! + B3_v1 c1( a1 ); // duplicate a1 on the heap + B3_v2 c1( a1 ); // duplicate a1 on the heap + B3_v3 c1( a1 ); // duplicate a1 on the heap + @endcode + + A last question could be why are we not just passing the instance + of A by value. This, for sure, would tell the developper that the + instance is duplicated somehow. The problem is that it induces + generally two duplications, and not only one ! It may be possible + that the compiler optimizes things nicely but it is unclear if + the compiler will always do it. + + @code + struct B4 { + B4( A a ) // not ambiguous, but cost is O(2N) here. + : myA( a ) {} + ... + A myA; + }; + A a1; + B4 b4( a1 ) // The object \a a1 is copied once on the heap as the parameter \a a, and once as the member \a b3.myA. + @endcode + + @note The user should not use deprecated::Alias instead of T* for data + members. It works in most cases, but there are some subtle + differences between the two behaviors. + + @note deprecated::Alias have no copy constructor. Indeed, if they had one, + there is an ambiguity when duplicating an alias between the copy + constructor or the T* cast followed by the T* constructor. + */ + template + class Alias + { + // ----------------------- Standard services ------------------------------ + public: + + /** + Destructor. Does nothing. + */ + ~Alias(); + + /** + * Constructor. + */ + Alias(); + + /** + Copy constructor. + @param other the object to clone. + + @note Keep in mind that Alias type should not be used in class + members (efficiency issue). + */ + Alias ( const DGtal::deprecated::Alias & other ); + + /** + * Assignment. + * @param other the object to copy. + * @return a reference on 'this'. + */ + DGtal::deprecated::Alias & operator= ( DGtal::deprecated::Alias & other ); + + /** + Constructor from an instance of T. The object is pointed in + 'this'. + @param t any object of type T. + */ + Alias( T & t ); + + /** + Constructor from a pointer of T. The pointer is copied in + 'this'. + @param ptrT any pointer to a object of type T or 0. + */ + Alias( T* ptrT ); + + /** + Cast operator to a reference to T instance. Gives access to the + instance of T. This allows things like: A a2 = a1; where a1 is + of type deprecated::Alias. + */ + operator T&() const; + + /** + @return the address of the aliased object. + @since 0.7 + */ + inline T* operator&() { return myPtrT; } + + // ------------------------- Private Datas -------------------------------- + private: + /// The pointer to the instance of T. + T* myPtrT; + + // ------------------------- Hidden services ------------------------------ + public: + + /* + Hidden copy constructor. + @param other the object to clone. + + It is not defined private since it must be accessible (see + warning below otherwise). + + Warning: C++98 requires an accessible copy constructor for class 'DGtal::deprecated::Alias' + when binding a reference to a temporary; was private [-Wbind-to-temporary-copy] + */ + //Alias ( const deprecated::Alias & other ); + + + + // ------------------------- Internals ------------------------------------ + private: + + }; // end of class deprecated::Alias + + + /** + * Overloads 'operator<<' for displaying objects of class 'deprecated::Alias'. + * @param out the output stream where the object is written. + * @param object the object of class 'deprecated::Alias' to write. + * @return the output stream after the writing. + */ + template + std::ostream& + operator<< ( std::ostream & out, const DGtal::deprecated::Alias & object ); + + } // namespace deprecated + +} // namespace DGtal + + +/////////////////////////////////////////////////////////////////////////////// +// Includes inline functions. +#include "DGtal/base/OldAlias.ih" + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined OldAlias_h + +#undef OldAlias_RECURSES +#endif // else defined(OldAlias_RECURSES) diff --git a/src/DGtal/base/OldAlias.ih b/src/DGtal/base/OldAlias.ih new file mode 100755 index 0000000000..f03623fa32 --- /dev/null +++ b/src/DGtal/base/OldAlias.ih @@ -0,0 +1,90 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file OldAlias.ih + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France + * + * @date 2012/11/23 + * + * Implementation of inline methods defined in OldAlias.h + * + * This file is part of the DGtal library. + */ + + +////////////////////////////////////////////////////////////////////////////// +#include +////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// IMPLEMENTATION of inline methods. +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// ----------------------- Standard services ------------------------------ + +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Alias::~Alias() +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Alias::Alias() + : myPtrT( 0 ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Alias & +DGtal::deprecated::Alias::operator=( DGtal::deprecated::Alias & other ) +{ + myPtrT = other.myPtrT; + return *this; +} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Alias::Alias( T & t ) : myPtrT( &t ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Alias::Alias(const DGtal::deprecated::Alias & other ) : myPtrT( other.myPtrT ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Alias::Alias( T* pT ) : myPtrT( pT ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Alias::operator T&() const +{ + return *myPtrT; +} +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline functions // + + +// // +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/src/DGtal/base/OldClone.h b/src/DGtal/base/OldClone.h new file mode 100755 index 0000000000..30edbd6944 --- /dev/null +++ b/src/DGtal/base/OldClone.h @@ -0,0 +1,304 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file OldClone.h + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France + * + * @date 2012/11/23 + * + * Header file for module OldClone.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(OldClone_RECURSES) +#error Recursive header files inclusion detected in OldClone.h +#else // defined(OldClone_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define OldClone_RECURSES + +#if !defined OldClone_h +/** Prevents repeated inclusion of headers. */ +#define OldClone_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include "DGtal/base/Common.h" +#include "DGtal/base/CountedPtr.h" +#include "DGtal/base/CowPtr.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + namespace deprecated { + + ///////////////////////////////////////////////////////////////////////////// + // template class deprecated::Clone + /** + Description of template class 'deprecated::Clone'

\brief Aim: This class + encapsulates its parameter class so that to indicate to the user + that the object will be duplicated (or cloned). Therefore the + user is reminded to take care of the possible cost of duplicating + the argument parameter, while he is aware that he does not have to take care + of the lifetime of the parameter. Note that an instance of + deprecated::Clone is itself a light object (it holds only a const + reference), the duplication takes place when the user + instantiates its member of type T. + + @remark deprecated since 0.7. Use Clone instead. + + @note The usage of \c deprecated::Clone instead of \c const \c T \c & or + \c const \c T \c * in parameters is \b always \b recommended when + the user duplicates the parameter and stores a clone of it as a + data member for later ise. The usage \c deprecated::Clone instead of \c T + is \b recommended whenever \c T is big (the object is sometimes + duplicated twice). When the object is small, writing either \c + deprecated::Clone or \c T is acceptable. + + @tparam T is any type. + + @see deprecated::Alias + @see deprecated::ConstAlias + + It can be used as follows. Consider this simple example where + class \e A is a big object. Then we define three classes \e B1, + \e B2 and \e B3, that uses some instance of \e A. + + @code + const int N = 10000; + struct A { ... + int table[N]; + }; + + // Each B1, B2 or B3 uses A, but we do not know if A will be copied + // or just referenced by only looking at the declaration of + // the method. Generally the ambiguity is removed by adding + // comments or, for the experienced developper, by looking at + // other parts of the code. + + // Only aliasing, but for a long lifetime. + struct B1 { + B1( const A & a ) // ambiguous, cost is O(1) here and lifetime of a should exceed constructor. + : myA( a ) {} + ... + const A & myA; + }; + // Copying as data member (stack or heap depending on B2 instance) + struct B2 { + B2( const A & a ) // ambiguous, cost is O(N) here + : myA( a ) {} + ... + A myA; + }; + // Copying on heap and data member pointing on it. + struct B3 { + B3( const A & a ) // ambiguous, cost is O(N) here + { myA = new A( a ); } + ~B3() + { if ( myA != 0 ) delete myA; } + ... + A* myA; + }; + @endcode + + Sometimes it is also very important that the developper that uses + the library is conscious that an object, say \a b, may require + that an instance \a a given as parameter should have a lifetime + longer than \a b itself (case for an instance of \a B1 + above). Classes deprecated::Clone, Alias, ConstAlias exist for these + reasons. The classes above may be rewritten as follows. + + @code + // Aliasing for a long lifetime is visible. + struct B1 { + B1( ConstAlias a ) // not ambiguous, cost is O(1) here and lifetime of a should be long enough + : myA( a ) {} + ... + const A & myA; + // or Const A* myA; + }; + // Cloning as data member is visible. + struct B2 { + B2( deprecated::Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ... + A myA; + }; + // Cloning on the heap requires call to allocate(), so that the user remembers calling \c delete. + struct B3_v1 { + B3_v1( deprecated::Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a.allocate() ) {} + ~B3_v1() { if ( myA != 0 ) delete myA; } + ... + A* myA; + }; + // Cloning on the heap with CountedPtr mechanism is straightforward. + struct B3_v2 { + B3_v2( deprecated::Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ~B3_v2() {} // CountedPtr takes care of delete. + ... + CountedPtr myA; + }; + // Cloning on the heap with CowPtr mechanism is straightforward. + struct B3_v3 { + B3_v3( deprecated::Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ~B3_v3() {} // CountedPtr takes care of delete. + ... + CowPtr myA; + }; + ... + A a1; + B1 b( a1 ); // do not duplicate a1 + B2 bb( a1 ); // duplicate a1 + B2 bbb( &a1 ); // also duplicate a1 ! + B3_v1 c1( a1 ); // duplicate a1 on the heap + B3_v2 c1( a1 ); // duplicate a1 on the heap + B3_v3 c1( a1 ); // duplicate a1 on the heap + @endcode + + A last question could be why are we not just passing the instance + of A by value. This, for sure, would tell the developper that the + instance is duplicated somehow. The problem is that it induces + generally two duplications, and not only one ! It may be possible + that the compiler optimizes things nicely but it is unclear if + the compiler will always do it. + + @code + struct B4 { + B4( A a ) // not ambiguous, but cost is O(2N) here. + : myA( a ) {} + ... + A myA; + }; + A a1; + B4 b4( a1 ) // The object \a a1 is copied once on the heap as the parameter \a a, and once as the member \a b3.myA. + @endcode + + @note deprecated::Clone have no copy constructor. + + @note The user should not used deprecated::Clone for data members (in + fact, he cannot), only as a type for parameters. + */ + template + class Clone + { + // ----------------------- Standard services ------------------------------ + public: + + /** + Destructor. Does nothing. + */ + ~Clone(); + + /** + Copy constructor. + @param other the object to clone. + + @note Keep in mind that Alias type should not be used in class + members (efficiency issue). + */ + Clone ( const DGtal::deprecated::Clone & other ); + + /** + Constructor from an instance of T. The object is referenced in + 'this' and is generally immediately duplicated by the user to + instantiate a data member. + @param t any object of type T. + */ + Clone( const T & t ); + + /** + Constructor from a pointer to a valid instance of T. The object is referenced in + 'this' and is generally immediately duplicated by the user to + instantiate a data member. + @param ptrT any valid pointer to a object of type T. + @pre ptrT != 0 + */ + Clone( const T* ptrT ); + + /** + Cast operator to a T instance. This is only at this moment that + the object is duplicated. This allows things like: A a2 = a1; + where a1 is of type deprecated::Clone. + */ + operator T() const; + + /** + Allocates a T instance on the heap and returns its adress. + @return a pointer on the instance of T allocated on the process heap. + */ + T* allocate() const; + + /** + Cast operator to a CountedPtr instance. This is only at this moment that + the object is duplicated (and only once). This allows things like: CountedPtr a2 = a1; + where a1 is of type deprecated::Clone. It also allows CowPtr a2 = a1; + */ + operator CountedPtr() const; + + // ------------------------- Protected Datas ------------------------------ + private: + // ------------------------- Private Datas -------------------------------- + private: + /// The reference to the T instance that is to be duplicated. + const T & myRefT; + + + // ------------------------- Hidden services ------------------------------ + private: + + /** + * Constructor. + * Forbidden. + */ + Clone(); + + + /** + * Assignment. + * @param other the object to copy. + * @return a reference on 'this'. + * Forbidden (otherwise the user might be tempted to use it as a member). + */ + DGtal::deprecated::Clone & operator= ( const DGtal::deprecated::Clone & other ); + + // ------------------------- Internals ------------------------------------ + private: + + }; // end of class deprecated::Clone + + } // namespace deprecated +} // namespace DGtal + + +/////////////////////////////////////////////////////////////////////////////// +// Includes inline functions. +#include "DGtal/base/OldClone.ih" + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined OldClone_h + +#undef OldClone_RECURSES +#endif // else defined(OldClone_RECURSES) diff --git a/src/DGtal/base/OldClone.ih b/src/DGtal/base/OldClone.ih new file mode 100755 index 0000000000..3cf1d36a5a --- /dev/null +++ b/src/DGtal/base/OldClone.ih @@ -0,0 +1,98 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file OldClone.ih + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France + * + * @date 2012/11/23 + * + * Implementation of inline methods defined in OldClone.h + * + * This file is part of the DGtal library. + */ + + +////////////////////////////////////////////////////////////////////////////// +#include +////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// IMPLEMENTATION of inline methods. +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// ----------------------- Standard services ------------------------------ + +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Clone::~Clone() +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Clone::Clone( const T & t ) + : myRefT( t ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Clone::Clone( const DGtal::deprecated::Clone & other ) + : myRefT( other.myRefT ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Clone::Clone( const T* ptrT ) + : myRefT( *ptrT ) +{ + ASSERT( ptrT != 0 ); +} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Clone::operator T() const +{ + return T( myRefT ); +} +//----------------------------------------------------------------------------- +template +inline +T* +DGtal::deprecated::Clone::allocate() const +{ + return new T( myRefT ); +} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::Clone::operator CountedPtr() const +{ + return CountedPtr( allocate() ); // duplicated once +} + + + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline functions // + + +// // +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/src/DGtal/base/OldConstAlias.h b/src/DGtal/base/OldConstAlias.h new file mode 100755 index 0000000000..4635ada20a --- /dev/null +++ b/src/DGtal/base/OldConstAlias.h @@ -0,0 +1,307 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file OldConstAlias.h + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France + * + * @date 2012/11/23 + * + * Header file for module OldConstAlias.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(OldConstAlias_RECURSES) +#error Recursive header files inclusion detected in OldConstAlias.h +#else // defined(OldConstAlias_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define OldConstAlias_RECURSES + +#if !defined OldConstAlias_h +/** Prevents repeated inclusion of headers. */ +#define OldConstAlias_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include "DGtal/base/Common.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + namespace deprecated { + + ///////////////////////////////////////////////////////////////////////////// + // template class deprecated::ConstAlias + /** + Description of template class 'deprecated::ConstAlias'

\brief Aim: This class + encapsulates its parameter class so that to indicate to the user + that the object/pointer will be only aliased. Therefore the user + is reminded that the argument parameter is given to the function + without any additional cost and may be modified, while he is + aware that the lifetime of the argument parameter must be at + least as long as the object itself. Note that an instance of + deprecated::ConstAlias is itself a light object (it holds only a pointer). + + It is used in methods or functions to encapsulate the parameter + types. + + @remark since 0.7. Use ::DGtal::ConstAlias instead. + + @note The usage of \c deprecated::ConstAlias instead of \c const \c T \c & + or of \c const \c T \c * in parameters is \b recommended when the + lifetime of the parameter must exceed the lifetime of the called + method/function/constructor (often the case in constructor or + init methods). The usage of \c const \c T \c & or \c const \c T + \c * instead of \c deprecated::ConstAlias is \b recommended when the + lifetime of the parameter is not required to exceed the lifetime + of the called method/function/constructor (often the case in + standard methods, where the parameter is only used at some point, + but not referenced after in some data member). + + @tparam T is any type. + + @see deprecated::Alias + @see deprecated::Clone + + It can be used as follows. Consider this simple example where + class \e A is a big object. Then we define three classes \e B1, + \e B2 and \e B3, that uses some instance of \e A. + + @code + const int N = 10000; + struct A { ... + int table[N]; + }; + + // Each B1, B2 or B3 uses A, but we do not know if A will be copied + // or just referenced by only looking at the declaration of + // the method. Generally the ambiguity is removed by adding + // comments or, for the experienced developper, by looking at + // other parts of the code. + + // Only aliasing, but for a long lifetime. + struct B1 { + B1( const A & a ) // ambiguous, cost is O(1) here and lifetime of a should exceed constructor. + : myA( a ) {} + ... + const A & myA; + }; + // Copying as data member (stack or heap depending on B2 instance) + struct B2 { + B2( const A & a ) // ambiguous, cost is O(N) here + : myA( a ) {} + ... + A myA; + }; + // Copying on heap and data member pointing on it. + struct B3 { + B3( const A & a ) // ambiguous, cost is O(N) here + { myA = new A( a ); } + ~B3() + { if ( myA != 0 ) delete myA; } + ... + A* myA; + }; + @endcode + + Sometimes it is also very important that the developper that uses + the library is conscious that an object, say \a b, may require + that an instance \a a given as parameter should have a lifetime + longer than \a b itself (case for an instance of \a B1 + above). Classes Clone, Alias, deprecated::ConstAlias exist for these + reasons. The classes above may be rewritten as follows. + + @code + // Aliasing for a long lifetime is visible. + struct B1 { + B1( ConstAlias a ) // not ambiguous, cost is O(1) here and lifetime of a should be long enough + : myA( a ) {} + ... + const A & myA; + // or Const A* myA; + }; + // Cloning as data member is visible. + struct B2 { + B2( Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ... + A myA; + }; + // Cloning on the heap requires call to allocate(), so that the user remembers calling \c delete. + struct B3_v1 { + B3_v1( Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a.allocate() ) {} + ~B3_v1() { if ( myA != 0 ) delete myA; } + ... + A* myA; + }; + // Cloning on the heap with CountedPtr mechanism is straightforward. + struct B3_v2 { + B3_v2( Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ~B3_v2() {} // CountedPtr takes care of delete. + ... + CountedPtr myA; + }; + // Cloning on the heap with CowPtr mechanism is straightforward. + struct B3_v3 { + B3_v3( Clone a ) // not ambiguous, cost is O(N) here and lifetime of a is whatever. + : myA( a ) {} + ~B3_v3() {} // CountedPtr takes care of delete. + ... + CowPtr myA; + }; + ... + A a1; + B1 b( a1 ); // do not duplicate a1 + B2 bb( a1 ); // duplicate a1 + B2 bbb( &a1 ); // also duplicate a1 ! + B3_v1 c1( a1 ); // duplicate a1 on the heap + B3_v2 c1( a1 ); // duplicate a1 on the heap + B3_v3 c1( a1 ); // duplicate a1 on the heap + @endcode + + A last question could be why are we not just passing the instance + of A by value. This, for sure, would tell the developper that the + instance is duplicated somehow. The problem is that it induces + generally two duplications, and not only one ! It may be possible + that the compiler optimizes things nicely but it is unclear if + the compiler will always do it. + + @code + struct B4 { + B4( A a ) // not ambiguous, but cost is O(2N) here. + : myA( a ) {} + ... + A myA; + }; + A a1; + B4 b4( a1 ) // The object \a a1 is copied once on the heap as the parameter \a a, and once as the member \a b3.myA. + @endcode + + @note The user should not use deprecated::ConstAlias instead of const T* + for data members. It works in most cases, but there are some + subtle differences between the two behaviors. + + @note deprecated::ConstAlias has no copy constructor. Indeed, if it had one, + there is an ambiguity when duplicating an alias between the copy + constructor or the T* cast followed by the T* constructor. + */ + template + class ConstAlias + { + // ----------------------- Standard services ------------------------------ + public: + + /** + Destructor. Does nothing. + */ + ~ConstAlias(); + + /** + * Constructor. + */ + ConstAlias(); + + /** + Copy constructor. + @param other the object to clone. + + @note Keep in mind that Alias type should not be used in class + members (efficiency issue). + + */ + ConstAlias ( const DGtal::deprecated::ConstAlias & other ); + + /** + * Assignment. + * @param other the object to copy. + * @return a reference on 'this'. + */ + DGtal::deprecated::ConstAlias & operator= ( DGtal::deprecated::ConstAlias & other ); + + /** + Constructor from an instance of T. The object is pointed in + 'this'. + @param t any object of type T. + */ + ConstAlias( const T & t ); + + /** + Constructor from a pointer of T. The pointer is copied in + 'this'. + @param ptrT any pointer to a object of type T or 0. + */ + ConstAlias( const T* ptrT ); + + /** + Cast operator to a reference to T instance. Gives access to the + instance of T. This allows things like: A a2 = a1; where a1 is + of type deprecated::ConstAlias. + */ + operator const T&() const; + + /** + @return the address of the const-aliased object. + @since 0.7 + */ + inline const T* operator&() const { return myPtrT; } + + // ------------------------- Private Datas -------------------------------- + private: + /// The pointer to the instance of T. + const T* myPtrT; + + // ------------------------- Hidden services ------------------------------ + private: + + + // ------------------------- Internals ------------------------------------ + private: + + }; // end of class deprecated::ConstAlias + + + /** + * Overloads 'operator<<' for displaying objects of class 'deprecated::ConstAlias'. + * @param out the output stream where the object is written. + * @param object the object of class 'deprecated::ConstAlias' to write. + * @return the output stream after the writing. + */ + template + std::ostream& + operator<< ( std::ostream & out, const DGtal::deprecated::ConstAlias & object ); + + } // namespace deprecated +} // namespace DGtal + + +/////////////////////////////////////////////////////////////////////////////// +// Includes inline functions. +#include "DGtal/base/OldConstAlias.ih" + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined OldConstAlias_h + +#undef OldConstAlias_RECURSES +#endif // else defined(OldConstAlias_RECURSES) diff --git a/src/DGtal/base/OldConstAlias.ih b/src/DGtal/base/OldConstAlias.ih new file mode 100755 index 0000000000..6a34825182 --- /dev/null +++ b/src/DGtal/base/OldConstAlias.ih @@ -0,0 +1,90 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file OldConstAlias.ih + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France + * + * @date 2012/11/23 + * + * Implementation of inline methods defined in OldConstAlias.h + * + * This file is part of the DGtal library. + */ + + +////////////////////////////////////////////////////////////////////////////// +#include +////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// IMPLEMENTATION of inline methods. +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// ----------------------- Standard services ------------------------------ + +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::ConstAlias::~ConstAlias() +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::ConstAlias::ConstAlias() + : myPtrT( 0 ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::ConstAlias & +DGtal::deprecated::ConstAlias::operator=( DGtal::deprecated::ConstAlias & other ) +{ + myPtrT = other.myPtrT; + return *this; +} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::ConstAlias::ConstAlias( const T & t ) : myPtrT( &t ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::ConstAlias::ConstAlias( const DGtal::deprecated::ConstAlias & other ) : myPtrT( other.myPtrT ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::ConstAlias::ConstAlias( const T* pT ) : myPtrT( pT ) +{} +//----------------------------------------------------------------------------- +template +inline +DGtal::deprecated::ConstAlias::operator const T&() const +{ + return *myPtrT; +} +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline functions // + + +// // +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/src/DGtal/base/OneItemOutputIterator.h b/src/DGtal/base/OneItemOutputIterator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/OpInSTLContainers.h b/src/DGtal/base/OpInSTLContainers.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/OrderedAlphabet.cpp b/src/DGtal/base/OrderedAlphabet.cpp new file mode 100755 index 0000000000..c0ee602ac9 --- /dev/null +++ b/src/DGtal/base/OrderedAlphabet.cpp @@ -0,0 +1,518 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file OrderedAlphabet.cpp + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5807), University of Savoie, France + * @author Laurent Provot (\c Laurent.Provot@loria.fr ) + * LORIA (CNRS, UMR 7503), Nancy University, France + * + * @date 2010/07/01 + * + * Implementation of methods defined in OrderedAlphabet.h + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +#include "DGtal/base/OrderedAlphabet.h" +#include "DGtal/arithmetic/ModuloComputer.h" +/////////////////////////////////////////////////////////////////////////////// + +using namespace std; + +/////////////////////////////////////////////////////////////////////////////// +// class OrderedAlphabet +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// Standard services - public : + +/** + * Destructor. + */ +DGtal::OrderedAlphabet::~OrderedAlphabet() +{ + if ( myOrder != 0 ) + delete[ ] myOrder; +} + +/** + * @return the current ordered alphabet. + */ +string +DGtal::OrderedAlphabet::orderedAlphabet() const +{ + char *tbl; + tbl = (char *)malloc((myNb + 1)*sizeof(char)); + for ( unsigned int i = 0; i < myNb; ++i ) + { + tbl[ myOrder[ i ] ] = myFirst + i; + } + tbl[ myNb ] = '\0'; + string s( tbl ); + free(tbl); + return s; +} + +/** + * Shift a0 < a1 < ... < an to a1 < ... < an < a0 + */ +void +DGtal::OrderedAlphabet::shiftLeft() +{ + unsigned int* p = myOrder; + unsigned int* q = myOrder + myNb; + while ( p != q ) + { + unsigned int k = *p; + *p = ( k == 0 ) ? myNb - 1 : k - 1; + ++p; + } +} + +/** + * Shift a0 < a1 < ... < an to an < a0 < ... < an-1 + */ +void +DGtal::OrderedAlphabet::shiftRight() +{ + unsigned int* p = myOrder; + unsigned int* q = myOrder + myNb; + while ( p != q ) + { + unsigned int k = *p + 1; + *p = ( k == myNb ) ? 0 : k; + ++p; + } +} + +/** + * Reverse the order a0 < a1 < ... < an to an < ... < a1 < a0 + */ +void +DGtal::OrderedAlphabet::reverse() +{ + unsigned int* p = myOrder; + unsigned int* q = myOrder + myNb; + while ( p != q ) + { + *p = myNb - 1 - *p; + ++p; + } +} + +/** + * Reverse the order a0 < a1 < ... < an to a3 < a2 < a1 < a0 < an < ... + */ +void +DGtal::OrderedAlphabet::reverseAround12() +{ + unsigned int* p = myOrder; + unsigned int* q = myOrder + myNb; + while ( p != q ) + { + *p = ( myNb + 3 - *p ) % myNb; + ++p; + } +} + + + + +/** + * Gives the first lyndon factor of the word [w] starting at + * position [s] in this alphabet. + * + * @param len (returns) the length of the primitive Lyndon factor + * (which starts at position s). + * + * @param nb (returns) the number of times the Lyndon factor appears. + * + * @param w a word + * @param s the starting index in [w]. + * @param e the index after the end in [w] (s mc( modulo ); + index_t i = s; + index_t j = mc.next( s ); + while ( ( j != e ) && ( lessOrEqual( w[ i ], w[ j ] ) ) ) + { + if ( equal( w[ i ], w[ j ] ) ) + mc.increment( i ); + else + i = s; + mc.increment( j ); + } + len = j >= i ? (size_t) ( j - i ) + : (size_t) ( j + modulo - i ); + if (len == 0) + nb = 0; + else + nb = ( (size_t) ( ( j + modulo - s ) % modulo ) ) / len; +} + + +/** + * @param len (returns) the length of the primitive Lyndon factor + * (which starts at position s). + * + * @param nb (returns) the number of times the Lyndon factor appears. + * + * @param w a word which starts with a1 or a2 at position s. + * @param s the starting index in [w]. + * @param e the index after the end in [w] (s mc( modulo ); + ModuloComputer< Integer >::UnsignedInteger i = s; + index_t j = mc.next( s ); + unsigned int p = 1; + unsigned int q = 2; + while ( ( j != e ) && ( lessOrEqual( w[ i ], w[ j ] ) ) ) + { + if ( equal( w[ i ], w[ j ] ) ) + { + if ( j == mc.cast( s + q - 1 ) ) + q += p; + mc.increment( i ); + } + else + { + if ( ( j != mc.cast( s + q - 1 ) ) || ( order ( w[ j ] ) != 2 ) ) + { + len = j; nb = 0; + return false; + } + unsigned int tmp = p; + p = q; + q += q - tmp; + i = s; + } + mc.increment( j ); + } + len = j >= i ? (size_t) ( j - i ) + : (size_t) ( j + modulo - i ); + nb = ( (size_t) ( ( j + modulo - s ) % modulo ) ) / len; + return true; +} + + +/////////////////////////////////////////////////////////////////////////////// +// Interface - public : + +/** + * Writes/Displays the object on an output stream. + * @param out the output stream where the object is written. + */ +void +DGtal::OrderedAlphabet::selfDisplay ( std::ostream & out ) const +{ + out << "[OrderedAlphabet]"; + out << " " << orderedAlphabet() << endl; +} + +/** + * Checks the validity/consistency of the object. + * @return 'true' if the object is valid, 'false' otherwise. + */ +bool +DGtal::OrderedAlphabet::isValid() const +{ + return true; +} + + + +/////////////////////////////////////////////////////////////////////////////// +// ----------------------- MLP services ------------------------------ + +/** + * Extracts the next edge of the minimum length polygon starting from + * position [s] on the word [w]. The alphabet may be modified + * (reversed or shifted). The output alphabet is some a0 < a1 < a2 < ... + * + * @param nb_a1 (returns) the number of letters a1 in the extracted edge (a1 + * in the output alphabet) + * + * @param nb_a2 (returns) the number of letters a2 in the extracted edge (a2 + * in the output alphabet) + * + * @param w the input (cyclic) word (may be modified in the process). + * + * @param s the starting point in the word (updated). + * + * @param cvx (updates) this boolean is flipped only if a change of + * convexity is detected. + * + * @return the number of letters of the extracted edge. + */ +DGtal::OrderedAlphabet::size_t +DGtal::OrderedAlphabet::nextEdge( size_t & nb_a1, + size_t & nb_a2, + std::string & w, + index_t & s, + bool & cvx ) +{ + ModuloComputer< Integer > mc( (const unsigned int)w.size() ); + size_t l; + size_t len; + size_t nb; + bool inC = duvalPPMod( len, nb, w, s, s ); + if ( ! inC ) + // case : change of convexity + { + // JOL : temporary change of letter w[ s ] + char tmp = w[ s ]; + index_t tmp_s = s; + w[ s ] = letter( 2 ); // a3 + this->reverseAround12(); + cvx = ! cvx; + l = nextEdge( nb_a1, nb_a2, w, s, cvx ); + // JOL : former letter is put back in string. + w[ tmp_s ] = tmp; + } + else if ( ( len == 1 ) && ( order( w[ s ] ) == 1 ) ) + // case u=a1 => Quadrant change + { + this->shiftRight(); + s = mc.cast( s + nb ); + nb_a1 = 0; + nb_a2 = nb - 1; + l = nb; + } + else + { // standard (convex) case. + l = len * nb; + char a2 = letter( 2 ); + nb_a1 = len; + nb_a2 = 0; + index_t ss = s; + s = mc.cast( s + l ); + while ( len != 0 ) + { + if ( w[ ss ] == a2 ) ++nb_a2; + mc.increment( ss ); + --len; + } + nb_a1 -= nb_a2; + nb_a1 *= nb; + nb_a2 *= nb; + } + return l; +} + + +/////////////////////////////////////////////////////////////////////////////// +// Internals - private : + +// // +/////////////////////////////////////////////////////////////////////////////// diff --git a/src/DGtal/base/OrderedAlphabet.h b/src/DGtal/base/OrderedAlphabet.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/OrderedAlphabet.ih b/src/DGtal/base/OrderedAlphabet.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/OutputIteratorAdapter.h b/src/DGtal/base/OutputIteratorAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/OwningOrAliasingPtr.h b/src/DGtal/base/OwningOrAliasingPtr.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/OwningOrAliasingPtr.ih b/src/DGtal/base/OwningOrAliasingPtr.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/ReverseIterator.h b/src/DGtal/base/ReverseIterator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/SetFunctions.ih b/src/DGtal/base/SetFunctions.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/SimpleConstRange.h b/src/DGtal/base/SimpleConstRange.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/SimpleRandomAccessConstRangeFromPoint.h b/src/DGtal/base/SimpleRandomAccessConstRangeFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/SimpleRandomAccessRangeFromPoint.h b/src/DGtal/base/SimpleRandomAccessRangeFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/StdRebinders.h b/src/DGtal/base/StdRebinders.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/TiledImageBidirectionalConstRangeFromPoint.h b/src/DGtal/base/TiledImageBidirectionalConstRangeFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/TiledImageBidirectionalRangeFromPoint.h b/src/DGtal/base/TiledImageBidirectionalRangeFromPoint.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Trace.h b/src/DGtal/base/Trace.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/Trace.ih b/src/DGtal/base/Trace.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/base/TraceWriter.h b/src/DGtal/base/TraceWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/TraceWriterFile.h b/src/DGtal/base/TraceWriterFile.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/TraceWriterTerm.h b/src/DGtal/base/TraceWriterTerm.h old mode 100644 new mode 100755 diff --git a/src/DGtal/base/doc/Boost.dox b/src/DGtal/base/doc/Boost.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/base/doc/BoostConcepts.dox b/src/DGtal/base/doc/BoostConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/base/doc/moduleCloneAndReference.dox b/src/DGtal/base/doc/moduleCloneAndReference.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/base/doc/moduleIteratorsRanges.dox b/src/DGtal/base/doc/moduleIteratorsRanges.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/base/doc/packageBase.dox b/src/DGtal/base/doc/packageBase.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/base/doc/packageBaseConcepts.dox b/src/DGtal/base/doc/packageBaseConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/curves/ParametricCurveDigitizer3D.h b/src/DGtal/curves/ParametricCurveDigitizer3D.h new file mode 100755 index 0000000000..169a981211 --- /dev/null +++ b/src/DGtal/curves/ParametricCurveDigitizer3D.h @@ -0,0 +1,158 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file CurveDigitizer.h + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/09/26 + * + * Header file for module CurveDigitizer.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(CurveDigitizer_RECURSES) +#error Recursive header files inclusion detected in CurveDigitizer.h +#else // defined(CurveDigitizer_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define CurveDigitizer_RECURSES + +#if !defined CurveDigitizer_h +/** Prevents repeated inclusion of headers. */ +#define CurveDigitizer_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include "DGtal/helpers/StdDefs.h" +#include "DGtal/base/Common.h" +#include +#include "DGtal/curves/parametric/C3DParametricCurve.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + +///////////////////////////////////////////////////////////////////////////// +// class CurveDigitizer +/** + * Description of class 'CurveDigitizer'

+ * \brief Aim: + */ +template +class ParametricCurveDigitizer3D +{ + BOOST_CONCEPT_ASSERT(( concepts::C3DParametricCurve < TParametricCurve > )); + // ----------------------- Standard services ------------------------------ +public: + typedef std::vector DigitalCurve; + typedef typename TParametricCurve::Space::Point Point; + typedef typename TParametricCurve::Space::RealPoint RealPoint; + typedef typename TParametricCurve::Space::RealVector RealVector; + + ParametricCurveDigitizer3D(); + /** + * Destructor. + */ + ~ParametricCurveDigitizer3D() {} + + // ----------------------- Interface -------------------------------------- +public: + void attach ( const TParametricCurve & t_curve ); + void init ( DigitalCurve & digiCurve ); + + void digitize ( const double & tmin, double & tmax, const double & step ); + + /** + * Writes/Displays the object on an output stream. + * @param out the output stream where the object is written. + */ + void selfDisplay ( std::ostream & out ) const; + + /** + * Checks the validity/consistency of the object. + * @return 'true' if the object is valid, 'false' otherwise. + */ + bool isValid() const; + + // ------------------------- Private Datas -------------------------------- +private: + // ------------------------- Protected Datas ------------------------------ +protected: + + DigitalCurve * digitalCurve; + const TParametricCurve * curve; + bool adaptive; + unsigned int attemptNumber; + bool is26Connected ( const Point &x, const Point &y ); + // ------------------------- Hidden services ------------------------------ +protected: + virtual unsigned char findMainAxis ( const double & i ); + virtual Point CurvePoint ( const char & mainAxis, const double & t, double & t_time ); +private: + + /** + * Copy constructor. + * @param other the object to clone. + * Forbidden by default. + */ + ParametricCurveDigitizer3D ( const ParametricCurveDigitizer3D & other ); + + /** + * Assignment. + * @param other the object to copy. + * @return a reference on 'this'. + * Forbidden by default. + */ + ParametricCurveDigitizer3D & operator= ( const ParametricCurveDigitizer3D & other ); + + // ------------------------- Internals ------------------------------------ + +}; // end of class CurveDigitizer + + +/** + * Overloads 'operator<<' for displaying objects of class 'CurveDigitizer'. + * @param out the output stream where the object is written. + * @param object the object of class 'CurveDigitizer' to write. + * @return the output stream after the writing. + */ +template +std::ostream& +operator<< ( std::ostream & out, const ParametricCurveDigitizer3D & object ); + + +} // namespace DGtal + + +/////////////////////////////////////////////////////////////////////////////// +// Includes inline functions. +#if !defined(BUILD_INLINE) +#include "DGtal/curves/ParametricCurveDigitizer3D.ih" +#endif + + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined CurveDigitizer_h + +#undef CurveDigitizer_RECURSES +#endif // else defined(CurveDigitizer_RECURSES) diff --git a/src/DGtal/curves/ParametricCurveDigitizer3D.ih b/src/DGtal/curves/ParametricCurveDigitizer3D.ih new file mode 100755 index 0000000000..4ea1d6b0c7 --- /dev/null +++ b/src/DGtal/curves/ParametricCurveDigitizer3D.ih @@ -0,0 +1,263 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file ParametricCurveDigitizer3D.ih + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/09/26 + * + * Implementation of inline methods defined in ParametricCurveDigitizer3D.h + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +// IMPLEMENTATION of inline methods. +/////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include "DGtal/kernel/BasicPointFunctors.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + /////////////////////////////////////////////////////////////////////////////// + // Implementation of inline methods // + template + inline + ParametricCurveDigitizer3D::ParametricCurveDigitizer3D() : curve ( 0 ) + { + attemptNumber = 2; + } + + template + inline + void ParametricCurveDigitizer3D::attach ( const T & p_curve ) + { + curve = &p_curve; + } + + template + inline + bool ParametricCurveDigitizer3D::isValid ( ) const + { + if ( digitalCurve != 0 ) + return true; + else + return false; + } + + + template + inline + unsigned char ParametricCurveDigitizer3D::findMainAxis ( const double & i ) + { + ParametricCurveDigitizer3D::RealVector value; + value[0] = std::fabs ( curve->xp ( i )[0] ); + value[1] = std::fabs ( curve->xp ( i )[1] ); + value[2] = std::fabs ( curve->xp ( i )[2] ); + + if ( value[0] > value[1] && value[0] > value[2] ) + return 0; + else if ( value[1] > value[0] && value[1] > value[2] ) + return 1; + else + return 2; + } + + template + inline + void ParametricCurveDigitizer3D::digitize ( const double & tmin, double & tmax, const double & step ) + { + assert ( isValid() ); + Point curvePoint; + double pStep = step; + unsigned int errC = 0; + double time = 0., pTime = 0.; + for ( double i = tmin; i < tmax; i += pStep ) + { + pTime = time; + if ( errC > attemptNumber ) + { + tmax = i; + throw std::runtime_error ( "Too many errors. Probably curvature or sampling step is too high." ); + } + unsigned char mainAxis = findMainAxis ( i ); + curvePoint = CurvePoint ( mainAxis, i, time ); + if (time == pTime) + continue; + if ( digitalCurve->size() == 0 ) + digitalCurve->push_back ( curvePoint ); + else if ( std::find ( digitalCurve->begin(), digitalCurve->end(), curvePoint ) == digitalCurve->end() ) + { + // In 26-connected curve a new point cannot be 26-connected to another points which already are a part of the curve + if ( digitalCurve->size() == 2 && is26Connected ( digitalCurve->back(), curvePoint ) && is26Connected ( digitalCurve->at(digitalCurve->size() - 2), curvePoint ) ) + { + if ( time > pTime ) + { + digitalCurve->pop_back(); + digitalCurve->push_back ( curvePoint ); + } + } + else if ( digitalCurve->size() >= 3 && is26Connected ( digitalCurve->back(), curvePoint ) && is26Connected ( digitalCurve->at(digitalCurve->size() - 2), curvePoint ) && !is26Connected ( digitalCurve->at(digitalCurve->size() - 3), curvePoint ) ) + { + if ( time > pTime ) + { + digitalCurve->pop_back(); + digitalCurve->push_back ( curvePoint ); + } + } + else if ( digitalCurve->size() >= 3 && is26Connected ( digitalCurve->back(), curvePoint ) && is26Connected ( digitalCurve->at(digitalCurve->size() - 2), curvePoint ) && is26Connected ( digitalCurve->at(digitalCurve->size() - 3), curvePoint ) ) + { + if ( time > pTime ) + { + digitalCurve->pop_back(); + digitalCurve->pop_back(); + digitalCurve->push_back ( curvePoint ); + } + } + // if is disconnected try to fix the problem + else if ( (!is26Connected ( digitalCurve->back(), curvePoint )) ) + { + if ( digitalCurve->size() >= 2 && is26Connected ( digitalCurve->at(digitalCurve->size() - 2), curvePoint ) ) + { + if ( time > pTime ) + { + digitalCurve->pop_back(); + digitalCurve->push_back ( curvePoint ); + } + } + else + { + pStep /= 10.; + errC++; + } + } + else + { + pStep = step; + errC = 0; + digitalCurve->push_back ( curvePoint ); + } + } + } + if ( digitalCurve->size() >= 2 && is26Connected ( digitalCurve->at ( digitalCurve->size() - 2), digitalCurve->front() ) ) + digitalCurve->pop_back(); + } + + template + inline + typename ParametricCurveDigitizer3D::Point ParametricCurveDigitizer3D::CurvePoint ( const char & mainAxis, const double & t, double & t_time ) + { + Point curvePoint; + functors::VectorRounding < RealPoint, Point > pRound; + RealPoint pp = pRound ( curve->x ( t ) ); + if ( mainAxis == 0 ) + { + try { + t_time = curve->f ( pp ); + } catch ( ... ) { + t_time = t; + } + RealPoint p = curve->x ( t_time ); + curvePoint[0] = pp[0]; + curvePoint[1] = std::round ( p[1] ); + curvePoint[2] = std::round ( p[2] ); + std::cout << "f^-1 " << t_time << std::endl; + } + else if ( mainAxis == 1 ) + { + try { + t_time = curve->g ( pp ); + } catch ( ... ) { + t_time = t; + } + RealPoint p = curve->x ( t_time ); + curvePoint[0] = std::round ( p[0] ); + curvePoint[1] = pp[1]; + curvePoint[2] = std::round ( p[2] ); + std::cout << "g^-1 " << t_time << std::endl; + } + else if ( mainAxis == 2 ) + { + try { + t_time = curve->h ( pp ); + } catch ( ... ) { + t_time = t; + } + RealPoint p = curve->x ( t_time ); + curvePoint[0] = std::round ( p[0] ); + curvePoint[1] = std::round ( p[1] ); + curvePoint[2] = pp[2]; + std::cout << "h^-1 " << t_time << std::endl; + } + return curvePoint; + } + + template + inline + bool ParametricCurveDigitizer3D::is26Connected ( const Point &x, const Point &y ) + { + if ( std::abs ( x[0] - y[0] ) < 2 && std::abs ( x[1] - y[1] ) < 2 && std::abs ( x[2] - y[2] ) < 2 ) + return true; + return false; + } + + template + inline + void ParametricCurveDigitizer3D::init ( typename ParametricCurveDigitizer3D::DigitalCurve & digitCurve ) + { + digitalCurve = &digitCurve; + } + + template + inline + void ParametricCurveDigitizer3D::selfDisplay ( std::ostream & out ) const + { + out << "[ParametricCurveDigitizer3D]"; + } + +} + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline functions and external operators // + +/** + * Overloads 'operator<<' for displaying objects of class 'ParametricCurveDigitizer3D'. + * @param out the output stream where the object is written. + * @param object the object of class 'ParametricCurveDigitizer3D' to write. + * @return the output stream after the writing. + */ +template +inline +std::ostream& +operator<< ( std::ostream & out, + const DGtal::ParametricCurveDigitizer3D & object ) +{ + object.selfDisplay ( out ); + return out; +} + +// // +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/src/DGtal/curves/parametric/C3DParametricCurve.h b/src/DGtal/curves/parametric/C3DParametricCurve.h new file mode 100755 index 0000000000..ed5760e1e9 --- /dev/null +++ b/src/DGtal/curves/parametric/C3DParametricCurve.h @@ -0,0 +1,155 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file C3DParametricCurve.h + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/10/01 + * + * Header file for concept ParametricCurve.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(C3DParametricCurve_RECURSES) +#error Recursive header files inclusion detected in ParametricCurve.h +#else // defined(C3DParametricCurve_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define C3DParametricCurve_RECURSES + +#if !defined C3DParametricCurve_h +/** Prevents repeated inclusion of headers. */ +#define C3DParametricCurve_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include "DGtal/base/Common.h" +#include "DGtal/kernel/CSpace.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ +namespace concepts +{ + +///////////////////////////////////////////////////////////////////////////// +// class ParametricCurve +/** +Description of \b concept '\b ParametricCurve'

+@ingroup Concepts +@brief Aim: + +### Refinement of + +### Associated types : + +### Notation + - \e X : A type that is a model of ParametricCurve + - \e x, \e y : object of type X + +### Definitions + +### Valid expressions and semantics + +| Name | Expression | Type requirements | Return type | Precondition | Semantics | Post condition | Complexity | +|-------|------------|-------------------|---------------|--------------|-----------|----------------|------------| +| | | | | | | | | + +### Invariants + +### Models + + A dummy model (for concept checking) is CParametricCurveArchetype. + +### Notes + +@tparam T the type that should be a model of ParametricCurve. + */ +template +struct C3DParametricCurve +{ + // ----------------------- Concept checks ------------------------------ +public: + typedef typename T::Space Space; + typedef typename T::RealPoint RealPoint; + typedef typename T::Point Point; + BOOST_CONCEPT_ASSERT(( concepts::CSpace )); + BOOST_STATIC_ASSERT(( Space::dimension == 3 )); + // check the presence of data members, operators and methods with + BOOST_CONCEPT_USAGE( C3DParametricCurve ) + { + // check const methods. + checkConstConstraints(); + } + void checkConstConstraints() const + { + ConceptUtils::sameType( x , self.xp ( 0.1f ) ); + ConceptUtils::sameType( x , self.x ( 0.1f ) ); + ConceptUtils::sameType( c , self.f ( x ) ); + ConceptUtils::sameType( c , self.g ( x ) ); + ConceptUtils::sameType( c , self.h ( x ) ); + } + // ------------------------- Private Datas -------------------------------- +protected: + T self; + RealPoint x; + Point y; + double c; + + // ------------------------- Internals ------------------------------------ +private: + +}; // end of concept ParametricCurve + + +template +struct C3DParametricCurveDecorator : public C3DParametricCurve< T > +{ + // ----------------------- Concept checks ------------------------------ +public: + // check the presence of data members, operators and methods with + BOOST_CONCEPT_USAGE( C3DParametricCurveDecorator ) + { + // check const methods. + checkConstConstraints(); + } + void checkConstConstraints() const + { + ConceptUtils::sameType( curve, self.curve ); + } + // ------------------------- Private Datas -------------------------------- +protected: + T self; + typename T::TypeCurve curve; + // ------------------------- Private Datas -------------------------------- + // ------------------------- Internals ------------------------------------ +}; // end of concept ParametricCurve + + } // namespace concepts +} // namespace DGtal + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined ParametricCurve_h + +#undef C3DParametricCurve_RECURSES +#endif // else defined(ParametricCurve_RECURSES) diff --git a/src/DGtal/curves/parametric/DecoratorCurveTransformation.h b/src/DGtal/curves/parametric/DecoratorCurveTransformation.h new file mode 100755 index 0000000000..4353703d59 --- /dev/null +++ b/src/DGtal/curves/parametric/DecoratorCurveTransformation.h @@ -0,0 +1,204 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file DecoratorCurveTransformation.h + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/10/10 + * + * Header file for module DecoratorCurveTransformation.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(DecoratorCurveTransformation_RECURSES) +#error Recursive header files inclusion detected in DecoratorCurveTransformation.h +#else // defined(DecoratorCurveTransformation_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define DecoratorCurveTransformation_RECURSES + +#if !defined DecoratorCurveTransformation_h +/** Prevents repeated inclusion of headers. */ +#define DecoratorCurveTransformation_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include "DGtal/base/Common.h" +#include "DGtal/curves/parametric/C3DParametricCurve.h" +#include "DGtal/curves/ParametricCurveDigitizer3D.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + +///////////////////////////////////////////////////////////////////////////// +// class DecoratorCurveTransformation +/** + * Description of class 'DecoratorCurveTransformation'

+ * \brief Aim: + */ +template +class DecoratorCurveTransformation +{ + BOOST_CONCEPT_ASSERT(( concepts::C3DParametricCurve < TCurve > )); + // ----------------------- Standard services ------------------------------ +public: + + typedef TCurve TypeCurve; + typedef typename TCurve::Space Space; + typedef typename Space::RealPoint RealPoint; + typedef typename Space::Point Point; + + DecoratorCurveTransformation ( const TCurve &, const TTransfromation &, const TInverseTransformation & ); + /** + * Destructor. + */ + ~DecoratorCurveTransformation() {} + + // ----------------------- Interface -------------------------------------- +public: + + const TCurve & curve; + + /** + * @param t any angle between 0 and k*Pi. + * + * @return the vector (x(t),y(t), z(t)) + */ + RealPoint x ( double t ) const; + + /** + * @param t any angle between 0 and k*Pi. + * + * @return the vector (x(t)',y(t)', z(t)') + */ + RealPoint xp ( double t ) const; + + /** + * @brief inverse function of x + * @param p = x(t) + * @return t + */ + double f ( const RealPoint & p ) const; + + /** + * @brief inverse function of y + * @param p = x(t)[ + * @return t + */ + double g ( const RealPoint & p ) const; + + /** + * @brief inverse function of z + * @param p = x(t) + * @return t + */ + double h ( const RealPoint & ) const; + + /** + * Writes/Displays the object on an output stream. + * @param out the output stream where the object is written. + */ + void selfDisplay ( std::ostream & out ) const; + + /** + * Checks the validity/consistency of the object. + * @return 'true' if the object is valid, 'false' otherwise. + */ + bool isValid() const; + + // ------------------------- Protected Datas ------------------------------ +private: + // ------------------------- Private Datas -------------------------------- +private: + + // ------------------------- Hidden services ------------------------------ +protected: + + /** + * Constructor. + * Forbidden by default (protected to avoid g++ warnings). + */ + DecoratorCurveTransformation(); + +private: + + /** + * Copy constructor. + * @param other the object to clone. + * Forbidden by default. + */ + DecoratorCurveTransformation ( const DecoratorCurveTransformation & other ); + + /** + * Assignment. + * @param other the object to copy. + * @return a reference on 'this'. + * Forbidden by default. + */ + DecoratorCurveTransformation & operator= ( const DecoratorCurveTransformation & other ); + + // ------------------------- Internals ------------------------------------ +private: + const TTransfromation & trans; + const TInverseTransformation & inverse; + +}; // end of class DecoratorCurveTransformation + + +/** + * Overloads 'operator<<' for displaying objects of class 'DecoratorCurveTransformation'. + * @param out the output stream where the object is written. + * @param object the object of class 'DecoratorCurveTransformation' to write. + * @return the output stream after the writing. + */ +template +inline +std::ostream& +operator<< ( std::ostream & out, const DecoratorCurveTransformation< TCurve, TTransfromation, TInverseTransformation > & object ); + + +template +class ParametricCurveDigitizer3DDecorator : public ParametricCurveDigitizer3D +{ + BOOST_CONCEPT_ASSERT(( concepts::C3DParametricCurveDecorator< TParametricCurve > )); + +private: + virtual unsigned char findMainAxis ( const char & blockAxis, const double & i ); +}; + +} // namespace DGtal + + +/////////////////////////////////////////////////////////////////////////////// +// Includes inline functions. +#if !defined(BUILD_INLINE) +#include "DGtal/curves/parametric/DecoratorCurveTransformation.ih" +#endif + + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined DecoratorCurveTransformation_h + +#undef DecoratorCurveTransformation_RECURSES +#endif // else defined(DecoratorCurveTransformation_RECURSES) diff --git a/src/DGtal/curves/parametric/DecoratorCurveTransformation.ih b/src/DGtal/curves/parametric/DecoratorCurveTransformation.ih new file mode 100755 index 0000000000..3f9f47a05e --- /dev/null +++ b/src/DGtal/curves/parametric/DecoratorCurveTransformation.ih @@ -0,0 +1,123 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file DecoratorCurveTransformation.ih + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/10/10 + * + * Implementation of inline methods defined in DecoratorCurveTransformation.h + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +// IMPLEMENTATION of inline methods. +/////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +template +inline +DGtal::DecoratorCurveTransformation::DecoratorCurveTransformation +( const TCurve & c, const TTransfromation & t, const TInverseTransformation & i ) : curve(c), trans(t), inverse(i) {} + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline methods // +template +inline +typename DGtal::DecoratorCurveTransformation::RealPoint +DGtal::DecoratorCurveTransformation::x ( const double t ) const +{ + return trans ( curve.x ( t ) ); +} + +template +inline +typename DGtal::DecoratorCurveTransformation::RealPoint +DGtal::DecoratorCurveTransformation::xp ( const double t ) const +{ + return trans ( curve.xp ( t ) ); +} + +template +inline +double DGtal::DecoratorCurveTransformation::f +( const typename DGtal::DecoratorCurveTransformation::RealPoint & point ) const +{ + return curve.f ( inverse ( point ) ); +} + +template +inline +double DGtal::DecoratorCurveTransformation::g +( const typename DGtal::DecoratorCurveTransformation::RealPoint & point ) const +{ + return curve.g ( inverse ( point ) ); +} + +template +inline +double DGtal::DecoratorCurveTransformation::h +( const typename DGtal::DecoratorCurveTransformation::RealPoint & point ) const +{ + return curve.h ( inverse ( point ) ); +} + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline functions and external operators // + +/** + * Overloads 'operator<<' for displaying objects of class 'DecoratorCurveTransformation'. + * @param out the output stream where the object is written. + * @param object the object of class 'DecoratorCurveTransformation' to write. + * @return the output stream after the writing. + */ +template +inline +std::ostream& +DGtal::operator<< ( std::ostream & out, + const DecoratorCurveTransformation < TCurve, TTransfromation, TInverseTransformation > & object ) +{ + object.selfDisplay ( out ); + return out; +} + +template +inline +unsigned char DGtal::ParametricCurveDigitizer3DDecorator::findMainAxis ( const char & blockAxis, const double & i ) +{ + typename ParametricCurveDigitizer3D::RealVector value; + value[0] = std::fabs ( ParametricCurveDigitizer3D::curve->curve.xp ( i )[0] ); + value[1] = std::fabs ( ParametricCurveDigitizer3D::curve->curve.xp ( i )[1] ); + value[2] = std::fabs ( ParametricCurveDigitizer3D::curve->curve.xp ( i )[2] ); + + if ( blockAxis != -1 ) + value[blockAxis] = FLT_MIN; + + if ( value[0] > value[1] && value[0] > value[2] ) + return 0; + else if ( value[1] > value[0] && value[1] > value[2] ) + return 1; + else + return 2; +} + +// // +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/src/DGtal/curves/parametric/EllipticHelix.h b/src/DGtal/curves/parametric/EllipticHelix.h new file mode 100755 index 0000000000..17b690ec7a --- /dev/null +++ b/src/DGtal/curves/parametric/EllipticHelix.h @@ -0,0 +1,192 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file EllipticHelix.h + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/10/01 + * + * Header file for module EllipticHelix.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(EllipticHelix_RECURSES) +#error Recursive header files inclusion detected in EllipticHelix.h +#else // defined(EllipticHelix_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define EllipticHelix_RECURSES + +#if !defined EllipticHelix_h +/** Prevents repeated inclusion of headers. */ +#define EllipticHelix_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include +#include "DGtal/base/Common.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + +///////////////////////////////////////////////////////////////////////////// +// class EllipticHelix +/** + * Description of class 'EllipticHelix'

+ * \brief Aim: + */ +template +class EllipticHelix +{ + // ----------------------- Standard services ------------------------------ +public: + typedef TSpace Space; + typedef typename TSpace::RealPoint RealPoint; + typedef typename TSpace::Point Point; + + /** + * Destructor. + */ + ~EllipticHelix() {} + /** + * Constructor. + * @param rr small radius of the helix + * @param rl big radius of the helix + * @param bb distance between each turn. + */ + EllipticHelix ( double rr, double rl, double bb ); + + // ----------------------- Interface -------------------------------------- +public: + + /** + * @param t any angle between 0 and k*Pi. + * + * @return the vector (x(t),y(t), z(t)) + */ + RealPoint x ( double t ) const; + + /** + * @param t any angle between 0 and k*Pi. + * + * @return the vector (x(t)',y(t)', z(t)') + */ + RealPoint xp ( double t ) const; + + /** + * @brief inverse function of x + * @param p = x(t) + * @return t + */ + double f ( const RealPoint & p ) const; + + /** + * @brief inverse function of y + * @param p = x(t)[ + * @return t + */ + double g ( const RealPoint & p ) const; + + /** + * @brief inverse function of z + * @param p = x(t) + * @return t + */ + double h ( const RealPoint & p ) const; + + /** + * Writes/Displays the object on an output stream. + * @param out the output stream where the object is written. + */ + void selfDisplay ( std::ostream & out ) const; + + /** + * Checks the validity/consistency of the object. + * @return 'true' if the object is valid, 'false' otherwise. + */ + bool isValid() const; + + // ------------------------- Protected Datas ------------------------------ +private: + // ------------------------- Private Datas -------------------------------- +private: + double r1, r2, b; + // ------------------------- Hidden services ------------------------------ +protected: + + /** + * Constructor. + * Forbidden by default (protected to avoid g++ warnings). + */ + EllipticHelix(); + +private: + + /** + * Copy constructor. + * @param other the object to clone. + * Forbidden by default. + */ + EllipticHelix ( const EllipticHelix & other ); + + /** + * Assignment. + * @param other the object to copy. + * @return a reference on 'this'. + * Forbidden by default. + */ + EllipticHelix & operator= ( const EllipticHelix & other ); + + // ------------------------- Internals ------------------------------------ +private: + +}; // end of class EllipticHelix + + +/** + * Overloads 'operator<<' for displaying objects of class 'EllipticHelix'. + * @param out the output stream where the object is written. + * @param object the object of class 'EllipticHelix' to write. + * @return the output stream after the writing. + */ +template +std::ostream& +operator<< ( std::ostream & out, const EllipticHelix & object ); + + +} // namespace DGtal + + +/////////////////////////////////////////////////////////////////////////////// +// Includes inline functions. +#if !defined(BUILD_INLINE) +#include "DGtal/curves/parametric/EllipticHelix.ih" +#endif + + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined EllipticHelix_h + +#undef EllipticHelix_RECURSES +#endif // else defined(EllipticHelix_RECURSES) diff --git a/src/DGtal/curves/parametric/EllipticHelix.ih b/src/DGtal/curves/parametric/EllipticHelix.ih new file mode 100755 index 0000000000..0cdb358761 --- /dev/null +++ b/src/DGtal/curves/parametric/EllipticHelix.ih @@ -0,0 +1,149 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file EllipticHelix.ih + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/10/01 + * + * Implementation of inline methods defined in EllipticHelix.h + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +// IMPLEMENTATION of inline methods. +/////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + + + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline methods // +template +inline +DGtal::EllipticHelix::EllipticHelix ( double rr, double rl, double bb ) : r1 ( rr ), r2 ( rl ) , b ( bb ) {} + +template < typename T> +inline +typename DGtal::EllipticHelix::RealPoint DGtal::EllipticHelix::x ( const double t ) const +{ + return DGtal::EllipticHelix::RealPoint ( r1 * std::cos ( t ), r2 * std::sin ( t ), b * t ); +} + +template < typename T> +inline +typename DGtal::EllipticHelix::RealPoint DGtal::EllipticHelix::xp ( const double t ) const +{ + return DGtal::EllipticHelix::RealPoint ( -r1 * std::sin ( t ), r2 * std::cos ( t ), b ); +} + +template < typename T> +inline +//!\todo treat exceptions +double DGtal::EllipticHelix:: f ( const RealPoint & p ) const +{ + if ( p[1] >= 0. ) + { + double value = std::acos ( p[0] / r1 ); + if ( std::isnan ( value ) ) + throw std::runtime_error ( "Out of range!" ); + return value; + } + else if ( p[1] < 0. ) + { + double value = std::acos ( p[0] / r1 ); + if ( std::isnan ( value ) ) + throw std::runtime_error ( "Out of range!" ); + return 2 * M_PI - value; + } + else + throw std::runtime_error ( "Out of range!" ); +} + +template < typename T> +inline +double DGtal::EllipticHelix:: g ( const RealPoint & p ) const +{ + if ( p[0] >= 0. && p[1] >= 0. ) + { + double value = std::asin ( p[1] / r2 ); + if ( std::isnan ( value ) ) + throw std::runtime_error ( "Out of range!" ); + return value; + } + else if ( p[0] < 0. ) + { + double value = std::asin ( p[1] / r2 ); + if ( std::isnan ( value ) ) + throw std::runtime_error ( "Out of range!" ); + return M_PI - value; + } + else if ( p[0] >= 0. && p[1] < 0. ) + { + double value = std::asin ( p[1]/ r2 ); + if ( std::isnan ( value ) ) + throw std::runtime_error ( "Out of range!" ); + return 2 * M_PI + value; + } + else + throw std::runtime_error ( "Out of range!" ); +} + +template < typename T> +inline +double DGtal::EllipticHelix:: h ( const RealPoint & p ) const +{ + if ( std::abs ( b ) < 1E-20 ) + return 0.; + else + return p[2]/b; +} + +template < typename T> +inline +void DGtal::EllipticHelix::selfDisplay ( std::ostream & out ) const +{ + out << "[EllipticHelix]"; +} + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline functions and external operators // + +/** + * Overloads 'operator<<' for displaying objects of class 'EllipticHelix'. + * @param out the output stream where the object is written. + * @param object the object of class 'EllipticHelix' to write. + * @return the output stream after the writing. + */ +template +inline +std::ostream& +DGtal::operator<< ( std::ostream & out, + const EllipticHelix & object ) +{ + object.selfDisplay ( out ); + return out; +} + +// // +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/src/DGtal/curves/parametric/Line.h b/src/DGtal/curves/parametric/Line.h new file mode 100755 index 0000000000..1d67666794 --- /dev/null +++ b/src/DGtal/curves/parametric/Line.h @@ -0,0 +1,187 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file Line.h + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/11/05 + * + * Header file for module Line.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(Line_RECURSES) +#error Recursive header files inclusion detected in Line.h +#else // defined(Line_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define Line_RECURSES + +#if !defined Line_h +/** Prevents repeated inclusion of headers. */ +#define Line_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include "DGtal/base/Common.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + +///////////////////////////////////////////////////////////////////////////// +// class Line +/** + * Description of class 'Line'

+ * \brief Aim: + */ +template +class Line +{ + // ----------------------- Standard services ------------------------------ +public: + + typedef TSpace Space; + typedef typename TSpace::RealPoint RealPoint; + typedef typename TSpace::Point Point; + + Line ( bool, bool, bool ); + + /** + * Destructor. + */ + ~Line() { } + + // ----------------------- Interface -------------------------------------- +public: + + /** + * @param t any angle between 0 and k*Pi. + * + * @return the vector (x(t),y(t), z(t)) + */ + RealPoint x ( double t ) const; + + /** + * @param t any angle between 0 and k*Pi. + * + * @return the vector (x(t)',y(t)', z(t)') + */ + RealPoint xp ( double ) const; + + /** + * @brief inverse function of x + * @param p = x(t) + * @return t + */ + double f ( const RealPoint & p ) const; + + /** + * @brief inverse function of y + * @param p = x(t)[ + * @return t + */ + double g ( const RealPoint & p ) const; + + /** + * @brief inverse function of z + * @param p = x(t) + * @return t + */ + double h ( const RealPoint & p ) const; + + /** + * Writes/Displays the object on an output stream. + * @param out the output stream where the object is written. + */ + void selfDisplay ( std::ostream & out ) const; + + /** + * Checks the validity/consistency of the object. + * @return 'true' if the object is valid, 'false' otherwise. + */ + bool isValid() const; + + // ------------------------- Protected Datas ------------------------------ +private: + // ------------------------- Private Datas -------------------------------- +private: + bool mask[3]; + // ------------------------- Hidden services ------------------------------ +protected: + + /** + * Constructor. + * Forbidden by default (protected to avoid g++ warnings). + */ + Line(); + +private: + + /** + * Copy constructor. + * @param other the object to clone. + * Forbidden by default. + */ + Line ( const Line & other ); + + /** + * Assignment. + * @param other the object to copy. + * @return a reference on 'this'. + * Forbidden by default. + */ + Line & operator= ( const Line & other ); + + // ------------------------- Internals ------------------------------------ +private: + +}; // end of class Line + + +/** + * Overloads 'operator<<' for displaying objects of class 'Line'. + * @param out the output stream where the object is written. + * @param object the object of class 'Line' to write. + * @return the output stream after the writing. + */ +template +std::ostream& +operator<< ( std::ostream & out, const Line < TSpace > & object ); + + +} // namespace DGtal + + +/////////////////////////////////////////////////////////////////////////////// +// Includes inline functions. +#if !defined(BUILD_INLINE) +#include "DGtal/curves/parametric/Line.ih" +#endif + + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined Line_h + +#undef Line_RECURSES +#endif // else defined(Line_RECURSES) diff --git a/src/DGtal/curves/parametric/Line.ih b/src/DGtal/curves/parametric/Line.ih new file mode 100755 index 0000000000..31449f6428 --- /dev/null +++ b/src/DGtal/curves/parametric/Line.ih @@ -0,0 +1,103 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file Line.ih + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/11/05 + * + * Implementation of inline methods defined in Line.h + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +// IMPLEMENTATION of inline methods. +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline methods // + +template +inline +DGtal::Line::Line ( bool rx, bool ry, bool rz ) +{ + mask[0] = rx; + mask[1] = ry; + mask[2] = rz; +} + +template < typename T> +inline +typename DGtal::Line::RealPoint DGtal::Line::x ( const double t ) const +{ + return DGtal::Line::RealPoint ( mask[0] ? t : 0, mask[1] ? t : 0, mask[2] ? t : 0 ); +} + +template < typename T> +inline +typename DGtal::Line::RealPoint DGtal::Line::xp ( const double ) const +{ + return DGtal::Line::RealPoint ( mask[0] ? 1 : 0, mask[1] ? 1 : 0, mask[2] ? 1 : 0 ); +} + +template < typename T> +inline +double DGtal::Line:: f ( const RealPoint & p ) const +{ + return p[0]; +} + +template < typename T> +inline +double DGtal::Line:: g ( const RealPoint & p ) const +{ + return p[1]; +} + +template < typename T> +inline +double DGtal::Line:: h ( const RealPoint & p ) const +{ + return p[2]; +} + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline functions and external operators // + +/** + * Overloads 'operator<<' for displaying objects of class 'Line'. + * @param out the output stream where the object is written. + * @param object the object of class 'Line' to write. + * @return the output stream after the writing. + */ +template +inline +std::ostream& +DGtal::operator<< ( std::ostream & out, + const Line < TSpace > & object ) +{ + object.selfDisplay ( out ); + return out; +} + +// // +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/src/DGtal/dec/CDiscreteExteriorCalculusVectorSpace.h b/src/DGtal/dec/CDiscreteExteriorCalculusVectorSpace.h old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/DiscreteExteriorCalculus.h b/src/DGtal/dec/DiscreteExteriorCalculus.h old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/DiscreteExteriorCalculus.ih b/src/DGtal/dec/DiscreteExteriorCalculus.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/DiscreteExteriorCalculusFactory.h b/src/DGtal/dec/DiscreteExteriorCalculusFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/DiscreteExteriorCalculusFactory.ih b/src/DGtal/dec/DiscreteExteriorCalculusFactory.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/DiscreteExteriorCalculusSolver.h b/src/DGtal/dec/DiscreteExteriorCalculusSolver.h old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/DiscreteExteriorCalculusSolver.ih b/src/DGtal/dec/DiscreteExteriorCalculusSolver.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/Duality.h b/src/DGtal/dec/Duality.h old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/Duality.ih b/src/DGtal/dec/Duality.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/KForm.h b/src/DGtal/dec/KForm.h old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/KForm.ih b/src/DGtal/dec/KForm.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/LinearOperator.h b/src/DGtal/dec/LinearOperator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/LinearOperator.ih b/src/DGtal/dec/LinearOperator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/VectorField.h b/src/DGtal/dec/VectorField.h old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/VectorField.ih b/src/DGtal/dec/VectorField.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/alcapone_calculus.png b/src/DGtal/dec/doc/images/alcapone_calculus.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/alcapone_phi.png b/src/DGtal/dec/doc/images/alcapone_phi.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/alcapone_rho.png b/src/DGtal/dec/doc/images/alcapone_rho.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_1d_calculus_1d.png b/src/DGtal/dec/doc/images/embedding_1d_calculus_1d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_1d_calculus_2d.png b/src/DGtal/dec/doc/images/embedding_1d_calculus_2d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_1d_calculus_3d.png b/src/DGtal/dec/doc/images/embedding_1d_calculus_3d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_2d_calculus_2d.png b/src/DGtal/dec/doc/images/embedding_2d_calculus_2d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_2d_calculus_2d_no_border.png b/src/DGtal/dec/doc/images/embedding_2d_calculus_2d_no_border.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_2d_calculus_3d.png b/src/DGtal/dec/doc/images/embedding_2d_calculus_3d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_2d_calculus_3d_no_border.png b/src/DGtal/dec/doc/images/embedding_2d_calculus_3d_no_border.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_surface_calculus.png b/src/DGtal/dec/doc/images/embedding_surface_calculus.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/embedding_surface_input_set.png b/src/DGtal/dec/doc/images/embedding_surface_input_set.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/grille_cubique.png b/src/DGtal/dec/doc/images/grille_cubique.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/helmoltz_3d_harmonic.png b/src/DGtal/dec/doc/images/helmoltz_3d_harmonic.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/helmoltz_3d_harmonic_zoom0.png b/src/DGtal/dec/doc/images/helmoltz_3d_harmonic_zoom0.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/helmoltz_3d_harmonic_zoom1.png b/src/DGtal/dec/doc/images/helmoltz_3d_harmonic_zoom1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/helmoltz_3d_structure.png b/src/DGtal/dec/doc/images/helmoltz_3d_structure.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/linear_structure_dirichlet_dirac.png b/src/DGtal/dec/doc/images/linear_structure_dirichlet_dirac.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/linear_structure_dirichlet_fit.png b/src/DGtal/dec/doc/images/linear_structure_dirichlet_fit.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/linear_structure_dirichlet_solution.png b/src/DGtal/dec/doc/images/linear_structure_dirichlet_solution.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/linear_structure_dirichlet_solution_gradient.png b/src/DGtal/dec/doc/images/linear_structure_dirichlet_solution_gradient.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/linear_structure_neumann_dirac.png b/src/DGtal/dec/doc/images/linear_structure_neumann_dirac.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/linear_structure_neumann_fit.png b/src/DGtal/dec/doc/images/linear_structure_neumann_fit.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/linear_structure_neumann_solution.png b/src/DGtal/dec/doc/images/linear_structure_neumann_solution.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/linear_structure_neumann_solution_gradient.png b/src/DGtal/dec/doc/images/linear_structure_neumann_solution_gradient.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/operators_3d.png b/src/DGtal/dec/doc/images/operators_3d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/operators_3d_laplace.png b/src/DGtal/dec/doc/images/operators_3d_laplace.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propa_samples.png b/src/DGtal/dec/doc/images/propa_samples.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propagation_forced_wave_0.png b/src/DGtal/dec/doc/images/propagation_forced_wave_0.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propagation_forced_wave_1.png b/src/DGtal/dec/doc/images/propagation_forced_wave_1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propagation_forced_wave_2.png b/src/DGtal/dec/doc/images/propagation_forced_wave_2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propagation_forced_wave_3.png b/src/DGtal/dec/doc/images/propagation_forced_wave_3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propagation_forced_wave_4.png b/src/DGtal/dec/doc/images/propagation_forced_wave_4.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propagation_forced_wave_5.png b/src/DGtal/dec/doc/images/propagation_forced_wave_5.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propagation_time_wave_i.gif b/src/DGtal/dec/doc/images/propagation_time_wave_i.gif old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/propagation_time_wave_ii.gif b/src/DGtal/dec/doc/images/propagation_time_wave_ii.gif old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_2d_dual_decomposition_calculus.png b/src/DGtal/dec/doc/images/solve_2d_dual_decomposition_calculus.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_2d_dual_decomposition_curl_free.png b/src/DGtal/dec/doc/images/solve_2d_dual_decomposition_curl_free.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_2d_dual_decomposition_div_free.png b/src/DGtal/dec/doc/images/solve_2d_dual_decomposition_div_free.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_2d_dual_decomposition_harmonic.png b/src/DGtal/dec/doc/images/solve_2d_dual_decomposition_harmonic.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_2d_primal_decomposition_calculus.png b/src/DGtal/dec/doc/images/solve_2d_primal_decomposition_calculus.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_2d_primal_decomposition_curl_free.png b/src/DGtal/dec/doc/images/solve_2d_primal_decomposition_curl_free.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_2d_primal_decomposition_div_free.png b/src/DGtal/dec/doc/images/solve_2d_primal_decomposition_div_free.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_2d_primal_decomposition_harmonic.png b/src/DGtal/dec/doc/images/solve_2d_primal_decomposition_harmonic.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_laplace_calculus.png b/src/DGtal/dec/doc/images/solve_laplace_calculus.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_laplace_simplicial_ldlt.png b/src/DGtal/dec/doc/images/solve_laplace_simplicial_ldlt.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/solve_laplace_simplicial_llt.png b/src/DGtal/dec/doc/images/solve_laplace_simplicial_llt.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/usage_calculus_with_border.png b/src/DGtal/dec/doc/images/usage_calculus_with_border.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/usage_calculus_without_border.png b/src/DGtal/dec/doc/images/usage_calculus_without_border.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/usage_primal_one_form.png b/src/DGtal/dec/doc/images/usage_primal_one_form.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/usage_primal_one_form_hodge.png b/src/DGtal/dec/doc/images/usage_primal_one_form_hodge.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/usage_primal_one_form_sharp_flat.png b/src/DGtal/dec/doc/images/usage_primal_one_form_sharp_flat.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/images/usage_primal_zero_form.png b/src/DGtal/dec/doc/images/usage_primal_zero_form.png old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/moduleDECEmbedding.dox b/src/DGtal/dec/doc/moduleDECEmbedding.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/moduleDECHelmoltz.dox b/src/DGtal/dec/doc/moduleDECHelmoltz.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/moduleDECIntroduction.dox b/src/DGtal/dec/doc/moduleDECIntroduction.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/moduleDECPoisson.dox b/src/DGtal/dec/doc/moduleDECPoisson.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/moduleDECPropagation.dox b/src/DGtal/dec/doc/moduleDECPropagation.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/packageDEC.dox b/src/DGtal/dec/doc/packageDEC.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/dec/doc/packageDECConcepts.dox b/src/DGtal/dec/doc/packageDECConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/global.bib b/src/DGtal/doc/global.bib old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/images/churchCrop.png b/src/DGtal/doc/images/churchCrop.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/images/lobsterExtracted.png b/src/DGtal/doc/images/lobsterExtracted.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/images/logo_DGtal_small.png b/src/DGtal/doc/images/logo_DGtal_small.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/images/slice20Lobster.png b/src/DGtal/doc/images/slice20Lobster.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/mainpage.dox b/src/DGtal/doc/mainpage.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/moduleBuildDGtal.dox b/src/DGtal/doc/moduleBuildDGtal.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/moduleCatch.dox b/src/DGtal/doc/moduleCatch.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/moduleFAQGit.dox b/src/DGtal/doc/moduleFAQGit.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/moduleHowToUseDGtal-qmake.dox b/src/DGtal/doc/moduleHowToUseDGtal-qmake.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/moduleHowToUseDGtal.dox b/src/DGtal/doc/moduleHowToUseDGtal.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/moduleIntroduction.dox b/src/DGtal/doc/moduleIntroduction.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/namespaces.dox b/src/DGtal/doc/namespaces.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/packageIntroduction.dox b/src/DGtal/doc/packageIntroduction.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/Al-thickness.png b/src/DGtal/doc/tutorials/images/Al-thickness.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/DisplayGridCurveTuto.png b/src/DGtal/doc/tutorials/images/DisplayGridCurveTuto.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/DisplayIncidentPointsTuto.png b/src/DGtal/doc/tutorials/images/DisplayIncidentPointsTuto.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/DisplayInnerPointsTuto.png b/src/DGtal/doc/tutorials/images/DisplayInnerPointsTuto.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/Flower01.png b/src/DGtal/doc/tutorials/images/Flower01.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/Flower1.png b/src/DGtal/doc/tutorials/images/Flower1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/GridCurveDSSSegmentationTuto3.png b/src/DGtal/doc/tutorials/images/GridCurveDSSSegmentationTuto3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/churchLevelSets.png b/src/DGtal/doc/tutorials/images/churchLevelSets.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/churchLevelSetsTransp.png b/src/DGtal/doc/tutorials/images/churchLevelSetsTransp.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/export-accflower.png b/src/DGtal/doc/tutorials/images/export-accflower.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/fcExtraction.png b/src/DGtal/doc/tutorials/images/fcExtraction.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/fcExtraction0.png b/src/DGtal/doc/tutorials/images/fcExtraction0.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/fcExtraction2.png b/src/DGtal/doc/tutorials/images/fcExtraction2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/graphTuto4.png b/src/DGtal/doc/tutorials/images/graphTuto4.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/imageDomainTuto2.png b/src/DGtal/doc/tutorials/images/imageDomainTuto2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/imageDomainTuto2bis.png b/src/DGtal/doc/tutorials/images/imageDomainTuto2bis.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/imageDomainTuto3.png b/src/DGtal/doc/tutorials/images/imageDomainTuto3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/imageDomainTutoSample.png b/src/DGtal/doc/tutorials/images/imageDomainTutoSample.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/imageNGinColor.png b/src/DGtal/doc/tutorials/images/imageNGinColor.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/polyhedral-al-finished-w3.png b/src/DGtal/doc/tutorials/images/polyhedral-al-finished-w3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/polyhedral-bunny-finished-w2.png b/src/DGtal/doc/tutorials/images/polyhedral-bunny-finished-w2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/polyhedral-ssphere-ctmv.png b/src/DGtal/doc/tutorials/images/polyhedral-ssphere-ctmv.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/polyhedralizer-al-1.png b/src/DGtal/doc/tutorials/images/polyhedralizer-al-1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/polyhedralizer-al-round.png b/src/DGtal/doc/tutorials/images/polyhedralizer-al-round.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/images/volumetricThickness.png b/src/DGtal/doc/tutorials/images/volumetricThickness.png old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/packageTutorials.dox b/src/DGtal/doc/tutorials/packageTutorials.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoAreaSurface.dox b/src/DGtal/doc/tutorials/tutoAreaSurface.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoFMMErosion.dox b/src/DGtal/doc/tutorials/tutoFMMErosion.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoFileGridCurveRanges.dox b/src/DGtal/doc/tutorials/tutoFileGridCurveRanges.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoImageGridCurveEstimator.dox b/src/DGtal/doc/tutorials/tutoImageGridCurveEstimator.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoImageGridCurveExtraction.dox b/src/DGtal/doc/tutorials/tutoImageGridCurveExtraction.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoImageGridVolume3dVolViewer.dox b/src/DGtal/doc/tutorials/tutoImageGridVolume3dVolViewer.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoImageManipulations.dox b/src/DGtal/doc/tutorials/tutoImageManipulations.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoImageRegionDT.dox b/src/DGtal/doc/tutorials/tutoImageRegionDT.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoPolyhedralisation.dox b/src/DGtal/doc/tutorials/tutoPolyhedralisation.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoShapeGridCurveEstimator.dox b/src/DGtal/doc/tutorials/tutoShapeGridCurveEstimator.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/doc/tutorials/tutoVolDTGranulometry.dox b/src/DGtal/doc/tutorials/tutoVolDTGranulometry.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithDSSIterator.h b/src/DGtal/geometry/curves/ArithDSSIterator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithDSSIterator.ih b/src/DGtal/geometry/curves/ArithDSSIterator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSL.h b/src/DGtal/geometry/curves/ArithmeticalDSL.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSL.ih b/src/DGtal/geometry/curves/ArithmeticalDSL.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSLKernel.h b/src/DGtal/geometry/curves/ArithmeticalDSLKernel.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSLKernel.ih b/src/DGtal/geometry/curves/ArithmeticalDSLKernel.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSS.h b/src/DGtal/geometry/curves/ArithmeticalDSS.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSS.ih b/src/DGtal/geometry/curves/ArithmeticalDSS.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSSCheck.h b/src/DGtal/geometry/curves/ArithmeticalDSSCheck.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSSCheck.ih b/src/DGtal/geometry/curves/ArithmeticalDSSCheck.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSSComputer.h b/src/DGtal/geometry/curves/ArithmeticalDSSComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSSComputer.ih b/src/DGtal/geometry/curves/ArithmeticalDSSComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSSConvexHull.h b/src/DGtal/geometry/curves/ArithmeticalDSSConvexHull.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSSConvexHull.ih b/src/DGtal/geometry/curves/ArithmeticalDSSConvexHull.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSSFactory.h b/src/DGtal/geometry/curves/ArithmeticalDSSFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/ArithmeticalDSSFactory.ih b/src/DGtal/geometry/curves/ArithmeticalDSSFactory.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/BinomialConvolver.h b/src/DGtal/geometry/curves/BinomialConvolver.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/BinomialConvolver.ih b/src/DGtal/geometry/curves/BinomialConvolver.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/CBidirectionalSegmentComputer.h b/src/DGtal/geometry/curves/CBidirectionalSegmentComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/CDynamicBidirectionalSegmentComputer.h b/src/DGtal/geometry/curves/CDynamicBidirectionalSegmentComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/CDynamicSegmentComputer.h b/src/DGtal/geometry/curves/CDynamicSegmentComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/CForwardSegmentComputer.h b/src/DGtal/geometry/curves/CForwardSegmentComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/CIncrementalSegmentComputer.h b/src/DGtal/geometry/curves/CIncrementalSegmentComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/CSegment.h b/src/DGtal/geometry/curves/CSegment.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/CSegmentFactory.h b/src/DGtal/geometry/curves/CSegmentFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/DSLSubsegment.h b/src/DGtal/geometry/curves/DSLSubsegment.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/DSLSubsegment.ih b/src/DGtal/geometry/curves/DSLSubsegment.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/FP.h b/src/DGtal/geometry/curves/FP.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/FP.ih b/src/DGtal/geometry/curves/FP.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/FrechetShortcut.h b/src/DGtal/geometry/curves/FrechetShortcut.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/FrechetShortcut.ih b/src/DGtal/geometry/curves/FrechetShortcut.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/FreemanChain.h b/src/DGtal/geometry/curves/FreemanChain.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/FreemanChain.ih b/src/DGtal/geometry/curves/FreemanChain.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/GreedySegmentation.h b/src/DGtal/geometry/curves/GreedySegmentation.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/GreedySegmentation.ih b/src/DGtal/geometry/curves/GreedySegmentation.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/GridCurve.h b/src/DGtal/geometry/curves/GridCurve.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/GridCurve.ih b/src/DGtal/geometry/curves/GridCurve.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/Naive3DDSSComputer.h b/src/DGtal/geometry/curves/Naive3DDSSComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/Naive3DDSSComputer.ih b/src/DGtal/geometry/curves/Naive3DDSSComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/OneBalancedWordComputer.h b/src/DGtal/geometry/curves/OneBalancedWordComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/OneBalancedWordComputer.ih b/src/DGtal/geometry/curves/OneBalancedWordComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/SaturatedSegmentation.h b/src/DGtal/geometry/curves/SaturatedSegmentation.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/SaturatedSegmentation.ih b/src/DGtal/geometry/curves/SaturatedSegmentation.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/SegmentComputerUtils.h b/src/DGtal/geometry/curves/SegmentComputerUtils.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/StabbingCircleComputer.h b/src/DGtal/geometry/curves/StabbingCircleComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/StabbingCircleComputer.ih b/src/DGtal/geometry/curves/StabbingCircleComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/StabbingLineComputer.h b/src/DGtal/geometry/curves/StabbingLineComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/StabbingLineComputer.ih b/src/DGtal/geometry/curves/StabbingLineComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/StandardDSS6Computer.h b/src/DGtal/geometry/curves/StandardDSS6Computer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/StandardDSS6Computer.ih b/src/DGtal/geometry/curves/StandardDSS6Computer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/BLUELocalLengthEstimator.h b/src/DGtal/geometry/curves/estimation/BLUELocalLengthEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/CCurveLocalGeometricEstimator.h b/src/DGtal/geometry/curves/estimation/CCurveLocalGeometricEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/CGlobalCurveGeometricEstimator.h b/src/DGtal/geometry/curves/estimation/CGlobalCurveGeometricEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/CLMSTTangentFromDSS.h b/src/DGtal/geometry/curves/estimation/CLMSTTangentFromDSS.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/CSegmentComputerEstimator.h b/src/DGtal/geometry/curves/estimation/CSegmentComputerEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/CompareLocalEstimators.h b/src/DGtal/geometry/curves/estimation/CompareLocalEstimators.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/DSSLengthEstimator.h b/src/DGtal/geometry/curves/estimation/DSSLengthEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/DSSLengthEstimator.ih b/src/DGtal/geometry/curves/estimation/DSSLengthEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/FPLengthEstimator.h b/src/DGtal/geometry/curves/estimation/FPLengthEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/FPLengthEstimator.ih b/src/DGtal/geometry/curves/estimation/FPLengthEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/FunctorsLambdaMST.h b/src/DGtal/geometry/curves/estimation/FunctorsLambdaMST.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/L1LengthEstimator.h b/src/DGtal/geometry/curves/estimation/L1LengthEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/L1LengthEstimator.ih b/src/DGtal/geometry/curves/estimation/L1LengthEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/LambdaMST2D.h b/src/DGtal/geometry/curves/estimation/LambdaMST2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/LambdaMST2D.ih b/src/DGtal/geometry/curves/estimation/LambdaMST2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/LambdaMST3D.h b/src/DGtal/geometry/curves/estimation/LambdaMST3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/LambdaMST3D.ih b/src/DGtal/geometry/curves/estimation/LambdaMST3D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/MLPLengthEstimator.h b/src/DGtal/geometry/curves/estimation/MLPLengthEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/MLPLengthEstimator.ih b/src/DGtal/geometry/curves/estimation/MLPLengthEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/ModuleSRC.txt b/src/DGtal/geometry/curves/estimation/ModuleSRC.txt new file mode 100755 index 0000000000..6fc56b9590 --- /dev/null +++ b/src/DGtal/geometry/curves/estimation/ModuleSRC.txt @@ -0,0 +1,5 @@ +## Sources associated to the module geometry +## + +SET(DGTAL_SRC ${DGTAL_SRC} + DGtal/geometry/curves/estimation/LambdaMST3DBy2D) diff --git a/src/DGtal/geometry/curves/estimation/MostCenteredMaximalSegmentEstimator.h b/src/DGtal/geometry/curves/estimation/MostCenteredMaximalSegmentEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/MostCenteredMaximalSegmentEstimator.ih b/src/DGtal/geometry/curves/estimation/MostCenteredMaximalSegmentEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/ParametricShapeArcLengthFunctor.h b/src/DGtal/geometry/curves/estimation/ParametricShapeArcLengthFunctor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/ParametricShapeCurvatureFunctor.h b/src/DGtal/geometry/curves/estimation/ParametricShapeCurvatureFunctor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/ParametricShapeTangentFunctor.h b/src/DGtal/geometry/curves/estimation/ParametricShapeTangentFunctor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/RosenProffittLocalLengthEstimator.h b/src/DGtal/geometry/curves/estimation/RosenProffittLocalLengthEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/SegmentComputerEstimators.h b/src/DGtal/geometry/curves/estimation/SegmentComputerEstimators.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/TrueGlobalEstimatorOnPoints.h b/src/DGtal/geometry/curves/estimation/TrueGlobalEstimatorOnPoints.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/TrueGlobalEstimatorOnPoints.ih b/src/DGtal/geometry/curves/estimation/TrueGlobalEstimatorOnPoints.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/TrueLocalEstimatorOnPoints.h b/src/DGtal/geometry/curves/estimation/TrueLocalEstimatorOnPoints.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/TrueLocalEstimatorOnPoints.ih b/src/DGtal/geometry/curves/estimation/TrueLocalEstimatorOnPoints.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/TwoStepLocalLengthEstimator.h b/src/DGtal/geometry/curves/estimation/TwoStepLocalLengthEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/curves/estimation/TwoStepLocalLengthEstimator.ih b/src/DGtal/geometry/curves/estimation/TwoStepLocalLengthEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/experiments/chord-benchmark-biginteger.txt b/src/DGtal/geometry/doc/experiments/chord-benchmark-biginteger.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/experiments/chord-benchmark-int64.txt b/src/DGtal/geometry/doc/experiments/chord-benchmark-int64.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/experiments/coba-benchmark-biginteger.txt b/src/DGtal/geometry/doc/experiments/coba-benchmark-biginteger.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/1cellsRange.png b/src/DGtal/geometry/doc/images/1cellsRange.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/ArithmeticalDSL-8-0-5-8.png b/src/DGtal/geometry/doc/images/ArithmeticalDSL-8-0-5-8.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/ArithmeticalDSL-8-1-8-5.png b/src/DGtal/geometry/doc/images/ArithmeticalDSL-8-1-8-5.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/ArithmeticalDSL-8-2-8-m5.png b/src/DGtal/geometry/doc/images/ArithmeticalDSL-8-2-8-m5.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/BackFrontFigure.png b/src/DGtal/geometry/doc/images/BackFrontFigure.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/BackFrontFigure.svg b/src/DGtal/geometry/doc/images/BackFrontFigure.svg old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/Bunny_128_mean.png b/src/DGtal/geometry/doc/images/Bunny_128_mean.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/Bunny_64_k1.png b/src/DGtal/geometry/doc/images/Bunny_64_k1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/COBA-timings.png b/src/DGtal/geometry/doc/images/COBA-timings.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/COBA-updates.png b/src/DGtal/geometry/doc/images/COBA-updates.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/DSS4.png b/src/DGtal/geometry/doc/images/DSS4.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/DSS8.png b/src/DGtal/geometry/doc/images/DSS8.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/DTbyFMM-25.png b/src/DGtal/geometry/doc/images/DTbyFMM-25.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/FMM-diagram.png b/src/DGtal/geometry/doc/images/FMM-diagram.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/FMM-diagram.svg b/src/DGtal/geometry/doc/images/FMM-diagram.svg old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/FMM-interface.png b/src/DGtal/geometry/doc/images/FMM-interface.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/FMM-interface.svg b/src/DGtal/geometry/doc/images/FMM-interface.svg old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/IncidentPointsRange.png b/src/DGtal/geometry/doc/images/IncidentPointsRange.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/InnerPointsRange.png b/src/DGtal/geometry/doc/images/InnerPointsRange.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/IntegralInvariantCurvatureEstimator-FullMask.png b/src/DGtal/geometry/doc/images/IntegralInvariantCurvatureEstimator-FullMask.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/IntegralInvariantCurvatureEstimator-PartialMask.png b/src/DGtal/geometry/doc/images/IntegralInvariantCurvatureEstimator-PartialMask.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/MidPointsRange.png b/src/DGtal/geometry/doc/images/MidPointsRange.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/MovingKernel.png b/src/DGtal/geometry/doc/images/MovingKernel.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/NaiveDSL.png b/src/DGtal/geometry/doc/images/NaiveDSL.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/NaiveDSS8.png b/src/DGtal/geometry/doc/images/NaiveDSS8.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/NaiveDSS8ExtDone.png b/src/DGtal/geometry/doc/images/NaiveDSS8ExtDone.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/NaiveDSS8ExtInit.png b/src/DGtal/geometry/doc/images/NaiveDSS8ExtInit.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/OuterPointsRange.png b/src/DGtal/geometry/doc/images/OuterPointsRange.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/PointsRange.png b/src/DGtal/geometry/doc/images/PointsRange.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/StandardDSL.png b/src/DGtal/geometry/doc/images/StandardDSL.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/StandardDSS4.png b/src/DGtal/geometry/doc/images/StandardDSS4.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/StandardDSS4bis.png b/src/DGtal/geometry/doc/images/StandardDSS4bis.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/algo2.png b/src/DGtal/geometry/doc/images/algo2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/algo3.png b/src/DGtal/geometry/doc/images/algo3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/approx_distance.png b/src/DGtal/geometry/doc/images/approx_distance.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/chord-naive-plane.png b/src/DGtal/geometry/doc/images/chord-naive-plane.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/circularRange.png b/src/DGtal/geometry/doc/images/circularRange.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/clusters.png b/src/DGtal/geometry/doc/images/clusters.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/coba-chord-benchmark.png b/src/DGtal/geometry/doc/images/coba-chord-benchmark.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/coba-naive-plane.png b/src/DGtal/geometry/doc/images/coba-naive-plane.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/coba-stdplane.png b/src/DGtal/geometry/doc/images/coba-stdplane.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/convex-and-concave-parts.png b/src/DGtal/geometry/doc/images/convex-and-concave-parts.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/curve_simplification.png b/src/DGtal/geometry/doc/images/curve_simplification.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/def_width_backpath.png b/src/DGtal/geometry/doc/images/def_width_backpath.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/def_width_backpath_2.png b/src/DGtal/geometry/doc/images/def_width_backpath_2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/definition1.png b/src/DGtal/geometry/doc/images/definition1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/definition_occulter.png b/src/DGtal/geometry/doc/images/definition_occulter.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/dvcm-3d-hat-r.png b/src/DGtal/geometry/doc/images/dvcm-3d-hat-r.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/dvcm-curvature.png b/src/DGtal/geometry/doc/images/dvcm-curvature.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/dvcm-hat-r.png b/src/DGtal/geometry/doc/images/dvcm-hat-r.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/example-DT-3D.png b/src/DGtal/geometry/doc/images/example-DT-3D.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/example-DT-L1.png b/src/DGtal/geometry/doc/images/example-DT-L1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/example-DT-L2.png b/src/DGtal/geometry/doc/images/example-DT-L2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/example-DT-Linf.png b/src/DGtal/geometry/doc/images/example-DT-Linf.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/example-integralinvariant2D.png b/src/DGtal/geometry/doc/images/example-integralinvariant2D.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/exampleArithDSS3d.png b/src/DGtal/geometry/doc/images/exampleArithDSS3d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/exampleFMM3D.png b/src/DGtal/geometry/doc/images/exampleFMM3D.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/exampleGridCurveCat.png b/src/DGtal/geometry/doc/images/exampleGridCurveCat.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/exampleGridCurveSinus.png b/src/DGtal/geometry/doc/images/exampleGridCurveSinus.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/greedy-dss-decomposition.png b/src/DGtal/geometry/doc/images/greedy-dss-decomposition.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/greedy-plane-segmentation-al-w1.png b/src/DGtal/geometry/doc/images/greedy-plane-segmentation-al-w1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/greedy-plane-segmentation-ex2-al-w1.png b/src/DGtal/geometry/doc/images/greedy-plane-segmentation-ex2-al-w1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/hausdorff.png b/src/DGtal/geometry/doc/images/hausdorff.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/hiddenBy.png b/src/DGtal/geometry/doc/images/hiddenBy.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/hiddenBy.svg b/src/DGtal/geometry/doc/images/hiddenBy.svg old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/integral2D.png b/src/DGtal/geometry/doc/images/integral2D.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/integral3D.png b/src/DGtal/geometry/doc/images/integral3D.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/intersection_shapes.png b/src/DGtal/geometry/doc/images/intersection_shapes.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/left_right.png b/src/DGtal/geometry/doc/images/left_right.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/lemma3.png b/src/DGtal/geometry/doc/images/lemma3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/linearRange.png b/src/DGtal/geometry/doc/images/linearRange.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/local.png b/src/DGtal/geometry/doc/images/local.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/maxseg.png b/src/DGtal/geometry/doc/images/maxseg.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/minus_shapes.png b/src/DGtal/geometry/doc/images/minus_shapes.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/notations_integral.png b/src/DGtal/geometry/doc/images/notations_integral.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/occulters.png b/src/DGtal/geometry/doc/images/occulters.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/ordre_projections.png b/src/DGtal/geometry/doc/images/ordre_projections.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/resuExDistanceTransform3D.png b/src/DGtal/geometry/doc/images/resuExDistanceTransform3D.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/right_left.png b/src/DGtal/geometry/doc/images/right_left.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/snapshot-K-zero.png b/src/DGtal/geometry/doc/images/snapshot-K-zero.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/snapshot-mean-zero.png b/src/DGtal/geometry/doc/images/snapshot-mean-zero.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/triangle01.png b/src/DGtal/geometry/doc/images/triangle01.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/triangle1.png b/src/DGtal/geometry/doc/images/triangle1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/union_shapes.png b/src/DGtal/geometry/doc/images/union_shapes.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/union_shapes_golf.png b/src/DGtal/geometry/doc/images/union_shapes_golf.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/update_width.png b/src/DGtal/geometry/doc/images/update_width.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/vcm.png b/src/DGtal/geometry/doc/images/vcm.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/voronoimap-cells.png b/src/DGtal/geometry/doc/images/voronoimap-cells.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/voronoimap-dt.png b/src/DGtal/geometry/doc/images/voronoimap-dt.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/voronoimap-inputset.png b/src/DGtal/geometry/doc/images/voronoimap-inputset.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/voronoimap-voro.png b/src/DGtal/geometry/doc/images/voronoimap-voro.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/voronoimap-vorol8.png b/src/DGtal/geometry/doc/images/voronoimap-vorol8.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/images/zones.png b/src/DGtal/geometry/doc/images/zones.png old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleArithDSSReco.dox b/src/DGtal/geometry/doc/moduleArithDSSReco.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleCOBANaivePlaneRecognition.dox b/src/DGtal/geometry/doc/moduleCOBANaivePlaneRecognition.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleFMM.dox b/src/DGtal/geometry/doc/moduleFMM.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleFrechetShortcut.dox b/src/DGtal/geometry/doc/moduleFrechetShortcut.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleGeometricPredicates.dox b/src/DGtal/geometry/doc/moduleGeometricPredicates.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleGridCurveAnalysis.dox b/src/DGtal/geometry/doc/moduleGridCurveAnalysis.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleIntegralInvariant.dox b/src/DGtal/geometry/doc/moduleIntegralInvariant.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleLocalEstimatorsFromSurfel.dox b/src/DGtal/geometry/doc/moduleLocalEstimatorsFromSurfel.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleMetrics.dox b/src/DGtal/geometry/doc/moduleMetrics.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/modulePlaneRecognition.dox b/src/DGtal/geometry/doc/modulePlaneRecognition.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleVCM.dox b/src/DGtal/geometry/doc/moduleVCM.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/moduleVolumetric.dox b/src/DGtal/geometry/doc/moduleVolumetric.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/packageGeometry.dox b/src/DGtal/geometry/doc/packageGeometry.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/doc/packageGeometryConcepts.dox b/src/DGtal/geometry/doc/packageGeometryConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/helpers/ContourHelper.h b/src/DGtal/geometry/helpers/ContourHelper.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/helpers/ContourHelper.ih b/src/DGtal/geometry/helpers/ContourHelper.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/CAdditivePrimitiveComputer.h b/src/DGtal/geometry/surfaces/CAdditivePrimitiveComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/CIncrementalPrimitiveComputer.h b/src/DGtal/geometry/surfaces/CIncrementalPrimitiveComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/COBAGenericNaivePlaneComputer.h b/src/DGtal/geometry/surfaces/COBAGenericNaivePlaneComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/COBAGenericNaivePlaneComputer.ih b/src/DGtal/geometry/surfaces/COBAGenericNaivePlaneComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/COBAGenericStandardPlaneComputer.h b/src/DGtal/geometry/surfaces/COBAGenericStandardPlaneComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/COBAGenericStandardPlaneComputer.ih b/src/DGtal/geometry/surfaces/COBAGenericStandardPlaneComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/COBANaivePlaneComputer.h b/src/DGtal/geometry/surfaces/COBANaivePlaneComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/COBANaivePlaneComputer.ih b/src/DGtal/geometry/surfaces/COBANaivePlaneComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/CPrimitiveComputer.h b/src/DGtal/geometry/surfaces/CPrimitiveComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/ChordGenericNaivePlaneComputer.h b/src/DGtal/geometry/surfaces/ChordGenericNaivePlaneComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/ChordGenericNaivePlaneComputer.ih b/src/DGtal/geometry/surfaces/ChordGenericNaivePlaneComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/ChordGenericStandardPlaneComputer.h b/src/DGtal/geometry/surfaces/ChordGenericStandardPlaneComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/ChordGenericStandardPlaneComputer.ih b/src/DGtal/geometry/surfaces/ChordGenericStandardPlaneComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/ChordNaivePlaneComputer.h b/src/DGtal/geometry/surfaces/ChordNaivePlaneComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/ChordNaivePlaneComputer.ih b/src/DGtal/geometry/surfaces/ChordNaivePlaneComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/DigitalSurfaceConvolver.h b/src/DGtal/geometry/surfaces/DigitalSurfaceConvolver.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/DigitalSurfaceConvolver.ih b/src/DGtal/geometry/surfaces/DigitalSurfaceConvolver.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/FunctorOnCells.h b/src/DGtal/geometry/surfaces/FunctorOnCells.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/FunctorOnCells.ih b/src/DGtal/geometry/surfaces/FunctorOnCells.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/ParallelStrip.h b/src/DGtal/geometry/surfaces/ParallelStrip.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/ParallelStrip.ih b/src/DGtal/geometry/surfaces/ParallelStrip.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/BasicConvolutionWeights.h b/src/DGtal/geometry/surfaces/estimation/BasicConvolutionWeights.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/CConvolutionWeights.h b/src/DGtal/geometry/surfaces/estimation/CConvolutionWeights.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/CDigitalSurfaceLocalEstimator.h b/src/DGtal/geometry/surfaces/estimation/CDigitalSurfaceLocalEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/CNormalVectorEstimator.h b/src/DGtal/geometry/surfaces/estimation/CNormalVectorEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/CSurfelLocalEstimator.h b/src/DGtal/geometry/surfaces/estimation/CSurfelLocalEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/DigitalSurfaceEmbedderWithNormalVectorEstimator.h b/src/DGtal/geometry/surfaces/estimation/DigitalSurfaceEmbedderWithNormalVectorEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/DigitalSurfaceEmbedderWithNormalVectorEstimator.ih b/src/DGtal/geometry/surfaces/estimation/DigitalSurfaceEmbedderWithNormalVectorEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/EstimatorCache.h b/src/DGtal/geometry/surfaces/estimation/EstimatorCache.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/IIGeometricFunctors.h b/src/DGtal/geometry/surfaces/estimation/IIGeometricFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.h b/src/DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.ih b/src/DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/IntegralInvariantNormalVectorEstimator.h b/src/DGtal/geometry/surfaces/estimation/IntegralInvariantNormalVectorEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/IntegralInvariantNormalVectorEstimator.ih b/src/DGtal/geometry/surfaces/estimation/IntegralInvariantNormalVectorEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/IntegralInvariantVolumeEstimator.h b/src/DGtal/geometry/surfaces/estimation/IntegralInvariantVolumeEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/IntegralInvariantVolumeEstimator.ih b/src/DGtal/geometry/surfaces/estimation/IntegralInvariantVolumeEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/LocalConvolutionNormalVectorEstimator.h b/src/DGtal/geometry/surfaces/estimation/LocalConvolutionNormalVectorEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/LocalConvolutionNormalVectorEstimator.ih b/src/DGtal/geometry/surfaces/estimation/LocalConvolutionNormalVectorEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/LocalEstimatorFromSurfelFunctorAdapter.h b/src/DGtal/geometry/surfaces/estimation/LocalEstimatorFromSurfelFunctorAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/LocalEstimatorFromSurfelFunctorAdapter.ih b/src/DGtal/geometry/surfaces/estimation/LocalEstimatorFromSurfelFunctorAdapter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/NormalVectorEstimatorLinearCellEmbedder.h b/src/DGtal/geometry/surfaces/estimation/NormalVectorEstimatorLinearCellEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/NormalVectorEstimatorLinearCellEmbedder.ih b/src/DGtal/geometry/surfaces/estimation/NormalVectorEstimatorLinearCellEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/TrueDigitalSurfaceLocalEstimator.h b/src/DGtal/geometry/surfaces/estimation/TrueDigitalSurfaceLocalEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/TrueDigitalSurfaceLocalEstimator.ih b/src/DGtal/geometry/surfaces/estimation/TrueDigitalSurfaceLocalEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/VCMDigitalSurfaceLocalEstimator.h b/src/DGtal/geometry/surfaces/estimation/VCMDigitalSurfaceLocalEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/VCMDigitalSurfaceLocalEstimator.ih b/src/DGtal/geometry/surfaces/estimation/VCMDigitalSurfaceLocalEstimator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/VCMGeometricFunctors.h b/src/DGtal/geometry/surfaces/estimation/VCMGeometricFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/VoronoiCovarianceMeasureOnDigitalSurface.h b/src/DGtal/geometry/surfaces/estimation/VoronoiCovarianceMeasureOnDigitalSurface.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/VoronoiCovarianceMeasureOnDigitalSurface.ih b/src/DGtal/geometry/surfaces/estimation/VoronoiCovarianceMeasureOnDigitalSurface.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/BasicEstimatorFromSurfelsFunctors.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/BasicEstimatorFromSurfelsFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/CLocalEstimatorFromSurfelFunctor.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/CLocalEstimatorFromSurfelFunctor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/ElementaryConvolutionNormalVectorEstimator.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/ElementaryConvolutionNormalVectorEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/LinearLeastSquareFittingNormalVectorEstimator.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/LinearLeastSquareFittingNormalVectorEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingGaussianCurvatureEstimator.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingGaussianCurvatureEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingMeanCurvatureEstimator.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingMeanCurvatureEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingNormalVectorEstimator.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingNormalVectorEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingPrincipalCurvaturesEstimator.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingPrincipalCurvaturesEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/SphereFittingEstimator.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/SphereFittingEstimator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/surfaces/estimation/estimationFunctors/TensorVotingFeatureExtraction.h b/src/DGtal/geometry/surfaces/estimation/estimationFunctors/TensorVotingFeatureExtraction.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/Preimage2D.h b/src/DGtal/geometry/tools/Preimage2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/Preimage2D.ih b/src/DGtal/geometry/tools/Preimage2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/RayIntersectionPredicates.h b/src/DGtal/geometry/tools/RayIntersectionPredicates.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/SpatialCubicalSubdivision.h b/src/DGtal/geometry/tools/SpatialCubicalSubdivision.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/SpatialCubicalSubdivision.ih b/src/DGtal/geometry/tools/SpatialCubicalSubdivision.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/SphericalAccumulator.h b/src/DGtal/geometry/tools/SphericalAccumulator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/SphericalAccumulator.ih b/src/DGtal/geometry/tools/SphericalAccumulator.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/AvnaimEtAl2x2DetSignComputer.h b/src/DGtal/geometry/tools/determinant/AvnaimEtAl2x2DetSignComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/AvnaimEtAl2x2DetSignComputer.ih b/src/DGtal/geometry/tools/determinant/AvnaimEtAl2x2DetSignComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/C2x2DetComputer.h b/src/DGtal/geometry/tools/determinant/C2x2DetComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/COrientationFunctor.h b/src/DGtal/geometry/tools/determinant/COrientationFunctor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/COrientationFunctor2.h b/src/DGtal/geometry/tools/determinant/COrientationFunctor2.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/Filtered2x2DetComputer.h b/src/DGtal/geometry/tools/determinant/Filtered2x2DetComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/Filtered2x2DetComputer.ih b/src/DGtal/geometry/tools/determinant/Filtered2x2DetComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/InGeneralizedDiskOfGivenRadius.h b/src/DGtal/geometry/tools/determinant/InGeneralizedDiskOfGivenRadius.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/InGeneralizedDiskOfGivenRadius.ih b/src/DGtal/geometry/tools/determinant/InGeneralizedDiskOfGivenRadius.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/InHalfPlaneBy2x2DetComputer.h b/src/DGtal/geometry/tools/determinant/InHalfPlaneBy2x2DetComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/InHalfPlaneBy2x2DetComputer.ih b/src/DGtal/geometry/tools/determinant/InHalfPlaneBy2x2DetComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.h b/src/DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.ih b/src/DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/PredicateFromOrientationFunctor2.h b/src/DGtal/geometry/tools/determinant/PredicateFromOrientationFunctor2.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/PredicateFromOrientationFunctor2.ih b/src/DGtal/geometry/tools/determinant/PredicateFromOrientationFunctor2.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/Simple2x2DetComputer.h b/src/DGtal/geometry/tools/determinant/Simple2x2DetComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/Simple2x2DetComputer.ih b/src/DGtal/geometry/tools/determinant/Simple2x2DetComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/SimpleIncremental2x2DetComputer.h b/src/DGtal/geometry/tools/determinant/SimpleIncremental2x2DetComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/tools/determinant/SimpleIncremental2x2DetComputer.ih b/src/DGtal/geometry/tools/determinant/SimpleIncremental2x2DetComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/KanungoNoise.h b/src/DGtal/geometry/volumes/KanungoNoise.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/KanungoNoise.ih b/src/DGtal/geometry/volumes/KanungoNoise.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/CDigitalMetricSpace.h b/src/DGtal/geometry/volumes/distance/CDigitalMetricSpace.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/CMetricSpace.h b/src/DGtal/geometry/volumes/distance/CMetricSpace.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/CPowerMetric.h b/src/DGtal/geometry/volumes/distance/CPowerMetric.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/CPowerSeparableMetric.h b/src/DGtal/geometry/volumes/distance/CPowerSeparableMetric.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/CSeparableMetric.h b/src/DGtal/geometry/volumes/distance/CSeparableMetric.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/ChamferNorm2D.h b/src/DGtal/geometry/volumes/distance/ChamferNorm2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/ChamferNorm2D.ih b/src/DGtal/geometry/volumes/distance/ChamferNorm2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/DigitalMetricAdapter.h b/src/DGtal/geometry/volumes/distance/DigitalMetricAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/DistanceTransformation.h b/src/DGtal/geometry/volumes/distance/DistanceTransformation.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/ExactPredicateLpPowerSeparableMetric.h b/src/DGtal/geometry/volumes/distance/ExactPredicateLpPowerSeparableMetric.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/ExactPredicateLpPowerSeparableMetric.ih b/src/DGtal/geometry/volumes/distance/ExactPredicateLpPowerSeparableMetric.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h b/src/DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.ih b/src/DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/FMM.h b/src/DGtal/geometry/volumes/distance/FMM.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/FMM.ih b/src/DGtal/geometry/volumes/distance/FMM.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/FMMPointFunctors.h b/src/DGtal/geometry/volumes/distance/FMMPointFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/FMMPointFunctors.ih b/src/DGtal/geometry/volumes/distance/FMMPointFunctors.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/InexactPredicateLpSeparableMetric.h b/src/DGtal/geometry/volumes/distance/InexactPredicateLpSeparableMetric.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/InexactPredicateLpSeparableMetric.ih b/src/DGtal/geometry/volumes/distance/InexactPredicateLpSeparableMetric.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/PowerMap.h b/src/DGtal/geometry/volumes/distance/PowerMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/PowerMap.ih b/src/DGtal/geometry/volumes/distance/PowerMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/ReducedMedialAxis.h b/src/DGtal/geometry/volumes/distance/ReducedMedialAxis.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/ReverseDistanceTransformation.h b/src/DGtal/geometry/volumes/distance/ReverseDistanceTransformation.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/SeparableMetricAdapter.h b/src/DGtal/geometry/volumes/distance/SeparableMetricAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/SeparableMetricAdapter.ih b/src/DGtal/geometry/volumes/distance/SeparableMetricAdapter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/VoronoiMap.h b/src/DGtal/geometry/volumes/distance/VoronoiMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/distance/VoronoiMap.ih b/src/DGtal/geometry/volumes/distance/VoronoiMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/estimation/Measure.h b/src/DGtal/geometry/volumes/estimation/Measure.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/estimation/Measure.ih b/src/DGtal/geometry/volumes/estimation/Measure.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/estimation/VoronoiCovarianceMeasure.h b/src/DGtal/geometry/volumes/estimation/VoronoiCovarianceMeasure.h old mode 100644 new mode 100755 diff --git a/src/DGtal/geometry/volumes/estimation/VoronoiCovarianceMeasure.ih b/src/DGtal/geometry/volumes/estimation/VoronoiCovarianceMeasure.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/BreadthFirstVisitor.h b/src/DGtal/graph/BreadthFirstVisitor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/BreadthFirstVisitor.ih b/src/DGtal/graph/BreadthFirstVisitor.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/CGraphVisitor.h b/src/DGtal/graph/CGraphVisitor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/CUndirectedSimpleGraph.h b/src/DGtal/graph/CUndirectedSimpleGraph.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/CUndirectedSimpleLocalGraph.h b/src/DGtal/graph/CUndirectedSimpleLocalGraph.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/CVertexMap.h b/src/DGtal/graph/CVertexMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/CVertexPredicate.h b/src/DGtal/graph/CVertexPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/CVertexPredicateArchetype.h b/src/DGtal/graph/CVertexPredicateArchetype.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/DepthFirstVisitor.h b/src/DGtal/graph/DepthFirstVisitor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/DepthFirstVisitor.ih b/src/DGtal/graph/DepthFirstVisitor.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/DigitalSurfaceBoostGraphInterface.h b/src/DGtal/graph/DigitalSurfaceBoostGraphInterface.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/DigitalSurfaceBoostGraphInterface.ih b/src/DGtal/graph/DigitalSurfaceBoostGraphInterface.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/DistanceBreadthFirstVisitor.h b/src/DGtal/graph/DistanceBreadthFirstVisitor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/DistanceBreadthFirstVisitor.ih b/src/DGtal/graph/DistanceBreadthFirstVisitor.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/Expander.h b/src/DGtal/graph/Expander.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/Expander.ih b/src/DGtal/graph/Expander.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/GraphVisitorRange.h b/src/DGtal/graph/GraphVisitorRange.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/GraphVisitorRange.ih b/src/DGtal/graph/GraphVisitorRange.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/STLMapToVertexMapAdapter.h b/src/DGtal/graph/STLMapToVertexMapAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/doc/images/graphTraversal-bfs.png b/src/DGtal/graph/doc/images/graphTraversal-bfs.png old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/doc/images/graphTraversal-dfs-range.png b/src/DGtal/graph/doc/images/graphTraversal-dfs-range.png old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/doc/images/graphTraversal-enum.png b/src/DGtal/graph/doc/images/graphTraversal-enum.png old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/doc/images/volDistanceTraversal-cat10.png b/src/DGtal/graph/doc/images/volDistanceTraversal-cat10.png old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/doc/moduleBoostGraphWrapping.dox b/src/DGtal/graph/doc/moduleBoostGraphWrapping.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/doc/moduleGraphDefinitions.dox b/src/DGtal/graph/doc/moduleGraphDefinitions.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/doc/packageGraph.dox b/src/DGtal/graph/doc/packageGraph.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/graph/doc/packageGraphConcepts.dox b/src/DGtal/graph/doc/packageGraphConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/helpers/StdDefs.h b/src/DGtal/helpers/StdDefs.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/CConstImage.h b/src/DGtal/images/CConstImage.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/CImage.h b/src/DGtal/images/CImage.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/CImageCacheReadPolicy.h b/src/DGtal/images/CImageCacheReadPolicy.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/CImageCacheWritePolicy.h b/src/DGtal/images/CImageCacheWritePolicy.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/CImageFactory.h b/src/DGtal/images/CImageFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/CTrivialConstImage.h b/src/DGtal/images/CTrivialConstImage.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/CTrivialImage.h b/src/DGtal/images/CTrivialImage.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ConstImageAdapter.h b/src/DGtal/images/ConstImageAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ConstImageAdapter.ih b/src/DGtal/images/ConstImageAdapter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/DefaultConstImageRange.h b/src/DGtal/images/DefaultConstImageRange.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/DefaultImageRange.h b/src/DGtal/images/DefaultImageRange.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/Image.h b/src/DGtal/images/Image.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/Image.ih b/src/DGtal/images/Image.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageAdapter.h b/src/DGtal/images/ImageAdapter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageAdapter.ih b/src/DGtal/images/ImageAdapter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageCache.h b/src/DGtal/images/ImageCache.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageCache.ih b/src/DGtal/images/ImageCache.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageCachePolicies.h b/src/DGtal/images/ImageCachePolicies.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageCachePolicies.ih b/src/DGtal/images/ImageCachePolicies.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageContainerByHashTree.h b/src/DGtal/images/ImageContainerByHashTree.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageContainerByHashTree.ih b/src/DGtal/images/ImageContainerByHashTree.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageContainerByITKImage.h b/src/DGtal/images/ImageContainerByITKImage.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageContainerByITKImage.ih b/src/DGtal/images/ImageContainerByITKImage.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageContainerBySTLMap.h b/src/DGtal/images/ImageContainerBySTLMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageContainerBySTLMap.ih b/src/DGtal/images/ImageContainerBySTLMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageContainerBySTLVector.h b/src/DGtal/images/ImageContainerBySTLVector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageContainerBySTLVector.ih b/src/DGtal/images/ImageContainerBySTLVector.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageFactoryFromHDF5.h b/src/DGtal/images/ImageFactoryFromHDF5.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageFactoryFromHDF5.ih b/src/DGtal/images/ImageFactoryFromHDF5.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageFactoryFromImage.h b/src/DGtal/images/ImageFactoryFromImage.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageFactoryFromImage.ih b/src/DGtal/images/ImageFactoryFromImage.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageHelper.h b/src/DGtal/images/ImageHelper.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageHelper.ih b/src/DGtal/images/ImageHelper.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageLinearCellEmbedder.h b/src/DGtal/images/ImageLinearCellEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageLinearCellEmbedder.ih b/src/DGtal/images/ImageLinearCellEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageSelector.h b/src/DGtal/images/ImageSelector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/ImageSelector.ih b/src/DGtal/images/ImageSelector.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/IntervalForegroundPredicate.h b/src/DGtal/images/IntervalForegroundPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/Morton.h b/src/DGtal/images/Morton.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/Morton.ih b/src/DGtal/images/Morton.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/RigidTransformation2D.h b/src/DGtal/images/RigidTransformation2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/RigidTransformation3D.h b/src/DGtal/images/RigidTransformation3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/SetValueIterator.h b/src/DGtal/images/SetValueIterator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/SimpleThresholdForegroundPredicate.h b/src/DGtal/images/SimpleThresholdForegroundPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/TiledImage.h b/src/DGtal/images/TiledImage.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/TiledImage.ih b/src/DGtal/images/TiledImage.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-01-read.png b/src/DGtal/images/doc/images/TiledImageFromImage-01-read.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-03-read.png b/src/DGtal/images/doc/images/TiledImageFromImage-03-read.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-05-write.png b/src/DGtal/images/doc/images/TiledImageFromImage-05-write.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-07-read.png b/src/DGtal/images/doc/images/TiledImageFromImage-07-read.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-09-read.png b/src/DGtal/images/doc/images/TiledImageFromImage-09-read.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-11-write.png b/src/DGtal/images/doc/images/TiledImageFromImage-11-write.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-domain-01.png b/src/DGtal/images/doc/images/TiledImageFromImage-domain-01.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-domain-02.png b/src/DGtal/images/doc/images/TiledImageFromImage-domain-02.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-domain-03.png b/src/DGtal/images/doc/images/TiledImageFromImage-domain-03.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-domain-04.png b/src/DGtal/images/doc/images/TiledImageFromImage-domain-04.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-domain-05.png b/src/DGtal/images/doc/images/TiledImageFromImage-domain-05.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-domain-06.png b/src/DGtal/images/doc/images/TiledImageFromImage-domain-06.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-domain-07.png b/src/DGtal/images/doc/images/TiledImageFromImage-domain-07.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/TiledImageFromImage-domain-08.png b/src/DGtal/images/doc/images/TiledImageFromImage-domain-08.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/cat10_backward.jpg b/src/DGtal/images/doc/images/cat10_backward.jpg old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/cat10_forward.jpg b/src/DGtal/images/doc/images/cat10_forward.jpg old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/church_backward.jpg b/src/DGtal/images/doc/images/church_backward.jpg old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/church_forward.jpg b/src/DGtal/images/doc/images/church_forward.jpg old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/image.png b/src/DGtal/images/doc/images/image.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/itkLogo.jpg b/src/DGtal/images/doc/images/itkLogo.jpg old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/itkLogo.png b/src/DGtal/images/doc/images/itkLogo.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/lobster2DExtract.png b/src/DGtal/images/doc/images/lobster2DExtract.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/lobsterSliceZ_20.png b/src/DGtal/images/doc/images/lobsterSliceZ_20.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/lobsterVisu3DSlicesZ.png b/src/DGtal/images/doc/images/lobsterVisu3DSlicesZ.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/logImage.png b/src/DGtal/images/doc/images/logImage.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/specificImage.png b/src/DGtal/images/doc/images/specificImage.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/subImage.png b/src/DGtal/images/doc/images/subImage.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/thresholderImage.png b/src/DGtal/images/doc/images/thresholderImage.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/tiledImageFromImage-image.png b/src/DGtal/images/doc/images/tiledImageFromImage-image.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/images/tiledImageFromImage-image2.png b/src/DGtal/images/doc/images/tiledImageFromImage-image2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/moduleBigImages.dox b/src/DGtal/images/doc/moduleBigImages.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/moduleGeometricalTransformation.dox b/src/DGtal/images/doc/moduleGeometricalTransformation.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/moduleImages.dox b/src/DGtal/images/doc/moduleImages.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/packageImage.dox b/src/DGtal/images/doc/packageImage.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/images/doc/packageImageConcepts.dox b/src/DGtal/images/doc/packageImageConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/images/imagesSetsUtils/ImageFromSet.h b/src/DGtal/images/imagesSetsUtils/ImageFromSet.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/imagesSetsUtils/ImageFromSet.ih b/src/DGtal/images/imagesSetsUtils/ImageFromSet.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/images/imagesSetsUtils/SetFromImage.h b/src/DGtal/images/imagesSetsUtils/SetFromImage.h old mode 100644 new mode 100755 diff --git a/src/DGtal/images/imagesSetsUtils/SetFromImage.ih b/src/DGtal/images/imagesSetsUtils/SetFromImage.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/CDrawableWithDisplay3D.h b/src/DGtal/io/CDrawableWithDisplay3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Color.cpp b/src/DGtal/io/Color.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Color.h b/src/DGtal/io/Color.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Color.ih b/src/DGtal/io/Color.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Display2DFactory.h b/src/DGtal/io/Display2DFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Display2DFactory.ih b/src/DGtal/io/Display2DFactory.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Display3D.h b/src/DGtal/io/Display3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Display3D.ih b/src/DGtal/io/Display3D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Display3DFactory.h b/src/DGtal/io/Display3DFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Display3DFactory.ih b/src/DGtal/io/Display3DFactory.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/DrawWithDisplay3DModifier.h b/src/DGtal/io/DrawWithDisplay3DModifier.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/DrawWithDisplay3DModifier.ih b/src/DGtal/io/DrawWithDisplay3DModifier.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/ITKIOTrait.h b/src/DGtal/io/ITKIOTrait.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/ModuleSRC.txt b/src/DGtal/io/ModuleSRC.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Style2DFactory.h b/src/DGtal/io/Style2DFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/Style2DFactory.ih b/src/DGtal/io/Style2DFactory.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board2D.cpp b/src/DGtal/io/boards/Board2D.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board2D.h b/src/DGtal/io/boards/Board2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board2D.ih b/src/DGtal/io/boards/Board2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board3D.cpp b/src/DGtal/io/boards/Board3D.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board3D.h b/src/DGtal/io/boards/Board3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board3D.ih b/src/DGtal/io/boards/Board3D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board3DTo2D.cpp b/src/DGtal/io/boards/Board3DTo2D.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board3DTo2D.h b/src/DGtal/io/boards/Board3DTo2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board3DTo2D.ih b/src/DGtal/io/boards/Board3DTo2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board3DTo2DFactory.h b/src/DGtal/io/boards/Board3DTo2DFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/Board3DTo2DFactory.ih b/src/DGtal/io/boards/Board3DTo2DFactory.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/CDrawableWithBoard2D.h b/src/DGtal/io/boards/CDrawableWithBoard2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/CDrawableWithBoard3DTo2D.h b/src/DGtal/io/boards/CDrawableWithBoard3DTo2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/DrawWithBoard3DTo2DModifier.h b/src/DGtal/io/boards/DrawWithBoard3DTo2DModifier.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/boards/DrawWithBoard3DTo2DModifier.ih b/src/DGtal/io/boards/DrawWithBoard3DTo2DModifier.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/BasicColorToScalarFunctors.h b/src/DGtal/io/colormaps/BasicColorToScalarFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/CColorMap.h b/src/DGtal/io/colormaps/CColorMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/ColorBrightnessColorMap.h b/src/DGtal/io/colormaps/ColorBrightnessColorMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/ColorBrightnessColorMap.ih b/src/DGtal/io/colormaps/ColorBrightnessColorMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/GradientColorMap.h b/src/DGtal/io/colormaps/GradientColorMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/GradientColorMap.ih b/src/DGtal/io/colormaps/GradientColorMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/GrayscaleColorMap.h b/src/DGtal/io/colormaps/GrayscaleColorMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/GrayscaleColorMap.ih b/src/DGtal/io/colormaps/GrayscaleColorMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/HueShadeColorMap.h b/src/DGtal/io/colormaps/HueShadeColorMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/HueShadeColorMap.ih b/src/DGtal/io/colormaps/HueShadeColorMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/RandomColorMap.h b/src/DGtal/io/colormaps/RandomColorMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/RandomColorMap.ih b/src/DGtal/io/colormaps/RandomColorMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/TickedColorMap.h b/src/DGtal/io/colormaps/TickedColorMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/colormaps/TickedColorMap.ih b/src/DGtal/io/colormaps/TickedColorMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/colormaps.png b/src/DGtal/io/doc/images/colormaps.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3D-1-points.png b/src/DGtal/io/doc/images/dgtalBoard3D-1-points.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3D-2-ks.png b/src/DGtal/io/doc/images/dgtalBoard3D-2-ks.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3D-6-clipping.png b/src/DGtal/io/doc/images/dgtalBoard3D-6-clipping.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3DTo2D-1-points.png b/src/DGtal/io/doc/images/dgtalBoard3DTo2D-1-points.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3DTo2D-2-sets.png b/src/DGtal/io/doc/images/dgtalBoard3DTo2D-2-sets.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3DTo2D-2bis-sets-wireframe.png b/src/DGtal/io/doc/images/dgtalBoard3DTo2D-2bis-sets-wireframe.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3DTo2D-3-objects.png b/src/DGtal/io/doc/images/dgtalBoard3DTo2D-3-objects.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3DTo2D-5-custom-wireframe.png b/src/DGtal/io/doc/images/dgtalBoard3DTo2D-5-custom-wireframe.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3DTo2D-5-custom.png b/src/DGtal/io/doc/images/dgtalBoard3DTo2D-5-custom.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3DTo2D-6.png b/src/DGtal/io/doc/images/dgtalBoard3DTo2D-6.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalBoard3DTo2D-KSCell.png b/src/DGtal/io/doc/images/dgtalBoard3DTo2D-KSCell.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalboard-1-points.png b/src/DGtal/io/doc/images/dgtalboard-1-points.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalboard-2-sets-1.png b/src/DGtal/io/doc/images/dgtalboard-2-sets-1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalboard-2-sets-2.png b/src/DGtal/io/doc/images/dgtalboard-2-sets-2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalboard-2-sets-3.png b/src/DGtal/io/doc/images/dgtalboard-2-sets-3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalboard-3-custom-classes.png b/src/DGtal/io/doc/images/dgtalboard-3-custom-classes.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalboard-3-custom-points.png b/src/DGtal/io/doc/images/dgtalboard-3-custom-points.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalboard-4-colormaps.png b/src/DGtal/io/doc/images/dgtalboard-4-colormaps.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/dgtalboard-5-greedy-dss.png b/src/DGtal/io/doc/images/dgtalboard-5-greedy-dss.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/logo_Board.png b/src/DGtal/io/doc/images/logo_Board.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/simple3dVisu1.png b/src/DGtal/io/doc/images/simple3dVisu1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/simple3dVisu2.png b/src/DGtal/io/doc/images/simple3dVisu2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/testTicked-gradient-regular.png b/src/DGtal/io/doc/images/testTicked-gradient-regular.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/view3D-4bis-illustrationMode.png b/src/DGtal/io/doc/images/view3D-4bis-illustrationMode.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/viewer3D-10-interaction.png b/src/DGtal/io/doc/images/viewer3D-10-interaction.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/viewer3D-4-modes.png b/src/DGtal/io/doc/images/viewer3D-4-modes.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/viewer3D-8.png b/src/DGtal/io/doc/images/viewer3D-8.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/viewer3D-8Color.png b/src/DGtal/io/doc/images/viewer3D-8Color.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/viewer3D-8Ex.png b/src/DGtal/io/doc/images/viewer3D-8Ex.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/viewer3D-8InterGrid.png b/src/DGtal/io/doc/images/viewer3D-8InterGrid.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/viewer3D-8bis.png b/src/DGtal/io/doc/images/viewer3D-8bis.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/viewer3D-9.png b/src/DGtal/io/doc/images/viewer3D-9.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visu18-6Adj.png b/src/DGtal/io/doc/images/visu18-6Adj.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visu3dKSSurfaceExtractionExportPDF.png b/src/DGtal/io/doc/images/visu3dKSSurfaceExtractionExportPDF.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visu6-18Adj.png b/src/DGtal/io/doc/images/visu6-18Adj.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuBorderExtraction.png b/src/DGtal/io/doc/images/visuBorderExtraction.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuBorderExtraction2.png b/src/DGtal/io/doc/images/visuBorderExtraction2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuClipping1.png b/src/DGtal/io/doc/images/visuClipping1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuClipping2.png b/src/DGtal/io/doc/images/visuClipping2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuClippingAll.png b/src/DGtal/io/doc/images/visuClippingAll.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuDigitalSet3D.png b/src/DGtal/io/doc/images/visuDigitalSet3D.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuDisplay3DToOFF.png b/src/DGtal/io/doc/images/visuDisplay3DToOFF.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuImportOFF.png b/src/DGtal/io/doc/images/visuImportOFF.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuModeCustom.png b/src/DGtal/io/doc/images/visuModeCustom.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuModeDefault.png b/src/DGtal/io/doc/images/visuModeDefault.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuModeGridVoxel.png b/src/DGtal/io/doc/images/visuModeGridVoxel.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuModePavingDomain.png b/src/DGtal/io/doc/images/visuModePavingDomain.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuModePavingGridsDomain.png b/src/DGtal/io/doc/images/visuModePavingGridsDomain.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuPointList.png b/src/DGtal/io/doc/images/visuPointList.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuThinning.png b/src/DGtal/io/doc/images/visuThinning.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuTrefExample.png b/src/DGtal/io/doc/images/visuTrefExample.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuVol3D.png b/src/DGtal/io/doc/images/visuVol3D.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/images/visuVol3Dclipping.png b/src/DGtal/io/doc/images/visuVol3Dclipping.png old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/moduleBoard2D.dox b/src/DGtal/io/doc/moduleBoard2D.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/moduleDisplay3D.dox b/src/DGtal/io/doc/moduleDisplay3D.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/moduleIO.dox b/src/DGtal/io/doc/moduleIO.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/moduleQGLInteraction.dox b/src/DGtal/io/doc/moduleQGLInteraction.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/io/doc/packageIO.dox b/src/DGtal/io/doc/packageIO.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/DicomReader.h b/src/DGtal/io/readers/DicomReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/DicomReader.ih b/src/DGtal/io/readers/DicomReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/GenericReader.h b/src/DGtal/io/readers/GenericReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/GenericReader.ih b/src/DGtal/io/readers/GenericReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/HDF5Reader.h b/src/DGtal/io/readers/HDF5Reader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/HDF5Reader.ih b/src/DGtal/io/readers/HDF5Reader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/ITKReader.h b/src/DGtal/io/readers/ITKReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/ITKReader.ih b/src/DGtal/io/readers/ITKReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/LongvolReader.h b/src/DGtal/io/readers/LongvolReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/LongvolReader.ih b/src/DGtal/io/readers/LongvolReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/MPolynomialReader.h b/src/DGtal/io/readers/MPolynomialReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/MPolynomialReader.ih b/src/DGtal/io/readers/MPolynomialReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/MagickReader.h b/src/DGtal/io/readers/MagickReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/MagickReader.ih b/src/DGtal/io/readers/MagickReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/MeshReader.h b/src/DGtal/io/readers/MeshReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/MeshReader.ih b/src/DGtal/io/readers/MeshReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/PGMReader.h b/src/DGtal/io/readers/PGMReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/PGMReader.ih b/src/DGtal/io/readers/PGMReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/PPMReader.h b/src/DGtal/io/readers/PPMReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/PPMReader.ih b/src/DGtal/io/readers/PPMReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/PointListReader.h b/src/DGtal/io/readers/PointListReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/PointListReader.ih b/src/DGtal/io/readers/PointListReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/RawReader.h b/src/DGtal/io/readers/RawReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/RawReader.ih b/src/DGtal/io/readers/RawReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/TableReader.h b/src/DGtal/io/readers/TableReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/TableReader.ih b/src/DGtal/io/readers/TableReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/VolReader.h b/src/DGtal/io/readers/VolReader.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/readers/VolReader.ih b/src/DGtal/io/readers/VolReader.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/viewers/CDrawableWithViewer3D.h b/src/DGtal/io/viewers/CDrawableWithViewer3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/viewers/DrawWithViewer3DModifier.h b/src/DGtal/io/viewers/DrawWithViewer3DModifier.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/viewers/Viewer3D.h b/src/DGtal/io/viewers/Viewer3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/viewers/Viewer3D.ih b/src/DGtal/io/viewers/Viewer3D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/viewers/Viewer3DFactory.h b/src/DGtal/io/viewers/Viewer3DFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/viewers/Viewer3DFactory.ih b/src/DGtal/io/viewers/Viewer3DFactory.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/viewers/windows/GL/glext.h b/src/DGtal/io/viewers/windows/GL/glext.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/GenericWriter.h b/src/DGtal/io/writers/GenericWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/GenericWriter.ih b/src/DGtal/io/writers/GenericWriter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/HDF5Writer.h b/src/DGtal/io/writers/HDF5Writer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/HDF5Writer.ih b/src/DGtal/io/writers/HDF5Writer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/ITKWriter.h b/src/DGtal/io/writers/ITKWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/ITKWriter.ih b/src/DGtal/io/writers/ITKWriter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/LongvolWriter.h b/src/DGtal/io/writers/LongvolWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/LongvolWriter.ih b/src/DGtal/io/writers/LongvolWriter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/MeshWriter.h b/src/DGtal/io/writers/MeshWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/MeshWriter.ih b/src/DGtal/io/writers/MeshWriter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/PGMWriter.h b/src/DGtal/io/writers/PGMWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/PGMWriter.ih b/src/DGtal/io/writers/PGMWriter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/PPMWriter.h b/src/DGtal/io/writers/PPMWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/PPMWriter.ih b/src/DGtal/io/writers/PPMWriter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/RawWriter.h b/src/DGtal/io/writers/RawWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/RawWriter.ih b/src/DGtal/io/writers/RawWriter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/VolWriter.h b/src/DGtal/io/writers/VolWriter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/io/writers/VolWriter.ih b/src/DGtal/io/writers/VolWriter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/BasicPointFunctors.h b/src/DGtal/kernel/BasicPointFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/BasicPointFunctors.ih b/src/DGtal/kernel/BasicPointFunctors.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/BasicPointPredicates.h b/src/DGtal/kernel/BasicPointPredicates.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/BasicPointPredicates.ih b/src/DGtal/kernel/BasicPointPredicates.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CBoundedNumber.h b/src/DGtal/kernel/CBoundedNumber.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CCommutativeRing.h b/src/DGtal/kernel/CCommutativeRing.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CEuclideanRing.h b/src/DGtal/kernel/CEuclideanRing.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CInteger.h b/src/DGtal/kernel/CInteger.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CIntegralNumber.h b/src/DGtal/kernel/CIntegralNumber.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CPointEmbedder.h b/src/DGtal/kernel/CPointEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CPointFunctor.h b/src/DGtal/kernel/CPointFunctor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CPointPredicate.h b/src/DGtal/kernel/CPointPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CSignedNumber.h b/src/DGtal/kernel/CSignedNumber.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CSpace.h b/src/DGtal/kernel/CSpace.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CUnsignedNumber.h b/src/DGtal/kernel/CUnsignedNumber.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CWithGradientMap.h b/src/DGtal/kernel/CWithGradientMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CanonicEmbedder.h b/src/DGtal/kernel/CanonicEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/CanonicEmbedder.ih b/src/DGtal/kernel/CanonicEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/LinearAlgebra.h b/src/DGtal/kernel/LinearAlgebra.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/LinearAlgebra.ih b/src/DGtal/kernel/LinearAlgebra.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/ModuleSRC.txt b/src/DGtal/kernel/ModuleSRC.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/NumberTraits.cpp b/src/DGtal/kernel/NumberTraits.cpp old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/NumberTraits.h b/src/DGtal/kernel/NumberTraits.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/NumberTraits.ih b/src/DGtal/kernel/NumberTraits.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/Point2ScalarFunctors.h b/src/DGtal/kernel/Point2ScalarFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/Point2ScalarFunctors.ih b/src/DGtal/kernel/Point2ScalarFunctors.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/PointHashFunctions.h b/src/DGtal/kernel/PointHashFunctions.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/PointVector.h b/src/DGtal/kernel/PointVector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/PointVector.ih b/src/DGtal/kernel/PointVector.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/RegularPointEmbedder.h b/src/DGtal/kernel/RegularPointEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/RegularPointEmbedder.ih b/src/DGtal/kernel/RegularPointEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/SpaceND.h b/src/DGtal/kernel/SpaceND.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/images/imageBasicSubsamplingExample.png b/src/DGtal/kernel/doc/images/imageBasicSubsamplingExample.png old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/images/kernel-domain-it-arrow.png b/src/DGtal/kernel/doc/images/kernel-domain-it-arrow.png old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/images/kernel-domain-it.png b/src/DGtal/kernel/doc/images/kernel-domain-it.png old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/images/kernel-domain-point.png b/src/DGtal/kernel/doc/images/kernel-domain-point.png old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/images/kernel-domain.png b/src/DGtal/kernel/doc/images/kernel-domain.png old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/moduleDigitalSets.dox b/src/DGtal/kernel/doc/moduleDigitalSets.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/moduleNumber.dox b/src/DGtal/kernel/doc/moduleNumber.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/moduleSpacePointVectorDomain.dox b/src/DGtal/kernel/doc/moduleSpacePointVectorDomain.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/packageKernel.dox b/src/DGtal/kernel/doc/packageKernel.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/doc/packageKernelConcepts.dox b/src/DGtal/kernel/doc/packageKernelConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/CDomain.h b/src/DGtal/kernel/domains/CDomain.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/CDomainArchetype.h b/src/DGtal/kernel/domains/CDomainArchetype.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/DomainPredicate.h b/src/DGtal/kernel/domains/DomainPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/DomainPredicate.ih b/src/DGtal/kernel/domains/DomainPredicate.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/HyperRectDomain.h b/src/DGtal/kernel/domains/HyperRectDomain.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/HyperRectDomain.ih b/src/DGtal/kernel/domains/HyperRectDomain.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/HyperRectDomain_Iterator.h b/src/DGtal/kernel/domains/HyperRectDomain_Iterator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/Linearizer.h b/src/DGtal/kernel/domains/Linearizer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/domains/Linearizer.ih b/src/DGtal/kernel/domains/Linearizer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/CDigitalSet.h b/src/DGtal/kernel/sets/CDigitalSet.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/CDigitalSetArchetype.h b/src/DGtal/kernel/sets/CDigitalSetArchetype.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetByAssociativeContainer.h b/src/DGtal/kernel/sets/DigitalSetByAssociativeContainer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetByAssociativeContainer.ih b/src/DGtal/kernel/sets/DigitalSetByAssociativeContainer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetBySTLSet.h b/src/DGtal/kernel/sets/DigitalSetBySTLSet.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetBySTLSet.ih b/src/DGtal/kernel/sets/DigitalSetBySTLSet.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetBySTLVector.h b/src/DGtal/kernel/sets/DigitalSetBySTLVector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetBySTLVector.ih b/src/DGtal/kernel/sets/DigitalSetBySTLVector.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetConverter.h b/src/DGtal/kernel/sets/DigitalSetConverter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetConverter.ih b/src/DGtal/kernel/sets/DigitalSetConverter.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetDomain.h b/src/DGtal/kernel/sets/DigitalSetDomain.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetDomain.ih b/src/DGtal/kernel/sets/DigitalSetDomain.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetFromMap.h b/src/DGtal/kernel/sets/DigitalSetFromMap.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetFromMap.ih b/src/DGtal/kernel/sets/DigitalSetFromMap.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetInserter.h b/src/DGtal/kernel/sets/DigitalSetInserter.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetSelector.h b/src/DGtal/kernel/sets/DigitalSetSelector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/DigitalSetSelector.ih b/src/DGtal/kernel/sets/DigitalSetSelector.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/SetPredicate.h b/src/DGtal/kernel/sets/SetPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/kernel/sets/SetPredicate.ih b/src/DGtal/kernel/sets/SetPredicate.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/AngleComputer.h b/src/DGtal/math/AngleComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/AngleComputer.ih b/src/DGtal/math/AngleComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/AngleLinearMinimizer.cpp b/src/DGtal/math/AngleLinearMinimizer.cpp new file mode 100755 index 0000000000..e51e022629 --- /dev/null +++ b/src/DGtal/math/AngleLinearMinimizer.cpp @@ -0,0 +1,522 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file AngleLinearMinimizer.cpp + * + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5807), University of Savoie, France + * + * @author (backported from ImaGene by) Bertrand Kerautret (\c kerautre@loria.fr ) + * LORIA (CNRS, UMR 7503), University of Nancy, France + * + * @date 2011/08/31 + * + * Implementation of methods defined in AngleLinearMinimizer.h + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +#include "DGtal/math/AngleLinearMinimizer.h" +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// class AngleLinearMinimizer +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// Standard services - public : + + +DGtal::AngleLinearMinimizer::~AngleLinearMinimizer() +{ + reset(); +} + + +DGtal::AngleLinearMinimizer::AngleLinearMinimizer() + : myValues( 0 ) +{ +} + + +void +DGtal::AngleLinearMinimizer::reset() +{ + if ( myValues != 0 ) + { + delete[] myValues; + myValues = 0; + } + mySum = 0.0; + myMax = 0.0; +} + + +void +DGtal::AngleLinearMinimizer::init( unsigned int nbMax ) +{ + reset(); + myValues = new ValueInfo[ nbMax ]; + myMaxSize = nbMax; + mySize = nbMax; + myIsCurveOpen = false; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +// ------------------------- Optimization services -------------------------- + +double +DGtal::AngleLinearMinimizer::getEnergy( unsigned int i1, unsigned int i2 ) const +{ + ModuloComputer mc( size() ); + double E = 0.0; + for ( unsigned int i = mc.next( i1 ); i != i2; ) + { + unsigned int inext = mc.next( i ); + const ValueInfo & vi = this->ro( i ); + const ValueInfo & viprev = this->ro( mc.previous( i ) ); + double dev = AngleComputer::deviation( vi.value, viprev.value ); + E += (dev * dev) / viprev.distToNext; + i = inext; + } + return E; +} + + + +double +DGtal::AngleLinearMinimizer::getFormerEnergy( unsigned int i1, unsigned int i2 ) const +{ + ModuloComputer mc( size() ); + double E = 0.0; + for ( unsigned int i = mc.next( i1 ); i != i2; ) + { + unsigned int inext = mc.next( i ); + const ValueInfo & vi = this->ro( i ); + const ValueInfo & viprev = this->ro( mc.previous( i ) ); + double dev = AngleComputer::deviation( vi.oldValue, viprev.oldValue ); + E += (dev * dev) / viprev.distToNext; + i = inext; + } + return E; +} + + + + +std::vector +DGtal::AngleLinearMinimizer::getGradient() const +{ + ModuloComputer mc( size() ); + + std::vector grad( size() ); + for ( unsigned int i = 0; i < size(); i++ ) + { + unsigned int iprev = mc.previous( i ); + unsigned int inext = mc.next( i ); + const ValueInfo & vi = this->ro( i ); + double val = vi.value; + if ( myIsCurveOpen && ( i == ( size() - 1 ) ) ) + { // free extremity to the front/right. + const ValueInfo & viprev = this->ro( iprev ); + double valp = viprev.value; + grad[ i ] = 2.0 * AngleComputer::deviation( val, valp ) / viprev.distToNext; + } + else if ( myIsCurveOpen && ( i == 0 ) ) + { // free extremity to the back/left. + const ValueInfo & vinext = this->ro( inext ); + double valn = vinext.value; + grad[ i ] = -2.0 * AngleComputer::deviation( valn, val ) / vi.distToNext; + } + else + { // standard case. + const ValueInfo & viprev = this->ro( iprev ); + const ValueInfo & vinext = this->ro( inext ); + double valp = viprev.value; + double valn = vinext.value; + grad[ i ] = 2.0*( AngleComputer::deviation( val, valp ) / viprev.distToNext + - AngleComputer::deviation( valn, val ) / vi.distToNext ) ; + } + } + return grad; +} + + + + +std::vector +DGtal::AngleLinearMinimizer::getFormerGradient() const +{ + ModuloComputer< int> mc( size() ); + + std::vector grad( size() ); + for ( unsigned int i = 0; i < size(); i++ ) + { + unsigned int iprev = mc.previous( i ); + unsigned int inext = mc.next( i ); + const ValueInfo & vi = this->ro( i ); + double val = vi.oldValue; + if ( myIsCurveOpen && ( i == ( size() - 1 ) ) ) + { // free extremity to the front/right. + const ValueInfo & viprev = this->ro( iprev ); + double valp = viprev.oldValue; + grad[ i ] = 2.0 * AngleComputer::deviation( val, valp ) / viprev.distToNext; + } + else if ( myIsCurveOpen && ( i == 0 ) ) + { // free extremity to the back/left. + const ValueInfo & vinext = this->ro( inext ); + double valn = vinext.oldValue; + grad[ i ] = -2.0 * AngleComputer::deviation( valn, val ) / vi.distToNext; + } + else + { // standard case. + const ValueInfo & viprev = this->ro( iprev ); + const ValueInfo & vinext = this->ro( inext ); + double valp = viprev.oldValue; + double valn = vinext.oldValue; + grad[ i ] = 2.0*( AngleComputer::deviation( val, valp ) / viprev.distToNext + - AngleComputer::deviation( valn, val ) / vi.distToNext ) ; + } + } + return grad; +} + + +double +DGtal::AngleLinearMinimizer::optimize() +{ + return optimize( 0, 0 ); +} + + +double +DGtal::AngleLinearMinimizer::optimize( unsigned int i1, unsigned int i2 ) +{ + ASSERT( size() > 2 ); + ModuloComputer< int> mc( size() ); + + unsigned int i = i1; + // (I) first pass to work on old values. + do + { + ValueInfo & vi = this->rw( i ); + vi.oldValue = vi.value; + // go to next. + i = mc.next( i ); + } + while ( i != i2 ); + this->oneStep( i1, i2 ); + + mySum = 0.0; + myMax = 0.0; + i = i1; + do + { + const ValueInfo & vi = this->ro( i ); + double diff = fabs( AngleComputer::deviation( vi.value, vi.oldValue ) ); + if ( diff > myMax ) + myMax = diff; + mySum += diff; + i = mc.next( i ); + } + while ( i != i2 ); + + return mySum; +} + + +double +DGtal::AngleLinearMinimizer::lastDelta() const +{ + return max(); +} + + +void +DGtal::AngleLinearMinimizer::oneStep( unsigned int i1, unsigned int i2 ) +{ + ModuloComputer< int> mc( size() ); + + double mid; + unsigned int i = i1; + unsigned int iprev = mc.previous( i ); + do + { + unsigned int inext = mc.next( i ); + ValueInfo & vi = this->rw( i ); + if ( myIsCurveOpen && ( i == ( size() - 1 ) ) ) + { // free extremity to the front/right. + const ValueInfo & viprev = this->ro( iprev ); + mid = viprev.oldValue; // - viprev.delta; + } + else if ( myIsCurveOpen && ( i == 0 ) ) + { // free extremity to the back/left. + const ValueInfo & vinext = this->ro( inext ); + mid = vinext.oldValue; // + vi.delta; + } + else + { // standard case. + const ValueInfo & viprev = this->ro( iprev ); + const ValueInfo & vinext = this->ro( inext ); + double valp = viprev.oldValue; // - viprev.delta; + double valn = vinext.oldValue; // + vi.delta; + + // old + double y = AngleComputer::deviation( valn, valp ); + mid = ( viprev.distToNext * y ) + / ( vi.distToNext + viprev.distToNext ); + mid = AngleComputer::cast( mid + valp ); + + } + if ( AngleComputer::less( mid, vi.min ) ) mid = vi.min; + if ( AngleComputer::less( vi.max, mid ) ) mid = vi.max; + double mvt = AngleComputer::deviation( mid, vi.oldValue ); + vi.value = AngleComputer::cast( vi.oldValue + 0.5 * mvt ); + // go to next. + iprev = i; + i = inext; + } + while ( i != i2 ); + + +} + + + +void +DGtal::AngleLinearMinimizerByRelaxation::oneStep( unsigned int i1, unsigned int i2 ) +{ + ModuloComputer< int> mc( size() ); + + double mid; + unsigned int i = i1; + unsigned int iprev = mc.previous( i ); + do + { + unsigned int inext = mc.next( i ); + ValueInfo & vi = this->rw( i ); + // vi.oldValue = vi.value; + if ( myIsCurveOpen && ( i == ( size() - 1 ) ) ) + { // free extremity to the front/right. + const ValueInfo & viprev = this->ro( iprev ); + mid = viprev.value; // - viprev.delta; + } + else if ( myIsCurveOpen && ( i == 0 ) ) + { // free extremity to the back/left. + const ValueInfo & vinext = this->ro( inext ); + mid = vinext.oldValue; // + vi.delta; + } + else + { // standard case. + const ValueInfo & viprev = this->ro( iprev ); + const ValueInfo & vinext = this->ro( inext ); + double valp = viprev.value; // - viprev.delta; + double valn = vinext.value; + + // old + double y = AngleComputer::deviation( valn, valp ); + mid = ( viprev.distToNext * y ) + / ( vi.distToNext + viprev.distToNext ); + mid = AngleComputer::cast( mid + valp ); + } + if ( AngleComputer::less( mid, vi.min ) ) mid = vi.min; + if ( AngleComputer::less( vi.max, mid ) ) mid = vi.max; + vi.value = mid; + iprev = i; + i = inext; + } + while ( i != i2 ); +} + + + + +double +DGtal::AngleLinearMinimizerByRelaxation::lastDelta() const +{ + return max(); +} + + + +void +DGtal::AngleLinearMinimizerByGradientDescent::oneStep( unsigned int i1, unsigned int i2 ) +{ + ModuloComputer< int> mc( size() ); + + std::vector grad ( getFormerGradient() ); + double mid; + unsigned int i = i1; + do + { + unsigned int inext = mc.next( i ); + ValueInfo & vi = this->rw( i ); + double val = vi.oldValue; + mid = AngleComputer::cast( val - myStep*grad[ i ] ); + if ( AngleComputer::less( mid, vi.min ) ) mid = vi.min; + if ( AngleComputer::less( vi.max, mid ) ) mid = vi.max; + vi.value = mid; + // go to next. + i = inext; + } + while ( i != i2 ); +} + + + +double +DGtal::AngleLinearMinimizerByGradientDescent::lastDelta() const +{ + std::vector grad ( getFormerGradient() ); + double ninf = 0.0; + for ( unsigned int i = 0; i < size(); i++ ) + { + const ValueInfo & vi = this->ro( i ); + if ( vi.value != vi.oldValue ) + { + double n = fabs( grad[ i ] ); + if ( n > ninf ) ninf = n; + } + } + return ninf; +} + + + + +void +DGtal::AngleLinearMinimizerByAdaptiveStepGradientDescent::oneStep( unsigned int i1, unsigned int i2 ) +{ + ModuloComputer< int> mc( size() ); + std::vector grad ( getFormerGradient() ); + + double mid; + unsigned int i = i1; + do + { + unsigned int inext = mc.next( i ); + ValueInfo & vi = this->rw( i ); + double val = vi.oldValue; + mid = AngleComputer::cast( val - myStep*grad[ i ] ); + if ( AngleComputer::less( mid, vi.min ) ) mid = vi.min; + if ( AngleComputer::less( vi.max, mid ) ) mid = vi.max; + vi.value = mid; + // go to next. + i = inext; + } + while ( i != i2 ); + + double E1 = getFormerEnergy( i1, i2 ); + double E2 = getEnergy( i1, i2 ); + if ( E1 <= E2 ) + { + myStep /= 4.0; + } + else + { + /* doubling step. */ + myStep *= 2.0; + } +} + + + +double +DGtal::AngleLinearMinimizerByAdaptiveStepGradientDescent::lastDelta() const +{ + std::vector grad ( getFormerGradient() ); + double ninf = 0.0; + for ( unsigned int i = 0; i < size(); i++ ) + { + const ValueInfo & vi = this->ro( i ); + if ( vi.value != vi.oldValue ) + { + double n = fabs( grad[ i ] ); + if ( n > ninf ) ninf = n; + } + } + return ninf; +} + + + + +/////////////////////////////////////////////////////////////////////////////// +// Interface - public : + +/** + * Writes/Displays the object on an output stream. + * @param out the output stream where the object is written. + */ +void +DGtal::AngleLinearMinimizer::selfDisplay ( std::ostream & aStream ) const +{ + aStream << "[AngleLinearMinimizer::standard 0.5]"; +} + + +/** + * Writes/Displays the object on an output stream. + * @param aStream the output stream where the object is written. + */ +void +DGtal::AngleLinearMinimizerByRelaxation::selfDisplay( std::ostream & aStream ) const +{ + aStream << "[LinearMinimizer::relaxation]"; +} + +/** + * Writes/Displays the object on an output stream. + * @param aStream the output stream where the object is written. + */ +void +DGtal::AngleLinearMinimizerByGradientDescent::selfDisplay( std::ostream& aStream ) const +{ + aStream << "[LinearMinimizer::gradient descent " << myStep << "]"; +} + +/** + * Writes/Displays the object on an output stream. + * @param aStream the output stream where the object is written. + */ +void +DGtal::AngleLinearMinimizerByAdaptiveStepGradientDescent::selfDisplay( std::ostream& aStream ) const +{ + aStream << "[LinearMinimizer::gradient descent with adaptive step " << myStep << "]"; +} + +/** + * Checks the validity/consistency of the object. + * @return 'true' if the object is valid, 'false' otherwise. + */ +bool +DGtal::AngleLinearMinimizer::isValid() const +{ + return true; +} + + + +/////////////////////////////////////////////////////////////////////////////// +// Internals - private : + +// // +/////////////////////////////////////////////////////////////////////////////// diff --git a/src/DGtal/math/AngleLinearMinimizer.h b/src/DGtal/math/AngleLinearMinimizer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/AngleLinearMinimizer.ih b/src/DGtal/math/AngleLinearMinimizer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/BasicMathFunctions.h b/src/DGtal/math/BasicMathFunctions.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/BasicMathFunctions.ih b/src/DGtal/math/BasicMathFunctions.ih new file mode 100755 index 0000000000..e69de29bb2 diff --git a/src/DGtal/math/CBinner.h b/src/DGtal/math/CBinner.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/Histogram.h b/src/DGtal/math/Histogram.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/Histogram.ih b/src/DGtal/math/Histogram.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/MPolynomial.h b/src/DGtal/math/MPolynomial.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/MPolynomial.ih b/src/DGtal/math/MPolynomial.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/MeasureOfStraightLines.h b/src/DGtal/math/MeasureOfStraightLines.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/MeasureOfStraightLines.ih b/src/DGtal/math/MeasureOfStraightLines.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/ModuleSRC.txt b/src/DGtal/math/ModuleSRC.txt new file mode 100755 index 0000000000..cf73f5b4e1 --- /dev/null +++ b/src/DGtal/math/ModuleSRC.txt @@ -0,0 +1,6 @@ +## Sources associated to the module math +## + +SET(DGTAL_SRC ${DGTAL_SRC} + DGtal/math/AngleLinearMinimizer) + diff --git a/src/DGtal/math/OrderedLinearRegression.h b/src/DGtal/math/OrderedLinearRegression.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/ScalarFunctors.h b/src/DGtal/math/ScalarFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/ScalarFunctors.ih b/src/DGtal/math/ScalarFunctors.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/Signal.h b/src/DGtal/math/Signal.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/Signal.ih b/src/DGtal/math/Signal.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/SimpleLinearRegression.h b/src/DGtal/math/SimpleLinearRegression.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/SimpleLinearRegression.ih b/src/DGtal/math/SimpleLinearRegression.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/Statistic.h b/src/DGtal/math/Statistic.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/Statistic.ih b/src/DGtal/math/Statistic.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/doc/images/nice-mpolynomial.png b/src/DGtal/math/doc/images/nice-mpolynomial.png old mode 100644 new mode 100755 diff --git a/src/DGtal/math/doc/modulePolynomial.dox b/src/DGtal/math/doc/modulePolynomial.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/math/doc/packageMath.dox b/src/DGtal/math/doc/packageMath.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/math/doc/packageMathConcepts.dox b/src/DGtal/math/doc/packageMathConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CDenseMatrix.h b/src/DGtal/math/linalg/CDenseMatrix.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CDenseVector.h b/src/DGtal/math/linalg/CDenseVector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CDynamicMatrix.h b/src/DGtal/math/linalg/CDynamicMatrix.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CDynamicVector.h b/src/DGtal/math/linalg/CDynamicVector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CLinearAlgebra.h b/src/DGtal/math/linalg/CLinearAlgebra.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CLinearAlgebraSolver.h b/src/DGtal/math/linalg/CLinearAlgebraSolver.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CMatrix.h b/src/DGtal/math/linalg/CMatrix.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CSparseMatrix.h b/src/DGtal/math/linalg/CSparseMatrix.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CStaticMatrix.h b/src/DGtal/math/linalg/CStaticMatrix.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CStaticVector.h b/src/DGtal/math/linalg/CStaticVector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CVector.h b/src/DGtal/math/linalg/CVector.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/CVectorSpace.h b/src/DGtal/math/linalg/CVectorSpace.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/EigenDecomposition.h b/src/DGtal/math/linalg/EigenDecomposition.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/EigenDecomposition.ih b/src/DGtal/math/linalg/EigenDecomposition.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/EigenDenseBaseAddons.h b/src/DGtal/math/linalg/EigenDenseBaseAddons.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/EigenSparseMatrixAddons.h b/src/DGtal/math/linalg/EigenSparseMatrixAddons.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/EigenSupport.h b/src/DGtal/math/linalg/EigenSupport.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/SimpleMatrix.h b/src/DGtal/math/linalg/SimpleMatrix.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/SimpleMatrix.ih b/src/DGtal/math/linalg/SimpleMatrix.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/SimpleMatrixSpecializations.h b/src/DGtal/math/linalg/SimpleMatrixSpecializations.h old mode 100644 new mode 100755 diff --git a/src/DGtal/math/linalg/SimpleMatrixSpecializations.ih b/src/DGtal/math/linalg/SimpleMatrixSpecializations.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/CDigitalBoundedShape.h b/src/DGtal/shapes/CDigitalBoundedShape.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/CDigitalOrientedShape.h b/src/DGtal/shapes/CDigitalOrientedShape.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/CEuclideanBoundedShape.h b/src/DGtal/shapes/CEuclideanBoundedShape.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/CEuclideanOrientedShape.h b/src/DGtal/shapes/CEuclideanOrientedShape.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/DigitalShapesDecorator.h b/src/DGtal/shapes/DigitalShapesDecorator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/EuclideanShapesDecorator.h b/src/DGtal/shapes/EuclideanShapesDecorator.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/GaussDigitizer.h b/src/DGtal/shapes/GaussDigitizer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/GaussDigitizer.ih b/src/DGtal/shapes/GaussDigitizer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/Mesh.h b/src/DGtal/shapes/Mesh.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/Mesh.ih b/src/DGtal/shapes/Mesh.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/ShapeFactory.h b/src/DGtal/shapes/ShapeFactory.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/ShapeGeometricFunctors.h b/src/DGtal/shapes/ShapeGeometricFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/ShapeGeometricFunctors.ih b/src/DGtal/shapes/ShapeGeometricFunctors.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/Shapes.h b/src/DGtal/shapes/Shapes.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/Shapes.ih b/src/DGtal/shapes/Shapes.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/accflower01.png b/src/DGtal/shapes/doc/images/accflower01.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/accflower1.png b/src/DGtal/shapes/doc/images/accflower1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/circle01.png b/src/DGtal/shapes/doc/images/circle01.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/circle1.png b/src/DGtal/shapes/doc/images/circle1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/ellipse01.png b/src/DGtal/shapes/doc/images/ellipse01.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/ellipse1.png b/src/DGtal/shapes/doc/images/ellipse1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/example3dMeshConstruction.png b/src/DGtal/shapes/doc/images/example3dMeshConstruction.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/flower01.png b/src/DGtal/shapes/doc/images/flower01.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/flower1.png b/src/DGtal/shapes/doc/images/flower1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/gauss-ellipse-0_25.png b/src/DGtal/shapes/doc/images/gauss-ellipse-0_25.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/gauss-ellipse-0_5.png b/src/DGtal/shapes/doc/images/gauss-ellipse-0_5.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/gauss-ellipse-1.png b/src/DGtal/shapes/doc/images/gauss-ellipse-1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/square01.png b/src/DGtal/shapes/doc/images/square01.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/square1.png b/src/DGtal/shapes/doc/images/square1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/testMeshVisu3d.png b/src/DGtal/shapes/doc/images/testMeshVisu3d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/images/testMeshVisu3dBis.png b/src/DGtal/shapes/doc/images/testMeshVisu3dBis.png old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/moduleMesh.dox b/src/DGtal/shapes/doc/moduleMesh.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/moduleShape.dox b/src/DGtal/shapes/doc/moduleShape.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/packageShapes.dox b/src/DGtal/shapes/doc/packageShapes.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/doc/packageShapesConcepts.dox b/src/DGtal/shapes/doc/packageShapesConcepts.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/fromPoints/CircleFrom2Points.h b/src/DGtal/shapes/fromPoints/CircleFrom2Points.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/fromPoints/CircleFrom2Points.ih b/src/DGtal/shapes/fromPoints/CircleFrom2Points.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/fromPoints/CircleFrom3Points.h b/src/DGtal/shapes/fromPoints/CircleFrom3Points.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/fromPoints/CircleFrom3Points.ih b/src/DGtal/shapes/fromPoints/CircleFrom3Points.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/fromPoints/Point2ShapePredicate.h b/src/DGtal/shapes/fromPoints/Point2ShapePredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/fromPoints/Point2ShapePredicate.ih b/src/DGtal/shapes/fromPoints/Point2ShapePredicate.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/fromPoints/StraightLineFrom2Points.h b/src/DGtal/shapes/fromPoints/StraightLineFrom2Points.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/fromPoints/StraightLineFrom2Points.ih b/src/DGtal/shapes/fromPoints/StraightLineFrom2Points.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/CImplicitFunction.h b/src/DGtal/shapes/implicit/CImplicitFunction.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/CImplicitFunctionDiff1.h b/src/DGtal/shapes/implicit/CImplicitFunctionDiff1.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitBall.h b/src/DGtal/shapes/implicit/ImplicitBall.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitBall.ih b/src/DGtal/shapes/implicit/ImplicitBall.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitFunctionDiff1LinearCellEmbedder.h b/src/DGtal/shapes/implicit/ImplicitFunctionDiff1LinearCellEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitFunctionDiff1LinearCellEmbedder.ih b/src/DGtal/shapes/implicit/ImplicitFunctionDiff1LinearCellEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitFunctionLinearCellEmbedder.h b/src/DGtal/shapes/implicit/ImplicitFunctionLinearCellEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitFunctionLinearCellEmbedder.ih b/src/DGtal/shapes/implicit/ImplicitFunctionLinearCellEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitHyperCube.h b/src/DGtal/shapes/implicit/ImplicitHyperCube.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitHyperCube.ih b/src/DGtal/shapes/implicit/ImplicitHyperCube.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitNorm1Ball.h b/src/DGtal/shapes/implicit/ImplicitNorm1Ball.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitNorm1Ball.ih b/src/DGtal/shapes/implicit/ImplicitNorm1Ball.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitPolynomial3Shape.h b/src/DGtal/shapes/implicit/ImplicitPolynomial3Shape.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitPolynomial3Shape.ih b/src/DGtal/shapes/implicit/ImplicitPolynomial3Shape.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitRoundedHyperCube.h b/src/DGtal/shapes/implicit/ImplicitRoundedHyperCube.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/implicit/ImplicitRoundedHyperCube.ih b/src/DGtal/shapes/implicit/ImplicitRoundedHyperCube.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/AccFlower2D.h b/src/DGtal/shapes/parametric/AccFlower2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/AccFlower2D.ih b/src/DGtal/shapes/parametric/AccFlower2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/Ball2D.h b/src/DGtal/shapes/parametric/Ball2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/Ball2D.ih b/src/DGtal/shapes/parametric/Ball2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/Ball3D.h b/src/DGtal/shapes/parametric/Ball3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/Ball3D.ih b/src/DGtal/shapes/parametric/Ball3D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/Ellipse2D.h b/src/DGtal/shapes/parametric/Ellipse2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/Ellipse2D.ih b/src/DGtal/shapes/parametric/Ellipse2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/Flower2D.h b/src/DGtal/shapes/parametric/Flower2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/Flower2D.ih b/src/DGtal/shapes/parametric/Flower2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/NGon2D.h b/src/DGtal/shapes/parametric/NGon2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/NGon2D.ih b/src/DGtal/shapes/parametric/NGon2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/StarShaped2D.h b/src/DGtal/shapes/parametric/StarShaped2D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/StarShaped2D.ih b/src/DGtal/shapes/parametric/StarShaped2D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/StarShaped3D.h b/src/DGtal/shapes/parametric/StarShaped3D.h old mode 100644 new mode 100755 diff --git a/src/DGtal/shapes/parametric/StarShaped3D.ih b/src/DGtal/shapes/parametric/StarShaped3D.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CAdjacency.h b/src/DGtal/topology/CAdjacency.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CCellEmbedder.h b/src/DGtal/topology/CCellEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CCellFunctor.h b/src/DGtal/topology/CCellFunctor.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CCellularGridSpaceND.h b/src/DGtal/topology/CCellularGridSpaceND.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CDigitalSurfaceContainer.h b/src/DGtal/topology/CDigitalSurfaceContainer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CDigitalSurfaceEmbedder.h b/src/DGtal/topology/CDigitalSurfaceEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CDigitalSurfaceTracker.h b/src/DGtal/topology/CDigitalSurfaceTracker.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CDomainAdjacency.h b/src/DGtal/topology/CDomainAdjacency.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CSCellEmbedder.h b/src/DGtal/topology/CSCellEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CSurfelPredicate.h b/src/DGtal/topology/CSurfelPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CanonicCellEmbedder.h b/src/DGtal/topology/CanonicCellEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CanonicCellEmbedder.ih b/src/DGtal/topology/CanonicCellEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CanonicDigitalSurfaceEmbedder.h b/src/DGtal/topology/CanonicDigitalSurfaceEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CanonicDigitalSurfaceEmbedder.ih b/src/DGtal/topology/CanonicDigitalSurfaceEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CanonicSCellEmbedder.h b/src/DGtal/topology/CanonicSCellEmbedder.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/CanonicSCellEmbedder.ih b/src/DGtal/topology/CanonicSCellEmbedder.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalSetBoundary.h b/src/DGtal/topology/DigitalSetBoundary.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalSetBoundary.ih b/src/DGtal/topology/DigitalSetBoundary.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalSurface.h b/src/DGtal/topology/DigitalSurface.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalSurface.ih b/src/DGtal/topology/DigitalSurface.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalSurface2DSlice.h b/src/DGtal/topology/DigitalSurface2DSlice.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalSurface2DSlice.ih b/src/DGtal/topology/DigitalSurface2DSlice.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalTopology.h b/src/DGtal/topology/DigitalTopology.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalTopology.ih b/src/DGtal/topology/DigitalTopology.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DigitalTopologyTraits.h b/src/DGtal/topology/DigitalTopologyTraits.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DomainAdjacency.h b/src/DGtal/topology/DomainAdjacency.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DomainAdjacency.ih b/src/DGtal/topology/DomainAdjacency.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DomainMetricAdjacency.h b/src/DGtal/topology/DomainMetricAdjacency.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/DomainMetricAdjacency.ih b/src/DGtal/topology/DomainMetricAdjacency.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/ExplicitDigitalSurface.h b/src/DGtal/topology/ExplicitDigitalSurface.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/ExplicitDigitalSurface.ih b/src/DGtal/topology/ExplicitDigitalSurface.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/HomotopicThinning.h b/src/DGtal/topology/HomotopicThinning.h new file mode 100755 index 0000000000..76e829aab0 --- /dev/null +++ b/src/DGtal/topology/HomotopicThinning.h @@ -0,0 +1,147 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +#pragma once + +/** + * @file HomotopicThinning.h + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, France + * + * @date 2014/11/13 + * + * Header file for module HomotopicThinning.cpp + * + * This file is part of the DGtal library. + */ + +#if defined(HomotopicThinning_RECURSES) +#error Recursive header files inclusion detected in HomotopicThinning.h +#else // defined(HomotopicThinning_RECURSES) +/** Prevents recursive inclusion of headers. */ +#define HomotopicThinning_RECURSES + +#if !defined HomotopicThinning_h +/** Prevents repeated inclusion of headers. */ +#define HomotopicThinning_h + +////////////////////////////////////////////////////////////////////////////// +// Inclusions +#include +#include "DGtal/base/Common.h" +////////////////////////////////////////////////////////////////////////////// + +namespace DGtal +{ + +///////////////////////////////////////////////////////////////////////////// +// class HomotopicThinning +/** + * Description of class 'HomotopicThinning'

+ * \brief Aim: + */ +template +class HomotopicThinning +{ + // ----------------------- Standard services ------------------------------ +public: + typedef typename ObjectA_B::DigitalSet DigitalSet; + HomotopicThinning ( PriorityFunctor & ); + + /** + * Destructor. + */ + ~HomotopicThinning(){} + + // ----------------------- Interface -------------------------------------- +public: + + void operator()( ObjectA_B &, const FixedSet &, const unsigned int & ); + void operator()( ObjectA_B &, const unsigned int & ); + + /** + * Writes/Displays the object on an output stream. + * @param out the output stream where the object is written. + */ + void selfDisplay ( std::ostream & out ) const; + + + /** + * Checks the validity/consistency of the object. + * @return 'true' if the object is valid, 'false' otherwise. + */ + bool isValid() const; + + // ------------------------- Protected Datas ------------------------------ +private: + // ------------------------- Private Datas -------------------------------- +private: + + // ------------------------- Hidden services ------------------------------ +protected: + +private: + + /** + * Copy constructor. + * @param other the object to clone. + * Forbidden by default. + */ + HomotopicThinning ( const HomotopicThinning & other ); + + /** + * Assignment. + * @param other the object to copy. + * @return a reference on 'this'. + * Forbidden by default. + */ + HomotopicThinning & operator= ( const HomotopicThinning & other ); + + // ------------------------- Internals ------------------------------------ +private: + PriorityFunctor & functor; + +}; // end of class HomotopicThinning + + +/** + * Overloads 'operator<<' for displaying objects of class 'HomotopicThinning'. + * @param out the output stream where the object is written. + * @param object the object of class 'HomotopicThinning' to write. + * @return the output stream after the writing. + */ +template +std::ostream& +operator<< ( std::ostream & out, const HomotopicThinning & object ); + + +} // namespace DGtal + + +/////////////////////////////////////////////////////////////////////////////// +// Includes inline functions. +#if !defined(BUILD_INLINE) +#include "DGtal/topology/HomotopicThinning.ih" +#endif + + +// // +/////////////////////////////////////////////////////////////////////////////// + +#endif // !defined HomotopicThinning_h + +#undef HomotopicThinning_RECURSES +#endif // else defined(HomotopicThinning_RECURSES) diff --git a/src/DGtal/topology/HomotopicThinning.ih b/src/DGtal/topology/HomotopicThinning.ih new file mode 100755 index 0000000000..a8983d99eb --- /dev/null +++ b/src/DGtal/topology/HomotopicThinning.ih @@ -0,0 +1,135 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file HomotopicThinning.ih + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, France + * + * @date 2014/11/13 + * + * Implementation of inline methods defined in HomotopicThinning.h + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +// IMPLEMENTATION of inline methods. +/////////////////////////////////////////////////////////////////////////////// +#include + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline methods // +template +inline +DGtal::HomotopicThinning< ObjectA_B, FixedSet, PriorityFunctor>::HomotopicThinning ( PriorityFunctor & prifunctor ) : functor ( prifunctor ) +{} + +template +inline +void DGtal::HomotopicThinning< ObjectA_B, FixedSet, PriorityFunctor>::operator()( ObjectA_B & shape, const FixedSet & fixedSet, const unsigned int & iter ) +{ + + unsigned int nb_simple=0; + unsigned int layer = 1; + std::queue< typename DigitalSet::Iterator> Q; + do + { + DigitalSet & S = shape.pointSet(); + + for ( typename DigitalSet::Iterator it = S.begin(); it != S.end(); ++it ) + { + if ( functor ( *it ) <= layer) + { + if ( shape.isSimple( *it ) ) + Q.push( it ); + } + } + nb_simple = 0; + while ( ! Q.empty() ) + { + typename DigitalSet::Iterator it = Q.front(); + Q.pop(); + if ( shape.isSimple( *it ) && std::find ( fixedSet.begin(), fixedSet.end(), *it ) == fixedSet.end() ) + { + S.erase( *it ); + ++nb_simple; + } + } + ++layer; + } + while ( nb_simple != 0 && layer <= iter ); +} + +template +inline +void DGtal::HomotopicThinning< ObjectA_B, FixedSet, PriorityFunctor>::operator()( ObjectA_B & shape, const unsigned int & iter ) +{ + + unsigned int nb_simple=0; + unsigned int layer = 1; + std::queue< typename DigitalSet::Iterator> Q; + do + { + DigitalSet & S = shape.pointSet(); + + for ( typename DigitalSet::Iterator it = S.begin(); it != S.end(); ++it ) + { + if ( functor ( *it ) <= layer) + { + if ( shape.isSimple( *it ) ) + Q.push( it ); + } + } + nb_simple = 0; + while ( ! Q.empty() ) + { + typename DigitalSet::Iterator it = Q.front(); + Q.pop(); + if ( shape.isSimple( *it ) ) + { + S.erase( *it ); + ++nb_simple; + } + } + ++layer; + } + while ( nb_simple != 0 && layer <= iter ); +} + +/////////////////////////////////////////////////////////////////////////////// +// Implementation of inline functions and external operators // + +/** + * Overloads 'operator<<' for displaying objects of class 'HomotopicThinning'. + * @param out the output stream where the object is written. + * @param object the object of class 'HomotopicThinning' to write. + * @return the output stream after the writing. + */ +template +inline +std::ostream& +DGtal::operator<< ( std::ostream & out, + const HomotopicThinning & object ) +{ + object.selfDisplay ( out ); + return out; +} + +// // +/////////////////////////////////////////////////////////////////////////////// + + diff --git a/src/DGtal/topology/ImplicitDigitalSurface.h b/src/DGtal/topology/ImplicitDigitalSurface.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/ImplicitDigitalSurface.ih b/src/DGtal/topology/ImplicitDigitalSurface.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/KhalimskySpaceND.h b/src/DGtal/topology/KhalimskySpaceND.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/KhalimskySpaceND.ih b/src/DGtal/topology/KhalimskySpaceND.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/LightExplicitDigitalSurface.h b/src/DGtal/topology/LightExplicitDigitalSurface.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/LightExplicitDigitalSurface.ih b/src/DGtal/topology/LightExplicitDigitalSurface.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/LightImplicitDigitalSurface.h b/src/DGtal/topology/LightImplicitDigitalSurface.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/LightImplicitDigitalSurface.ih b/src/DGtal/topology/LightImplicitDigitalSurface.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/MetricAdjacency.h b/src/DGtal/topology/MetricAdjacency.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/MetricAdjacency.ih b/src/DGtal/topology/MetricAdjacency.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/ModuleSRC.txt b/src/DGtal/topology/ModuleSRC.txt old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/Object.h b/src/DGtal/topology/Object.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/Object.ih b/src/DGtal/topology/Object.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SCellsFunctors.h b/src/DGtal/topology/SCellsFunctors.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SetOfSurfels.h b/src/DGtal/topology/SetOfSurfels.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SetOfSurfels.ih b/src/DGtal/topology/SetOfSurfels.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SurfelAdjacency.h b/src/DGtal/topology/SurfelAdjacency.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SurfelAdjacency.ih b/src/DGtal/topology/SurfelAdjacency.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SurfelNeighborhood.h b/src/DGtal/topology/SurfelNeighborhood.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SurfelNeighborhood.ih b/src/DGtal/topology/SurfelNeighborhood.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SurfelSetPredicate.h b/src/DGtal/topology/SurfelSetPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/SurfelSetPredicate.ih b/src/DGtal/topology/SurfelSetPredicate.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/Topology.h b/src/DGtal/topology/Topology.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/UmbrellaComputer.h b/src/DGtal/topology/UmbrellaComputer.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/UmbrellaComputer.ih b/src/DGtal/topology/UmbrellaComputer.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/DiskWithAdj4.png b/src/DGtal/topology/doc/images/DiskWithAdj4.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/DiskWithAdj8.png b/src/DGtal/topology/doc/images/DiskWithAdj8.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/KSurfelsConnectedDefaultOrient.png b/src/DGtal/topology/doc/images/KSurfelsConnectedDefaultOrient.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/KSurfelsConnectedOrientExt.png b/src/DGtal/topology/doc/images/KSurfelsConnectedOrientExt.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/cellular-grid-space-1.png b/src/DGtal/topology/doc/images/cellular-grid-space-1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo-1-3d.png b/src/DGtal/topology/doc/images/ctopo-1-3d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo-1.png b/src/DGtal/topology/doc/images/ctopo-1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo-1b-3d.png b/src/DGtal/topology/doc/images/ctopo-1b-3d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo-1s-3d.png b/src/DGtal/topology/doc/images/ctopo-1s-3d.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo-fillContours.png b/src/DGtal/topology/doc/images/ctopo-fillContours.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo-fillContours0.png b/src/DGtal/topology/doc/images/ctopo-fillContours0.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo-fillContours1.png b/src/DGtal/topology/doc/images/ctopo-fillContours1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo-fillContours3.png b/src/DGtal/topology/doc/images/ctopo-fillContours3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo2a.png b/src/DGtal/topology/doc/images/ctopo2a.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo2b.png b/src/DGtal/topology/doc/images/ctopo2b.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo2c.png b/src/DGtal/topology/doc/images/ctopo2c.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo3dSurfel.png b/src/DGtal/topology/doc/images/ctopo3dSurfel.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/ctopo3dSurfelCut.png b/src/DGtal/topology/doc/images/ctopo3dSurfelCut.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/diag-digital-surface-1.dia b/src/DGtal/topology/doc/images/diag-digital-surface-1.dia old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/diag-digital-surface-1.png b/src/DGtal/topology/doc/images/diag-digital-surface-1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-0.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-0.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-0s.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-0s.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-1.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-1s.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-1s.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-1ss.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-1ss.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-2.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-2s.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-2s.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-3.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-3.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-3s.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-3s.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-4.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-4.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-4s.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-4s.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-5.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-5.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-5s.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-5s.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-6.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-6.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-BdryOp-6s.png b/src/DGtal/topology/doc/images/digital-surface-BdryOp-6s.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-IntAdjacency.png b/src/DGtal/topology/doc/images/digital-surface-IntAdjacency.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-SurfaceTracking.fig b/src/DGtal/topology/doc/images/digital-surface-SurfaceTracking.fig old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-SurfaceTracking.png b/src/DGtal/topology/doc/images/digital-surface-SurfaceTracking.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-SurfaceTracking2.fig b/src/DGtal/topology/doc/images/digital-surface-SurfaceTracking2.fig old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-SurfaceTracking2.png b/src/DGtal/topology/doc/images/digital-surface-SurfaceTracking2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-bfv-all.png b/src/DGtal/topology/doc/images/digital-surface-bfv-all.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-intersecting-balls.png b/src/DGtal/topology/doc/images/digital-surface-intersecting-balls.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-mc-cat10.png b/src/DGtal/topology/doc/images/digital-surface-mc-cat10.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/digital-surface-mc-lobster.png b/src/DGtal/topology/doc/images/digital-surface-mc-lobster.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/khalimskySpaceScanner1.png b/src/DGtal/topology/doc/images/khalimskySpaceScanner1.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/khalimskySpaceScanner2.png b/src/DGtal/topology/doc/images/khalimskySpaceScanner2.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/nice-mpolynomial.png b/src/DGtal/topology/doc/images/nice-mpolynomial.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/resulExerciceHelpSurface.png b/src/DGtal/topology/doc/images/resulExerciceHelpSurface.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/suivi-artzy.fig b/src/DGtal/topology/doc/images/suivi-artzy.fig old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/suivi-artzy.png b/src/DGtal/topology/doc/images/suivi-artzy.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/suivi-parcours-largeur.png b/src/DGtal/topology/doc/images/suivi-parcours-largeur.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/visuThinning-18-6.png b/src/DGtal/topology/doc/images/visuThinning-18-6.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/images/volTrackBoundary-lobster.png b/src/DGtal/topology/doc/images/volTrackBoundary-lobster.png old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/moduleCellularTopology.dox b/src/DGtal/topology/doc/moduleCellularTopology.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/moduleDigitalSurfaceHelpers.dox b/src/DGtal/topology/doc/moduleDigitalSurfaceHelpers.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/moduleDigitalSurfaces.dox b/src/DGtal/topology/doc/moduleDigitalSurfaces.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/moduleDigitalTopology.dox b/src/DGtal/topology/doc/moduleDigitalTopology.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/packageTopology.dox b/src/DGtal/topology/doc/packageTopology.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/packageTopologyConcepts.dox b/src/DGtal/topology/doc/packageTopologyConcepts.dox new file mode 100755 index 0000000000..7bb171ce48 --- /dev/null +++ b/src/DGtal/topology/doc/packageTopologyConcepts.dox @@ -0,0 +1,173 @@ + +/** + * @file packageTopologyConcepts.dox + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France + * + * @date 2012/03/16 + * + * Documentation file for feature packageTopologyConcepts + * + * This file is part of the DGtal library. + */ + +/* + * Useful to avoid writing DGtal:: in front of every class. + * Do not forget to add an entry in src/DGtal/base/Config.h.in ! + */ +namespace DGtal { +//---------------------------------------- +/*! +@page packageTopologyConcepts Topology Concepts and Models +@writers Jacques-Olivier Lachaud + + @dot +digraph GTOPOLOGY { + rankdir= BT + + subgraph cluster_ext { + rank = same; + style=invis; + subgraph cluster_1 { + style=filled; + color="#eeeeff"; + node [style=filled,color=white]; + label="base"; + + CConstSinglePassRange [ label="CConstSinglePassRange" URL="\ref CConstSinglePassRange" ]; + CPredicate [ label="CPredicate" URL="\ref CPredicate" ]; + } + subgraph cluster_2 { + style=filled; + color="#ddddff"; + node [style=filled,color=white]; + label="graph"; + + CUndirectedSimpleGraph [ label="CUndirectedSimpleGraph" URL="\ref concepts::CUndirectedSimpleGraph" ]; + CUndirectedSimpleLocalGraph [ label="CUndirectedSimpleLocalGraph" URL="\ref concepts::CUndirectedSimpleLocalGraph" ]; + + } + subgraph cluster_3 { + style=filled; + color="#d4ddff"; + node [style=filled,color=white]; + label="image"; + + CImage [ label="CImage" URL="\ref CImage" ]; + } + subgraph cluster_4 { + style=filled; + color="#e0eeff"; + node [style=filled,color=white]; + label="kernel"; + + CDigitalSet [ label="CDigitalSet" URL="\ref CDigitalSet" ]; + } + subgraph cluster_5 { + style=filled; + color=white; + node [style=filled,color=orange]; + label="boost"; + + boost_CopyConstructible [ label="boost::CopyConstructible" URL="\ref boost::CopyConstructible" ]; + } + } + + subgraph cluster_0 { + style=filled; + color=lightgrey; + node [style=filled,color=white]; + label="topology (main concepts)"; + + CDigitalSurfaceContainer [ label="CDigitalSurfaceContainer" URL="\ref concepts::CDigitalSurfaceContainer" ]; + CDigitalSurfaceTracker [ label="CDigitalSurfaceTracker" URL="\ref concepts::CDigitalSurfaceTracker" ]; + CDomainAdjacency [ label="CDomainAdjacency" URL="\ref concepts::CDomainAdjacency" ]; + CAdjacency [ label="CAdjacency" URL="\ref concepts::CAdjacency" ]; + CSurfelPredicate [ label="CSurfelPredicate" URL="\ref concepts::CSurfelPredicate" ]; + CCellularGridSpaceND [ label="CCellularGridSpaceND" URL="\ref concepts::CCellularGridSpaceND" ]; + } + CDigitalSurfaceContainer -> boost_CopyConstructible; + CDigitalSurfaceTracker -> boost_CopyConstructible; + CDigitalSurfaceContainer -> CDigitalSurfaceTracker [label="use",style=dashed]; + CDigitalSurfaceContainer -> CCellularGridSpaceND [label="use",style=dashed]; + CUndirectedSimpleLocalGraph -> CConstSinglePassRange; + CUndirectedSimpleGraph -> CUndirectedSimpleLocalGraph; + CAdjacency -> CUndirectedSimpleLocalGraph; + CDomainAdjacency -> CAdjacency ; + CSurfelPredicate -> CPredicate; + + subgraph cluster_models { + style=filled; + color="#ccffcc"; + node [style=filled,color=white]; + label="topology (main models)"; + + subgraph cluster_models_0 { + style=filled; + color="#ccffcc"; + node [style=filled,color=white]; + label="(main graph models)"; + + MetricAdjacency [ label="MetricAdjacency" URL="\ref MetricAdjacency" ]; + DomainAdjacency [ label="DomainAdjacency" URL="\ref DomainAdjacency" ]; + DigitalSurface [ label="DigitalSurface" URL="\ref DigitalSurface" ]; + Object [ label="Object" URL="\ref Object" ]; + } + + subgraph cluster_models_1 { + style=filled; + color="#ccffcc"; + node [style=filled,color=white]; + label="(main digital surface container models)"; + + DigitalSetBoundary [ label="DigitalSetBoundary" URL="\ref DigitalSetBoundary" ]; + ImplicitDigitalSurface [ label="ImplicitDigitalSurface" URL="\ref ImplicitDigitalSurface" ]; + LightImplicitDigitalSurface [ label="LightImplicitDigitalSurface" URL="\ref LightImplicitDigitalSurface" ]; + SetOfSurfels [ label="SetOfSurfels" URL="\ref SetOfSurfels" ]; + ExplicitDigitalSurface [ label="ExplicitDigitalSurface" URL="\ref ExplicitDigitalSurface" ]; + LightExplicitDigitalSurface [ label="LightExplicitDigitalSurface" URL="\ref LightExplicitDigitalSurface" ]; + } + + subgraph cluster_models_2 { + style=filled; + color="#ccffcc"; + node [style=filled,color=white]; + label="(others)"; + + KhalimskySpaceND [ label="KhalimskySpaceND" URL="\ref KhalimskySpaceND" ]; + SurfelSetPredicate [ label="SurfelSetPredicate" URL="\ref functors::SurfelSetPredicate" ]; + BoundaryPredicate [ label="BoundaryPredicate" URL="\ref functors::BoundaryPredicate" ]; + FrontierPredicate [ label="FrontierPredicate" URL="\ref functors::FrontierPredicate" ]; + } + } + + Object -> CUndirectedSimpleGraph; + Object -> CDigitalSet [label="use",style=dashed]; + MetricAdjacency -> CAdjacency; + DomainAdjacency -> CDomainAdjacency; + DigitalSetBoundary -> CDigitalSurfaceContainer; + DigitalSetBoundary -> CDigitalSet [label="use",style=dashed]; + ImplicitDigitalSurface -> CDigitalSurfaceContainer; + SetOfSurfels -> CDigitalSurfaceContainer; + ExplicitDigitalSurface -> CDigitalSurfaceContainer; + LightImplicitDigitalSurface -> CDigitalSurfaceContainer; + LightImplicitDigitalSurface -> CUndirectedSimpleLocalGraph; + LightExplicitDigitalSurface -> CDigitalSurfaceContainer; + LightExplicitDigitalSurface -> CUndirectedSimpleLocalGraph; + DigitalSurface -> CUndirectedSimpleGraph; + DigitalSurface -> CDigitalSurfaceContainer [label="use",style=dashed]; + KhalimskySpaceND -> CCellularGridSpaceND; + + SurfelSetPredicate -> CSurfelPredicate; + BoundaryPredicate -> CSurfelPredicate; + FrontierPredicate -> CSurfelPredicate; + BoundaryPredicate -> CCellularGridSpaceND [label="use",style=dashed]; + FrontierPredicate -> CCellularGridSpaceND [label="use",style=dashed]; + BoundaryPredicate -> CImage [label="use",style=dashed]; + FrontierPredicate -> CImage [label="use",style=dashed]; +} +@enddot + +*/ + +} diff --git a/src/DGtal/topology/doc/packageTopologyConcepts1.dox b/src/DGtal/topology/doc/packageTopologyConcepts1.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/doc/packageTopologyConcepts2.dox b/src/DGtal/topology/doc/packageTopologyConcepts2.dox old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/helpers/BoundaryPredicate.h b/src/DGtal/topology/helpers/BoundaryPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/helpers/BoundaryPredicate.ih b/src/DGtal/topology/helpers/BoundaryPredicate.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/helpers/FrontierPredicate.h b/src/DGtal/topology/helpers/FrontierPredicate.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/helpers/FrontierPredicate.ih b/src/DGtal/topology/helpers/FrontierPredicate.ih old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/helpers/Surfaces.h b/src/DGtal/topology/helpers/Surfaces.h old mode 100644 new mode 100755 diff --git a/src/DGtal/topology/helpers/Surfaces.ih b/src/DGtal/topology/helpers/Surfaces.ih old mode 100644 new mode 100755 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/ConfigTest.h.in b/tests/ConfigTest.h.in old mode 100644 new mode 100755 diff --git a/tests/DGtalCatch.h b/tests/DGtalCatch.h old mode 100644 new mode 100755 diff --git a/tests/arithmetic/CMakeLists.txt b/tests/arithmetic/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testArithmeticDSS-benchmark.cpp b/tests/arithmetic/testArithmeticDSS-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testIntegerComputer.cpp b/tests/arithmetic/testIntegerComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testLatticePolytope2D.cpp b/tests/arithmetic/testLatticePolytope2D.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testLightSternBrocot.cpp b/tests/arithmetic/testLightSternBrocot.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testLighterSternBrocot.cpp b/tests/arithmetic/testLighterSternBrocot.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testModuloComputer.cpp b/tests/arithmetic/testModuloComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testPattern.cpp b/tests/arithmetic/testPattern.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testStandardDSLQ0-LSB-reversedSmartDSS-benchmark.cpp b/tests/arithmetic/testStandardDSLQ0-LSB-reversedSmartDSS-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testStandardDSLQ0-LrSB-reversedSmartDSS-benchmark.cpp b/tests/arithmetic/testStandardDSLQ0-LrSB-reversedSmartDSS-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testStandardDSLQ0-reversedSmartDSS-benchmark.cpp b/tests/arithmetic/testStandardDSLQ0-reversedSmartDSS-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testStandardDSLQ0-smartDSS-benchmark.cpp b/tests/arithmetic/testStandardDSLQ0-smartDSS-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/arithmetic/testSternBrocot.cpp b/tests/arithmetic/testSternBrocot.cpp old mode 100644 new mode 100755 diff --git a/tests/base/CMakeLists.txt b/tests/base/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/base/testBasicBoolFunctors.cpp b/tests/base/testBasicBoolFunctors.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testBasicFunctors.cpp b/tests/base/testBasicFunctors.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testBenchmark.cpp b/tests/base/testBenchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testBits.cpp b/tests/base/testBits.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testCatch.cpp b/tests/base/testCatch.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testCirculator.cpp b/tests/base/testCirculator.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testClock.cpp b/tests/base/testClock.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testClone2.cpp b/tests/base/testClone2.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testCloneAndAliases.cpp b/tests/base/testCloneAndAliases.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testConstIteratorAdapter.cpp b/tests/base/testConstIteratorAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testConstRangeAdapter.cpp b/tests/base/testConstRangeAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testCountedConstPtrOrConstPtr.cpp b/tests/base/testCountedConstPtrOrConstPtr.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testCountedPtr.cpp b/tests/base/testCountedPtr.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testCountedPtrOrPtr.cpp b/tests/base/testCountedPtrOrPtr.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testIndexedListWithBlocks.cpp b/tests/base/testIndexedListWithBlocks.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testIteratorCirculatorTraits.cpp b/tests/base/testIteratorCirculatorTraits.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testIteratorFunctions.cpp b/tests/base/testIteratorFunctions.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testLabelledMap-benchmark.cpp b/tests/base/testLabelledMap-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testLabelledMap.cpp b/tests/base/testLabelledMap.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testLabels.cpp b/tests/base/testLabels.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testMultiMap-benchmark.cpp b/tests/base/testMultiMap-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testOpenMP.cpp b/tests/base/testOpenMP.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testOrderedAlphabet.cpp b/tests/base/testOrderedAlphabet.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testOutputIteratorAdapter.cpp b/tests/base/testOutputIteratorAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testOwningOrAliasingPtr.cpp b/tests/base/testOwningOrAliasingPtr.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testPartialTemplateSpecialization.cpp b/tests/base/testPartialTemplateSpecialization.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testProgressBar.cpp b/tests/base/testProgressBar.cpp old mode 100644 new mode 100755 diff --git a/tests/base/testTrace.cpp b/tests/base/testTrace.cpp old mode 100644 new mode 100755 diff --git a/tests/catch.hpp b/tests/catch.hpp old mode 100644 new mode 100755 diff --git a/tests/curves/CMakeLists.txt b/tests/curves/CMakeLists.txt new file mode 100755 index 0000000000..3fc96bd808 --- /dev/null +++ b/tests/curves/CMakeLists.txt @@ -0,0 +1,18 @@ +SET(DGTAL_TESTS_SRC + testParametricCurves3D + ) + +FOREACH(FILE ${DGTAL_TESTS_SRC}) + add_executable(${FILE} ${FILE}) + target_link_libraries (${FILE} DGtal DGtalIO) + add_test(${FILE} ${FILE}) +ENDFOREACH(FILE) + + +#Benchmark target +FOREACH(FILE ${DGTAL_BENCH_SRC}) +add_executable(${FILE} ${FILE}) +target_link_libraries (${FILE} DGtal DGtalIO) +add_custom_target(${FILE}-benchmark COMMAND ${FILE} ">benchmark-${FILE}.txt" ) +ADD_DEPENDENCIES(benchmark ${FILE}-benchmark) +ENDFOREACH(FILE) diff --git a/tests/curves/testParametricCurves3D.cpp b/tests/curves/testParametricCurves3D.cpp new file mode 100755 index 0000000000..5313f38d7a --- /dev/null +++ b/tests/curves/testParametricCurves3D.cpp @@ -0,0 +1,231 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file testParametricCurves3D.cpp + * @ingroup Tests + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, A3SI, France + * + * @date 2014/09/26 + * + * Functions for testing class ParametricCurveDigitizer3D. + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +#include +#include "DGtal/base/Common.h" +#include "ConfigTest.h" +#include "DGtal/helpers/StdDefs.h" +#include "DGtal/curves/parametric/EllipticHelix.h" +#include "DGtal/curves/parametric/Line.h" +#include "DGtal/base/BasicFunctors.h" +#include "DGtal/curves/ParametricCurveDigitizer3D.h" +#include "DGtal/curves/parametric/DecoratorCurveTransformation.h" +#include "DGtal/images/RigidTransformation3D.h" +#include "DGtal/io/writers/PGMWriter.h" +#include +#include +#ifdef __GNUC__ + #ifndef NDEBUG + #include + #endif +#endif +/////////////////////////////////////////////////////////////////////////////// + +using namespace std; +using namespace DGtal; +using namespace Z3i; +using namespace functors; + +/////////////////////////////////////////////////////////////////////////////// +// Functions for testing class ParametricCurveDigitizer3D. +/////////////////////////////////////////////////////////////////////////////// +/** + * Example of a test. To be completed. + * + */ + +class testParametricCurves3D +{ + typedef EllipticHelix < Z3i::Space > MyEllipticHelix; + typedef EllipticHelix < Z3i::Space > MyHelix; + typedef EllipticHelix < Z3i::Space > MyDisc; + typedef Line < Z3i::Space > MyLine; + typedef Board3D<> MyBoard; +private: + MyEllipticHelix ellipticHelix; + MyHelix helix; + MyDisc disc; + MyBoard board; + MyLine line; + template + void project ( const TDCurve & curve, const char * filename, const TDCurve * errors = 0 ) + { + + board.clear(); + for ( unsigned int i = 0; i < curve.size(); i++ ) + { + board.setFillColor ( Color ( 0, 0, 255, 255 ) ); + board << SetMode3D(curve[i].className(), ""); + board << curve[i]; + + board << SetMode3D(curve[i].className(), "PavingWired"); + board << curve[i]; +// board.setFillColor ( Color ( 255, 0, 0, 255 ) ); +// board << SetMode3D(curve[i].className(), ""); +// board << Z3i::Point ( curve.at(i)[0], curve.at(i)[1], -50 ); +// +// board << SetMode3D ( curve[i].className(), "PavingWired"); +// board << Z3i::Point ( curve.at(i)[0], curve.at(i)[1], -50); +// +// board.setFillColor ( Color ( 0, 255, 0 ) ); +// board << SetMode3D(curve[i].className(), ""); +// board << Z3i::Point ( curve.at(i)[0], -50, curve.at(i)[2] ); +// +// board << SetMode3D ( curve[i].className(), "PavingWired"); +// board << Z3i::Point ( curve.at(i)[0], -50, curve.at(i)[2] ); +// +// board.setFillColor ( Color ( 255, 255, 0 ) ); +// board << SetMode3D(curve[i].className(), ""); +// board << Z3i::Point ( -50, curve.at(i)[1], curve.at(i)[2] ); +// +// board << SetMode3D ( curve[i].className(), "PavingWired"); +// board << Z3i::Point ( -50, curve.at(i)[1], curve.at(i)[2] ); + } + if (errors) + { + for ( unsigned int i = 0; i < errors->size(); i++ ) + { + board.setFillColor ( Color ( 255, 0, 0, 255 ) ); + board << SetMode3D(errors->at(i).className(), ""); + board << errors->at(i); + + board << SetMode3D(errors->at(i).className(), "PavingWired"); + board << errors->at(i); + } + } + board.saveOBJ ( filename ); + } + +public: + testParametricCurves3D() : ellipticHelix ( 2, 36, 2 ), helix ( 6, 16, 10 ), disc ( 3 * 10 , 8 * 10, 0 ), line (true, true, true) { } + + bool testDigitizeEllipticHelix () + { + typedef ParametricCurveDigitizer3D < MyEllipticHelix > Digitizer; + typedef ParametricCurveDigitizer3D < MyEllipticHelix >::DigitalCurve MyDigitalCurve; + Digitizer digitizer; + MyDigitalCurve digitalCurve; + digitizer.attach ( ellipticHelix ); + digitizer.init ( digitalCurve ); + double maxt = 2. * M_PI; + digitizer.digitize ( 0, maxt, 0.1 ); + project < MyDigitalCurve > ( digitalCurve, "EllipticHelix" ); + return true; + } + + bool testDigitizeHelix () + { + typedef ParametricCurveDigitizer3D < MyHelix > Digitizer; + typedef ParametricCurveDigitizer3D < MyHelix >::DigitalCurve MyDigitalCurve; + Digitizer digitizer; + MyDigitalCurve digitalCurve; + digitizer.attach ( helix ); + digitizer.init ( digitalCurve ); + double maxt = 2. * M_PI + 0.01; + digitizer.digitize ( 0.0, maxt, 0.001 ); + project < MyDigitalCurve > ( digitalCurve, "helix" ); + return true; + } + + bool testDigitizeLine () + { + typedef ParametricCurveDigitizer3D < MyLine > Digitizer; + typedef ParametricCurveDigitizer3D < MyLine >::DigitalCurve MyDigitalCurve; + Digitizer digitizer; + MyDigitalCurve digitalCurve; + digitizer.attach ( line ); + digitizer.init ( digitalCurve ); + double maxt = 100; + digitizer.digitize ( 0, maxt, 0.5 ); + project < MyDigitalCurve > ( digitalCurve, "line" ); + return true; + } + + bool testDigitizeDisc () + { + typedef ForwardRigidTransformation3D < Space, Identity, Space::RealPoint, Space::RealPoint > ForwardTrans; + typedef BackwardRigidTransformation3D < Space, Identity, Space::RealPoint, Space::RealPoint > BackwardTrans; + typedef DecoratorCurveTransformation < MyDisc, ForwardTrans, BackwardTrans > MyRotatedDisc; + typedef ParametricCurveDigitizer3DDecorator < MyRotatedDisc > Digitizer; + typedef ParametricCurveDigitizer3D < MyRotatedDisc >::DigitalCurve MyDigitalCurve; + + + ForwardTrans trans ( RealPoint ( 0, 0, 0 ), RealVector ( 0, 1, 0 ), M_PI_2, RealVector( 0, 0, 0) ); + BackwardTrans inverse ( RealPoint ( 0, 0, 0 ), RealVector ( 0, 1, 0 ), M_PI_2, RealVector( 0, 0, 0 ) ); + MyRotatedDisc rotDisc ( disc, trans, inverse ); + Digitizer digitizer; + MyDigitalCurve digitalCurve; + MyDigitalCurve digitalCurveErrors; + digitizer.attach ( rotDisc ); +// digitizer.fastAdaptiveMethod ( true ); + digitizer.init ( digitalCurve ); + try + { + double maxt = 2 * M_PI - 0.04; + digitizer.digitize ( 0.04, maxt, 0.00001 ); + } catch ( std::exception & e) { +// if ( std::abs ( digitalCurve.back()[0] - digitalCurve.front()[0] ) >= 2 +// || std::abs ( digitalCurve.back()[1] - digitalCurve.front()[1] ) >= 2 +// || std::abs ( digitalCurve.back()[2] - digitalCurve.front()[2] ) >= 2 ) +// { + ;//return false; +// } + } + project < MyDigitalCurve > ( digitalCurve, "disc", &digitalCurveErrors ); + return true; + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// Standard services - public : + +int main( int , char** ) +{ + +// #ifdef __GNUC__ +// #ifndef NDEBUG +// feenableexcept ( FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW ); +// #endif +// #endif + + bool res = true; + testParametricCurves3D parametricCurveTest; + trace.beginBlock ( "Testing Digitization of parametric 3D curves" ); + std::cout << std::asin(1) << std::endl; +// res &= parametricCurveTest.testDigitizeEllipticHelix(); +// res &= parametricCurveTest.testDigitizeHelix(); +// res &= parametricCurveTest.testDigitizeLine(); + res &= parametricCurveTest.testDigitizeDisc(); + trace.emphase() << ( res ? "Passed." : "Error." ) << endl; + trace.endBlock(); + return res ? 0 : 1; +} +// // +/////////////////////////////////////////////////////////////////////////////// diff --git a/tests/dec/CMakeLists.txt b/tests/dec/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/dec/DECCommon.h b/tests/dec/DECCommon.h old mode 100644 new mode 100755 diff --git a/tests/dec/linear_structure.gp b/tests/dec/linear_structure.gp old mode 100644 new mode 100755 diff --git a/tests/dec/testDiscreteExteriorCalculus.cpp b/tests/dec/testDiscreteExteriorCalculus.cpp old mode 100644 new mode 100755 diff --git a/tests/dec/testDiscreteExteriorCalculusExtended.cpp b/tests/dec/testDiscreteExteriorCalculusExtended.cpp old mode 100644 new mode 100755 diff --git a/tests/dec/testEmbedding.cpp b/tests/dec/testEmbedding.cpp old mode 100644 new mode 100755 diff --git a/tests/dec/testLinearStructure.cpp b/tests/dec/testLinearStructure.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/CMakeLists.txt b/tests/geometry/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/CMakeLists.txt b/tests/geometry/curves/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/CMakeLists.txt b/tests/geometry/curves/estimation/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/testEstimatorComparator.cpp b/tests/geometry/curves/estimation/testEstimatorComparator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/testL1LengthEstimator.cpp b/tests/geometry/curves/estimation/testL1LengthEstimator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/testLambdaMST2D.cpp b/tests/geometry/curves/estimation/testLambdaMST2D.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/testLambdaMST3D.cpp b/tests/geometry/curves/estimation/testLambdaMST3D.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/testLengthEstimators.cpp b/tests/geometry/curves/estimation/testLengthEstimators.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/testMostCenteredMSEstimator.cpp b/tests/geometry/curves/estimation/testMostCenteredMSEstimator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/testSegmentComputerEstimators.cpp b/tests/geometry/curves/estimation/testSegmentComputerEstimators.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/estimation/testTrueLocalEstimator.cpp b/tests/geometry/curves/estimation/testTrueLocalEstimator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testArithDSS3d.cpp b/tests/geometry/curves/testArithDSS3d.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testArithDSSIterator.cpp b/tests/geometry/curves/testArithDSSIterator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testArithmeticalDSL.cpp b/tests/geometry/curves/testArithmeticalDSL.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testArithmeticalDSLKernel.cpp b/tests/geometry/curves/testArithmeticalDSLKernel.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testArithmeticalDSS.cpp b/tests/geometry/curves/testArithmeticalDSS.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testArithmeticalDSSComputer.cpp b/tests/geometry/curves/testArithmeticalDSSComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testArithmeticalDSSConvexHull.cpp b/tests/geometry/curves/testArithmeticalDSSConvexHull.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testBinomialConvolver.cpp b/tests/geometry/curves/testBinomialConvolver.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testCombinDSS.cpp b/tests/geometry/curves/testCombinDSS.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testDSLSubsegment.cpp b/tests/geometry/curves/testDSLSubsegment.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testFP.cpp b/tests/geometry/curves/testFP.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testFrechetShortcut.cpp b/tests/geometry/curves/testFrechetShortcut.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testFreemanChain.cpp b/tests/geometry/curves/testFreemanChain.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testGridCurve.cpp b/tests/geometry/curves/testGridCurve.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testSegmentation.cpp b/tests/geometry/curves/testSegmentation.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testStabbingCircleComputer.cpp b/tests/geometry/curves/testStabbingCircleComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/curves/testStabbingLineComputer.cpp b/tests/geometry/curves/testStabbingLineComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/CMakeLists.txt b/tests/geometry/surfaces/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testCOBAGenericNaivePlaneComputer-benchmark.cpp b/tests/geometry/surfaces/testCOBAGenericNaivePlaneComputer-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testCOBAGenericStandardPlaneComputer.cpp b/tests/geometry/surfaces/testCOBAGenericStandardPlaneComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testCOBANaivePlaneComputer-benchmark.cpp b/tests/geometry/surfaces/testCOBANaivePlaneComputer-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testCOBANaivePlaneComputer.cpp b/tests/geometry/surfaces/testCOBANaivePlaneComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testChordGenericStandardPlaneComputer.cpp b/tests/geometry/surfaces/testChordGenericStandardPlaneComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testChordNaivePlaneComputer-benchmark.cpp b/tests/geometry/surfaces/testChordNaivePlaneComputer-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testChordNaivePlaneComputer.cpp b/tests/geometry/surfaces/testChordNaivePlaneComputer.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testEstimatorCache.cpp b/tests/geometry/surfaces/testEstimatorCache.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testIntegralInvariantCovarianceEstimator.cpp b/tests/geometry/surfaces/testIntegralInvariantCovarianceEstimator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testIntegralInvariantVolumeEstimator.cpp b/tests/geometry/surfaces/testIntegralInvariantVolumeEstimator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testLocalConvolutionNormalVectorEstimator.cpp b/tests/geometry/surfaces/testLocalConvolutionNormalVectorEstimator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testLocalEstimatorFromFunctorAdapter.cpp b/tests/geometry/surfaces/testLocalEstimatorFromFunctorAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testMonge.cpp b/tests/geometry/surfaces/testMonge.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testNormalVectorEstimatorEmbedder.cpp b/tests/geometry/surfaces/testNormalVectorEstimatorEmbedder.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testSphereFitting.cpp b/tests/geometry/surfaces/testSphereFitting.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testTensorVoting.cpp b/tests/geometry/surfaces/testTensorVoting.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testTensorVotingViewer.cpp b/tests/geometry/surfaces/testTensorVotingViewer.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/surfaces/testVoronoiCovarianceMeasureOnSurface.cpp b/tests/geometry/surfaces/testVoronoiCovarianceMeasureOnSurface.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/testContourHelper.cpp b/tests/geometry/testContourHelper.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/CMakeLists.txt b/tests/geometry/tools/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/determinant/CMakeLists.txt b/tests/geometry/tools/determinant/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/determinant/test2x2DetComputers.cpp b/tests/geometry/tools/determinant/test2x2DetComputers.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/determinant/testInHalfPlane-benchmark.cpp b/tests/geometry/tools/determinant/testInHalfPlane-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/determinant/testInHalfPlane.cpp b/tests/geometry/tools/determinant/testInHalfPlane.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/testPreimage.cpp b/tests/geometry/tools/testPreimage.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/testRayIntersection.cpp b/tests/geometry/tools/testRayIntersection.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/testSphericalAccumulator.cpp b/tests/geometry/tools/testSphericalAccumulator.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/tools/testSphericalAccumulatorQGL.cpp b/tests/geometry/tools/testSphericalAccumulatorQGL.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/CMakeLists.txt b/tests/geometry/volumes/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/CMakeLists.txt b/tests/geometry/volumes/distance/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testChamferDT.cpp b/tests/geometry/volumes/distance/testChamferDT.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testChamferVoro.cpp b/tests/geometry/volumes/distance/testChamferVoro.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testDigitalMetricAdapter.cpp b/tests/geometry/volumes/distance/testDigitalMetricAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testDistanceTransformation.cpp b/tests/geometry/volumes/distance/testDistanceTransformation.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testDistanceTransformationMetrics.cpp b/tests/geometry/volumes/distance/testDistanceTransformationMetrics.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testDistanceTransformationND.cpp b/tests/geometry/volumes/distance/testDistanceTransformationND.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testFMM.cpp b/tests/geometry/volumes/distance/testFMM.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testMetricBalls.cpp b/tests/geometry/volumes/distance/testMetricBalls.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testMetrics-benchmark.cpp b/tests/geometry/volumes/distance/testMetrics-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testMetrics.cpp b/tests/geometry/volumes/distance/testMetrics.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testPowerMap.cpp b/tests/geometry/volumes/distance/testPowerMap.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testReducedMedialAxis.cpp b/tests/geometry/volumes/distance/testReducedMedialAxis.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testReverseDT.cpp b/tests/geometry/volumes/distance/testReverseDT.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testSeparableMetricAdapter.cpp b/tests/geometry/volumes/distance/testSeparableMetricAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/distance/testVoronoiMap.cpp b/tests/geometry/volumes/distance/testVoronoiMap.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/estimation/CMakeLists.txt b/tests/geometry/volumes/estimation/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/estimation/testMeasureSet.cpp b/tests/geometry/volumes/estimation/testMeasureSet.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/estimation/testVoronoiCovarianceMeasure.cpp b/tests/geometry/volumes/estimation/testVoronoiCovarianceMeasure.cpp old mode 100644 new mode 100755 diff --git a/tests/geometry/volumes/testKanungo.cpp b/tests/geometry/volumes/testKanungo.cpp old mode 100644 new mode 100755 diff --git a/tests/graph/CMakeLists.txt b/tests/graph/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/graph/testBreadthFirstPropagation.cpp b/tests/graph/testBreadthFirstPropagation.cpp old mode 100644 new mode 100755 diff --git a/tests/graph/testDepthFirstPropagation.cpp b/tests/graph/testDepthFirstPropagation.cpp old mode 100644 new mode 100755 diff --git a/tests/graph/testDigitalSurfaceBoostGraphInterface.cpp b/tests/graph/testDigitalSurfaceBoostGraphInterface.cpp old mode 100644 new mode 100755 diff --git a/tests/graph/testDistancePropagation.cpp b/tests/graph/testDistancePropagation.cpp old mode 100644 new mode 100755 diff --git a/tests/graph/testExpander-benchmark.cpp b/tests/graph/testExpander-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/graph/testExpander.cpp b/tests/graph/testExpander.cpp old mode 100644 new mode 100755 diff --git a/tests/graph/testSTLMapToVertexMapAdapter.cpp b/tests/graph/testSTLMapToVertexMapAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/helpers/CMakeLists.txt b/tests/helpers/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/helpers/testImplicitShape.cpp b/tests/helpers/testImplicitShape.cpp old mode 100644 new mode 100755 diff --git a/tests/helpers/testParametricShape.cpp b/tests/helpers/testParametricShape.cpp old mode 100644 new mode 100755 diff --git a/tests/images/CMakeLists.txt b/tests/images/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/images/benchmarkImageContainer.cpp b/tests/images/benchmarkImageContainer.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testCheckImageConcept.cpp b/tests/images/testCheckImageConcept.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testConstImageAdapter.cpp b/tests/images/testConstImageAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testHashTree.cpp b/tests/images/testHashTree.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testITKImage.cpp b/tests/images/testITKImage.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testImage.cpp b/tests/images/testImage.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testImageAdapter.cpp b/tests/images/testImageAdapter.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testImageCache.cpp b/tests/images/testImageCache.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testImageContainerByHashTree.cpp b/tests/images/testImageContainerByHashTree.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testImageFactoryFromHDF5.cpp b/tests/images/testImageFactoryFromHDF5.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testImageSimple.cpp b/tests/images/testImageSimple.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testImageSpanIterators.cpp b/tests/images/testImageSpanIterators.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testMorton.cpp b/tests/images/testMorton.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testRigidTransformation2D.cpp b/tests/images/testRigidTransformation2D.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testRigidTransformation3D.cpp b/tests/images/testRigidTransformation3D.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testSliceImageFromFunctor.cpp b/tests/images/testSliceImageFromFunctor.cpp old mode 100644 new mode 100755 diff --git a/tests/images/testTiledImage.cpp b/tests/images/testTiledImage.cpp old mode 100644 new mode 100755 diff --git a/tests/io/CMakeLists.txt b/tests/io/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/io/boards/CMakeLists.txt b/tests/io/boards/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/io/boards/testBallQuad.cpp b/tests/io/boards/testBallQuad.cpp old mode 100644 new mode 100755 diff --git a/tests/io/boards/testBoard3D.cpp b/tests/io/boards/testBoard3D.cpp old mode 100644 new mode 100755 diff --git a/tests/io/colormaps/CMakeLists.txt b/tests/io/colormaps/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/io/colormaps/testColorMaps.cpp b/tests/io/colormaps/testColorMaps.cpp old mode 100644 new mode 100755 diff --git a/tests/io/colormaps/testTickedColorMap.cpp b/tests/io/colormaps/testTickedColorMap.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/CMakeLists.txt b/tests/io/readers/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/io/readers/testDicomReader.cpp b/tests/io/readers/testDicomReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testGenericReader.cpp b/tests/io/readers/testGenericReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testHDF5Reader.cpp b/tests/io/readers/testHDF5Reader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testMPolynomialReader.cpp b/tests/io/readers/testMPolynomialReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testMagickReader.cpp b/tests/io/readers/testMagickReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testMeshReader.cpp b/tests/io/readers/testMeshReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testPNMReader.cpp b/tests/io/readers/testPNMReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testPointListReader.cpp b/tests/io/readers/testPointListReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testRawReader.cpp b/tests/io/readers/testRawReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testTableReader.cpp b/tests/io/readers/testTableReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/readers/testVolReader.cpp b/tests/io/readers/testVolReader.cpp old mode 100644 new mode 100755 diff --git a/tests/io/testArcDrawing.cpp b/tests/io/testArcDrawing.cpp old mode 100644 new mode 100755 diff --git a/tests/io/testBoard2DCustomStyle.cpp b/tests/io/testBoard2DCustomStyle.cpp old mode 100644 new mode 100755 diff --git a/tests/io/testColor.cpp b/tests/io/testColor.cpp old mode 100644 new mode 100755 diff --git a/tests/io/testITKio.cpp b/tests/io/testITKio.cpp old mode 100644 new mode 100755 diff --git a/tests/io/testLongvol.cpp b/tests/io/testLongvol.cpp old mode 100644 new mode 100755 diff --git a/tests/io/testSimpleBoard.cpp b/tests/io/testSimpleBoard.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/CMakeLists.txt b/tests/io/viewers/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/io/viewers/test3DDomain2DView.cpp b/tests/io/viewers/test3DDomain2DView.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/test3DImage3DView.cpp b/tests/io/viewers/test3DImage3DView.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/test3DImageView.cpp b/tests/io/viewers/test3DImageView.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/test3DImageViewEmbedder.cpp b/tests/io/viewers/test3DImageViewEmbedder.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/testBallQuadViewer.cpp b/tests/io/viewers/testBallQuadViewer.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/testDisplayKSCell.cpp b/tests/io/viewers/testDisplayKSCell.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/testPolygon3D.cpp b/tests/io/viewers/testPolygon3D.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/testViewer3D.cpp b/tests/io/viewers/testViewer3D.cpp old mode 100644 new mode 100755 diff --git a/tests/io/viewers/testViewerQuad.cpp b/tests/io/viewers/testViewerQuad.cpp old mode 100644 new mode 100755 diff --git a/tests/io/writers/CMakeLists.txt b/tests/io/writers/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/io/writers/testGenericWriter.cpp b/tests/io/writers/testGenericWriter.cpp old mode 100644 new mode 100755 diff --git a/tests/io/writers/testMeshWriter.cpp b/tests/io/writers/testMeshWriter.cpp old mode 100644 new mode 100755 diff --git a/tests/io/writers/testPNMRawWriter.cpp b/tests/io/writers/testPNMRawWriter.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/CMakeLists.txt b/tests/kernel/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/kernel/benchmarkSetContainer.cpp b/tests/kernel/benchmarkSetContainer.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testBasicPointFunctors.cpp b/tests/kernel/testBasicPointFunctors.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testDGtalGMP.cpp b/tests/kernel/testDGtalGMP.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testDigitalSet.cpp b/tests/kernel/testDigitalSet.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testDomainSpanIterator.cpp b/tests/kernel/testDomainSpanIterator.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testEmbedder.cpp b/tests/kernel/testEmbedder.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testHyperRectDomain-snippet.cpp b/tests/kernel/testHyperRectDomain-snippet.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testHyperRectDomain.cpp b/tests/kernel/testHyperRectDomain.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testImagesSetsUtilities.cpp b/tests/kernel/testImagesSetsUtilities.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testInteger.cpp b/tests/kernel/testInteger.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testLinearAlgebra.cpp b/tests/kernel/testLinearAlgebra.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testLinearizer.cpp b/tests/kernel/testLinearizer.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testPointHashFunctions.cpp b/tests/kernel/testPointHashFunctions.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testPointPredicateConcepts.cpp b/tests/kernel/testPointPredicateConcepts.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testPointVector-catch.cpp b/tests/kernel/testPointVector-catch.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testPointVector.cpp b/tests/kernel/testPointVector.cpp old mode 100644 new mode 100755 diff --git a/tests/kernel/testPointVectorContainers.cpp b/tests/kernel/testPointVectorContainers.cpp old mode 100644 new mode 100755 diff --git a/tests/math/CMakeLists.txt b/tests/math/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/math/linalg/CMakeLists.txt b/tests/math/linalg/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/math/linalg/testEigenDecomposition.cpp b/tests/math/linalg/testEigenDecomposition.cpp old mode 100644 new mode 100755 diff --git a/tests/math/linalg/testEigenSolver.cpp b/tests/math/linalg/testEigenSolver.cpp old mode 100644 new mode 100755 diff --git a/tests/math/linalg/testSimpleMatrix.cpp b/tests/math/linalg/testSimpleMatrix.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testAngleLinearMinimizer.cpp b/tests/math/testAngleLinearMinimizer.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testBasicMathFunctions.cpp b/tests/math/testBasicMathFunctions.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testHistogram.cpp b/tests/math/testHistogram.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testMPolynomial.cpp b/tests/math/testMPolynomial.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testMeasure.cpp b/tests/math/testMeasure.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testRationalAngle.cpp b/tests/math/testRationalAngle.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testSignal.cpp b/tests/math/testSignal.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testSimpleRegression.cpp b/tests/math/testSimpleRegression.cpp old mode 100644 new mode 100755 diff --git a/tests/math/testStatistics.cpp b/tests/math/testStatistics.cpp old mode 100644 new mode 100755 diff --git a/tests/samples/Ball.fc b/tests/samples/Ball.fc old mode 100644 new mode 100755 diff --git a/tests/samples/Ball2.fc b/tests/samples/Ball2.fc old mode 100644 new mode 100755 diff --git a/tests/samples/BigBall.fc b/tests/samples/BigBall.fc old mode 100644 new mode 100755 diff --git a/tests/samples/BigBall2.fc b/tests/samples/BigBall2.fc old mode 100644 new mode 100755 diff --git a/tests/samples/DSS.dat b/tests/samples/DSS.dat old mode 100644 new mode 100755 diff --git a/tests/samples/SmallBall.fc b/tests/samples/SmallBall.fc old mode 100644 new mode 100755 diff --git a/tests/samples/SmallBall2.fc b/tests/samples/SmallBall2.fc old mode 100644 new mode 100755 diff --git a/tests/samples/ascii_ball.pgm3d b/tests/samples/ascii_ball.pgm3d old mode 100644 new mode 100755 diff --git a/tests/samples/box.off b/tests/samples/box.off old mode 100644 new mode 100755 diff --git a/tests/samples/cat10.h5 b/tests/samples/cat10.h5 old mode 100644 new mode 100755 diff --git a/tests/samples/cat10.pgm3d b/tests/samples/cat10.pgm3d old mode 100644 new mode 100755 diff --git a/tests/samples/cat10.vol b/tests/samples/cat10.vol old mode 100644 new mode 100755 diff --git a/tests/samples/church-small.pgm b/tests/samples/church-small.pgm old mode 100644 new mode 100755 diff --git a/tests/samples/circleR10.pgm b/tests/samples/circleR10.pgm old mode 100644 new mode 100755 diff --git a/tests/samples/circleR10modif.pgm b/tests/samples/circleR10modif.pgm old mode 100644 new mode 100755 diff --git a/tests/samples/color64.png b/tests/samples/color64.png old mode 100644 new mode 100755 diff --git a/tests/samples/color64.ppm b/tests/samples/color64.ppm old mode 100644 new mode 100755 diff --git a/tests/samples/contourS.fc b/tests/samples/contourS.fc old mode 100644 new mode 100755 diff --git a/tests/samples/contourS.gif b/tests/samples/contourS.gif old mode 100644 new mode 100755 diff --git a/tests/samples/contourS.pgm b/tests/samples/contourS.pgm old mode 100644 new mode 100755 diff --git a/tests/samples/contourS.png b/tests/samples/contourS.png old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1629.dcm b/tests/samples/dicomSample/1629.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1630.dcm b/tests/samples/dicomSample/1630.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1631.dcm b/tests/samples/dicomSample/1631.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1632.dcm b/tests/samples/dicomSample/1632.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1633.dcm b/tests/samples/dicomSample/1633.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1634.dcm b/tests/samples/dicomSample/1634.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1635.dcm b/tests/samples/dicomSample/1635.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1636.dcm b/tests/samples/dicomSample/1636.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1637.dcm b/tests/samples/dicomSample/1637.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1638.dcm b/tests/samples/dicomSample/1638.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1639.dcm b/tests/samples/dicomSample/1639.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1640.dcm b/tests/samples/dicomSample/1640.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1641.dcm b/tests/samples/dicomSample/1641.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1642.dcm b/tests/samples/dicomSample/1642.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1643.dcm b/tests/samples/dicomSample/1643.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1644.dcm b/tests/samples/dicomSample/1644.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1645.dcm b/tests/samples/dicomSample/1645.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1646.dcm b/tests/samples/dicomSample/1646.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1647.dcm b/tests/samples/dicomSample/1647.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1648.dcm b/tests/samples/dicomSample/1648.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1649.dcm b/tests/samples/dicomSample/1649.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1650.dcm b/tests/samples/dicomSample/1650.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1651.dcm b/tests/samples/dicomSample/1651.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1652.dcm b/tests/samples/dicomSample/1652.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1653.dcm b/tests/samples/dicomSample/1653.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1654.dcm b/tests/samples/dicomSample/1654.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1655.dcm b/tests/samples/dicomSample/1655.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1656.dcm b/tests/samples/dicomSample/1656.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1657.dcm b/tests/samples/dicomSample/1657.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1658.dcm b/tests/samples/dicomSample/1658.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1659.dcm b/tests/samples/dicomSample/1659.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1660.dcm b/tests/samples/dicomSample/1660.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1661.dcm b/tests/samples/dicomSample/1661.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1662.dcm b/tests/samples/dicomSample/1662.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1663.dcm b/tests/samples/dicomSample/1663.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1664.dcm b/tests/samples/dicomSample/1664.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1665.dcm b/tests/samples/dicomSample/1665.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1666.dcm b/tests/samples/dicomSample/1666.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1667.dcm b/tests/samples/dicomSample/1667.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1668.dcm b/tests/samples/dicomSample/1668.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1669.dcm b/tests/samples/dicomSample/1669.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1670.dcm b/tests/samples/dicomSample/1670.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1671.dcm b/tests/samples/dicomSample/1671.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1672.dcm b/tests/samples/dicomSample/1672.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1673.dcm b/tests/samples/dicomSample/1673.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1674.dcm b/tests/samples/dicomSample/1674.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1675.dcm b/tests/samples/dicomSample/1675.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1676.dcm b/tests/samples/dicomSample/1676.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1677.dcm b/tests/samples/dicomSample/1677.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1678.dcm b/tests/samples/dicomSample/1678.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1679.dcm b/tests/samples/dicomSample/1679.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1680.dcm b/tests/samples/dicomSample/1680.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1681.dcm b/tests/samples/dicomSample/1681.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1682.dcm b/tests/samples/dicomSample/1682.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1683.dcm b/tests/samples/dicomSample/1683.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1684.dcm b/tests/samples/dicomSample/1684.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1685.dcm b/tests/samples/dicomSample/1685.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1686.dcm b/tests/samples/dicomSample/1686.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1687.dcm b/tests/samples/dicomSample/1687.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1688.dcm b/tests/samples/dicomSample/1688.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1689.dcm b/tests/samples/dicomSample/1689.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1690.dcm b/tests/samples/dicomSample/1690.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1691.dcm b/tests/samples/dicomSample/1691.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1692.dcm b/tests/samples/dicomSample/1692.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1693.dcm b/tests/samples/dicomSample/1693.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1694.dcm b/tests/samples/dicomSample/1694.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1695.dcm b/tests/samples/dicomSample/1695.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1696.dcm b/tests/samples/dicomSample/1696.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1697.dcm b/tests/samples/dicomSample/1697.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1698.dcm b/tests/samples/dicomSample/1698.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1699.dcm b/tests/samples/dicomSample/1699.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1700.dcm b/tests/samples/dicomSample/1700.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1701.dcm b/tests/samples/dicomSample/1701.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1702.dcm b/tests/samples/dicomSample/1702.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1703.dcm b/tests/samples/dicomSample/1703.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1704.dcm b/tests/samples/dicomSample/1704.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1705.dcm b/tests/samples/dicomSample/1705.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1706.dcm b/tests/samples/dicomSample/1706.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1707.dcm b/tests/samples/dicomSample/1707.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1708.dcm b/tests/samples/dicomSample/1708.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1709.dcm b/tests/samples/dicomSample/1709.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1710.dcm b/tests/samples/dicomSample/1710.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1711.dcm b/tests/samples/dicomSample/1711.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1712.dcm b/tests/samples/dicomSample/1712.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1713.dcm b/tests/samples/dicomSample/1713.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1714.dcm b/tests/samples/dicomSample/1714.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1715.dcm b/tests/samples/dicomSample/1715.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1716.dcm b/tests/samples/dicomSample/1716.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1717.dcm b/tests/samples/dicomSample/1717.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1718.dcm b/tests/samples/dicomSample/1718.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1719.dcm b/tests/samples/dicomSample/1719.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1720.dcm b/tests/samples/dicomSample/1720.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1721.dcm b/tests/samples/dicomSample/1721.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1722.dcm b/tests/samples/dicomSample/1722.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1723.dcm b/tests/samples/dicomSample/1723.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1724.dcm b/tests/samples/dicomSample/1724.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1725.dcm b/tests/samples/dicomSample/1725.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1726.dcm b/tests/samples/dicomSample/1726.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1727.dcm b/tests/samples/dicomSample/1727.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1728.dcm b/tests/samples/dicomSample/1728.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1729.dcm b/tests/samples/dicomSample/1729.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1730.dcm b/tests/samples/dicomSample/1730.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1731.dcm b/tests/samples/dicomSample/1731.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1732.dcm b/tests/samples/dicomSample/1732.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1733.dcm b/tests/samples/dicomSample/1733.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1734.dcm b/tests/samples/dicomSample/1734.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1735.dcm b/tests/samples/dicomSample/1735.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1736.dcm b/tests/samples/dicomSample/1736.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1737.dcm b/tests/samples/dicomSample/1737.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1738.dcm b/tests/samples/dicomSample/1738.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1739.dcm b/tests/samples/dicomSample/1739.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1740.dcm b/tests/samples/dicomSample/1740.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1741.dcm b/tests/samples/dicomSample/1741.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1742.dcm b/tests/samples/dicomSample/1742.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1743.dcm b/tests/samples/dicomSample/1743.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1744.dcm b/tests/samples/dicomSample/1744.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1745.dcm b/tests/samples/dicomSample/1745.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1746.dcm b/tests/samples/dicomSample/1746.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1747.dcm b/tests/samples/dicomSample/1747.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1748.dcm b/tests/samples/dicomSample/1748.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1749.dcm b/tests/samples/dicomSample/1749.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1750.dcm b/tests/samples/dicomSample/1750.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1751.dcm b/tests/samples/dicomSample/1751.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1752.dcm b/tests/samples/dicomSample/1752.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1753.dcm b/tests/samples/dicomSample/1753.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1754.dcm b/tests/samples/dicomSample/1754.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1755.dcm b/tests/samples/dicomSample/1755.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1756.dcm b/tests/samples/dicomSample/1756.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/dicomSample/1757.dcm b/tests/samples/dicomSample/1757.dcm old mode 100644 new mode 100755 diff --git a/tests/samples/emptyFile.dat b/tests/samples/emptyFile.dat old mode 100644 new mode 100755 diff --git a/tests/samples/ex_image2.h5 b/tests/samples/ex_image2.h5 old mode 100644 new mode 100755 diff --git a/tests/samples/france.fc b/tests/samples/france.fc old mode 100644 new mode 100755 diff --git a/tests/samples/france.sdp b/tests/samples/france.sdp old mode 100644 new mode 100755 diff --git a/tests/samples/freemanChainSample.fc b/tests/samples/freemanChainSample.fc old mode 100644 new mode 100755 diff --git a/tests/samples/klokan.fc b/tests/samples/klokan.fc old mode 100644 new mode 100755 diff --git a/tests/samples/klokan.sdp b/tests/samples/klokan.sdp old mode 100644 new mode 100755 diff --git a/tests/samples/klokanNoise0_75_125_175.fc b/tests/samples/klokanNoise0_75_125_175.fc old mode 100644 new mode 100755 diff --git a/tests/samples/klokanNoise0_75_125_175.pgm b/tests/samples/klokanNoise0_75_125_175.pgm old mode 100644 new mode 100755 diff --git a/tests/samples/klokanNoise0_75_125_175BG.png b/tests/samples/klokanNoise0_75_125_175BG.png old mode 100644 new mode 100755 diff --git a/tests/samples/lobsterCroped.vol b/tests/samples/lobsterCroped.vol old mode 100644 new mode 100755 diff --git a/tests/samples/manche.fc b/tests/samples/manche.fc old mode 100644 new mode 100755 diff --git a/tests/samples/pointList1.pl b/tests/samples/pointList1.pl old mode 100644 new mode 100755 diff --git a/tests/samples/polygon2D.dat b/tests/samples/polygon2D.dat old mode 100644 new mode 100755 diff --git a/tests/samples/polygons.dat b/tests/samples/polygons.dat old mode 100644 new mode 100755 diff --git a/tests/samples/raw2D-64x64.raw b/tests/samples/raw2D-64x64.raw old mode 100644 new mode 100755 diff --git a/tests/samples/raw32bits5x5.raw b/tests/samples/raw32bits5x5.raw old mode 100644 new mode 100755 diff --git a/tests/samples/raw32bits5x5x5.raw b/tests/samples/raw32bits5x5x5.raw old mode 100644 new mode 100755 diff --git a/tests/samples/rsquareNoise0_75_125_175.fc b/tests/samples/rsquareNoise0_75_125_175.fc old mode 100644 new mode 100755 diff --git a/tests/samples/rsquareNoise0_75_125_175.sdp b/tests/samples/rsquareNoise0_75_125_175.sdp old mode 100644 new mode 100755 diff --git a/tests/samples/simple.pgm3d b/tests/samples/simple.pgm3d old mode 100644 new mode 100755 diff --git a/tests/samples/simpleSet-paving.png b/tests/samples/simpleSet-paving.png old mode 100644 new mode 100755 diff --git a/tests/samples/sinus2D4.dat b/tests/samples/sinus2D4.dat old mode 100644 new mode 100755 diff --git a/tests/samples/sinus3D.dat b/tests/samples/sinus3D.dat old mode 100644 new mode 100755 diff --git a/tests/samples/sinusplanar3D.dat b/tests/samples/sinusplanar3D.dat old mode 100644 new mode 100755 diff --git a/tests/samples/smallSquare.dat b/tests/samples/smallSquare.dat old mode 100644 new mode 100755 diff --git a/tests/samples/test.longvol b/tests/samples/test.longvol old mode 100644 new mode 100755 diff --git a/tests/samples/testMesh.ofs b/tests/samples/testMesh.ofs old mode 100644 new mode 100755 diff --git a/tests/shapes/CMakeLists.txt b/tests/shapes/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/shapes/testBall3D.cpp b/tests/shapes/testBall3D.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testBall3DSurface.cpp b/tests/shapes/testBall3DSurface.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testDigitalShapesDecorator.cpp b/tests/shapes/testDigitalShapesDecorator.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testEuclideanShapesDecorator.cpp b/tests/shapes/testEuclideanShapesDecorator.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testGaussDigitizer.cpp b/tests/shapes/testGaussDigitizer.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testHalfPlane.cpp b/tests/shapes/testHalfPlane.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testImplicitFunctionModels.cpp b/tests/shapes/testImplicitFunctionModels.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testMesh.cpp b/tests/shapes/testMesh.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testMeshDisplay.cpp b/tests/shapes/testMeshDisplay.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testPolynomial.cpp b/tests/shapes/testPolynomial.cpp old mode 100644 new mode 100755 diff --git a/tests/shapes/testShapesFromPoints.cpp b/tests/shapes/testShapesFromPoints.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/CMakeLists.txt b/tests/topology/CMakeLists.txt old mode 100644 new mode 100755 diff --git a/tests/topology/testAdjacency.cpp b/tests/topology/testAdjacency.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testCellularGridSpaceND.cpp b/tests/topology/testCellularGridSpaceND.cpp new file mode 100755 index 0000000000..67119696fa --- /dev/null +++ b/tests/topology/testCellularGridSpaceND.cpp @@ -0,0 +1,532 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file testCellularGridSpaceND.cpp + * @ingroup Tests + * @author Jacques-Olivier Lachaud (\c jacques-olivier.lachaud@univ-savoie.fr ) + * Laboratory of Mathematics (CNRS, UMR 5807), University of Savoie, France + * + * @date 2011/02/08 + * + * Functions for testing class CellularGridSpaceND. + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include "DGtal/base/Common.h" +#include "DGtal/kernel/SpaceND.h" +#include "DGtal/kernel/domains/HyperRectDomain.h" +#include "DGtal/kernel/sets/DigitalSetSelector.h" +#include "DGtal/topology/CCellularGridSpaceND.h" +#include "DGtal/topology/KhalimskySpaceND.h" +#include "DGtal/topology/SurfelAdjacency.h" +#include "DGtal/topology/SurfelNeighborhood.h" +#include "DGtal/shapes/Shapes.h" +#include "DGtal/topology/helpers/Surfaces.h" +#include "DGtal/io/boards/Board2D.h" +#include "DGtal/io/Color.h" +/////////////////////////////////////////////////////////////////////////////// + +using namespace std; +using namespace DGtal; + +/////////////////////////////////////////////////////////////////////////////// +// Functions for testing class CellularGridSpaceND. +/////////////////////////////////////////////////////////////////////////////// +/** + * Example of a test. To be completed. + * + */ +template +bool testCellularGridSpaceND() +{ + typedef typename KSpace::Cell Cell; + typedef typename KSpace::SCell SCell; + typedef typename KSpace::Point Point; + typedef typename KSpace::DirIterator DirIterator; + typedef typename KSpace::Cells Cells; + unsigned int nbok = 0; + unsigned int nb = 0; + + trace.beginBlock ( "Testing block KSpace instantiation and scan ..." ); + KSpace K; + int xlow[ 4 ] = { -3, -2, -2, -1 }; + int xhigh[ 4 ] = { 5, 3, 2, 3 }; + Point low( xlow ); + Point high( xhigh ); + bool space_ok = K.init( low, high, true ); + nbok += space_ok ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << "K.init( low, high )" << std::endl; + trace.info() << "K.dim()=" << K.dimension << endl; + int spel[ 4 ] = { 1, 1, 1, 1 }; // pixel + Point kp( spel ); + Cell center = K.uCell( kp ); + Cell c1 = K.uCell( kp ); + Cell clow = K.uCell( low, kp ); + Cell chigh = K.uCell( high, kp ); + trace.info() << c1 << clow << chigh + << " topo(c1)=" << K.uTopology( c1 ) << " dirs="; + for ( DirIterator q = K.uDirs( clow ); q != 0; ++q ) + trace.info() << " " << *q; + trace.info() << endl; + Cell f = K.uFirst( c1 ); + Cell l = K.uLast( c1 ); + trace.info() << "Loop in " << clow << chigh << endl; + c1 = f; + unsigned int nbelems = 0; + do { + ++nbelems; + // trace.info() << c1; + } while ( K.uNext( c1, f, l ) ); + trace.info() << " -> " << nbelems << " elements." << endl; + unsigned int exp_nbelems = 1; + for ( Dimension i = 0; i < K.dimension; ++i ) + exp_nbelems *= K.size( i ); + nbok += nbelems == exp_nbelems ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << nbelems << " scanned elements == " + << exp_nbelems << " space size." + << std::endl; + trace.endBlock(); + trace.beginBlock ( "Testing neighborhoods in KSpace..." ); + Cells N = K.uNeighborhood( center ); + nbok += N.size() == ( K.dimension*2 + 1 ) ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << N.size() << "(neighborhood size) == " + << ( K.dimension*2 + 1 ) << "(2*dim()+1)" << endl; + Cells Np = K.uProperNeighborhood( center ); + nbok += Np.size() == ( K.dimension*2 ) ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << Np.size() << "(proper neighborhood size) == " + << ( K.dimension*2 ) << "(2*dim())" << endl; + trace.endBlock(); + + trace.beginBlock ( "Testing faces in KSpace..." ); + Cells Nf = K.uFaces( center ); + nbok += Nf.size() == ceil( std::pow( 3.0 ,(int) K.dimension ) - 1 ) ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << Nf.size() << "(faces size) == " + << floor( std::pow( 3.0, (int)K.dimension ) - 1 ) << "(3^dim()-1)" << endl; + trace.endBlock(); + + trace.beginBlock ( "Testing block Incidence in KSpace..." ); + SCell sspel = K.sCell( kp, K.POS ); + for ( DirIterator q1 = K.sDirs( sspel ); q1 != 0; ++q1 ) + for ( DirIterator q2 = K.sDirs( sspel ); q2 != 0; ++q2 ) + { + if ( *q1 != *q2 ) + { + SCell s0 = K.sIncident( sspel, *q1, true ); + SCell s1 = K.sIncident( sspel, *q2, true ); + SCell l10 = K.sIncident( s0, *q2, true ); + SCell l01 = K.sIncident( s1, *q1, true ); + trace.info() << "D+_" << *q2 << "(D+_" << *q1 << "(V))=" << l10 + << " D+_" << *q1 << "(D+_" << *q2 << "(V))=" << l01 + << endl; + nbok += l10 == K.sOpp( l01 ) ? 1 : 0; + nb++; + } + } + trace.info() << "(" << nbok << "/" << nb << ") " + << "anti-commutativity of incidence operators." << std::endl; + trace.endBlock(); + + trace.beginBlock ( "Testing direct Incidence in KSpace..." ); + for ( DirIterator q1 = K.sDirs( sspel ); q1 != 0; ++q1 ) + for ( DirIterator q2 = K.sDirs( sspel ); q2 != 0; ++q2 ) + { + if ( *q1 != *q2 ) + { + SCell s0 = K.sDirectIncident( sspel, *q1 ); + SCell l10 = K.sDirectIncident( s0, *q2 ); + SCell s1 = K.sDirectIncident( sspel, *q2 ); + SCell l01 = K.sDirectIncident( s1, *q1 ); + trace.info() << "Dd_" << *q2 << "(Dd_" << *q1 << "(V))=" << l10 + << " Dd_" << *q1 << "(Dd_" << *q2 << "(V))=" << l01 + << endl; + nbok += l10 != l01 ? 1 : 0; + nbok += K.sSign( s0 ) == K.POS ? 1 : 0; + nbok += K.sSign( s1 ) == K.POS ? 1 : 0; + nbok += K.sSign( l10 ) == K.POS ? 1 : 0; + nbok += K.sSign( l01 ) == K.POS ? 1 : 0; + nbok += s0 == K.sIncident( sspel, *q1, K.sDirect( sspel, *q1 ) ) + ? 1 : 0; + nbok += s1 == K.sIncident( sspel, *q2, K.sDirect( sspel, *q2 ) ) + ? 1 : 0; + nbok += l10 == K.sIncident( s0, *q2, K.sDirect( s0, *q2 ) ) + ? 1 : 0; + nbok += l01 == K.sIncident( s1, *q1, K.sDirect( s1, *q1 ) ) + ? 1 : 0; + nb += 9; + } + } + trace.info() << "(" << nbok << "/" << nb << ") " + << "correctness of direct and indirect orientations." << std::endl; + + trace.endBlock(); + + + return nbok == nb; +} + + +template +bool testSurfelAdjacency() +{ + typedef typename KSpace::Integer Integer; + typedef typename KSpace::SCell SCell; + typedef typename KSpace::Point Point; + unsigned int nbok = 0; + unsigned int nb = 0; + + trace.beginBlock ( "Testing block KSpace instantiation and scan ..." ); + KSpace K; + int xlow[ 4 ] = { -3, -3, -3, -3 }; + int xhigh[ 4 ] = { 5, 3, 3, 3 }; + Point low( xlow ); + Point high( xhigh ); + bool space_ok = K.init( low, high, true ); + nbok += space_ok ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << "K.init( low, high )" << std::endl; + trace.info() << "K.dim()=" << K.dimension << endl; + trace.endBlock(); + trace.beginBlock ( "Testing surfel adjacency ..." ); + SurfelAdjacency SAdj( true ); + for ( Dimension i = 0; i < K.dimension; ++i ) + for ( Dimension j = 0; j < K.dimension; ++j ) + if ( i != j ) + trace.info() << "(" << i << "," << j << ")=" + << ( SAdj.getAdjacency( i, j ) ? "i2e" : "e2i" ); + trace.info() << endl; + trace.endBlock(); + + int spel[ 4 ] = { 1, 1, 1, 1 }; // pixel + Point kp( spel ); + SCell sspel = K.sCell( kp, K.POS ); + trace.beginBlock ( "Testing surfel directness ..." ); + for ( Dimension k = 0; k < K.dimension; ++k ) + { + SCell surfel = K.sIncident( sspel, k, true ); + SCell innerspel = K.sDirectIncident( surfel, K.sOrthDir( surfel ) ); + trace.info() << "spel=" << sspel << " surfel=" << surfel + << " innerspel=" << innerspel << endl; + nbok += sspel == innerspel ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << "spel == innerspel" << std::endl; + surfel = K.sIncident( sspel, k, false ); + innerspel = K.sDirectIncident( surfel, K.sOrthDir( surfel ) ); + trace.info() << "spel=" << sspel << " surfel=" << surfel + << " innerspel=" << innerspel << endl; + nbok += sspel == innerspel ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << "spel == innerspel" << std::endl; + } + trace.endBlock(); + + SurfelNeighborhood SN; + trace.beginBlock ( "Testing surfel neighborhood ..." ); + SCell surfel = K.sIncident( sspel, 0, false ); + SN.init( &K, &SAdj, surfel ); + trace.info() << "surfel =" << surfel << endl; + trace.info() << "follower1(+)=" << SN.follower1( 1, true ) << endl; + trace.info() << "follower2(+)=" << SN.follower2( 1, true ) << endl; + trace.info() << "follower3(+)=" << SN.follower3( 1, true ) << endl; + trace.info() << "follower1(-)=" << SN.follower1( 1, false ) << endl; + trace.info() << "follower2(-)=" << SN.follower2( 1, false ) << endl; + trace.info() << "follower3(-)=" << SN.follower3( 1, false ) << endl; + trace.endBlock(); + + trace.beginBlock ( "Testing surface tracking ..." ); + typedef SpaceND< KSpace::dimension, Integer > Space; + typedef HyperRectDomain Domain; + typedef typename DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet; + Domain domain( low, high ); + DigitalSet shape_set( domain ); + int center[ 4 ] = { 1, 0, 0, 0 }; // pixel + Point pcenter( center ); + Shapes::addNorm1Ball( shape_set, pcenter, 1 ); + trace.info() << "surfel = " << surfel << endl; + SCell other1, other2; + SN.getAdjacentOnDigitalSet( other1, shape_set, 1, K.sDirect( surfel, 1 ) ); + SN.getAdjacentOnDigitalSet( other2, shape_set, 1, !K.sDirect( surfel, 1 ) ); + trace.info() << "directNext = " << other1 << endl; + trace.info() << "indirectNext= " << other2 << endl; + std::set bdry; + + // surfel = Surfaces::findABel( K, shape_set ); + + Surfaces::trackBoundary( bdry, + K, SAdj, shape_set, surfel ); + trace.info() << "tracking finished, size=" << bdry.size() + << ", should be " << 2*K.dimension*(2*K.dimension-1) << endl; + nbok += bdry.size() == ( 2*K.dimension*(2*K.dimension-1) ) ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << "bdry.size() == ( 2*K.dimension*(2*K.dimension-1) )" + << std::endl; + std::set bdry_direct; + Surfaces::trackClosedBoundary( bdry_direct, + K, SAdj, shape_set, surfel ); + trace.info() << "fast direct tracking finished, size=" << bdry_direct.size() + << ", should be " << 2*K.dimension*(2*K.dimension-1) << endl; + nbok += bdry_direct.size() == ( 2*K.dimension*(2*K.dimension-1) ) ? 1 : 0; + nb++; + trace.info() << "(" << nbok << "/" << nb << ") " + << "bdry_direct.size() == ( 2*K.dimension*(2*K.dimension-1) )" + << std::endl; + + trace.endBlock(); + if ( K.dimension == 2 ) + { + Board2D board; + board.setUnit( LibBoard::Board::UCentimeter ); + board << SetMode( domain.className(), "Paving" ) + << domain; + for ( typename std::set::const_iterator it = bdry_direct.begin(), + it_end = bdry_direct.end(); it != it_end; ++it ) + board << *it; + board.saveEPS( "cells-2.eps" ); + board.saveSVG( "cells-2.svg" ); + } + return nbok == nb; +} + +template +bool testCellDrawOnBoard() +{ + typedef typename KSpace::Integer Integer; + typedef typename KSpace::Cell Cell; + typedef typename KSpace::SCell SCell; + typedef typename KSpace::Point Point; + typedef SpaceND<2, Integer> Z2; + typedef HyperRectDomain Domain; + unsigned int nbok = 0; + unsigned int nb = 0; + trace.beginBlock ( "Testing cell draw on digital board ..." ); + KSpace K; + int xlow[ 4 ] = { -3, -3 }; + int xhigh[ 4 ] = { 5, 3 }; + Point low( xlow ); + Point high( xhigh ); + bool space_ok = K.init( low, high, true ); + Domain domain( low, high ); + Board2D board; + board.setUnit( LibBoard::Board::UCentimeter ); + board << SetMode( domain.className(), "Paving" ) + << domain; + int spel[ 2 ] = { 1, 1 }; // pixel 0,0 + Point kp( spel ); + Cell uspel = K.uCell( kp ); + board << uspel + << low << high + << K.uIncident( uspel, 0, false ) + << K.uIncident( uspel, 1, false ); + int spel2[ 2 ] = { 5, 1 }; // pixel 2,0 + Point kp2( spel2 ); + SCell sspel2 = K.sCell( kp2, K.POS ); + board << CustomStyle( sspel2.className(), + new CustomPen( Color( 200, 0, 0 ), + Color( 255, 100, 100 ), + 2.0, + Board2D::Shape::SolidStyle ) ) + << sspel2 + << K.sIncident( sspel2, 0, K.sDirect( sspel2, 0 ) ) + << K.sIncident( sspel2, 1, K.sDirect( sspel2, 0 ) ); + board.saveEPS( "cells-1.eps" ); + board.saveSVG( "cells-1.svg" ); + trace.endBlock(); + board.clear(); + board << domain; + SCell slinel0 = K.sIncident( sspel2, 0, K.sDirect( sspel2, 0 ) ); + SCell spointel01 = K.sIncident( slinel0, 1, K.sDirect( slinel0, 1 ) ); + board << CustomStyle( sspel2.className(), + new CustomColors( Color( 200, 0, 0 ), + Color( 255, 100, 100 ) ) ) + << sspel2 + << CustomStyle( slinel0.className(), + new CustomColors( Color( 0, 200, 0 ), + Color( 100, 255, 100 ) ) ) + << slinel0 + << CustomStyle( spointel01.className(), + new CustomColors( Color( 0, 0, 200 ), + Color( 100, 100, 255 ) ) ) + << spointel01; + board.saveEPS( "cells-3.eps" ); + board.saveSVG( "cells-3.svg" ); + + return ((space_ok) && (nbok == nb)); +} + +template +bool testFindABel() +{ + typedef typename KSpace::Point Point; + typedef SpaceND< KSpace::dimension, typename KSpace::Integer > Space; + typedef HyperRectDomain Domain; + typedef typename DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet; + typedef typename KSpace::SCell SCell; + + trace.beginBlock("Test FindABel"); + Point low(-3,-3,-3), high(3,3,3); + Domain domain( low, high ); + DigitalSet shape_set( domain ); + KSpace K; + K.init( low, high, true ); + + Point p000(0,0,0), p001(0,0,1), p010(0,1,0), p011(0,1,1), + p100(1,0,0), p101(1,0,1), p110(1,1,0), p111(1,1,1); + + shape_set.insert( p000 ); + shape_set.insert( p100 ); + + Surfaces::findABel( K, shape_set , p000 , p011 ); + Surfaces::findABel( K, shape_set , p000 , p110 ); + Surfaces::findABel( K, shape_set , p000 , p111 ); + Surfaces::findABel( K, shape_set , p000 , p101 ); + SCell s010 = Surfaces::findABel( K, shape_set , p000 , p010 ); + SCell s001 = Surfaces::findABel( K, shape_set , p000 , p001 ); + + trace.endBlock(); + return ( (s010 == SCell( Point(1,2,1), true ) ) && + (s001 == SCell( Point(1,1,2), false ) ) ); +} + +template +bool testCellularGridSpaceNDFaces() +{ + typedef typename KSpace::Cell Cell; + typedef typename KSpace::Point Point; + typedef typename KSpace::Cells Cells; + unsigned int nbok = 0; + unsigned int nb = 0; + Dimension N = KSpace::dimension; + Point low = Point::diagonal(-5); + Point high = Point::diagonal(5); + KSpace K; + K.init( low, high, true ); + Cell vox = K.uSpel( Point::zero ); + Cells faces = K.uFaces( vox ); + // Check that there is no duplicates. + trace.beginBlock( "Check CellularGridSpaceND::uFaces" ); + for ( Dimension k = 0; k < N; ++k ) + { + trace.info() << "[" << k << "]"; + DGtal::int64_t nf = 0; + for ( typename Cells::const_iterator it = faces.begin(), itE = faces.end(); it != itE; ++it ) + if ( K.uDim( *it ) == k ) { std::cout << " " << *it; ++nf; } + trace.info() << " -> " << nf << std::endl; + // Number of k-faces of N-cube is binom(n,k)*2^(n-k) + DGtal::int64_t exp_nf = (DGtal::int64_t) round( boost::math::binomial_coefficient(N, k) ); + exp_nf <<= N-k; + ++nb, nbok += ( nf == exp_nf ); + trace.info() << "(" << nbok << "/" << nb << ") " + << nf << " == " << exp_nf << " (Number of " << k << "-cells faces of a " << N << "-cell)" + << std::endl; + } + trace.endBlock(); + return nb == nbok; +} + +template +bool testCellularGridSpaceNDCoFaces() +{ + typedef typename KSpace::Cell Cell; + typedef typename KSpace::Point Point; + typedef typename KSpace::Cells Cells; + unsigned int nbok = 0; + unsigned int nb = 0; + Dimension N = KSpace::dimension; + Point low = Point::diagonal(-5); + Point high = Point::diagonal(5); + KSpace K; + K.init( low, high, true ); + Cell pointel = K.uPointel( Point::zero ); + Cells cofaces = K.uCoFaces( pointel ); + // Check that there is no duplicates. + trace.beginBlock( "Check CellularGridSpaceND::uCoFaces" ); + for ( Dimension k = 1; k <= N; ++k ) + { + trace.info() << "[" << k << "]"; + DGtal::int64_t nf = 0; + for ( typename Cells::const_iterator it = cofaces.begin(), itE = cofaces.end(); it != itE; ++it ) + if ( K.uDim( *it ) == k ) { std::cout << " " << *it; ++nf; } + trace.info() << " -> " << nf << std::endl; + // Number of k-faces of N-cube is binom(n,k)*2^(n-k) + DGtal::int64_t exp_nf = (DGtal::int64_t) round( boost::math::binomial_coefficient(N, N-k) ); + exp_nf <<= k; + ++nb, nbok += ( nf == exp_nf ); + trace.info() << "(" << nbok << "/" << nb << ") " + << nf << " == " << exp_nf << " (Number of " << k << "-cells cofaces of a " << 0 << "-cell)" + << std::endl; + } + trace.endBlock(); + return nb == nbok; +} + +/////////////////////////////////////////////////////////////////////////////// +// Standard services - public : + +int main( int argc, char** argv ) +{ + trace.beginBlock ( "Testing class CellularGridSpaceND" ); + trace.info() << "Args:"; + for ( int i = 0; i < argc; ++i ) + trace.info() << " " << argv[ i ]; + trace.info() << endl; + + typedef KhalimskySpaceND<2> K2; + typedef KhalimskySpaceND<3> K3; + typedef KhalimskySpaceND<4> K4; + BOOST_CONCEPT_ASSERT(( concepts::CCellularGridSpaceND< K2 > )); + BOOST_CONCEPT_ASSERT(( concepts::CCellularGridSpaceND< K3 > )); + BOOST_CONCEPT_ASSERT(( concepts::CCellularGridSpaceND< K4 > )); + + bool res = testCellularGridSpaceND() + && testCellularGridSpaceND() + && testCellularGridSpaceND() + && testSurfelAdjacency() + && testSurfelAdjacency() + && testSurfelAdjacency() + && testCellDrawOnBoard() + && testFindABel() + && testCellularGridSpaceNDFaces() + && testCellularGridSpaceNDFaces() + && testCellularGridSpaceNDFaces() + && testCellularGridSpaceNDCoFaces() + && testCellularGridSpaceNDCoFaces() + && testCellularGridSpaceNDCoFaces(); + + trace.emphase() << ( res ? "Passed." : "Error." ) << endl; + trace.endBlock(); + return res ? 0 : 1; +} +// // +/////////////////////////////////////////////////////////////////////////////// diff --git a/tests/topology/testDigitalSurface.cpp b/tests/topology/testDigitalSurface.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testDigitalTopology.cpp b/tests/topology/testDigitalTopology.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testHomotopicThinning.cpp b/tests/topology/testHomotopicThinning.cpp new file mode 100755 index 0000000000..90e1345010 --- /dev/null +++ b/tests/topology/testHomotopicThinning.cpp @@ -0,0 +1,170 @@ +/** + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + **/ + +/** + * @file testHomotopicThinning.cpp + * @ingroup Tests + * @author Kacper Pluta (\c kacper.pluta@esiee.fr ) + * Laboratoire d'Informatique Gaspard-Monge - LIGM, France + * + * @date 2014/11/13 + * + * Functions for testing class HomotopicThinning. + * + * This file is part of the DGtal library. + */ + +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include "DGtal/base/Common.h" +#include "ConfigTest.h" +#include "DGtal/helpers/StdDefs.h" +#include +#include +#include "DGtal/topology/HomotopicThinning.h" +#include "DGtal/io/writers/GenericWriter.h" +#include "DGtal/io/readers/GenericReader.h" +#include "DGtal/images/imagesSetsUtils/SetFromImage.h" +#include "DGtal/images/IntervalForegroundPredicate.h" +#include "DGtal/geometry/volumes/distance/DistanceTransformation.h" + +#ifdef __GNUC__ + #ifndef NDEBUG + #include + #endif +#endif +/////////////////////////////////////////////////////////////////////////////// + +using namespace std; +using namespace DGtal; +using namespace functors; + +/////////////////////////////////////////////////////////////////////////////// +// Functions for testing class HomotopicThinning. +/////////////////////////////////////////////////////////////////////////////// +/** + * Example of a test. To be completed. + * + */ + +class testHomotopicThinning +{ +public: + typedef ImageSelector::Type Image2D; + typedef ImageSelector::Type Image3D; + typedef IntervalForegroundPredicate Predicate2D; + typedef DistanceTransformation DistanceTrans2D; + typedef std::function Zeros; + typedef HomotopicThinning < Z3i::Object26_6, std::vector < Z3i::Point >, Zeros > HomoThinnSimple3D; + typedef HomotopicThinning < Z2i::Object8_4, std::vector < Z2i::Point >, DistanceTrans2D > HomoThinnSimple2D; + testHomotopicThinning () : image3d ( PGMReader::importPGM3D ( testPath + "samples/cat10.pgm3d" ) ), + image2d ( PGMReader::importPGM ( testPath + "samples/church-small.pgm" ) ), + zeros ([](Z3i::Point) { return 0; } ), + aPredicate ( image2d, 125, 255 ), + disTrans2D ( image2d.domain(),aPredicate, L2metric ), + homoThinnSimple3D ( zeros ), + homoThinnSimple2D ( disTrans2D ) + { + } + bool Binary3D() + { + using namespace Z3i; + DigitalSet shape_set( image3d.domain() ); + SetFromImage::append(shape_set, image3d, 1, 255 ); + Object26_6 shape ( dt26_6, shape_set ); + homoThinnSimple3D ( shape, 3 ); + Point low, up; + shape.pointSet().computeBoundingBox ( low, up ); + Image3D output (Domain ( low, up ) ); + for ( DigitalSet::ConstIterator it = shape.begin(); it != shape.end(); ++it ) + output.setValue ( *it, 255 ); + PGMWriter::exportPGM3D ( "output_homothinn.pgm3d", output ); + return true; + } + bool Gray2D() + { + using namespace Z2i; + DigitalSet shape_set( image2d.domain() ); + SetFromImage::append(shape_set, image2d, 125, 255 ); + Object8_4 shape ( dt8_4, shape_set ); + homoThinnSimple2D ( shape, 3 ); + Point low, up; + shape.pointSet().computeBoundingBox ( low, up ); + Image2D output (Domain ( low, up ) ); + for ( DigitalSet::ConstIterator it = shape.begin(); it != shape.end(); ++it ) + output.setValue ( *it, 255 ); + PGMWriter::exportPGM ( "output_homothinn.pgm", output ); + return true; + } + + bool Gray2DFixSet() + { + using namespace Z2i; + DigitalSet shape_set( image2d.domain() ); + DigitalSet fixedShape( image2d.domain() ); + SetFromImage::append(shape_set, image2d, 0, 255 ); + SetFromImage::append(fixedShape, image2d, 125, 190 ); + std::vector < Point > fixPoints; + for ( DigitalSet::ConstIterator it = fixedShape.begin(); it != fixedShape.end(); ++it ) + fixPoints.push_back ( *it ); + Object8_4 shape ( dt8_4, shape_set ); + homoThinnSimple2D ( shape, fixPoints, image2d.domain().size() ); + Point low, up; + shape.pointSet().computeBoundingBox ( low, up ); + Image2D output (Domain ( low, up ) ); + for ( DigitalSet::ConstIterator it = shape.begin(); it != shape.end(); ++it ) + output.setValue ( *it, 255 ); + PGMWriter::exportPGM ( "output_homothinn_fix.pgm", output ); + return true; + } + +private: + Image3D image3d; + Image2D image2d; + Zeros zeros; + Predicate2D aPredicate; + Z2i::L2Metric L2metric; + DistanceTrans2D disTrans2D; + HomoThinnSimple3D homoThinnSimple3D; + HomoThinnSimple2D homoThinnSimple2D; +}; + +/////////////////////////////////////////////////////////////////////////////// +// Standard services - public : + +int main( int , char** ) +{ + #ifdef __GNUC__ + #ifndef NDEBUG + feenableexcept ( FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW ); + #endif + #endif + + bool res = true; + testHomotopicThinning testHomoThinn; + trace.beginBlock ( "Testing homotopic thinning." ); + res &= testHomoThinn.Binary3D(); + res &= testHomoThinn.Gray2D(); + res &= testHomoThinn.Gray2DFixSet(); + trace.emphase() << ( res ? "Passed." : "Error." ) << endl; + trace.endBlock(); + return res ? 0 : 1; +} +// // +/////////////////////////////////////////////////////////////////////////////// diff --git a/tests/topology/testImplicitDigitalSurface-benchmark.cpp b/tests/topology/testImplicitDigitalSurface-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testLightImplicitDigitalSurface-benchmark.cpp b/tests/topology/testLightImplicitDigitalSurface-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testObject-benchmark.cpp b/tests/topology/testObject-benchmark.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testObject.cpp b/tests/topology/testObject.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testObjectBorder.cpp b/tests/topology/testObjectBorder.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testSCellsFunctor.cpp b/tests/topology/testSCellsFunctor.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testSimpleExpander.cpp b/tests/topology/testSimpleExpander.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testSurfaceHelper.cpp b/tests/topology/testSurfaceHelper.cpp old mode 100644 new mode 100755 diff --git a/tests/topology/testUmbrellaComputer.cpp b/tests/topology/testUmbrellaComputer.cpp old mode 100644 new mode 100755