├── .gitignore ├── CMakeCache.txt ├── CMakeFiles ├── 3.5.1 │ ├── CMakeCCompiler.cmake │ ├── CMakeCXXCompiler.cmake │ ├── CMakeDetermineCompilerABI_C.bin │ ├── CMakeDetermineCompilerABI_CXX.bin │ ├── CMakeSystem.cmake │ ├── CompilerIdC │ │ ├── CMakeCCompilerId.c │ │ └── a.out │ └── CompilerIdCXX │ │ ├── CMakeCXXCompilerId.cpp │ │ └── a.out ├── CMakeDirectoryInformation.cmake ├── CMakeOutput.log ├── Makefile.cmake ├── Makefile2 ├── TargetDirectories.txt ├── cmake.check_cache ├── feature_tests.bin ├── feature_tests.c ├── feature_tests.cxx ├── progress.marks ├── remove_similar_segm.dir │ ├── CXX.includecache │ ├── DependInfo.cmake │ ├── build.make │ ├── cmake_clean.cmake │ ├── depend.internal │ ├── depend.make │ ├── flags.make │ ├── link.txt │ ├── progress.make │ └── remove_similar_segm.cpp.o └── segment_meshes.dir │ ├── CXX.includecache │ ├── DependInfo.cmake │ ├── build.make │ ├── cmake_clean.cmake │ ├── depend.internal │ ├── depend.make │ ├── flags.make │ ├── link.txt │ ├── progress.make │ └── segment_meshes.cpp.o ├── CMakeLists.txt ├── Makefile ├── README.md ├── cmake_install.cmake ├── data_demo └── chineseknife_1_3dwh.ply ├── demo.sh ├── easyinstall.sh ├── make_cgal_friendly.mlx ├── remove_similar_segm ├── remove_similar_segm.cpp ├── segment_meshes └── segment_meshes.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | data_demo_segmented* 2 | -------------------------------------------------------------------------------- /CMakeCache.txt: -------------------------------------------------------------------------------- 1 | # This is the CMakeCache file. 2 | # For build in directory: /home/paulo/batch_segmentation 3 | # It was generated by CMake: /usr/bin/cmake 4 | # You can edit this file to change values found and used by cmake. 5 | # If you do not want to change any of the values, simply exit the editor. 6 | # If you do want to change a value, simply edit, save, and exit the editor. 7 | # The syntax for the file is as follows: 8 | # KEY:TYPE=VALUE 9 | # KEY is the name of a variable in the cache. 10 | # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. 11 | # VALUE is the current value for the KEY. 12 | 13 | ######################## 14 | # EXTERNAL cache entries 15 | ######################## 16 | 17 | //Activate the debug messages of the script FindBoost 18 | Boost_DEBUG:BOOL=OFF 19 | 20 | //The directory containing a CMake configuration file for Boost. 21 | Boost_DIR:PATH=Boost_DIR-NOTFOUND 22 | 23 | //Path to a file. 24 | Boost_INCLUDE_DIR:PATH=/usr/include 25 | 26 | //Link with static Boost libraries 27 | CGAL_Boost_USE_STATIC_LIBS:BOOL=OFF 28 | 29 | //The directory containing a CMake configuration file for CGAL. 30 | CGAL_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/CGAL 31 | 32 | //Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. 33 | // When this is FALSE, all the CMAKE_*_FLAGS flags are overriden 34 | // with the values used when building the CGAL libs. For CGAL_*_flags 35 | // (used for ADDITIONAL flags) , there is no need to set this to 36 | // TRUE. 37 | CGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=TRUE 38 | 39 | //Path to a program. 40 | CMAKE_AR:FILEPATH=/usr/bin/ar 41 | 42 | //Build type: Release or Debug 43 | CMAKE_BUILD_TYPE:STRING=Release 44 | 45 | //Enable/Disable color output during build. 46 | CMAKE_COLOR_MAKEFILE:BOOL=ON 47 | 48 | //CXX compiler 49 | CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ 50 | 51 | //C++ compiler flags for both Release and Debug 52 | CMAKE_CXX_FLAGS:STRING=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -frounding-math 53 | 54 | //Flags used by the compiler during debug builds. 55 | CMAKE_CXX_FLAGS_DEBUG:STRING=-g 56 | 57 | //Flags used by the compiler during release builds for minimum 58 | // size. 59 | CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 60 | 61 | //C++ compiler flags for RELEASE 62 | CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 63 | 64 | //Flags used by the compiler during release builds with debug info. 65 | CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 66 | 67 | //C compiler 68 | CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc 69 | 70 | //Flags used by the compiler during all build types. 71 | CMAKE_C_FLAGS:STRING= 72 | 73 | //Flags used by the compiler during debug builds. 74 | CMAKE_C_FLAGS_DEBUG:STRING=-g 75 | 76 | //Flags used by the compiler during release builds for minimum 77 | // size. 78 | CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 79 | 80 | //Flags used by the compiler during release builds. 81 | CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 82 | 83 | //Flags used by the compiler during release builds with debug info. 84 | CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 85 | 86 | //Linker flags for both Release and Debug 87 | CMAKE_EXE_LINKER_FLAGS:STRING= -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed 88 | 89 | //Flags used by the linker during debug builds. 90 | CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= 91 | 92 | //Flags used by the linker during release minsize builds. 93 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= 94 | 95 | //Linker flags for RELEASE 96 | CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= 97 | 98 | //Flags used by the linker during Release with Debug Info builds. 99 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 100 | 101 | //Enable/Disable output of compile commands during generation. 102 | CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF 103 | 104 | //Install path prefix, prepended onto install directories. 105 | CMAKE_INSTALL_PREFIX:PATH=/usr/local 106 | 107 | //Path to a program. 108 | CMAKE_LINKER:FILEPATH=/usr/bin/ld 109 | 110 | //Path to a program. 111 | CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make 112 | 113 | //Flags used by the linker during the creation of modules. 114 | CMAKE_MODULE_LINKER_FLAGS:STRING= 115 | 116 | //Flags used by the linker during debug builds. 117 | CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= 118 | 119 | //Flags used by the linker during release minsize builds. 120 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= 121 | 122 | //Flags used by the linker during release builds. 123 | CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= 124 | 125 | //Flags used by the linker during Release with Debug Info builds. 126 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 127 | 128 | //Path to a program. 129 | CMAKE_NM:FILEPATH=/usr/bin/nm 130 | 131 | //Path to a program. 132 | CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy 133 | 134 | //Path to a program. 135 | CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump 136 | 137 | //Value Computed by CMake 138 | CMAKE_PROJECT_NAME:STATIC=segmentation 139 | 140 | //Path to a program. 141 | CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib 142 | 143 | //Flags used by the linker during the creation of dll's. 144 | CMAKE_SHARED_LINKER_FLAGS:STRING= 145 | 146 | //Flags used by the linker during debug builds. 147 | CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= 148 | 149 | //Flags used by the linker during release minsize builds. 150 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= 151 | 152 | //Flags used by the linker during release builds. 153 | CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= 154 | 155 | //Flags used by the linker during Release with Debug Info builds. 156 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= 157 | 158 | //If set, runtime paths are not added when installing shared libraries, 159 | // but are added when building. 160 | CMAKE_SKIP_INSTALL_RPATH:BOOL=NO 161 | 162 | //If set, runtime paths are not added when using shared libraries. 163 | CMAKE_SKIP_RPATH:BOOL=NO 164 | 165 | //Flags used by the linker during the creation of static libraries. 166 | CMAKE_STATIC_LINKER_FLAGS:STRING= 167 | 168 | //Flags used by the linker during debug builds. 169 | CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= 170 | 171 | //Flags used by the linker during release minsize builds. 172 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= 173 | 174 | //Flags used by the linker during release builds. 175 | CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= 176 | 177 | //Flags used by the linker during Release with Debug Info builds. 178 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= 179 | 180 | //Path to a program. 181 | CMAKE_STRIP:FILEPATH=/usr/bin/strip 182 | 183 | //If this value is on, makefiles will be generated without the 184 | // .SILENT directive, and all commands will be echoed to the console 185 | // during the make. This is useful for debugging only. With Visual 186 | // Studio IDE projects all commands are done without /nologo. 187 | CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE 188 | 189 | //Value Computed by CMake 190 | segmentation_BINARY_DIR:STATIC=/home/paulo/batch_segmentation 191 | 192 | //Value Computed by CMake 193 | segmentation_SOURCE_DIR:STATIC=/home/paulo/batch_segmentation 194 | 195 | 196 | ######################## 197 | # INTERNAL cache entries 198 | ######################## 199 | 200 | //ADVANCED property for variable: Boost_DEBUG 201 | Boost_DEBUG-ADVANCED:INTERNAL=1 202 | //ADVANCED property for variable: Boost_DIR 203 | Boost_DIR-ADVANCED:INTERNAL=1 204 | //ADVANCED property for variable: Boost_INCLUDE_DIR 205 | Boost_INCLUDE_DIR-ADVANCED:INTERNAL=1 206 | //ADVANCED property for variable: CGAL_Boost_USE_STATIC_LIBS 207 | CGAL_Boost_USE_STATIC_LIBS-ADVANCED:INTERNAL=1 208 | CGAL_EXECUTABLE_TARGETS:INTERNAL=segment_meshes;remove_similar_segm 209 | //ADVANCED property for variable: CMAKE_AR 210 | CMAKE_AR-ADVANCED:INTERNAL=1 211 | //This is the directory where this CMakeCache.txt was created 212 | CMAKE_CACHEFILE_DIR:INTERNAL=/home/paulo/batch_segmentation 213 | //Major version of cmake used to create the current loaded cache 214 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 215 | //Minor version of cmake used to create the current loaded cache 216 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 217 | //Patch version of cmake used to create the current loaded cache 218 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 219 | //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE 220 | CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 221 | //Path to CMake executable. 222 | CMAKE_COMMAND:INTERNAL=/usr/bin/cmake 223 | //Path to cpack program executable. 224 | CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack 225 | //Path to ctest program executable. 226 | CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest 227 | //ADVANCED property for variable: CMAKE_CXX_COMPILER 228 | CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 229 | //ADVANCED property for variable: CMAKE_CXX_FLAGS 230 | CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 231 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG 232 | CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 233 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL 234 | CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 235 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE 236 | CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 237 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO 238 | CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 239 | //ADVANCED property for variable: CMAKE_C_COMPILER 240 | CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 241 | //ADVANCED property for variable: CMAKE_C_FLAGS 242 | CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 243 | //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG 244 | CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 245 | //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL 246 | CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 247 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE 248 | CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 249 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO 250 | CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 251 | //Path to cache edit program executable. 252 | CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake 253 | //Executable file format 254 | CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF 255 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS 256 | CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 257 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG 258 | CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 259 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL 260 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 261 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE 262 | CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 263 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO 264 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 265 | //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS 266 | CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 267 | //Name of external makefile project generator. 268 | CMAKE_EXTRA_GENERATOR:INTERNAL= 269 | //Name of generator. 270 | CMAKE_GENERATOR:INTERNAL=Unix Makefiles 271 | //Name of generator platform. 272 | CMAKE_GENERATOR_PLATFORM:INTERNAL= 273 | //Name of generator toolset. 274 | CMAKE_GENERATOR_TOOLSET:INTERNAL= 275 | //Source directory with the top level CMakeLists.txt file for this 276 | // project 277 | CMAKE_HOME_DIRECTORY:INTERNAL=/home/paulo/batch_segmentation 278 | //Install .so files without execute permission. 279 | CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 280 | //ADVANCED property for variable: CMAKE_LINKER 281 | CMAKE_LINKER-ADVANCED:INTERNAL=1 282 | //ADVANCED property for variable: CMAKE_MAKE_PROGRAM 283 | CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 284 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS 285 | CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 286 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG 287 | CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 288 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL 289 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 290 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE 291 | CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 292 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO 293 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 294 | //ADVANCED property for variable: CMAKE_NM 295 | CMAKE_NM-ADVANCED:INTERNAL=1 296 | //number of local generators 297 | CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 298 | //ADVANCED property for variable: CMAKE_OBJCOPY 299 | CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 300 | //ADVANCED property for variable: CMAKE_OBJDUMP 301 | CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 302 | //ADVANCED property for variable: CMAKE_RANLIB 303 | CMAKE_RANLIB-ADVANCED:INTERNAL=1 304 | //Path to CMake installation. 305 | CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5 306 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS 307 | CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 308 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG 309 | CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 310 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL 311 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 312 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE 313 | CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 314 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO 315 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 316 | //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH 317 | CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 318 | //ADVANCED property for variable: CMAKE_SKIP_RPATH 319 | CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 320 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS 321 | CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 322 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG 323 | CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 324 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL 325 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 326 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE 327 | CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 328 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO 329 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 330 | //ADVANCED property for variable: CMAKE_STRIP 331 | CMAKE_STRIP-ADVANCED:INTERNAL=1 332 | //uname command 333 | CMAKE_UNAME:INTERNAL=/bin/uname 334 | //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE 335 | CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 336 | //Last used Boost_ADDITIONAL_VERSIONS value. 337 | _Boost_ADDITIONAL_VERSIONS_LAST:INTERNAL=1.69.1;1.69.0;1.69;1.68.1;1.68.0;1.68;1.67.1;1.67.0;1.67;1.66.1;1.66.0;1.66;1.65.1;1.65.0;1.65;1.64.1;1.64.0;1.64;1.63.1;1.63.0;1.63;1.62.1;1.62.0;1.62;1.61.1;1.61.0;1.61;1.60.1;1.60.0;1.60;1.59.1;1.59.0;1.59;1.58.1;1.58.0;1.58;1.57.1;1.57.0;1.57;1.56.1;1.56.0;1.56;1.55.1;1.55.0;1.55;1.54.1;1.54.0;1.54;1.53.1;1.53.0;1.53;1.52.1;1.52.0;1.52;1.51.1;1.51.0;1.51;1.50.1;1.50.0;1.50;1.49.1;1.49.0;1.49;1.48.1;1.48.0;1.48;1.47.1;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.1;1.45.0;1.45;1.44.1;1.44.0;1.44;1.43.1;1.43.0;1.43;1.42.1;1.42.0;1.42;1.41.1;1.41.0;1.41;1.40.1;1.40.0;1.40;1.39.1;1.39.0;1.39;1.38.1;1.38.0;1.38;1.37.1;1.37.0;1.37 338 | //Components requested for this build tree. 339 | _Boost_COMPONENTS_SEARCHED:INTERNAL= 340 | //Last used Boost_INCLUDE_DIR value. 341 | _Boost_INCLUDE_DIR_LAST:INTERNAL=/usr/include 342 | //Last used Boost_NAMESPACE value. 343 | _Boost_NAMESPACE_LAST:INTERNAL=boost 344 | //Last used Boost_USE_MULTITHREADED value. 345 | _Boost_USE_MULTITHREADED_LAST:INTERNAL=TRUE 346 | //Last used Boost_USE_STATIC_LIBS value. 347 | _Boost_USE_STATIC_LIBS_LAST:INTERNAL=OFF 348 | 349 | -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/usr/bin/cc") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "5.4.0") 5 | set(CMAKE_C_COMPILER_WRAPPER "") 6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 7 | set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") 8 | set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") 9 | set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") 10 | set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") 11 | 12 | set(CMAKE_C_PLATFORM_ID "Linux") 13 | set(CMAKE_C_SIMULATE_ID "") 14 | set(CMAKE_C_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCC 1) 20 | set(CMAKE_C_COMPILER_LOADED 1) 21 | set(CMAKE_C_COMPILER_WORKS TRUE) 22 | set(CMAKE_C_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_C_COMPILER_ID_RUN 1) 36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 38 | set(CMAKE_C_LINKER_PREFERENCE 10) 39 | 40 | # Save compiler ABI information. 41 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 42 | set(CMAKE_C_COMPILER_ABI "ELF") 43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 44 | 45 | if(CMAKE_C_SIZEOF_DATA_PTR) 46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 47 | endif() 48 | 49 | if(CMAKE_C_COMPILER_ABI) 50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 51 | endif() 52 | 53 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 54 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 55 | endif() 56 | 57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 60 | endif() 61 | 62 | 63 | 64 | 65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") 66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 68 | -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "5.4.0") 5 | set(CMAKE_CXX_COMPILER_WRAPPER "") 6 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") 7 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 8 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") 9 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 10 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 11 | 12 | set(CMAKE_CXX_PLATFORM_ID "Linux") 13 | set(CMAKE_CXX_SIMULATE_ID "") 14 | set(CMAKE_CXX_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "/usr/bin/ar") 17 | set(CMAKE_RANLIB "/usr/bin/ranlib") 18 | set(CMAKE_LINKER "/usr/bin/ld") 19 | set(CMAKE_COMPILER_IS_GNUCXX 1) 20 | set(CMAKE_CXX_COMPILER_LOADED 1) 21 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 22 | set(CMAKE_CXX_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 36 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 37 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) 38 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 39 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 40 | 41 | # Save compiler ABI information. 42 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 43 | set(CMAKE_CXX_COMPILER_ABI "ELF") 44 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 45 | 46 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 47 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 48 | endif() 49 | 50 | if(CMAKE_CXX_COMPILER_ABI) 51 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 52 | endif() 53 | 54 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 55 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 56 | endif() 57 | 58 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 59 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 60 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 61 | endif() 62 | 63 | 64 | 65 | 66 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") 67 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 68 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 69 | -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.4.0-96-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.4.0-96-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.4.0-96-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.4.0-96-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | # error "A C++ compiler has been selected for C." 3 | #endif 4 | 5 | #if defined(__18CXX) 6 | # define ID_VOID_MAIN 7 | #endif 8 | 9 | 10 | /* Version number components: V=Version, R=Revision, P=Patch 11 | Version date components: YYYY=Year, MM=Month, DD=Day */ 12 | 13 | #if defined(__INTEL_COMPILER) || defined(__ICC) 14 | # define COMPILER_ID "Intel" 15 | # if defined(_MSC_VER) 16 | # define SIMULATE_ID "MSVC" 17 | # endif 18 | /* __INTEL_COMPILER = VRP */ 19 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 20 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 21 | # if defined(__INTEL_COMPILER_UPDATE) 22 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 23 | # else 24 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 25 | # endif 26 | # if defined(__INTEL_COMPILER_BUILD_DATE) 27 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 28 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 29 | # endif 30 | # if defined(_MSC_VER) 31 | /* _MSC_VER = VVRR */ 32 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 33 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 34 | # endif 35 | 36 | #elif defined(__PATHCC__) 37 | # define COMPILER_ID "PathScale" 38 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 39 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 40 | # if defined(__PATHCC_PATCHLEVEL__) 41 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 42 | # endif 43 | 44 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 45 | # define COMPILER_ID "Embarcadero" 46 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 47 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 48 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 49 | 50 | #elif defined(__BORLANDC__) 51 | # define COMPILER_ID "Borland" 52 | /* __BORLANDC__ = 0xVRR */ 53 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 54 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 55 | 56 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 57 | # define COMPILER_ID "Watcom" 58 | /* __WATCOMC__ = VVRR */ 59 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 60 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 61 | # if (__WATCOMC__ % 10) > 0 62 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 63 | # endif 64 | 65 | #elif defined(__WATCOMC__) 66 | # define COMPILER_ID "OpenWatcom" 67 | /* __WATCOMC__ = VVRP + 1100 */ 68 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 69 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 70 | # if (__WATCOMC__ % 10) > 0 71 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 72 | # endif 73 | 74 | #elif defined(__SUNPRO_C) 75 | # define COMPILER_ID "SunPro" 76 | # if __SUNPRO_C >= 0x5100 77 | /* __SUNPRO_C = 0xVRRP */ 78 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) 79 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) 80 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 81 | # else 82 | /* __SUNPRO_CC = 0xVRP */ 83 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) 84 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) 85 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 86 | # endif 87 | 88 | #elif defined(__HP_cc) 89 | # define COMPILER_ID "HP" 90 | /* __HP_cc = VVRRPP */ 91 | # define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) 92 | # define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) 93 | # define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) 94 | 95 | #elif defined(__DECC) 96 | # define COMPILER_ID "Compaq" 97 | /* __DECC_VER = VVRRTPPPP */ 98 | # define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) 99 | # define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) 100 | # define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) 101 | 102 | #elif defined(__IBMC__) && defined(__COMPILER_VER__) 103 | # define COMPILER_ID "zOS" 104 | /* __IBMC__ = VRP */ 105 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 106 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 107 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 108 | 109 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 110 | # define COMPILER_ID "XL" 111 | /* __IBMC__ = VRP */ 112 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 113 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 114 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 115 | 116 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 117 | # define COMPILER_ID "VisualAge" 118 | /* __IBMC__ = VRP */ 119 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 120 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 121 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 122 | 123 | #elif defined(__PGI) 124 | # define COMPILER_ID "PGI" 125 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 126 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 127 | # if defined(__PGIC_PATCHLEVEL__) 128 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 129 | # endif 130 | 131 | #elif defined(_CRAYC) 132 | # define COMPILER_ID "Cray" 133 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 134 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 135 | 136 | #elif defined(__TI_COMPILER_VERSION__) 137 | # define COMPILER_ID "TI" 138 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 139 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 140 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 141 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 142 | 143 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 144 | # define COMPILER_ID "Fujitsu" 145 | 146 | #elif defined(__TINYC__) 147 | # define COMPILER_ID "TinyCC" 148 | 149 | #elif defined(__SCO_VERSION__) 150 | # define COMPILER_ID "SCO" 151 | 152 | #elif defined(__clang__) && defined(__apple_build_version__) 153 | # define COMPILER_ID "AppleClang" 154 | # if defined(_MSC_VER) 155 | # define SIMULATE_ID "MSVC" 156 | # endif 157 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 158 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 159 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 160 | # if defined(_MSC_VER) 161 | /* _MSC_VER = VVRR */ 162 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 163 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 164 | # endif 165 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 166 | 167 | #elif defined(__clang__) 168 | # define COMPILER_ID "Clang" 169 | # if defined(_MSC_VER) 170 | # define SIMULATE_ID "MSVC" 171 | # endif 172 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 173 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 174 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 175 | # if defined(_MSC_VER) 176 | /* _MSC_VER = VVRR */ 177 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 178 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 179 | # endif 180 | 181 | #elif defined(__GNUC__) 182 | # define COMPILER_ID "GNU" 183 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 184 | # if defined(__GNUC_MINOR__) 185 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 186 | # endif 187 | # if defined(__GNUC_PATCHLEVEL__) 188 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 189 | # endif 190 | 191 | #elif defined(_MSC_VER) 192 | # define COMPILER_ID "MSVC" 193 | /* _MSC_VER = VVRR */ 194 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 195 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 196 | # if defined(_MSC_FULL_VER) 197 | # if _MSC_VER >= 1400 198 | /* _MSC_FULL_VER = VVRRPPPPP */ 199 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 200 | # else 201 | /* _MSC_FULL_VER = VVRRPPPP */ 202 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 203 | # endif 204 | # endif 205 | # if defined(_MSC_BUILD) 206 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 207 | # endif 208 | 209 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 210 | # define COMPILER_ID "ADSP" 211 | #if defined(__VISUALDSPVERSION__) 212 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 213 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 214 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 215 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 216 | #endif 217 | 218 | #elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) 219 | # define COMPILER_ID "IAR" 220 | 221 | #elif defined(__ARMCC_VERSION) 222 | # define COMPILER_ID "ARMCC" 223 | #if __ARMCC_VERSION >= 1000000 224 | /* __ARMCC_VERSION = VRRPPPP */ 225 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 226 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 227 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 228 | #else 229 | /* __ARMCC_VERSION = VRPPPP */ 230 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 231 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 232 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 233 | #endif 234 | 235 | 236 | #elif defined(SDCC) 237 | # define COMPILER_ID "SDCC" 238 | /* SDCC = VRP */ 239 | # define COMPILER_VERSION_MAJOR DEC(SDCC/100) 240 | # define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) 241 | # define COMPILER_VERSION_PATCH DEC(SDCC % 10) 242 | 243 | #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) 244 | # define COMPILER_ID "MIPSpro" 245 | # if defined(_SGI_COMPILER_VERSION) 246 | /* _SGI_COMPILER_VERSION = VRP */ 247 | # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) 248 | # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) 249 | # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) 250 | # else 251 | /* _COMPILER_VERSION = VRP */ 252 | # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) 253 | # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) 254 | # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) 255 | # endif 256 | 257 | 258 | /* These compilers are either not known or too old to define an 259 | identification macro. Try to identify the platform and guess that 260 | it is the native compiler. */ 261 | #elif defined(__sgi) 262 | # define COMPILER_ID "MIPSpro" 263 | 264 | #elif defined(__hpux) || defined(__hpua) 265 | # define COMPILER_ID "HP" 266 | 267 | #else /* unknown compiler */ 268 | # define COMPILER_ID "" 269 | #endif 270 | 271 | /* Construct the string literal in pieces to prevent the source from 272 | getting matched. Store it in a pointer rather than an array 273 | because some compilers will just produce instructions to fill the 274 | array rather than assigning a pointer to a static array. */ 275 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 276 | #ifdef SIMULATE_ID 277 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 278 | #endif 279 | 280 | #ifdef __QNXNTO__ 281 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 282 | #endif 283 | 284 | #if defined(__CRAYXE) || defined(__CRAYXC) 285 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 286 | #endif 287 | 288 | #define STRINGIFY_HELPER(X) #X 289 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 290 | 291 | /* Identify known platforms by name. */ 292 | #if defined(__linux) || defined(__linux__) || defined(linux) 293 | # define PLATFORM_ID "Linux" 294 | 295 | #elif defined(__CYGWIN__) 296 | # define PLATFORM_ID "Cygwin" 297 | 298 | #elif defined(__MINGW32__) 299 | # define PLATFORM_ID "MinGW" 300 | 301 | #elif defined(__APPLE__) 302 | # define PLATFORM_ID "Darwin" 303 | 304 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 305 | # define PLATFORM_ID "Windows" 306 | 307 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 308 | # define PLATFORM_ID "FreeBSD" 309 | 310 | #elif defined(__NetBSD__) || defined(__NetBSD) 311 | # define PLATFORM_ID "NetBSD" 312 | 313 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 314 | # define PLATFORM_ID "OpenBSD" 315 | 316 | #elif defined(__sun) || defined(sun) 317 | # define PLATFORM_ID "SunOS" 318 | 319 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 320 | # define PLATFORM_ID "AIX" 321 | 322 | #elif defined(__sgi) || defined(__sgi__) || defined(_SGI) 323 | # define PLATFORM_ID "IRIX" 324 | 325 | #elif defined(__hpux) || defined(__hpux__) 326 | # define PLATFORM_ID "HP-UX" 327 | 328 | #elif defined(__HAIKU__) 329 | # define PLATFORM_ID "Haiku" 330 | 331 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 332 | # define PLATFORM_ID "BeOS" 333 | 334 | #elif defined(__QNX__) || defined(__QNXNTO__) 335 | # define PLATFORM_ID "QNX" 336 | 337 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 338 | # define PLATFORM_ID "Tru64" 339 | 340 | #elif defined(__riscos) || defined(__riscos__) 341 | # define PLATFORM_ID "RISCos" 342 | 343 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 344 | # define PLATFORM_ID "SINIX" 345 | 346 | #elif defined(__UNIX_SV__) 347 | # define PLATFORM_ID "UNIX_SV" 348 | 349 | #elif defined(__bsdos__) 350 | # define PLATFORM_ID "BSDOS" 351 | 352 | #elif defined(_MPRAS) || defined(MPRAS) 353 | # define PLATFORM_ID "MP-RAS" 354 | 355 | #elif defined(__osf) || defined(__osf__) 356 | # define PLATFORM_ID "OSF1" 357 | 358 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 359 | # define PLATFORM_ID "SCO_SV" 360 | 361 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 362 | # define PLATFORM_ID "ULTRIX" 363 | 364 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 365 | # define PLATFORM_ID "Xenix" 366 | 367 | #elif defined(__WATCOMC__) 368 | # if defined(__LINUX__) 369 | # define PLATFORM_ID "Linux" 370 | 371 | # elif defined(__DOS__) 372 | # define PLATFORM_ID "DOS" 373 | 374 | # elif defined(__OS2__) 375 | # define PLATFORM_ID "OS2" 376 | 377 | # elif defined(__WINDOWS__) 378 | # define PLATFORM_ID "Windows3x" 379 | 380 | # else /* unknown platform */ 381 | # define PLATFORM_ID "" 382 | # endif 383 | 384 | #else /* unknown platform */ 385 | # define PLATFORM_ID "" 386 | 387 | #endif 388 | 389 | /* For windows compilers MSVC and Intel we can determine 390 | the architecture of the compiler being used. This is because 391 | the compilers do not have flags that can change the architecture, 392 | but rather depend on which compiler is being used 393 | */ 394 | #if defined(_WIN32) && defined(_MSC_VER) 395 | # if defined(_M_IA64) 396 | # define ARCHITECTURE_ID "IA64" 397 | 398 | # elif defined(_M_X64) || defined(_M_AMD64) 399 | # define ARCHITECTURE_ID "x64" 400 | 401 | # elif defined(_M_IX86) 402 | # define ARCHITECTURE_ID "X86" 403 | 404 | # elif defined(_M_ARM) 405 | # if _M_ARM == 4 406 | # define ARCHITECTURE_ID "ARMV4I" 407 | # elif _M_ARM == 5 408 | # define ARCHITECTURE_ID "ARMV5I" 409 | # else 410 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 411 | # endif 412 | 413 | # elif defined(_M_MIPS) 414 | # define ARCHITECTURE_ID "MIPS" 415 | 416 | # elif defined(_M_SH) 417 | # define ARCHITECTURE_ID "SHx" 418 | 419 | # else /* unknown architecture */ 420 | # define ARCHITECTURE_ID "" 421 | # endif 422 | 423 | #elif defined(__WATCOMC__) 424 | # if defined(_M_I86) 425 | # define ARCHITECTURE_ID "I86" 426 | 427 | # elif defined(_M_IX86) 428 | # define ARCHITECTURE_ID "X86" 429 | 430 | # else /* unknown architecture */ 431 | # define ARCHITECTURE_ID "" 432 | # endif 433 | 434 | #else 435 | # define ARCHITECTURE_ID "" 436 | #endif 437 | 438 | /* Convert integer to decimal digit literals. */ 439 | #define DEC(n) \ 440 | ('0' + (((n) / 10000000)%10)), \ 441 | ('0' + (((n) / 1000000)%10)), \ 442 | ('0' + (((n) / 100000)%10)), \ 443 | ('0' + (((n) / 10000)%10)), \ 444 | ('0' + (((n) / 1000)%10)), \ 445 | ('0' + (((n) / 100)%10)), \ 446 | ('0' + (((n) / 10)%10)), \ 447 | ('0' + ((n) % 10)) 448 | 449 | /* Convert integer to hex digit literals. */ 450 | #define HEX(n) \ 451 | ('0' + ((n)>>28 & 0xF)), \ 452 | ('0' + ((n)>>24 & 0xF)), \ 453 | ('0' + ((n)>>20 & 0xF)), \ 454 | ('0' + ((n)>>16 & 0xF)), \ 455 | ('0' + ((n)>>12 & 0xF)), \ 456 | ('0' + ((n)>>8 & 0xF)), \ 457 | ('0' + ((n)>>4 & 0xF)), \ 458 | ('0' + ((n) & 0xF)) 459 | 460 | /* Construct a string literal encoding the version number components. */ 461 | #ifdef COMPILER_VERSION_MAJOR 462 | char const info_version[] = { 463 | 'I', 'N', 'F', 'O', ':', 464 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 465 | COMPILER_VERSION_MAJOR, 466 | # ifdef COMPILER_VERSION_MINOR 467 | '.', COMPILER_VERSION_MINOR, 468 | # ifdef COMPILER_VERSION_PATCH 469 | '.', COMPILER_VERSION_PATCH, 470 | # ifdef COMPILER_VERSION_TWEAK 471 | '.', COMPILER_VERSION_TWEAK, 472 | # endif 473 | # endif 474 | # endif 475 | ']','\0'}; 476 | #endif 477 | 478 | /* Construct a string literal encoding the version number components. */ 479 | #ifdef SIMULATE_VERSION_MAJOR 480 | char const info_simulate_version[] = { 481 | 'I', 'N', 'F', 'O', ':', 482 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 483 | SIMULATE_VERSION_MAJOR, 484 | # ifdef SIMULATE_VERSION_MINOR 485 | '.', SIMULATE_VERSION_MINOR, 486 | # ifdef SIMULATE_VERSION_PATCH 487 | '.', SIMULATE_VERSION_PATCH, 488 | # ifdef SIMULATE_VERSION_TWEAK 489 | '.', SIMULATE_VERSION_TWEAK, 490 | # endif 491 | # endif 492 | # endif 493 | ']','\0'}; 494 | #endif 495 | 496 | /* Construct the string literal in pieces to prevent the source from 497 | getting matched. Store it in a pointer rather than an array 498 | because some compilers will just produce instructions to fill the 499 | array rather than assigning a pointer to a static array. */ 500 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 501 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 502 | 503 | 504 | 505 | 506 | const char* info_language_dialect_default = "INFO" ":" "dialect_default[" 507 | #if !defined(__STDC_VERSION__) 508 | "90" 509 | #elif __STDC_VERSION__ >= 201000L 510 | "11" 511 | #elif __STDC_VERSION__ >= 199901L 512 | "99" 513 | #else 514 | #endif 515 | "]"; 516 | 517 | /*--------------------------------------------------------------------------*/ 518 | 519 | #ifdef ID_VOID_MAIN 520 | void main() {} 521 | #else 522 | int main(int argc, char* argv[]) 523 | { 524 | int require = 0; 525 | require += info_compiler[argc]; 526 | require += info_platform[argc]; 527 | require += info_arch[argc]; 528 | #ifdef COMPILER_VERSION_MAJOR 529 | require += info_version[argc]; 530 | #endif 531 | #ifdef SIMULATE_ID 532 | require += info_simulate[argc]; 533 | #endif 534 | #ifdef SIMULATE_VERSION_MAJOR 535 | require += info_simulate_version[argc]; 536 | #endif 537 | #if defined(__CRAYXE) || defined(__CRAYXC) 538 | require += info_cray[argc]; 539 | #endif 540 | require += info_language_dialect_default[argc]; 541 | (void)argv; 542 | return require; 543 | } 544 | #endif 545 | -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/CMakeFiles/3.5.1/CompilerIdC/a.out -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp: -------------------------------------------------------------------------------- 1 | /* This source file must have a .cpp extension so that all C++ compilers 2 | recognize the extension without flags. Borland does not know .cxx for 3 | example. */ 4 | #ifndef __cplusplus 5 | # error "A C compiler has been selected for C++." 6 | #endif 7 | 8 | 9 | /* Version number components: V=Version, R=Revision, P=Patch 10 | Version date components: YYYY=Year, MM=Month, DD=Day */ 11 | 12 | #if defined(__COMO__) 13 | # define COMPILER_ID "Comeau" 14 | /* __COMO_VERSION__ = VRR */ 15 | # define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) 16 | # define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) 17 | 18 | #elif defined(__INTEL_COMPILER) || defined(__ICC) 19 | # define COMPILER_ID "Intel" 20 | # if defined(_MSC_VER) 21 | # define SIMULATE_ID "MSVC" 22 | # endif 23 | /* __INTEL_COMPILER = VRP */ 24 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 25 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 26 | # if defined(__INTEL_COMPILER_UPDATE) 27 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 28 | # else 29 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 30 | # endif 31 | # if defined(__INTEL_COMPILER_BUILD_DATE) 32 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 33 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 34 | # endif 35 | # if defined(_MSC_VER) 36 | /* _MSC_VER = VVRR */ 37 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 38 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 39 | # endif 40 | 41 | #elif defined(__PATHCC__) 42 | # define COMPILER_ID "PathScale" 43 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 44 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 45 | # if defined(__PATHCC_PATCHLEVEL__) 46 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 47 | # endif 48 | 49 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 50 | # define COMPILER_ID "Embarcadero" 51 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 52 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 53 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 54 | 55 | #elif defined(__BORLANDC__) 56 | # define COMPILER_ID "Borland" 57 | /* __BORLANDC__ = 0xVRR */ 58 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 59 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 60 | 61 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 62 | # define COMPILER_ID "Watcom" 63 | /* __WATCOMC__ = VVRR */ 64 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 65 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 66 | # if (__WATCOMC__ % 10) > 0 67 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 68 | # endif 69 | 70 | #elif defined(__WATCOMC__) 71 | # define COMPILER_ID "OpenWatcom" 72 | /* __WATCOMC__ = VVRP + 1100 */ 73 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 74 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 75 | # if (__WATCOMC__ % 10) > 0 76 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 77 | # endif 78 | 79 | #elif defined(__SUNPRO_CC) 80 | # define COMPILER_ID "SunPro" 81 | # if __SUNPRO_CC >= 0x5100 82 | /* __SUNPRO_CC = 0xVRRP */ 83 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) 84 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) 85 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 86 | # else 87 | /* __SUNPRO_CC = 0xVRP */ 88 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) 89 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) 90 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 91 | # endif 92 | 93 | #elif defined(__HP_aCC) 94 | # define COMPILER_ID "HP" 95 | /* __HP_aCC = VVRRPP */ 96 | # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) 97 | # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) 98 | # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) 99 | 100 | #elif defined(__DECCXX) 101 | # define COMPILER_ID "Compaq" 102 | /* __DECCXX_VER = VVRRTPPPP */ 103 | # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) 104 | # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) 105 | # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) 106 | 107 | #elif defined(__IBMCPP__) && defined(__COMPILER_VER__) 108 | # define COMPILER_ID "zOS" 109 | /* __IBMCPP__ = VRP */ 110 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 111 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 112 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 113 | 114 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 115 | # define COMPILER_ID "XL" 116 | /* __IBMCPP__ = VRP */ 117 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 118 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 119 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 120 | 121 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 122 | # define COMPILER_ID "VisualAge" 123 | /* __IBMCPP__ = VRP */ 124 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 125 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 126 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 127 | 128 | #elif defined(__PGI) 129 | # define COMPILER_ID "PGI" 130 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 131 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 132 | # if defined(__PGIC_PATCHLEVEL__) 133 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 134 | # endif 135 | 136 | #elif defined(_CRAYC) 137 | # define COMPILER_ID "Cray" 138 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 139 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 140 | 141 | #elif defined(__TI_COMPILER_VERSION__) 142 | # define COMPILER_ID "TI" 143 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 144 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 145 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 146 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 147 | 148 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 149 | # define COMPILER_ID "Fujitsu" 150 | 151 | #elif defined(__SCO_VERSION__) 152 | # define COMPILER_ID "SCO" 153 | 154 | #elif defined(__clang__) && defined(__apple_build_version__) 155 | # define COMPILER_ID "AppleClang" 156 | # if defined(_MSC_VER) 157 | # define SIMULATE_ID "MSVC" 158 | # endif 159 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 160 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 161 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 162 | # if defined(_MSC_VER) 163 | /* _MSC_VER = VVRR */ 164 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 165 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 166 | # endif 167 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 168 | 169 | #elif defined(__clang__) 170 | # define COMPILER_ID "Clang" 171 | # if defined(_MSC_VER) 172 | # define SIMULATE_ID "MSVC" 173 | # endif 174 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 175 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 176 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 177 | # if defined(_MSC_VER) 178 | /* _MSC_VER = VVRR */ 179 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 180 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 181 | # endif 182 | 183 | #elif defined(__GNUC__) 184 | # define COMPILER_ID "GNU" 185 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 186 | # if defined(__GNUC_MINOR__) 187 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 188 | # endif 189 | # if defined(__GNUC_PATCHLEVEL__) 190 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 191 | # endif 192 | 193 | #elif defined(_MSC_VER) 194 | # define COMPILER_ID "MSVC" 195 | /* _MSC_VER = VVRR */ 196 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 197 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 198 | # if defined(_MSC_FULL_VER) 199 | # if _MSC_VER >= 1400 200 | /* _MSC_FULL_VER = VVRRPPPPP */ 201 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 202 | # else 203 | /* _MSC_FULL_VER = VVRRPPPP */ 204 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 205 | # endif 206 | # endif 207 | # if defined(_MSC_BUILD) 208 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 209 | # endif 210 | 211 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 212 | # define COMPILER_ID "ADSP" 213 | #if defined(__VISUALDSPVERSION__) 214 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 215 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 216 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 217 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 218 | #endif 219 | 220 | #elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) 221 | # define COMPILER_ID "IAR" 222 | 223 | #elif defined(__ARMCC_VERSION) 224 | # define COMPILER_ID "ARMCC" 225 | #if __ARMCC_VERSION >= 1000000 226 | /* __ARMCC_VERSION = VRRPPPP */ 227 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 228 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 229 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 230 | #else 231 | /* __ARMCC_VERSION = VRPPPP */ 232 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 233 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 234 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 235 | #endif 236 | 237 | 238 | #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) 239 | # define COMPILER_ID "MIPSpro" 240 | # if defined(_SGI_COMPILER_VERSION) 241 | /* _SGI_COMPILER_VERSION = VRP */ 242 | # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) 243 | # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) 244 | # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) 245 | # else 246 | /* _COMPILER_VERSION = VRP */ 247 | # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) 248 | # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) 249 | # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) 250 | # endif 251 | 252 | 253 | /* These compilers are either not known or too old to define an 254 | identification macro. Try to identify the platform and guess that 255 | it is the native compiler. */ 256 | #elif defined(__sgi) 257 | # define COMPILER_ID "MIPSpro" 258 | 259 | #elif defined(__hpux) || defined(__hpua) 260 | # define COMPILER_ID "HP" 261 | 262 | #else /* unknown compiler */ 263 | # define COMPILER_ID "" 264 | #endif 265 | 266 | /* Construct the string literal in pieces to prevent the source from 267 | getting matched. Store it in a pointer rather than an array 268 | because some compilers will just produce instructions to fill the 269 | array rather than assigning a pointer to a static array. */ 270 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 271 | #ifdef SIMULATE_ID 272 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 273 | #endif 274 | 275 | #ifdef __QNXNTO__ 276 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 277 | #endif 278 | 279 | #if defined(__CRAYXE) || defined(__CRAYXC) 280 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 281 | #endif 282 | 283 | #define STRINGIFY_HELPER(X) #X 284 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 285 | 286 | /* Identify known platforms by name. */ 287 | #if defined(__linux) || defined(__linux__) || defined(linux) 288 | # define PLATFORM_ID "Linux" 289 | 290 | #elif defined(__CYGWIN__) 291 | # define PLATFORM_ID "Cygwin" 292 | 293 | #elif defined(__MINGW32__) 294 | # define PLATFORM_ID "MinGW" 295 | 296 | #elif defined(__APPLE__) 297 | # define PLATFORM_ID "Darwin" 298 | 299 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 300 | # define PLATFORM_ID "Windows" 301 | 302 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 303 | # define PLATFORM_ID "FreeBSD" 304 | 305 | #elif defined(__NetBSD__) || defined(__NetBSD) 306 | # define PLATFORM_ID "NetBSD" 307 | 308 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 309 | # define PLATFORM_ID "OpenBSD" 310 | 311 | #elif defined(__sun) || defined(sun) 312 | # define PLATFORM_ID "SunOS" 313 | 314 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 315 | # define PLATFORM_ID "AIX" 316 | 317 | #elif defined(__sgi) || defined(__sgi__) || defined(_SGI) 318 | # define PLATFORM_ID "IRIX" 319 | 320 | #elif defined(__hpux) || defined(__hpux__) 321 | # define PLATFORM_ID "HP-UX" 322 | 323 | #elif defined(__HAIKU__) 324 | # define PLATFORM_ID "Haiku" 325 | 326 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 327 | # define PLATFORM_ID "BeOS" 328 | 329 | #elif defined(__QNX__) || defined(__QNXNTO__) 330 | # define PLATFORM_ID "QNX" 331 | 332 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 333 | # define PLATFORM_ID "Tru64" 334 | 335 | #elif defined(__riscos) || defined(__riscos__) 336 | # define PLATFORM_ID "RISCos" 337 | 338 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 339 | # define PLATFORM_ID "SINIX" 340 | 341 | #elif defined(__UNIX_SV__) 342 | # define PLATFORM_ID "UNIX_SV" 343 | 344 | #elif defined(__bsdos__) 345 | # define PLATFORM_ID "BSDOS" 346 | 347 | #elif defined(_MPRAS) || defined(MPRAS) 348 | # define PLATFORM_ID "MP-RAS" 349 | 350 | #elif defined(__osf) || defined(__osf__) 351 | # define PLATFORM_ID "OSF1" 352 | 353 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 354 | # define PLATFORM_ID "SCO_SV" 355 | 356 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 357 | # define PLATFORM_ID "ULTRIX" 358 | 359 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 360 | # define PLATFORM_ID "Xenix" 361 | 362 | #elif defined(__WATCOMC__) 363 | # if defined(__LINUX__) 364 | # define PLATFORM_ID "Linux" 365 | 366 | # elif defined(__DOS__) 367 | # define PLATFORM_ID "DOS" 368 | 369 | # elif defined(__OS2__) 370 | # define PLATFORM_ID "OS2" 371 | 372 | # elif defined(__WINDOWS__) 373 | # define PLATFORM_ID "Windows3x" 374 | 375 | # else /* unknown platform */ 376 | # define PLATFORM_ID "" 377 | # endif 378 | 379 | #else /* unknown platform */ 380 | # define PLATFORM_ID "" 381 | 382 | #endif 383 | 384 | /* For windows compilers MSVC and Intel we can determine 385 | the architecture of the compiler being used. This is because 386 | the compilers do not have flags that can change the architecture, 387 | but rather depend on which compiler is being used 388 | */ 389 | #if defined(_WIN32) && defined(_MSC_VER) 390 | # if defined(_M_IA64) 391 | # define ARCHITECTURE_ID "IA64" 392 | 393 | # elif defined(_M_X64) || defined(_M_AMD64) 394 | # define ARCHITECTURE_ID "x64" 395 | 396 | # elif defined(_M_IX86) 397 | # define ARCHITECTURE_ID "X86" 398 | 399 | # elif defined(_M_ARM) 400 | # if _M_ARM == 4 401 | # define ARCHITECTURE_ID "ARMV4I" 402 | # elif _M_ARM == 5 403 | # define ARCHITECTURE_ID "ARMV5I" 404 | # else 405 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 406 | # endif 407 | 408 | # elif defined(_M_MIPS) 409 | # define ARCHITECTURE_ID "MIPS" 410 | 411 | # elif defined(_M_SH) 412 | # define ARCHITECTURE_ID "SHx" 413 | 414 | # else /* unknown architecture */ 415 | # define ARCHITECTURE_ID "" 416 | # endif 417 | 418 | #elif defined(__WATCOMC__) 419 | # if defined(_M_I86) 420 | # define ARCHITECTURE_ID "I86" 421 | 422 | # elif defined(_M_IX86) 423 | # define ARCHITECTURE_ID "X86" 424 | 425 | # else /* unknown architecture */ 426 | # define ARCHITECTURE_ID "" 427 | # endif 428 | 429 | #else 430 | # define ARCHITECTURE_ID "" 431 | #endif 432 | 433 | /* Convert integer to decimal digit literals. */ 434 | #define DEC(n) \ 435 | ('0' + (((n) / 10000000)%10)), \ 436 | ('0' + (((n) / 1000000)%10)), \ 437 | ('0' + (((n) / 100000)%10)), \ 438 | ('0' + (((n) / 10000)%10)), \ 439 | ('0' + (((n) / 1000)%10)), \ 440 | ('0' + (((n) / 100)%10)), \ 441 | ('0' + (((n) / 10)%10)), \ 442 | ('0' + ((n) % 10)) 443 | 444 | /* Convert integer to hex digit literals. */ 445 | #define HEX(n) \ 446 | ('0' + ((n)>>28 & 0xF)), \ 447 | ('0' + ((n)>>24 & 0xF)), \ 448 | ('0' + ((n)>>20 & 0xF)), \ 449 | ('0' + ((n)>>16 & 0xF)), \ 450 | ('0' + ((n)>>12 & 0xF)), \ 451 | ('0' + ((n)>>8 & 0xF)), \ 452 | ('0' + ((n)>>4 & 0xF)), \ 453 | ('0' + ((n) & 0xF)) 454 | 455 | /* Construct a string literal encoding the version number components. */ 456 | #ifdef COMPILER_VERSION_MAJOR 457 | char const info_version[] = { 458 | 'I', 'N', 'F', 'O', ':', 459 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 460 | COMPILER_VERSION_MAJOR, 461 | # ifdef COMPILER_VERSION_MINOR 462 | '.', COMPILER_VERSION_MINOR, 463 | # ifdef COMPILER_VERSION_PATCH 464 | '.', COMPILER_VERSION_PATCH, 465 | # ifdef COMPILER_VERSION_TWEAK 466 | '.', COMPILER_VERSION_TWEAK, 467 | # endif 468 | # endif 469 | # endif 470 | ']','\0'}; 471 | #endif 472 | 473 | /* Construct a string literal encoding the version number components. */ 474 | #ifdef SIMULATE_VERSION_MAJOR 475 | char const info_simulate_version[] = { 476 | 'I', 'N', 'F', 'O', ':', 477 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 478 | SIMULATE_VERSION_MAJOR, 479 | # ifdef SIMULATE_VERSION_MINOR 480 | '.', SIMULATE_VERSION_MINOR, 481 | # ifdef SIMULATE_VERSION_PATCH 482 | '.', SIMULATE_VERSION_PATCH, 483 | # ifdef SIMULATE_VERSION_TWEAK 484 | '.', SIMULATE_VERSION_TWEAK, 485 | # endif 486 | # endif 487 | # endif 488 | ']','\0'}; 489 | #endif 490 | 491 | /* Construct the string literal in pieces to prevent the source from 492 | getting matched. Store it in a pointer rather than an array 493 | because some compilers will just produce instructions to fill the 494 | array rather than assigning a pointer to a static array. */ 495 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 496 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 497 | 498 | 499 | 500 | 501 | const char* info_language_dialect_default = "INFO" ":" "dialect_default[" 502 | #if __cplusplus >= 201402L 503 | "14" 504 | #elif __cplusplus >= 201103L 505 | "11" 506 | #else 507 | "98" 508 | #endif 509 | "]"; 510 | 511 | /*--------------------------------------------------------------------------*/ 512 | 513 | int main(int argc, char* argv[]) 514 | { 515 | int require = 0; 516 | require += info_compiler[argc]; 517 | require += info_platform[argc]; 518 | #ifdef COMPILER_VERSION_MAJOR 519 | require += info_version[argc]; 520 | #endif 521 | #ifdef SIMULATE_ID 522 | require += info_simulate[argc]; 523 | #endif 524 | #ifdef SIMULATE_VERSION_MAJOR 525 | require += info_simulate_version[argc]; 526 | #endif 527 | #if defined(__CRAYXE) || defined(__CRAYXC) 528 | require += info_cray[argc]; 529 | #endif 530 | require += info_language_dialect_default[argc]; 531 | (void)argv; 532 | return require; 533 | } 534 | -------------------------------------------------------------------------------- /CMakeFiles/3.5.1/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/CMakeFiles/3.5.1/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/paulo/batch_segmentation") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/paulo/batch_segmentation") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 11 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 12 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 13 | "CMakeFiles/feature_tests.c" 14 | "CMakeFiles/feature_tests.cxx" 15 | "CMakeLists.txt" 16 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALConfig.cmake" 17 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports-release.cmake" 18 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports.cmake" 19 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_Common.cmake" 20 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_CreateSingleSourceCGALProgram.cmake" 21 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_GeneratorSpecificSettings.cmake" 22 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_Macros.cmake" 23 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_SetupFlags.cmake" 24 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_TweakFindBoost.cmake" 25 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_VersionUtils.cmake" 26 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/UseCGAL.cmake" 27 | "/usr/share/cmake-3.5/Modules/CMakeCCompiler.cmake.in" 28 | "/usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c" 29 | "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake" 30 | "/usr/share/cmake-3.5/Modules/CMakeCXXCompiler.cmake.in" 31 | "/usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp" 32 | "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake" 33 | "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" 34 | "/usr/share/cmake-3.5/Modules/CMakeCompilerIdDetection.cmake" 35 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCCompiler.cmake" 36 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCXXCompiler.cmake" 37 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake" 38 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCompiler.cmake" 39 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake" 40 | "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake" 41 | "/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake" 42 | "/usr/share/cmake-3.5/Modules/CMakeFindBinUtils.cmake" 43 | "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" 44 | "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" 45 | "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" 46 | "/usr/share/cmake-3.5/Modules/CMakeParseImplicitLinkInfo.cmake" 47 | "/usr/share/cmake-3.5/Modules/CMakeSystem.cmake.in" 48 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" 49 | "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" 50 | "/usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake" 51 | "/usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake" 52 | "/usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake" 53 | "/usr/share/cmake-3.5/Modules/CMakeUnixFindMake.cmake" 54 | "/usr/share/cmake-3.5/Modules/Compiler/ADSP-DetermineCompiler.cmake" 55 | "/usr/share/cmake-3.5/Modules/Compiler/ARMCC-DetermineCompiler.cmake" 56 | "/usr/share/cmake-3.5/Modules/Compiler/AppleClang-DetermineCompiler.cmake" 57 | "/usr/share/cmake-3.5/Modules/Compiler/Borland-DetermineCompiler.cmake" 58 | "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompiler.cmake" 59 | "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" 60 | "/usr/share/cmake-3.5/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" 61 | "/usr/share/cmake-3.5/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" 62 | "/usr/share/cmake-3.5/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" 63 | "/usr/share/cmake-3.5/Modules/Compiler/Cray-DetermineCompiler.cmake" 64 | "/usr/share/cmake-3.5/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" 65 | "/usr/share/cmake-3.5/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" 66 | "/usr/share/cmake-3.5/Modules/Compiler/GHS-DetermineCompiler.cmake" 67 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-C-FeatureTests.cmake" 68 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake" 69 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX-FeatureTests.cmake" 70 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake" 71 | "/usr/share/cmake-3.5/Modules/Compiler/GNU-DetermineCompiler.cmake" 72 | "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" 73 | "/usr/share/cmake-3.5/Modules/Compiler/HP-C-DetermineCompiler.cmake" 74 | "/usr/share/cmake-3.5/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" 75 | "/usr/share/cmake-3.5/Modules/Compiler/IAR-DetermineCompiler.cmake" 76 | "/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" 77 | "/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" 78 | "/usr/share/cmake-3.5/Modules/Compiler/Intel-DetermineCompiler.cmake" 79 | "/usr/share/cmake-3.5/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" 80 | "/usr/share/cmake-3.5/Modules/Compiler/MSVC-DetermineCompiler.cmake" 81 | "/usr/share/cmake-3.5/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" 82 | "/usr/share/cmake-3.5/Modules/Compiler/PGI-DetermineCompiler.cmake" 83 | "/usr/share/cmake-3.5/Modules/Compiler/PathScale-DetermineCompiler.cmake" 84 | "/usr/share/cmake-3.5/Modules/Compiler/SCO-DetermineCompiler.cmake" 85 | "/usr/share/cmake-3.5/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" 86 | "/usr/share/cmake-3.5/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" 87 | "/usr/share/cmake-3.5/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" 88 | "/usr/share/cmake-3.5/Modules/Compiler/TI-DetermineCompiler.cmake" 89 | "/usr/share/cmake-3.5/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" 90 | "/usr/share/cmake-3.5/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" 91 | "/usr/share/cmake-3.5/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" 92 | "/usr/share/cmake-3.5/Modules/Compiler/Watcom-DetermineCompiler.cmake" 93 | "/usr/share/cmake-3.5/Modules/Compiler/XL-C-DetermineCompiler.cmake" 94 | "/usr/share/cmake-3.5/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" 95 | "/usr/share/cmake-3.5/Modules/Compiler/zOS-C-DetermineCompiler.cmake" 96 | "/usr/share/cmake-3.5/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" 97 | "/usr/share/cmake-3.5/Modules/FindBoost.cmake" 98 | "/usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake" 99 | "/usr/share/cmake-3.5/Modules/MultiArchCross.cmake" 100 | "/usr/share/cmake-3.5/Modules/Platform/Linux-CXX.cmake" 101 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake" 102 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake" 103 | "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" 104 | "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" 105 | "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" 106 | ) 107 | 108 | # The corresponding makefile is: 109 | set(CMAKE_MAKEFILE_OUTPUTS 110 | "Makefile" 111 | "CMakeFiles/cmake.check_cache" 112 | ) 113 | 114 | # Byproducts of CMake generate step: 115 | set(CMAKE_MAKEFILE_PRODUCTS 116 | "CMakeFiles/3.5.1/CMakeSystem.cmake" 117 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 118 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 119 | "CMakeFiles/3.5.1/CMakeCCompiler.cmake" 120 | "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" 121 | "CMakeFiles/CMakeDirectoryInformation.cmake" 122 | ) 123 | 124 | # Dependency information for all targets: 125 | set(CMAKE_DEPEND_INFO_FILES 126 | "CMakeFiles/remove_similar_segm.dir/DependInfo.cmake" 127 | "CMakeFiles/segment_meshes.dir/DependInfo.cmake" 128 | ) 129 | -------------------------------------------------------------------------------- /CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # The main recursive all target 10 | all: 11 | 12 | .PHONY : all 13 | 14 | # The main recursive preinstall target 15 | preinstall: 16 | 17 | .PHONY : preinstall 18 | 19 | #============================================================================= 20 | # Special targets provided by cmake. 21 | 22 | # Disable implicit rules so canonical targets will work. 23 | .SUFFIXES: 24 | 25 | 26 | # Remove some rules from gmake that .SUFFIXES does not remove. 27 | SUFFIXES = 28 | 29 | .SUFFIXES: .hpux_make_needs_suffix_list 30 | 31 | 32 | # Suppress display of executed commands. 33 | $(VERBOSE).SILENT: 34 | 35 | 36 | # A target that is always out of date. 37 | cmake_force: 38 | 39 | .PHONY : cmake_force 40 | 41 | #============================================================================= 42 | # Set environment variables for the build. 43 | 44 | # The shell in which to execute make rules. 45 | SHELL = /bin/sh 46 | 47 | # The CMake executable. 48 | CMAKE_COMMAND = /usr/bin/cmake 49 | 50 | # The command to remove a file. 51 | RM = /usr/bin/cmake -E remove -f 52 | 53 | # Escaping for special characters. 54 | EQUALS = = 55 | 56 | # The top-level source directory on which CMake was run. 57 | CMAKE_SOURCE_DIR = /home/paulo/batch_segmentation 58 | 59 | # The top-level build directory on which CMake was run. 60 | CMAKE_BINARY_DIR = /home/paulo/batch_segmentation 61 | 62 | #============================================================================= 63 | # Target rules for target CMakeFiles/remove_similar_segm.dir 64 | 65 | # All Build rule for target. 66 | CMakeFiles/remove_similar_segm.dir/all: 67 | $(MAKE) -f CMakeFiles/remove_similar_segm.dir/build.make CMakeFiles/remove_similar_segm.dir/depend 68 | $(MAKE) -f CMakeFiles/remove_similar_segm.dir/build.make CMakeFiles/remove_similar_segm.dir/build 69 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/paulo/batch_segmentation/CMakeFiles --progress-num=1,2 "Built target remove_similar_segm" 70 | .PHONY : CMakeFiles/remove_similar_segm.dir/all 71 | 72 | # Include target in all. 73 | all: CMakeFiles/remove_similar_segm.dir/all 74 | 75 | .PHONY : all 76 | 77 | # Build rule for subdir invocation for target. 78 | CMakeFiles/remove_similar_segm.dir/rule: cmake_check_build_system 79 | $(CMAKE_COMMAND) -E cmake_progress_start /home/paulo/batch_segmentation/CMakeFiles 2 80 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/remove_similar_segm.dir/all 81 | $(CMAKE_COMMAND) -E cmake_progress_start /home/paulo/batch_segmentation/CMakeFiles 0 82 | .PHONY : CMakeFiles/remove_similar_segm.dir/rule 83 | 84 | # Convenience name for target. 85 | remove_similar_segm: CMakeFiles/remove_similar_segm.dir/rule 86 | 87 | .PHONY : remove_similar_segm 88 | 89 | # clean rule for target. 90 | CMakeFiles/remove_similar_segm.dir/clean: 91 | $(MAKE) -f CMakeFiles/remove_similar_segm.dir/build.make CMakeFiles/remove_similar_segm.dir/clean 92 | .PHONY : CMakeFiles/remove_similar_segm.dir/clean 93 | 94 | # clean rule for target. 95 | clean: CMakeFiles/remove_similar_segm.dir/clean 96 | 97 | .PHONY : clean 98 | 99 | #============================================================================= 100 | # Target rules for target CMakeFiles/segment_meshes.dir 101 | 102 | # All Build rule for target. 103 | CMakeFiles/segment_meshes.dir/all: 104 | $(MAKE) -f CMakeFiles/segment_meshes.dir/build.make CMakeFiles/segment_meshes.dir/depend 105 | $(MAKE) -f CMakeFiles/segment_meshes.dir/build.make CMakeFiles/segment_meshes.dir/build 106 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/paulo/batch_segmentation/CMakeFiles --progress-num=3,4 "Built target segment_meshes" 107 | .PHONY : CMakeFiles/segment_meshes.dir/all 108 | 109 | # Include target in all. 110 | all: CMakeFiles/segment_meshes.dir/all 111 | 112 | .PHONY : all 113 | 114 | # Build rule for subdir invocation for target. 115 | CMakeFiles/segment_meshes.dir/rule: cmake_check_build_system 116 | $(CMAKE_COMMAND) -E cmake_progress_start /home/paulo/batch_segmentation/CMakeFiles 2 117 | $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/segment_meshes.dir/all 118 | $(CMAKE_COMMAND) -E cmake_progress_start /home/paulo/batch_segmentation/CMakeFiles 0 119 | .PHONY : CMakeFiles/segment_meshes.dir/rule 120 | 121 | # Convenience name for target. 122 | segment_meshes: CMakeFiles/segment_meshes.dir/rule 123 | 124 | .PHONY : segment_meshes 125 | 126 | # clean rule for target. 127 | CMakeFiles/segment_meshes.dir/clean: 128 | $(MAKE) -f CMakeFiles/segment_meshes.dir/build.make CMakeFiles/segment_meshes.dir/clean 129 | .PHONY : CMakeFiles/segment_meshes.dir/clean 130 | 131 | # clean rule for target. 132 | clean: CMakeFiles/segment_meshes.dir/clean 133 | 134 | .PHONY : clean 135 | 136 | #============================================================================= 137 | # Special targets to cleanup operation of make. 138 | 139 | # Special rule to run CMake to check the build system integrity. 140 | # No rule that depends on this can have commands that come from listfiles 141 | # because they might be regenerated. 142 | cmake_check_build_system: 143 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 144 | .PHONY : cmake_check_build_system 145 | 146 | -------------------------------------------------------------------------------- /CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/paulo/batch_segmentation/CMakeFiles/edit_cache.dir 2 | /home/paulo/batch_segmentation/CMakeFiles/rebuild_cache.dir 3 | /home/paulo/batch_segmentation/CMakeFiles/remove_similar_segm.dir 4 | /home/paulo/batch_segmentation/CMakeFiles/segment_meshes.dir 5 | -------------------------------------------------------------------------------- /CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /CMakeFiles/feature_tests.cxx: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "CXX_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "cxx_aggregate_default_initializers\n" 10 | "CXX_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "cxx_alias_templates\n" 17 | "CXX_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "cxx_alignas\n" 24 | "CXX_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "cxx_alignof\n" 31 | "CXX_FEATURE:" 32 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 33 | "1" 34 | #else 35 | "0" 36 | #endif 37 | "cxx_attributes\n" 38 | "CXX_FEATURE:" 39 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 40 | "1" 41 | #else 42 | "0" 43 | #endif 44 | "cxx_attribute_deprecated\n" 45 | "CXX_FEATURE:" 46 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 47 | "1" 48 | #else 49 | "0" 50 | #endif 51 | "cxx_auto_type\n" 52 | "CXX_FEATURE:" 53 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 54 | "1" 55 | #else 56 | "0" 57 | #endif 58 | "cxx_binary_literals\n" 59 | "CXX_FEATURE:" 60 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 61 | "1" 62 | #else 63 | "0" 64 | #endif 65 | "cxx_constexpr\n" 66 | "CXX_FEATURE:" 67 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 68 | "1" 69 | #else 70 | "0" 71 | #endif 72 | "cxx_contextual_conversions\n" 73 | "CXX_FEATURE:" 74 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 75 | "1" 76 | #else 77 | "0" 78 | #endif 79 | "cxx_decltype\n" 80 | "CXX_FEATURE:" 81 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 82 | "1" 83 | #else 84 | "0" 85 | #endif 86 | "cxx_decltype_auto\n" 87 | "CXX_FEATURE:" 88 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 89 | "1" 90 | #else 91 | "0" 92 | #endif 93 | "cxx_decltype_incomplete_return_types\n" 94 | "CXX_FEATURE:" 95 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 96 | "1" 97 | #else 98 | "0" 99 | #endif 100 | "cxx_default_function_template_args\n" 101 | "CXX_FEATURE:" 102 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 103 | "1" 104 | #else 105 | "0" 106 | #endif 107 | "cxx_defaulted_functions\n" 108 | "CXX_FEATURE:" 109 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 110 | "1" 111 | #else 112 | "0" 113 | #endif 114 | "cxx_defaulted_move_initializers\n" 115 | "CXX_FEATURE:" 116 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 117 | "1" 118 | #else 119 | "0" 120 | #endif 121 | "cxx_delegating_constructors\n" 122 | "CXX_FEATURE:" 123 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 124 | "1" 125 | #else 126 | "0" 127 | #endif 128 | "cxx_deleted_functions\n" 129 | "CXX_FEATURE:" 130 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 131 | "1" 132 | #else 133 | "0" 134 | #endif 135 | "cxx_digit_separators\n" 136 | "CXX_FEATURE:" 137 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 138 | "1" 139 | #else 140 | "0" 141 | #endif 142 | "cxx_enum_forward_declarations\n" 143 | "CXX_FEATURE:" 144 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 145 | "1" 146 | #else 147 | "0" 148 | #endif 149 | "cxx_explicit_conversions\n" 150 | "CXX_FEATURE:" 151 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 152 | "1" 153 | #else 154 | "0" 155 | #endif 156 | "cxx_extended_friend_declarations\n" 157 | "CXX_FEATURE:" 158 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 159 | "1" 160 | #else 161 | "0" 162 | #endif 163 | "cxx_extern_templates\n" 164 | "CXX_FEATURE:" 165 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 166 | "1" 167 | #else 168 | "0" 169 | #endif 170 | "cxx_final\n" 171 | "CXX_FEATURE:" 172 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 173 | "1" 174 | #else 175 | "0" 176 | #endif 177 | "cxx_func_identifier\n" 178 | "CXX_FEATURE:" 179 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 180 | "1" 181 | #else 182 | "0" 183 | #endif 184 | "cxx_generalized_initializers\n" 185 | "CXX_FEATURE:" 186 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 187 | "1" 188 | #else 189 | "0" 190 | #endif 191 | "cxx_generic_lambdas\n" 192 | "CXX_FEATURE:" 193 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 194 | "1" 195 | #else 196 | "0" 197 | #endif 198 | "cxx_inheriting_constructors\n" 199 | "CXX_FEATURE:" 200 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 201 | "1" 202 | #else 203 | "0" 204 | #endif 205 | "cxx_inline_namespaces\n" 206 | "CXX_FEATURE:" 207 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 208 | "1" 209 | #else 210 | "0" 211 | #endif 212 | "cxx_lambdas\n" 213 | "CXX_FEATURE:" 214 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 215 | "1" 216 | #else 217 | "0" 218 | #endif 219 | "cxx_lambda_init_captures\n" 220 | "CXX_FEATURE:" 221 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 222 | "1" 223 | #else 224 | "0" 225 | #endif 226 | "cxx_local_type_template_args\n" 227 | "CXX_FEATURE:" 228 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 229 | "1" 230 | #else 231 | "0" 232 | #endif 233 | "cxx_long_long_type\n" 234 | "CXX_FEATURE:" 235 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 236 | "1" 237 | #else 238 | "0" 239 | #endif 240 | "cxx_noexcept\n" 241 | "CXX_FEATURE:" 242 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 243 | "1" 244 | #else 245 | "0" 246 | #endif 247 | "cxx_nonstatic_member_init\n" 248 | "CXX_FEATURE:" 249 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 250 | "1" 251 | #else 252 | "0" 253 | #endif 254 | "cxx_nullptr\n" 255 | "CXX_FEATURE:" 256 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 257 | "1" 258 | #else 259 | "0" 260 | #endif 261 | "cxx_override\n" 262 | "CXX_FEATURE:" 263 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 264 | "1" 265 | #else 266 | "0" 267 | #endif 268 | "cxx_range_for\n" 269 | "CXX_FEATURE:" 270 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 271 | "1" 272 | #else 273 | "0" 274 | #endif 275 | "cxx_raw_string_literals\n" 276 | "CXX_FEATURE:" 277 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 278 | "1" 279 | #else 280 | "0" 281 | #endif 282 | "cxx_reference_qualified_functions\n" 283 | "CXX_FEATURE:" 284 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 285 | "1" 286 | #else 287 | "0" 288 | #endif 289 | "cxx_relaxed_constexpr\n" 290 | "CXX_FEATURE:" 291 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 292 | "1" 293 | #else 294 | "0" 295 | #endif 296 | "cxx_return_type_deduction\n" 297 | "CXX_FEATURE:" 298 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 299 | "1" 300 | #else 301 | "0" 302 | #endif 303 | "cxx_right_angle_brackets\n" 304 | "CXX_FEATURE:" 305 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 306 | "1" 307 | #else 308 | "0" 309 | #endif 310 | "cxx_rvalue_references\n" 311 | "CXX_FEATURE:" 312 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 313 | "1" 314 | #else 315 | "0" 316 | #endif 317 | "cxx_sizeof_member\n" 318 | "CXX_FEATURE:" 319 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 320 | "1" 321 | #else 322 | "0" 323 | #endif 324 | "cxx_static_assert\n" 325 | "CXX_FEATURE:" 326 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 327 | "1" 328 | #else 329 | "0" 330 | #endif 331 | "cxx_strong_enums\n" 332 | "CXX_FEATURE:" 333 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus 334 | "1" 335 | #else 336 | "0" 337 | #endif 338 | "cxx_template_template_parameters\n" 339 | "CXX_FEATURE:" 340 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 341 | "1" 342 | #else 343 | "0" 344 | #endif 345 | "cxx_thread_local\n" 346 | "CXX_FEATURE:" 347 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 348 | "1" 349 | #else 350 | "0" 351 | #endif 352 | "cxx_trailing_return_types\n" 353 | "CXX_FEATURE:" 354 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 355 | "1" 356 | #else 357 | "0" 358 | #endif 359 | "cxx_unicode_literals\n" 360 | "CXX_FEATURE:" 361 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 362 | "1" 363 | #else 364 | "0" 365 | #endif 366 | "cxx_uniform_initialization\n" 367 | "CXX_FEATURE:" 368 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 369 | "1" 370 | #else 371 | "0" 372 | #endif 373 | "cxx_unrestricted_unions\n" 374 | "CXX_FEATURE:" 375 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 376 | "1" 377 | #else 378 | "0" 379 | #endif 380 | "cxx_user_literals\n" 381 | "CXX_FEATURE:" 382 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 383 | "1" 384 | #else 385 | "0" 386 | #endif 387 | "cxx_variable_templates\n" 388 | "CXX_FEATURE:" 389 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 390 | "1" 391 | #else 392 | "0" 393 | #endif 394 | "cxx_variadic_macros\n" 395 | "CXX_FEATURE:" 396 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 397 | "1" 398 | #else 399 | "0" 400 | #endif 401 | "cxx_variadic_templates\n" 402 | 403 | }; 404 | 405 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 406 | -------------------------------------------------------------------------------- /CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 4 2 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | /home/paulo/batch_segmentation/remove_similar_segm.cpp 10 | dirent.h 11 | - 12 | errno.h 13 | - 14 | CGAL/Exact_predicates_inexact_constructions_kernel.h 15 | - 16 | CGAL/boost/graph/graph_traits_Polyhedron_3.h 17 | - 18 | CGAL/Polyhedron_items_with_id_3.h 19 | - 20 | CGAL/IO/Polyhedron_iostream.h 21 | - 22 | CGAL/mesh_segmentation.h 23 | - 24 | CGAL/Simple_cartesian.h 25 | - 26 | CGAL/Polyhedron_3.h 27 | - 28 | CGAL/property_map.h 29 | - 30 | iostream 31 | - 32 | fstream 33 | - 34 | string 35 | - 36 | bitset 37 | - 38 | string 39 | - 40 | vector 41 | - 42 | algorithm 43 | - 44 | 45 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/paulo/batch_segmentation/remove_similar_segm.cpp" "/home/paulo/batch_segmentation/CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "GNU") 10 | 11 | # Preprocessor definitions for this target. 12 | set(CMAKE_TARGET_DEFINITIONS_CXX 13 | "CGAL_USE_GMP" 14 | "CGAL_USE_MPFR" 15 | ) 16 | 17 | # The include file search paths: 18 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 19 | "/usr/include/x86_64-linux-gnu" 20 | "." 21 | ) 22 | 23 | # Targets to which this target links. 24 | set(CMAKE_TARGET_LINKED_INFO_FILES 25 | ) 26 | 27 | # Fortran module output directory. 28 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 29 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | # The shell in which to execute make rules. 34 | SHELL = /bin/sh 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = /usr/bin/cmake 38 | 39 | # The command to remove a file. 40 | RM = /usr/bin/cmake -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = /home/paulo/batch_segmentation 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = /home/paulo/batch_segmentation 50 | 51 | # Include any dependencies generated for this target. 52 | include CMakeFiles/remove_similar_segm.dir/depend.make 53 | 54 | # Include the progress variables for this target. 55 | include CMakeFiles/remove_similar_segm.dir/progress.make 56 | 57 | # Include the compile flags for this target's objects. 58 | include CMakeFiles/remove_similar_segm.dir/flags.make 59 | 60 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o: CMakeFiles/remove_similar_segm.dir/flags.make 61 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o: remove_similar_segm.cpp 62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/paulo/batch_segmentation/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o" 63 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o -c /home/paulo/batch_segmentation/remove_similar_segm.cpp 64 | 65 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.i: cmake_force 66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.i" 67 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/paulo/batch_segmentation/remove_similar_segm.cpp > CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.i 68 | 69 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.s: cmake_force 70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.s" 71 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/paulo/batch_segmentation/remove_similar_segm.cpp -o CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.s 72 | 73 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o.requires: 74 | 75 | .PHONY : CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o.requires 76 | 77 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o.provides: CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o.requires 78 | $(MAKE) -f CMakeFiles/remove_similar_segm.dir/build.make CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o.provides.build 79 | .PHONY : CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o.provides 80 | 81 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o.provides.build: CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o 82 | 83 | 84 | # Object files for target remove_similar_segm 85 | remove_similar_segm_OBJECTS = \ 86 | "CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o" 87 | 88 | # External object files for target remove_similar_segm 89 | remove_similar_segm_EXTERNAL_OBJECTS = 90 | 91 | remove_similar_segm: CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o 92 | remove_similar_segm: CMakeFiles/remove_similar_segm.dir/build.make 93 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libmpfr.so 94 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libgmp.so 95 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libCGAL.so.11.0.1 96 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libboost_thread.so 97 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libboost_system.so 98 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libpthread.so 99 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libCGAL.so.11.0.1 100 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libboost_thread.so 101 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libboost_system.so 102 | remove_similar_segm: /usr/lib/x86_64-linux-gnu/libpthread.so 103 | remove_similar_segm: CMakeFiles/remove_similar_segm.dir/link.txt 104 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/paulo/batch_segmentation/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable remove_similar_segm" 105 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/remove_similar_segm.dir/link.txt --verbose=$(VERBOSE) 106 | 107 | # Rule to build all files generated by this target. 108 | CMakeFiles/remove_similar_segm.dir/build: remove_similar_segm 109 | 110 | .PHONY : CMakeFiles/remove_similar_segm.dir/build 111 | 112 | CMakeFiles/remove_similar_segm.dir/requires: CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o.requires 113 | 114 | .PHONY : CMakeFiles/remove_similar_segm.dir/requires 115 | 116 | CMakeFiles/remove_similar_segm.dir/clean: 117 | $(CMAKE_COMMAND) -P CMakeFiles/remove_similar_segm.dir/cmake_clean.cmake 118 | .PHONY : CMakeFiles/remove_similar_segm.dir/clean 119 | 120 | CMakeFiles/remove_similar_segm.dir/depend: 121 | cd /home/paulo/batch_segmentation && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/paulo/batch_segmentation /home/paulo/batch_segmentation /home/paulo/batch_segmentation /home/paulo/batch_segmentation /home/paulo/batch_segmentation/CMakeFiles/remove_similar_segm.dir/DependInfo.cmake --color=$(COLOR) 122 | .PHONY : CMakeFiles/remove_similar_segm.dir/depend 123 | 124 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o" 3 | "remove_similar_segm.pdb" 4 | "remove_similar_segm" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/remove_similar_segm.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o 5 | /home/paulo/batch_segmentation/remove_similar_segm.cpp 6 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o: remove_similar_segm.cpp 5 | 6 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -frounding-math -O3 -DNDEBUG 6 | 7 | CXX_DEFINES = -DCGAL_USE_GMP -DCGAL_USE_MPFR 8 | 9 | CXX_INCLUDES = -isystem /usr/include/x86_64-linux-gnu -I/home/paulo/batch_segmentation 10 | 11 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -frounding-math -O3 -DNDEBUG -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o -o remove_similar_segm -rdynamic -lmpfr -lgmp /usr/lib/x86_64-linux-gnu/libCGAL.so.11.0.1 -lboost_thread -lboost_system -lpthread /usr/lib/x86_64-linux-gnu/libCGAL.so.11.0.1 -lboost_thread -lboost_system -lpthread 2 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | 4 | -------------------------------------------------------------------------------- /CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | /home/paulo/batch_segmentation/segment_meshes.cpp 10 | dirent.h 11 | - 12 | errno.h 13 | - 14 | CGAL/Exact_predicates_inexact_constructions_kernel.h 15 | - 16 | CGAL/boost/graph/graph_traits_Polyhedron_3.h 17 | - 18 | CGAL/Polyhedron_items_with_id_3.h 19 | - 20 | CGAL/IO/Polyhedron_iostream.h 21 | - 22 | CGAL/mesh_segmentation.h 23 | - 24 | CGAL/Simple_cartesian.h 25 | - 26 | CGAL/Polyhedron_3.h 27 | - 28 | CGAL/property_map.h 29 | - 30 | iostream 31 | - 32 | fstream 33 | - 34 | string 35 | - 36 | bitset 37 | - 38 | ctime 39 | - 40 | 41 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/paulo/batch_segmentation/segment_meshes.cpp" "/home/paulo/batch_segmentation/CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "GNU") 10 | 11 | # Preprocessor definitions for this target. 12 | set(CMAKE_TARGET_DEFINITIONS_CXX 13 | "CGAL_USE_GMP" 14 | "CGAL_USE_MPFR" 15 | ) 16 | 17 | # The include file search paths: 18 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 19 | "/usr/include/x86_64-linux-gnu" 20 | "." 21 | ) 22 | 23 | # Targets to which this target links. 24 | set(CMAKE_TARGET_LINKED_INFO_FILES 25 | ) 26 | 27 | # Fortran module output directory. 28 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 29 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | # The shell in which to execute make rules. 34 | SHELL = /bin/sh 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = /usr/bin/cmake 38 | 39 | # The command to remove a file. 40 | RM = /usr/bin/cmake -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = /home/paulo/batch_segmentation 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = /home/paulo/batch_segmentation 50 | 51 | # Include any dependencies generated for this target. 52 | include CMakeFiles/segment_meshes.dir/depend.make 53 | 54 | # Include the progress variables for this target. 55 | include CMakeFiles/segment_meshes.dir/progress.make 56 | 57 | # Include the compile flags for this target's objects. 58 | include CMakeFiles/segment_meshes.dir/flags.make 59 | 60 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o: CMakeFiles/segment_meshes.dir/flags.make 61 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o: segment_meshes.cpp 62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/paulo/batch_segmentation/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o" 63 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o -c /home/paulo/batch_segmentation/segment_meshes.cpp 64 | 65 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.i: cmake_force 66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/segment_meshes.dir/segment_meshes.cpp.i" 67 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/paulo/batch_segmentation/segment_meshes.cpp > CMakeFiles/segment_meshes.dir/segment_meshes.cpp.i 68 | 69 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.s: cmake_force 70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/segment_meshes.dir/segment_meshes.cpp.s" 71 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/paulo/batch_segmentation/segment_meshes.cpp -o CMakeFiles/segment_meshes.dir/segment_meshes.cpp.s 72 | 73 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o.requires: 74 | 75 | .PHONY : CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o.requires 76 | 77 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o.provides: CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o.requires 78 | $(MAKE) -f CMakeFiles/segment_meshes.dir/build.make CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o.provides.build 79 | .PHONY : CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o.provides 80 | 81 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o.provides.build: CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o 82 | 83 | 84 | # Object files for target segment_meshes 85 | segment_meshes_OBJECTS = \ 86 | "CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o" 87 | 88 | # External object files for target segment_meshes 89 | segment_meshes_EXTERNAL_OBJECTS = 90 | 91 | segment_meshes: CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o 92 | segment_meshes: CMakeFiles/segment_meshes.dir/build.make 93 | segment_meshes: /usr/lib/x86_64-linux-gnu/libmpfr.so 94 | segment_meshes: /usr/lib/x86_64-linux-gnu/libgmp.so 95 | segment_meshes: /usr/lib/x86_64-linux-gnu/libCGAL.so.11.0.1 96 | segment_meshes: /usr/lib/x86_64-linux-gnu/libboost_thread.so 97 | segment_meshes: /usr/lib/x86_64-linux-gnu/libboost_system.so 98 | segment_meshes: /usr/lib/x86_64-linux-gnu/libpthread.so 99 | segment_meshes: /usr/lib/x86_64-linux-gnu/libCGAL.so.11.0.1 100 | segment_meshes: /usr/lib/x86_64-linux-gnu/libboost_thread.so 101 | segment_meshes: /usr/lib/x86_64-linux-gnu/libboost_system.so 102 | segment_meshes: /usr/lib/x86_64-linux-gnu/libpthread.so 103 | segment_meshes: CMakeFiles/segment_meshes.dir/link.txt 104 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/paulo/batch_segmentation/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable segment_meshes" 105 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/segment_meshes.dir/link.txt --verbose=$(VERBOSE) 106 | 107 | # Rule to build all files generated by this target. 108 | CMakeFiles/segment_meshes.dir/build: segment_meshes 109 | 110 | .PHONY : CMakeFiles/segment_meshes.dir/build 111 | 112 | CMakeFiles/segment_meshes.dir/requires: CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o.requires 113 | 114 | .PHONY : CMakeFiles/segment_meshes.dir/requires 115 | 116 | CMakeFiles/segment_meshes.dir/clean: 117 | $(CMAKE_COMMAND) -P CMakeFiles/segment_meshes.dir/cmake_clean.cmake 118 | .PHONY : CMakeFiles/segment_meshes.dir/clean 119 | 120 | CMakeFiles/segment_meshes.dir/depend: 121 | cd /home/paulo/batch_segmentation && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/paulo/batch_segmentation /home/paulo/batch_segmentation /home/paulo/batch_segmentation /home/paulo/batch_segmentation /home/paulo/batch_segmentation/CMakeFiles/segment_meshes.dir/DependInfo.cmake --color=$(COLOR) 122 | .PHONY : CMakeFiles/segment_meshes.dir/depend 123 | 124 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o" 3 | "segment_meshes.pdb" 4 | "segment_meshes" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/segment_meshes.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o 5 | /home/paulo/batch_segmentation/segment_meshes.cpp 6 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o: segment_meshes.cpp 5 | 6 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -frounding-math -O3 -DNDEBUG 6 | 7 | CXX_DEFINES = -DCGAL_USE_GMP -DCGAL_USE_MPFR 8 | 9 | CXX_INCLUDES = -isystem /usr/include/x86_64-linux-gnu -I/home/paulo/batch_segmentation 10 | 11 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -frounding-math -O3 -DNDEBUG -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o -o segment_meshes -rdynamic -lmpfr -lgmp /usr/lib/x86_64-linux-gnu/libCGAL.so.11.0.1 -lboost_thread -lboost_system -lpthread /usr/lib/x86_64-linux-gnu/libCGAL.so.11.0.1 -lboost_thread -lboost_system -lpthread 2 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 3 2 | CMAKE_PROGRESS_2 = 4 3 | 4 | -------------------------------------------------------------------------------- /CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Created by the script cgal_create_cmake_script_with_options 2 | # This is the CMake script for compiling a set of CGAL applications. 3 | # modified by Paulo Abelha to compile his own *.cpp files 4 | 5 | project( segmentation ) 6 | 7 | 8 | cmake_minimum_required(VERSION 2.6.2) 9 | if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) 10 | if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) 11 | cmake_policy(VERSION 2.8.4) 12 | else() 13 | cmake_policy(VERSION 2.6) 14 | endif() 15 | endif() 16 | 17 | set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) 18 | 19 | if ( COMMAND cmake_policy ) 20 | 21 | cmake_policy( SET CMP0003 NEW ) 22 | 23 | endif() 24 | 25 | # CGAL and its components 26 | find_package( CGAL QUIET COMPONENTS ) 27 | 28 | if ( NOT CGAL_FOUND ) 29 | 30 | message(STATUS "This project requires the CGAL library, and will not be compiled.") 31 | return() 32 | 33 | endif() 34 | 35 | # include helper file 36 | include( ${CGAL_USE_FILE} ) 37 | 38 | 39 | # Boost and its components 40 | find_package( Boost REQUIRED ) 41 | 42 | if ( NOT Boost_FOUND ) 43 | 44 | message(STATUS "This project requires the Boost library, and will not be compiled.") 45 | 46 | return() 47 | 48 | endif() 49 | 50 | # include for local directory 51 | 52 | # include for local package 53 | 54 | 55 | # Creating entries for all .cpp/.C files with "main" routine 56 | # ########################################################## 57 | 58 | include( CGAL_CreateSingleSourceCGALProgram ) 59 | 60 | # create source for each cpp 61 | create_single_source_cgal_program( "segment_meshes.cpp" ) 62 | 63 | create_single_source_cgal_program( "remove_similar_segm.cpp" ) 64 | 65 | 66 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.5 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/paulo/batch_segmentation 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/paulo/batch_segmentation 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target edit_cache 60 | edit_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." 62 | /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : edit_cache 64 | 65 | # Special rule for the target edit_cache 66 | edit_cache/fast: edit_cache 67 | 68 | .PHONY : edit_cache/fast 69 | 70 | # Special rule for the target rebuild_cache 71 | rebuild_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 73 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 74 | .PHONY : rebuild_cache 75 | 76 | # Special rule for the target rebuild_cache 77 | rebuild_cache/fast: rebuild_cache 78 | 79 | .PHONY : rebuild_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | $(CMAKE_COMMAND) -E cmake_progress_start /home/paulo/batch_segmentation/CMakeFiles /home/paulo/batch_segmentation/CMakeFiles/progress.marks 84 | $(MAKE) -f CMakeFiles/Makefile2 all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/paulo/batch_segmentation/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | $(MAKE) -f CMakeFiles/Makefile2 clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | #============================================================================= 114 | # Target rules for targets named remove_similar_segm 115 | 116 | # Build rule for target. 117 | remove_similar_segm: cmake_check_build_system 118 | $(MAKE) -f CMakeFiles/Makefile2 remove_similar_segm 119 | .PHONY : remove_similar_segm 120 | 121 | # fast build rule for target. 122 | remove_similar_segm/fast: 123 | $(MAKE) -f CMakeFiles/remove_similar_segm.dir/build.make CMakeFiles/remove_similar_segm.dir/build 124 | .PHONY : remove_similar_segm/fast 125 | 126 | #============================================================================= 127 | # Target rules for targets named segment_meshes 128 | 129 | # Build rule for target. 130 | segment_meshes: cmake_check_build_system 131 | $(MAKE) -f CMakeFiles/Makefile2 segment_meshes 132 | .PHONY : segment_meshes 133 | 134 | # fast build rule for target. 135 | segment_meshes/fast: 136 | $(MAKE) -f CMakeFiles/segment_meshes.dir/build.make CMakeFiles/segment_meshes.dir/build 137 | .PHONY : segment_meshes/fast 138 | 139 | remove_similar_segm.o: remove_similar_segm.cpp.o 140 | 141 | .PHONY : remove_similar_segm.o 142 | 143 | # target to build an object file 144 | remove_similar_segm.cpp.o: 145 | $(MAKE) -f CMakeFiles/remove_similar_segm.dir/build.make CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.o 146 | .PHONY : remove_similar_segm.cpp.o 147 | 148 | remove_similar_segm.i: remove_similar_segm.cpp.i 149 | 150 | .PHONY : remove_similar_segm.i 151 | 152 | # target to preprocess a source file 153 | remove_similar_segm.cpp.i: 154 | $(MAKE) -f CMakeFiles/remove_similar_segm.dir/build.make CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.i 155 | .PHONY : remove_similar_segm.cpp.i 156 | 157 | remove_similar_segm.s: remove_similar_segm.cpp.s 158 | 159 | .PHONY : remove_similar_segm.s 160 | 161 | # target to generate assembly for a file 162 | remove_similar_segm.cpp.s: 163 | $(MAKE) -f CMakeFiles/remove_similar_segm.dir/build.make CMakeFiles/remove_similar_segm.dir/remove_similar_segm.cpp.s 164 | .PHONY : remove_similar_segm.cpp.s 165 | 166 | segment_meshes.o: segment_meshes.cpp.o 167 | 168 | .PHONY : segment_meshes.o 169 | 170 | # target to build an object file 171 | segment_meshes.cpp.o: 172 | $(MAKE) -f CMakeFiles/segment_meshes.dir/build.make CMakeFiles/segment_meshes.dir/segment_meshes.cpp.o 173 | .PHONY : segment_meshes.cpp.o 174 | 175 | segment_meshes.i: segment_meshes.cpp.i 176 | 177 | .PHONY : segment_meshes.i 178 | 179 | # target to preprocess a source file 180 | segment_meshes.cpp.i: 181 | $(MAKE) -f CMakeFiles/segment_meshes.dir/build.make CMakeFiles/segment_meshes.dir/segment_meshes.cpp.i 182 | .PHONY : segment_meshes.cpp.i 183 | 184 | segment_meshes.s: segment_meshes.cpp.s 185 | 186 | .PHONY : segment_meshes.s 187 | 188 | # target to generate assembly for a file 189 | segment_meshes.cpp.s: 190 | $(MAKE) -f CMakeFiles/segment_meshes.dir/build.make CMakeFiles/segment_meshes.dir/segment_meshes.cpp.s 191 | .PHONY : segment_meshes.cpp.s 192 | 193 | # Help Target 194 | help: 195 | @echo "The following are some of the valid targets for this Makefile:" 196 | @echo "... all (the default if no target is provided)" 197 | @echo "... clean" 198 | @echo "... depend" 199 | @echo "... edit_cache" 200 | @echo "... rebuild_cache" 201 | @echo "... remove_similar_segm" 202 | @echo "... segment_meshes" 203 | @echo "... remove_similar_segm.o" 204 | @echo "... remove_similar_segm.i" 205 | @echo "... remove_similar_segm.s" 206 | @echo "... segment_meshes.o" 207 | @echo "... segment_meshes.i" 208 | @echo "... segment_meshes.s" 209 | .PHONY : help 210 | 211 | 212 | 213 | #============================================================================= 214 | # Special targets to cleanup operation of make. 215 | 216 | # Special rule to run CMake to check the build system integrity. 217 | # No rule that depends on this can have commands that come from listfiles 218 | # because they might be regenerated. 219 | cmake_check_build_system: 220 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 221 | .PHONY : cmake_check_build_system 222 | 223 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # batch_segmentation 2 | 3 | 4 | If you are using this code, please cite: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8206372 5 | 6 | @inproceedings{abelha2017learning, \ 7 | title={Learning How a Tool Affords by Simulating 3D Models from the Web}, \ 8 | author={Abelha Ferreira, Paulo and Guerin, Frank}, \ 9 | booktitle={Proceedings of IEEE International Conference on Intelligent Robots and Systems (IROS 2017)}, \ 10 | year={2017}, \ 11 | organization={IEEE Press} \ 12 | } 13 | 14 | Batch segmentation using CGAL Triangulated Surface Mesh Segmentation 15 | https://doc.cgal.org/latest/Surface_mesh_segmentation/index.html 16 | 17 | By Paulo A. FErreira 18 | 19 | E-mail: pauloabelha@gmail.com 20 | 21 | This repository is part of my PhD. It contains the code and files for batch segmentation of point clouds. 22 | 23 | You require CGAL to run my code. 24 | The easiest way is to run my script easy_install.sh. It will install CGAL and compile my code for you. 25 | 26 | After installating and compiling you can run demo.sh ad it will segment the demo point cloud that goes with the repository. 27 | 28 | My code accepts --help and --verbose. I hope this helps you. 29 | 30 | 31 | Good segmenting! :) 32 | 33 | -------------------------------------------------------------------------------- /cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/paulo/batch_segmentation 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Release") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/home/paulo/batch_segmentation/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /data_demo/chineseknife_1_3dwh.ply: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/data_demo/chineseknife_1_3dwh.ply -------------------------------------------------------------------------------- /demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" == "--help" ]; then 4 | echo "This script runs the segmentation demo for one point cloud" 5 | echo "It will create a folder 'data_demo_segmented' and dump the segmented point clouds in there" 6 | echo "It will create a folder 'data_demo_segmented_unique' and dump the unique segmented point clouds in there" 7 | echo "Please install CGAL and compile my code before running this demo." 8 | echo "Run easy_install.sh" 9 | echo "By Paulo Abelha" 10 | echo "github.com/pauloabelha" 11 | echo "pauloabelha.com" 12 | exit 0 13 | fi 14 | 15 | echo "Runing command: ./segment_meshes -i data_demo -o data_demo_segmented -z 3:2:5,0.3:0.1:0.5 -e ply" 16 | echo "" 17 | echo "" 18 | 19 | ./segment_meshes -i data_demo -o data_demo_segmented -z 3:2:7,0.2:0.1:0.8 -e ply --verbose 20 | 21 | ./remove_similar_segm -i data_demo_segmented -o data_demo_segmented_unique --verbose 22 | 23 | 24 | -------------------------------------------------------------------------------- /easyinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" == "--help" ]; then 4 | echo "This script installs CGAL and the compile the segmentation code." 5 | echo "It will ask for your sudo to update and install the packages" 6 | echo "By Paulo Abelha" 7 | echo "github.com/pauloabelha" 8 | echo "pauloabelha.com" 9 | exit 0 10 | fi 11 | 12 | sudo apt-get update 13 | 14 | sudo apt-get install libcgal-dev 15 | 16 | cmake . 17 | 18 | make -j 4 19 | 20 | echo "Everything installed and compiled!" 21 | echo "Please run: ./segment_meshes --help" 22 | -------------------------------------------------------------------------------- /make_cgal_friendly.mlx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /remove_similar_segm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/remove_similar_segm -------------------------------------------------------------------------------- /remove_similar_segm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * So far tested on Ubuntu 14.04 only 3 | * 4 | * Fuses small segments with the closest ones of every .PLY file in an input folder and writes the fused .PLY file to an output folder 5 | * 6 | * Options: 7 | * -i: Followed by the input directory 8 | * -o: Followed by the output directory 9 | * Example usages: 10 | * fuse_small_segments -i data_segmented -o data_fused 11 | * This will fuse small segments of every .PLY file in 'data' and output the fused .PLY files in 'data_segmented' 12 | * 13 | * By Paulo Abelha (github.com/pauloabelha) 14 | */ 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | typedef CGAL::Exact_predicates_inexact_constructions_kernel K; 35 | typedef CGAL::Polyhedron_3 Polyhedron; 36 | typedef K::Point_3 Point_3; 37 | typedef Polyhedron::Vertex_iterator Vertex_iterator; 38 | typedef Polyhedron::Facet_iterator Facet_iterator; 39 | typedef Polyhedron::Halfedge_around_facet_circulator Halfedge_facet_circulator; 40 | // Property map associating a facet with an integer as id to an 41 | // element in a vector stored internally 42 | template 43 | struct Facet_with_id_pmap 44 | : public boost::put_get_helper > 46 | { 47 | typedef Polyhedron::Facet_const_handle key_type; 48 | typedef ValueType value_type; 49 | typedef value_type& reference; 50 | typedef boost::lvalue_property_map_tag category; 51 | 52 | Facet_with_id_pmap( 53 | std::vector& internal_vector 54 | ) : internal_vector(internal_vector) { } 55 | 56 | reference operator[](key_type key) const 57 | { return internal_vector[key->id()]; } 58 | private: 59 | std::vector& internal_vector; 60 | }; 61 | 62 | // Global variables that are all set by function parse_args 63 | // Option --verbose 64 | //Shows information as the program runs (--verbose) 65 | bool VERBOSE = 0; 66 | // Option -i 67 | // Input file or folder 68 | std::string INPUT_DIR = ""; 69 | // Option -o 70 | // Output file or folder 71 | std::string OUTPUT_DIR = ""; 72 | // Option -e EXT 73 | // Extension of the input file(s); if differente than .off 74 | // Meshlab is used to convert all files befor erunning the segmentation 75 | std::string INPUT_FILE_EXT = ""; 76 | 77 | //splits a string (http://www.cplusplus.com/articles/1UqpX9L8/) 78 | // split: receives a char delimiter; returns a vector of strings 79 | // By default ignores repeated delimiters (rep == 0) 80 | std::vector splitstr(std::string str, char delim) { 81 | std::vector flds; 82 | std::string buf = ""; 83 | int rep = 0; 84 | int i = 0; 85 | while (i < str.length()) { 86 | if (str[i] != delim) 87 | buf += str[i]; 88 | else if (rep == 1) { 89 | flds.push_back(buf); 90 | buf = ""; 91 | } else if (buf.length() > 0) { 92 | flds.push_back(buf); 93 | buf = ""; 94 | } 95 | i++; 96 | } 97 | if (!buf.empty()) 98 | flds.push_back(buf); 99 | return flds; 100 | } 101 | 102 | // writes comment-style line for the --help option 103 | void write_comment_line(std::string comment) { 104 | std::cout << "* " << comment << std::endl; 105 | } 106 | 107 | // writes usage of program to standard output 108 | void write_usage(void) { 109 | write_comment_line("So far tested on Ubuntu 14.04 only"); 110 | write_comment_line(""); 111 | write_comment_line("Fuses small segments with the closest ones of every .PLY file in an input folder and writes the fused .PLY file to an output folder"); 112 | write_comment_line(""); 113 | write_comment_line("Options:"); 114 | write_comment_line("\t-i: Followed by the input directory"); 115 | write_comment_line("\t-o: Followed by the output directory"); 116 | write_comment_line("Example usages:"); 117 | write_comment_line("\tfuse_small_segments -i data_segmented -o data_fused"); 118 | write_comment_line("\t\tThis will fuse small segments of every .PLY file in 'data' and output the fused .PLY files in 'data_segmented'"); 119 | write_comment_line(""); 120 | write_comment_line("By Paulo Abelha (github.com/pauloabelha)"); 121 | } 122 | 123 | // parse function params 124 | // this function will set all global variables 125 | // see global variables above to know the meaning of each option 126 | int parse_args(int argc, char *argv[]) { 127 | if (argc < 2) { 128 | std::cout << "ERROR: No arguments given" << std::endl; 129 | write_usage(); 130 | return 0; 131 | } 132 | if (argc > 10) { 133 | std::cout << "ERROR: There too many arguments passed to the program: " << argc << std::endl; 134 | write_usage(); 135 | return 0; 136 | } 137 | int i = 1; 138 | bool is_option_arg = false; 139 | bool is_help_option = false; 140 | bool is_verbose_option = false; 141 | bool loop_option = false; 142 | int n_args = argc - 1; 143 | 144 | const int safe_n_iter = 10; 145 | int n_iter = 0; 146 | while (i<=n_args) { 147 | if (n_iter++ > safe_n_iter) { 148 | std::cout << "ERROR: Avoiding infinite loop when parsing arguments (something bad happened):\t" << n_args << std::endl; 149 | write_usage(); 150 | return 0; 151 | } 152 | std::string argv_str = std::string(argv[i]); 153 | char first_char = argv[i][0]; 154 | is_option_arg = first_char == '-'; 155 | is_help_option = argv_str.compare("--help") == 0; 156 | is_verbose_option = argv_str.compare("--verbose") == 0; 157 | // arguments should either come in pairs (option arg) or be --verbose or --help 158 | if (!(is_verbose_option || is_help_option) && !(is_option_arg)) { 159 | std::cout << "ERROR: There is an option without argument (or vice versa):\t" << argv_str << std::endl; 160 | write_usage(); 161 | return 0; 162 | } 163 | // parse --help 164 | if (is_help_option) { 165 | write_usage(); 166 | return 0; 167 | } 168 | // parse --verbose 169 | if (is_verbose_option) { 170 | VERBOSE = true; 171 | i++; 172 | continue; 173 | } 174 | // parse options 175 | if (is_option_arg) { 176 | // if last argument is an option (shouldn't be), write usage 177 | if ((i+1)>n_args) { 178 | std::cout << "ERROR: Last argument is an option:\t" << argv_str << std::endl; 179 | write_usage(); 180 | return 0; 181 | } 182 | // if option argument is an option itself 183 | if (argv[i+1][0] == '-') { 184 | std::cout << "ERROR: Option has another options as argument:\t" << argv_str << " " << argv[i+1] << std::endl; 185 | write_usage(); 186 | return 0; 187 | } 188 | else if ((argv_str.compare("-i") == 0)) { 189 | INPUT_DIR = std::string(argv[i+1]); 190 | if (INPUT_DIR.at(INPUT_DIR.length()-1) != '/') 191 | INPUT_DIR += "/"; 192 | } 193 | else if ((argv_str.compare("-o") == 0)) { 194 | OUTPUT_DIR = std::string(argv[i+1]); 195 | if (OUTPUT_DIR.at(OUTPUT_DIR.length()-1) != '/') 196 | OUTPUT_DIR += "/"; 197 | } 198 | else { 199 | std::cout << "ERROR: Invalid option found: " << argv_str << std::endl; 200 | write_usage(); 201 | return 0; 202 | } 203 | // increment to get next option 204 | i += 2; 205 | } 206 | } 207 | if (VERBOSE) { 208 | std::cout << "Arguments parsed (or default) that are going to be going to be used:" << std::endl; 209 | std::cout << "INPUT_DIR: " << INPUT_DIR << std::endl; 210 | std::cout << "OUTPUT_DIR: " << OUTPUT_DIR << std::endl; 211 | std::cout << std::endl << std::endl; 212 | } 213 | if (INPUT_DIR.empty()) { 214 | std::cout << "Input directory cannot be empty. Please give an input directory through option -i" << std::endl; 215 | write_usage(); 216 | return 0; 217 | } 218 | if (OUTPUT_DIR.empty()) { 219 | std::cout << "Output directory cannot be empty. Please give an output directory through option -o" << std::endl; 220 | write_usage(); 221 | return 0; 222 | } 223 | return 1; 224 | } 225 | 226 | // get all files in a given directory 227 | // files are any string with lenght > 4 and with a '.' at end - 4 228 | int get_files_in_dir (std::string dir, std::vector &files, std::string ext){ 229 | DIR *dp; 230 | struct dirent *dirp; 231 | if((dp = opendir(dir.c_str())) == NULL) { 232 | std::cout << "Error (" << errno << ") opening folder: " << dir << std::endl; 233 | return 0; 234 | } 235 | 236 | while ((dirp = readdir(dp)) != NULL) { 237 | std::string file_name = std::string(dirp->d_name); 238 | bool file_has_min_lenght = file_name.length() > 4; 239 | if (file_has_min_lenght) { 240 | bool is_a_file = file_name[file_name.length() - 4] == '.'; 241 | std::string file_ext = file_name.substr(file_name.length() - 3); 242 | bool file_has_ext = (file_ext.compare(ext) == 0); 243 | if (is_a_file && file_has_ext) { 244 | std::string filename = std::string(dirp->d_name); 245 | files.push_back(filename); 246 | if (VERBOSE) std::cout << filename << std::endl; 247 | } 248 | 249 | } 250 | } 251 | closedir(dp); 252 | return 1; 253 | } 254 | 255 | // gest the name of every .PLY file in the directory 256 | int get_ply_filenames(std::string INPUT_DIR, std::vector & pcl_filenames, bool sorted = false) { 257 | pcl_filenames = std::vector(); 258 | if(!get_files_in_dir(INPUT_DIR, pcl_filenames, "ply")) 259 | return 0; 260 | if (VERBOSE) std::cout << std::endl; 261 | if (pcl_filenames.size() == 0) { 262 | std::cout << pcl_filenames.size() << " .PLY files found in directory: " << INPUT_DIR << std::endl; 263 | return 0; 264 | } 265 | if (sorted) 266 | std::sort(pcl_filenames.begin(), pcl_filenames.end()); 267 | return 1; 268 | } 269 | 270 | // get a color as RGB in a int[3] array given an index 271 | // color order: red - green - blue - yellow - cyan - magenta - white 272 | // further colors (in order) are darker versions of each above 273 | int * get_color(uint index) { 274 | index++; 275 | std::bitset<3> index_bits = index % 7; 276 | int *color = new int[3]; 277 | //std::cout << "Index in bits:\t" << index_bits[0] << " " << index_bits[1] << " " << index_bits[2] << std::endl; 278 | int darken_decay_factor = std::floor((double)index/7); 279 | double darken_factor = 1.0/std::pow(2.0,darken_decay_factor); 280 | //std::cout << "Darken decay and full factor:\t" << " " << darken_decay_factor << " " << darken_factor << std::endl; 281 | for (int i=0;i<3;i++) 282 | color[i] = index_bits[i] * std::floor(darken_factor*255); 283 | //std::cout << "Index color:\t" << color[0] << " " << color[1] << " " << color[2] << std::endl; 284 | return color; 285 | } 286 | 287 | struct PLY { 288 | int n_points; 289 | int n_segms; 290 | int n_points_per_face; 291 | int n_faces; 292 | 293 | double ** points; 294 | int *segm_labels; 295 | int *points_per_segm_label; 296 | int **colors; 297 | int ** faces; 298 | }; 299 | 300 | // read only non-binary .PLY 301 | PLY * read_ply(std::string ply_filepath) { 302 | PLY *ply = new PLY(); 303 | std::vector line_split; 304 | std::ifstream infile(ply_filepath.c_str()); 305 | std::string line; 306 | // read header 307 | ply->n_points = 0; 308 | ply->n_faces = 0; 309 | while (std::getline(infile, line)) { 310 | std::istringstream iss(line); 311 | if (line.compare("end_header")) { 312 | line_split = splitstr(line, ' '); 313 | // get number of points 314 | if (line_split.size() > 2 && line_split[0].compare("element") == 0 && line_split[1].compare("vertex") == 0) 315 | ply->n_points = std::atoi(line_split[2].c_str()); 316 | // get number of faces 317 | if (line_split.size() > 2 && line_split[0].compare("element") == 0 && line_split[1].compare("face") == 0) 318 | ply->n_faces = std::atoi(line_split[2].c_str()); 319 | } 320 | else 321 | break; 322 | } 323 | // read points, segm labels and colors 324 | // read first line 325 | bool has_segm_label = false; 326 | bool has_color = false; 327 | std::getline(infile, line); 328 | 329 | line_split = splitstr(line, ' '); 330 | if (line_split.size() < 3) { 331 | std::cout << "Error reading point #" << 0 << std::endl; 332 | return 0; 333 | } 334 | // add point 335 | ply->points = new double*[ply->n_points]; 336 | ply->points[0] = new double[3]; 337 | for (int j=0;j<=2;j++) { 338 | ply->points[0][j] = std::atof(line_split[j].c_str()); 339 | } 340 | // add segm label 341 | std::vector unique_segm_labels; 342 | int n_segms = 0; 343 | if (line_split.size() > 3) { 344 | ply->segm_labels = new int[ply->n_points]; 345 | has_segm_label = true; 346 | ply->segm_labels[0] = std::atoi(line_split[3].c_str()); 347 | // add unique segm label 348 | unique_segm_labels.push_back(ply->segm_labels[0]); 349 | n_segms++; 350 | } 351 | // add color 352 | ply->colors = NULL; 353 | if (line_split.size() > 6) { 354 | has_color = true; 355 | ply->colors = new int*[ply->n_points]; 356 | ply->colors[0] = new int[3]; 357 | for (int j=4;j<=6;j++) 358 | ply->colors[0][j-4] = std::atoi(line_split[j].c_str()); 359 | } 360 | 361 | // run from the second point to the last, gathering points, segm and color 362 | for (int i=1;i<=ply->n_points-1;i++) { 363 | std::getline(infile, line); 364 | 365 | line_split = splitstr(line, ' '); 366 | if (line_split.size() < 3) { 367 | std::cout << "Error reading point #" << i << std::endl; 368 | return 0; 369 | } 370 | // add point 371 | ply->points[i] = new double[3]; 372 | for (int j=0;j<=2;j++) 373 | ply->points[i][j] = std::atof(line_split[j].c_str()); 374 | // add segm label 375 | if (has_segm_label) { 376 | ply->segm_labels[i] = std::atoi(line_split[3].c_str()); 377 | // add unique segm label 378 | if (std::find(unique_segm_labels.begin(), unique_segm_labels.end(), ply->segm_labels[i]) == unique_segm_labels.end()) { 379 | unique_segm_labels.push_back(ply->segm_labels[i]); 380 | n_segms++; 381 | } 382 | } 383 | // add color 384 | if (has_color) 385 | for (int j=4;j<=6;j++) { 386 | ply->colors[i] = new int[3]; 387 | ply->colors[i][j-4] = std::atoi(line_split[j].c_str()); 388 | } 389 | } 390 | 391 | if(has_segm_label) 392 | ply->n_segms = n_segms; 393 | else 394 | ply->n_segms = 0; 395 | 396 | // run a second pass to get the number of points per segm label 397 | ply->points_per_segm_label = NULL; 398 | if (has_segm_label) { 399 | ply->points_per_segm_label = new int[n_segms]; 400 | for (int i=0;i<=ply->n_segms-1;i++) { 401 | ply->points_per_segm_label[i] = 0; 402 | } 403 | for (int i=0;i<=ply->n_points-1;i++) 404 | ply->points_per_segm_label[ply->segm_labels[i]]++; 405 | } 406 | 407 | 408 | 409 | // read faces 410 | // read first face and get number of points per face 411 | std::getline(infile, line); 412 | 413 | line_split = splitstr(line, ' '); 414 | // get number of points per face 415 | const int n_points_per_face = line_split.size() - 1; 416 | ply->n_points_per_face = n_points_per_face; 417 | // allocate faces 418 | ply->faces = new int*[ply->n_faces]; 419 | // add points to first face 420 | ply->faces[0] = new int[3]; 421 | for (int j=1;j<=line_split.size()-1;j++) { 422 | ply->faces[0][j-1] = std::atoi(line_split[j].c_str()); 423 | } 424 | for (int i=1;i<=ply->n_faces-1;i++) { 425 | std::getline(infile, line); 426 | std::istringstream iss(line); 427 | line_split = splitstr(line, ' '); 428 | // add points 429 | ply->faces[i] = new int[3]; 430 | for (int j=1;j<=line_split.size()-1;j++) { 431 | ply->faces[i][j-1] = std::atoi(line_split[j].c_str()); 432 | } 433 | } 434 | infile.close(); 435 | return ply; 436 | } 437 | 438 | // write a ply header 439 | void write_ply_header(std::ofstream & output, int n_segms, int n_points, int n_faces, bool color) { 440 | output << "ply" << std::endl; 441 | output << "format ascii 1.0" << std::endl; 442 | output << "comment File generated By Paulo Abelha (github/pauloabelha)" << std::endl; 443 | output << "comment Code file: segment_meshes.cpp" << std::endl; 444 | output << "comment Using the library CGAL 4.9" << std::endl; 445 | output << "comment Based on http://doc.cgal.org/latest/Surface_mesh_segmentation/index.html" << std::endl; 446 | output << "comment n_segms " << n_segms << std::endl; 447 | output << "element vertex " << n_points << std::endl; 448 | output << "property float x" << std::endl; 449 | output << "property float y" << std::endl; 450 | output << "property float z" << std::endl; 451 | if (n_segms > 0) 452 | output << "property int segm" << std::endl; 453 | if (color) { 454 | output << "property uchar red" << std::endl; 455 | output << "property uchar green" << std::endl; 456 | output << "property uchar blue" << std::endl; 457 | } 458 | if (n_faces > 0) { 459 | output << "element face " << n_faces << std::endl; 460 | output << "property list uchar int vertex_indices" << std::endl; 461 | } 462 | output << "end_header" << std::endl; 463 | } 464 | 465 | void write_ply(PLY *ply, std::string output_filepath) { 466 | // get stream output 467 | std::ofstream output(output_filepath.c_str()); 468 | // write header 469 | write_ply_header(output, ply->n_segms, ply->n_points, ply->n_faces, ply->colors != NULL); 470 | // write points, segm labels and colors 471 | for (int i=0;i<=ply->n_points-1;i++) 472 | output << ply->points[i][0] << " " << ply->points[i][1] << " " << ply->points[i][2] << " " << ply->segm_labels[i] << " " << ply->colors[i][0] << " " << ply->colors[i][1] << " " << ply->colors[i][2] << std::endl; 473 | // write faces 474 | for (int i=0;i<=ply->n_faces-1;i++) { 475 | output << ply->n_points_per_face; 476 | for (int j=0;j<=2;j++) 477 | output << " " << ply->faces[i][j]; 478 | output << std::endl; 479 | } 480 | output.close(); 481 | } 482 | 483 | // adds a suffix to a filename that has an extension 484 | // e.g. adding suffix "out" to filename "mymesh.off" outputs "mymesh_out.off" 485 | std::string add_suffix_filename(std::string filename, std::string suffix) { 486 | std::string file_shortname = filename.substr(0,filename.length()-4); 487 | std::string file_ext = filename.substr(filename.length()-3,filename.length()-1); 488 | return file_shortname + suffix + "." + file_ext; 489 | } 490 | 491 | std::string change_filename_ext(std::string filename, std::string new_ext) { 492 | if (new_ext.empty()) 493 | return std::string(filename.substr(0,filename.length()-4)); 494 | else 495 | return std::string(filename.substr(0,filename.length()-3)) + new_ext; 496 | } 497 | 498 | // get the label of the first small segm 499 | int get_small_segm_label(PLY *ply, double max_prop) { 500 | int small_segm_label = -1; 501 | double prop_segm_size = 0; 502 | for (int i=0;i<=ply->n_segms-1;i++) { 503 | // there needs to be at lest one point for that segment 504 | if (ply->points_per_segm_label[i] > 0) { 505 | prop_segm_size = (double)ply->points_per_segm_label[i]/ply->n_points; 506 | if (prop_segm_size < max_prop) { 507 | small_segm_label = i; 508 | break; 509 | } 510 | } 511 | } 512 | if (small_segm_label >= 0) { 513 | if (VERBOSE) std::cout << "Small segment label: " << small_segm_label << std::endl; 514 | if (VERBOSE) std::cout << "Segment proportional size: " << prop_segm_size << std::endl; 515 | } 516 | else 517 | if (VERBOSE) std::cout << "There are no small segments" << std::endl; 518 | return small_segm_label; 519 | } 520 | 521 | // get ix of the closest neighbour from another segment for all points 522 | int * get_closest_diff_neighbour(PLY *ply) { 523 | // initialize 524 | int *closest_diff_neighbour = new int[ply->n_points]; 525 | // get the ix of the closest neighbour for each point 526 | for (int i=0;i<=ply->n_points-1;i++) { 527 | double min_dist = 1e6; 528 | // run through every point from another segment (ignoring itself) 529 | for (int j=0;j<=ply->n_points-1;j++) { 530 | if (i != j && ply->segm_labels[i] != ply->segm_labels[j]) { 531 | // get dist between points 532 | double dist = std::sqrt(std::pow(ply->points[i][0] - ply->points[j][0], 2) + std::pow(ply->points[i][1] - ply->points[j][1], 2) + std::pow(ply->points[i][2] - ply->points[j][2], 2)); 533 | if (dist < min_dist) { 534 | min_dist = dist; 535 | closest_diff_neighbour[i] = j; 536 | } 537 | } 538 | } 539 | } 540 | return closest_diff_neighbour; 541 | } 542 | 543 | // fuse segm into others (segm is a segm label) 544 | void fuse_segm_into_others(PLY *ply, int small_segm_label, int *closest_diff_neighbour) { 545 | for (int i=0;i<=ply->n_points-1;i++) { 546 | if (ply->segm_labels[i] == small_segm_label) { 547 | ply->segm_labels[i] = ply->segm_labels[closest_diff_neighbour[i]]; 548 | ply->points_per_segm_label[ply->segm_labels[i]]++; 549 | } 550 | } 551 | // update labels (left shifting label values > small_segm_label) 552 | for (int i=0;i<=ply->n_points-1;i++) { 553 | if (ply->segm_labels[i] > small_segm_label) 554 | ply->segm_labels[i]--; 555 | } 556 | // delete small segm label 557 | int *new_segm_labels = new int[ply->n_segms-1]; 558 | for (int i=0;ipoints_per_segm_label[i]; 560 | for (int i=small_segm_label+1;i<=ply->n_segms-1;i++) 561 | new_segm_labels[i-1] = ply->points_per_segm_label[i]; 562 | delete [] ply->points_per_segm_label; 563 | ply->points_per_segm_label = new_segm_labels; 564 | std::cout << std::endl; 565 | // update number of segments 566 | ply->n_segms--; 567 | } 568 | 569 | void update_ply_color(PLY *ply) { 570 | for (int i=0;i<=ply->n_points-1;i++) { 571 | int *color = get_color(ply->segm_labels[i]); 572 | for (int j=0;j<=2;j++) { 573 | ply->colors[i][j] = color[j]; 574 | } 575 | delete color; 576 | } 577 | } 578 | 579 | void print_ply_info(PLY *ply) { 580 | if (VERBOSE) { 581 | std::cout << "PLY info:" << std::endl; 582 | std::cout << "\tNumber of points: " << ply->n_points << std::endl; 583 | std::cout << "\tNumber of faces: " << ply->n_faces << std::endl; 584 | std::cout << "\tNumber of segments: " << ply->n_segms << std::endl; 585 | std::cout << "\tPoints per segment label: "; 586 | int sum_points_per_segm_label = 0; 587 | for (int i=0;i<=ply->n_segms-1;i++) { 588 | std::cout << ply->points_per_segm_label[i] << " "; 589 | sum_points_per_segm_label += ply->points_per_segm_label[i]; 590 | } 591 | std::cout << std::endl; 592 | std::cout << "\tSum of points per segment label: " << sum_points_per_segm_label << std::endl; 593 | std::cout << std::endl; 594 | } 595 | } 596 | 597 | double sesc2HHMM(double secs, double & minutes, double & hours, int round) { 598 | hours = std::floor(secs/3600); 599 | minutes = ((int)secs % 3600)/60; 600 | double round_factor = std::pow(10,round); 601 | minutes = floorf( (minutes*round_factor)/round_factor ); 602 | } 603 | 604 | void DisplayEstimatedTimeOfLoop( double tot_toc, int curr_ix, int tot_iter, std::string prefix ) { 605 | double minutes = 0; 606 | double hours = 0; 607 | if (curr_ix == tot_iter) { 608 | sesc2HHMM(tot_toc, minutes, hours, 2); 609 | std::cout << prefix << "Total elapsed time (HH:MM): " << hours << ":" << minutes << std::endl; 610 | } 611 | else { 612 | double avg_toc = tot_toc/curr_ix; 613 | sesc2HHMM(avg_toc*(tot_iter-curr_ix), minutes, hours, 2); 614 | std::cout << prefix << "Estimated time (HH:MM): " << hours << ":" << minutes << " " << std::floor(curr_ix*100/tot_iter) << "%" << std::endl; 615 | } 616 | } 617 | 618 | 619 | // segment every mesh in a given directory 620 | int main(int argc, char *argv[]){ 621 | // parse args 622 | if (!parse_args(argc, argv)) 623 | return 0; 624 | 625 | // make output directory 626 | if (VERBOSE) std::cout << "Creating directory " << OUTPUT_DIR << std::endl; 627 | std::string command_mkdir = "mkdir " + OUTPUT_DIR; 628 | system(command_mkdir.c_str()); 629 | 630 | //get ply filenames sorted (ascend) 631 | std::vector pcl_filenames; 632 | if(!get_ply_filenames(INPUT_DIR, pcl_filenames, true)) 633 | return 0; 634 | 635 | // run through each mesh in INPUT_DIR (getting SDF values only once) 636 | // run through k number of clusters 637 | // run through smoothing lambdas 638 | // segment and write .OFF file 639 | double tot_toc_per_pcl = 0; 640 | int curr_ix = 0; 641 | for(std::vector::iterator it = pcl_filenames.begin(); it != pcl_filenames.end(); ++it) { 642 | // for outputting estimated time 643 | curr_ix++; 644 | std::clock_t tic = std::clock(); 645 | 646 | // get filepath to write to 647 | std::string pcl_filename = *it; 648 | std::string pcl_filepath = INPUT_DIR + pcl_filename; 649 | 650 | // read PLY 651 | if (VERBOSE) std::cout << "Reading .PLY file: " << pcl_filepath << std::endl; 652 | 653 | PLY *ply = read_ply(pcl_filepath); 654 | // print PLY info 655 | print_ply_info(ply); 656 | 657 | if (VERBOSE) std::cout << "Fusing small segments into others" << std::endl; 658 | 659 | int small_segm_label = get_small_segm_label(ply, 0.05); 660 | bool has_small_segms = small_segm_label >= 0; 661 | 662 | // calculate indexes of closest neighbours 663 | int *closest_diff_neighbour = get_closest_diff_neighbour(ply); 664 | 665 | while (has_small_segms) { 666 | fuse_segm_into_others(ply, small_segm_label, closest_diff_neighbour); 667 | print_ply_info(ply); 668 | small_segm_label = get_small_segm_label(ply, 0.05); 669 | has_small_segms = small_segm_label >= 0; 670 | } 671 | delete [] closest_diff_neighbour; 672 | //update color 673 | update_ply_color(ply); 674 | // write PLY 675 | std::string output_filepath = add_suffix_filename(OUTPUT_DIR + pcl_filename, "_fused"); 676 | if (VERBOSE) std::cout << "Writing .PLY file: " << output_filepath << std::endl; 677 | write_ply(ply, output_filepath); 678 | // destruct PLY 679 | for(int i = 0; i < ply->n_points; i++) { 680 | delete [] ply->points[i]; 681 | } 682 | delete [] ply->points; 683 | delete [] ply->segm_labels; 684 | delete [] ply->colors; 685 | delete [] ply->points_per_segm_label; 686 | for(int i = 0; i < ply->n_faces; i++) { 687 | delete [] ply->faces[i]; 688 | } 689 | delete [] ply->faces; 690 | delete ply; 691 | if (VERBOSE) std::cout << std::endl; 692 | if (VERBOSE) { 693 | tot_toc_per_pcl += double(std::clock() - tic) / CLOCKS_PER_SEC; 694 | std::cout << std::endl; 695 | DisplayEstimatedTimeOfLoop( tot_toc_per_pcl, curr_ix, pcl_filenames.size(), "Loop per point cloud "); 696 | std::cout << std::endl; 697 | } 698 | } 699 | } 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | -------------------------------------------------------------------------------- /segment_meshes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pauloabelha/batch_segmentation/5b5f9f4b2c4fd0cd2aa2290adb448e900a6f2828/segment_meshes -------------------------------------------------------------------------------- /segment_meshes.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * So far tested on Ubuntu 14.04 only 3 | * Based on: http://doc.cgal.org/latest/Surface_mesh_segmentation/index.html 4 | * `...an implementation of the algorithm relying on the Shape Diameter Function [1] (SDF)' 5 | * L. Shapira, A. Shamir, and D. Cohen-Or. Consistent mesh partitioning and skeletonisation using the shape diameter function. The Visual Computer, 24(4):249–259, 2008 6 | * 7 | * Dependencies: If you want to convert from non .OFF files, then this program will require Meshlab Server to be installed 8 | * 9 | * Segments every mesh in an input folder and writes the segmented .OFF files to an output folder 10 | * It is possible to use this program to run a nested loop of using different number of clusters and smoothing parameters 11 | * The program can also use MeshlabServer to convert input meshes to .OFF before segmenting them 12 | * There are two possible usages: 13 | * Segmenting once for each mesh with a given number of clusters (k) and smoothing (lambda) parameters; 14 | * Segmenting many times using different values for k and lambda in a nested loop 15 | * 16 | * Options: 17 | * -i: Followed by the input directory 18 | * -o: Followed by the output directory 19 | * -e: Followed by the input mesh file extension (if not .OFF) 20 | * -k: Followed by the k value (Integer) - integer number of clusters to use (2 <= k <= 9) 21 | * -l: Followed by the lambda value (Real) - float smoothing parameter to use (0.01 <= lambda <= 1) 22 | * -z: Followed by K_START:K_STEP:K_END,LAMBDA_START:LAMBDA_STEP:LAMBDA_END values for runnning many segmentations in a nested loop 23 | * -f: (TO BE IMPLEMENTED) Followed by the minimum number of points of a segment to considered it to be fused with others if too small 24 | * Options -i and -o are the only mandatory ones 25 | * If options -k or -l are not present, then the recommended default value of k=5 and l=0.25 are used 26 | * If option -z is present, options -k and -l are ignored 27 | * 28 | * Example usages: 29 | * segment_meshes -i data -o data_segmented 30 | * This will segment every .OFF file in 'data' once, using the recommended values for k and lambda, and output the segmented .OFF files in 'data_segmented' 31 | * segment_meshes -i data -o data_segmented -k 5 -l 0.25 -e ply 32 | * This will convert every .PLY file in 'data', convert them to .OFF and segment each one once, using k=8 and lambda=0.7, and output the segmented .OFF files in 'data_segmented' 33 | * segment_meshes -i data -o data_segmented -z 3:2:7,0.2:0.1:0.8 34 | * This will segment every .PLY file in 'data' (without converting them - i.e. assuming they are .OFF files already), using k ranging from 2 to 8 in steps of 2, and so on for lambda 35 | * 36 | * By Paulo Abelha (github.com/pauloabelha) 37 | 38 | */ 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | 56 | typedef CGAL::Exact_predicates_inexact_constructions_kernel K; 57 | typedef CGAL::Polyhedron_3 Polyhedron; 58 | typedef K::Point_3 Point_3; 59 | typedef Polyhedron::Vertex_iterator Vertex_iterator; 60 | typedef Polyhedron::Facet_iterator Facet_iterator; 61 | typedef Polyhedron::Halfedge_around_facet_circulator Halfedge_facet_circulator; 62 | // Property map associating a facet with an integer as id to an 63 | // element in a vector stored internally 64 | template 65 | struct Facet_with_id_pmap 66 | : public boost::put_get_helper > 68 | { 69 | typedef Polyhedron::Facet_const_handle key_type; 70 | typedef ValueType value_type; 71 | typedef value_type& reference; 72 | typedef boost::lvalue_property_map_tag category; 73 | 74 | Facet_with_id_pmap( 75 | std::vector& internal_vector 76 | ) : internal_vector(internal_vector) { } 77 | 78 | reference operator[](key_type key) const 79 | { return internal_vector[key->id()]; } 80 | private: 81 | std::vector& internal_vector; 82 | }; 83 | 84 | // Global variables that are all set by function parse_args 85 | // Option --verbose 86 | //Shows information as the program runs (-v) 87 | bool VERBOSE = 0; 88 | // Option -z ks,ke,ls,le 89 | // Loops for number of clusters (ks to ke) and smoothing values (ls to le) 90 | bool LOOP = 0; 91 | // cluster args 92 | int K_START = 5; 93 | int K_STEP = 1; 94 | int K_END = 5; 95 | // lambda (smoothing) args 96 | float LAMBDA_START = 0.25; 97 | float LAMBDA_STEP = 1; 98 | float LAMBDA_END = 0.25; 99 | // Option -i 100 | // Input file or folder 101 | std::string INPUT_DIR = ""; 102 | // Option -o 103 | // Output file or folder 104 | std::string OUTPUT_DIR = ""; 105 | // Option -e EXT 106 | // Extension of the input file(s); if differente than .off 107 | // Meshlab is used to convert all files befor erunning the segmentation 108 | std::string INPUT_FILE_EXT = ""; 109 | 110 | //splits a string (http://www.cplusplus.com/articles/1UqpX9L8/) 111 | // split: receives a char delimiter; returns a vector of strings 112 | // By default ignores repeated delimiters (rep == 0) 113 | void splitstr(std::string str, char delim, std::vector & flds) { 114 | std::string buf = ""; 115 | int rep = 0; 116 | int i = 0; 117 | while (i < str.length()) { 118 | if (str[i] != delim) 119 | buf += str[i]; 120 | else if (rep == 1) { 121 | flds.push_back(buf); 122 | buf = ""; 123 | } else if (buf.length() > 0) { 124 | flds.push_back(buf); 125 | buf = ""; 126 | } 127 | i++; 128 | } 129 | if (!buf.empty()) 130 | flds.push_back(buf); 131 | return; 132 | } 133 | 134 | // writes comment-style line for the --help option 135 | void write_comment_line(std::string comment) { 136 | std::cout << "* " << comment << std::endl; 137 | } 138 | 139 | // writes usage of program to standard output 140 | void write_usage(void) { 141 | write_comment_line("So far tested on Ubuntu 14.04 only"); 142 | write_comment_line("Based on: http://doc.cgal.org/latest/Surface_mesh_segmentation/index.html"); 143 | write_comment_line("\t`...an implementation of the algorithm relying on the Shape Diameter Function [1] (SDF)'"); 144 | write_comment_line("\tL. Shapira, A. Shamir, and D. Cohen-Or. Consistent mesh partitioning and skeletonisation using the shape diameter function. The Visual Computer, 24(4):249–259, 2008"); 145 | write_comment_line(""); 146 | write_comment_line("Dependencies: If you want to convert from non .OFF files, then this program will require Meshlab Server to be installed"); 147 | write_comment_line(""); 148 | write_comment_line("Segments every mesh in an input folder and writes the segmented .OFF files to an output folder"); 149 | write_comment_line("It is possible to use this program to run a nested loop of using different number of clusters and smoothing parameters"); 150 | write_comment_line("The program can also use MeshlabServer to convert input meshes to .OFF before segmenting them"); 151 | write_comment_line("There are two possible usages:"); 152 | write_comment_line("\tSegmenting once for each mesh with a given number of clusters (k) and smoothing (lambda) parameters;"); 153 | write_comment_line("\tSegmenting many times using different values for k and lambda in a nested loop"); 154 | write_comment_line(""); 155 | write_comment_line("Options:"); 156 | write_comment_line("\t-i: Followed by the input directory"); 157 | write_comment_line("\t-o: Followed by the output directory"); 158 | write_comment_line("\t-e: Followed by the input mesh file extension (if not .OFF)"); 159 | write_comment_line("\t-k: Followed by the k value (Integer) - integer number of clusters to use (2 <= k <= 9)"); 160 | write_comment_line("\t-l: Followed by the lambda value (Real) - float smoothing parameter to use (0.01 <= lambda <= 1)"); 161 | write_comment_line("\t-z: Followed by K_START:K_STEP:K_END,LAMBDA_START:LAMBDA_STEP:LAMBDA_END values for runnning many segmentations in a nested loop"); 162 | write_comment_line("\t-f: (TO BE IMPLEMENTED) Followed by a percentage number ]0, 0.5[ representing the minimum proportional size of a segment (in number of points) above which it is going to be be fused with closest segment neighbours"); 163 | write_comment_line("\tOptions -i and -o are the only mandatory ones"); 164 | write_comment_line("\tIf options -k or -l are not present, then the recommended default value of k=5 and l=0.25 are used"); 165 | write_comment_line("\tIf option -z is present, options -k and -l are ignored"); 166 | write_comment_line(""); 167 | write_comment_line("Example usages:"); 168 | write_comment_line("\tsegment_meshes -i data -o data_segmented"); 169 | write_comment_line("\t\tThis will segment every .OFF file in 'data' once, using the recommended values for k and lambda, and output the segmented .OFF files in 'data_segmented'"); 170 | write_comment_line("\tsegment_meshes -i data -o data_segmented -k 5 -l 0.25 -e ply"); 171 | write_comment_line("\t\tThis will convert every .PLY file in 'data', convert them to .OFF and segment each one once, using k=8 and lambda=0.7, and output the segmented .OFF files in 'data_segmented'"); 172 | write_comment_line("\tsegment_meshes -i data -o data_segmented -z 3:2:7,0.2:0.1:0.8"); 173 | write_comment_line("\t\tThis will segment every .PLY file in 'data' (without converting them - i.e. assuming they are .OFF files already), using k ranging from 2 to 8 in steps of 2, and so on for lambda"); 174 | write_comment_line(""); 175 | write_comment_line("By Paulo Abelha (github.com/pauloabelha)"); 176 | } 177 | 178 | // parse function params 179 | // this function will set all global variables 180 | // see global variables above to know the meaning of each option 181 | int parse_args(int argc, char *argv[]) { 182 | if (argc < 2) { 183 | std::cout << "ERROR: No arguments given" << std::endl; 184 | write_usage(); 185 | return 0; 186 | } 187 | if (argc > 10) { 188 | std::cout << "ERROR: There too many arguments passed to the program: " << argc << std::endl; 189 | write_usage(); 190 | return 0; 191 | } 192 | int i = 1; 193 | bool is_option_arg = false; 194 | bool is_help_option = false; 195 | bool is_verbose_option = false; 196 | bool loop_option = false; 197 | int n_args = argc - 1; 198 | 199 | const int safe_n_iter = 10; 200 | int n_iter = 0; 201 | while (i<=n_args) { 202 | if (n_iter++ > safe_n_iter) { 203 | std::cout << "ERROR: Avoiding infinite loop when parsing arguments (something bad happened):\t" << n_args << std::endl; 204 | write_usage(); 205 | return 0; 206 | } 207 | std::string argv_str = std::string(argv[i]); 208 | char first_char = argv[i][0]; 209 | is_option_arg = first_char == '-'; 210 | is_help_option = argv_str.compare("--help") == 0; 211 | is_verbose_option = argv_str.compare("--verbose") == 0; 212 | // arguments should either come in pairs (option arg) or be --verbose or --help 213 | if (!(is_verbose_option || is_help_option) && !(is_option_arg)) { 214 | std::cout << "ERROR: There is an option without argument (or vice versa):\t" << argv_str << std::endl; 215 | write_usage(); 216 | return 0; 217 | } 218 | // parse --help 219 | if (is_help_option) { 220 | write_usage(); 221 | return 0; 222 | } 223 | // parse --verbose 224 | if (is_verbose_option) { 225 | VERBOSE = true; 226 | i++; 227 | continue; 228 | } 229 | // parse options 230 | if (is_option_arg) { 231 | // if last argument is an option (shouldn't be), write usage 232 | if ((i+1)>n_args) { 233 | std::cout << "ERROR: Last argument is an option:\t" << argv_str << std::endl; 234 | write_usage(); 235 | return 0; 236 | } 237 | // if option argument is an option itself 238 | if (argv[i+1][0] == '-') { 239 | std::cout << "ERROR: Option has another options as argument:\t" << argv_str << " " << argv[i+1] << std::endl; 240 | write_usage(); 241 | return 0; 242 | } 243 | // -z (loop option) 244 | if (argv_str.compare("-z") == 0) { 245 | loop_option = true; 246 | std::string loop_argument_str = std::string(argv[i+1]); 247 | std::vector loop_args; 248 | splitstr(loop_argument_str, ',', loop_args); 249 | if (loop_args.size() != 2) { 250 | std::cout << "ERROR: Loop option should have one comma separating its two arguments:\t" << loop_argument_str << std::endl; 251 | write_usage(); 252 | return 0; 253 | } 254 | // get loop cluster args 255 | std::vector cluster_args; 256 | splitstr(loop_args[0], ':', cluster_args); 257 | if (cluster_args.size() != 3) { 258 | std::cout << "ERROR: Loop option for number of clusters (k) should have three values separated by colons:\t" << loop_argument_str << std::endl; 259 | write_usage(); 260 | return 0; 261 | } 262 | K_START = std::atoi(cluster_args[0].c_str()); 263 | K_STEP = std::atoi(cluster_args[1].c_str()); 264 | K_END = std::atoi(cluster_args[2].c_str()); 265 | if (K_START < 2) { 266 | std::cout << "ERROR: Initial number of clusters is less than two:\t" << loop_argument_str << std::endl; 267 | write_usage(); 268 | return 0; 269 | } 270 | if (K_END < 2) { 271 | std::cout << "ERROR: Final number of clusters is less than two:\t" << loop_argument_str << std::endl; 272 | write_usage(); 273 | return 0; 274 | } 275 | if (K_START > K_END) { 276 | std::cout << "ERROR: Initial number of clusters is greater than final number of clusters:\t" << loop_argument_str << std::endl; 277 | write_usage(); 278 | return 0; 279 | } 280 | // get loop lambda args 281 | std::vector lambda_args; 282 | splitstr(loop_args[1], ':', lambda_args); 283 | if (lambda_args.size() != 3) { 284 | std::cout << "ERROR: Loop option for lambda (smoothing) should have three values separated by colons:\t" << loop_argument_str << std::endl; 285 | write_usage(); 286 | return 0; 287 | } 288 | LAMBDA_START = std::atof(lambda_args[0].c_str()); 289 | LAMBDA_STEP = std::atof(lambda_args[1].c_str()); 290 | LAMBDA_END = std::atof(lambda_args[2].c_str()); 291 | if (LAMBDA_START < 0.0099) { 292 | std::cout << "ERROR: Initial lambda is less than 0.01:\t" << loop_argument_str << std::endl; 293 | write_usage(); 294 | return 0; 295 | } 296 | if (LAMBDA_STEP < 0.0099) { 297 | std::cout << "ERROR: Lambda step is too small (MIN: 0.01):\t" << loop_argument_str << std::endl; 298 | write_usage(); 299 | return 0; 300 | } 301 | if (LAMBDA_END > 1.001) { 302 | std::cout << "ERROR: Final lambda is greater than 1:\t" << loop_argument_str << std::endl; 303 | write_usage(); 304 | return 0; 305 | } 306 | if (LAMBDA_START > LAMBDA_END) { 307 | std::cout << "ERROR: Initial lambda is greater than final lambda:\t" << loop_argument_str << std::endl; 308 | write_usage(); 309 | return 0; 310 | } 311 | } 312 | else if (argv_str.compare("-k") == 0) { 313 | if(!loop_option) { 314 | K_START = std::atoi(argv[i+1]); 315 | if (K_START < 2) { 316 | std::cout << "ERROR: Given number of clusters is less than two: " << K_START << std::endl; 317 | write_usage(); 318 | return 0; 319 | } 320 | K_STEP = 1; 321 | K_END = K_START; 322 | std::cout << K_START << std::endl; 323 | } 324 | } 325 | else if (argv_str.compare("-l") == 0) { 326 | if(!loop_option) { 327 | LAMBDA_START = std::atof(argv[i+1]); 328 | if (LAMBDA_START < 0.0099 || LAMBDA_END > 1.001) { 329 | std::cout << "ERROR: Given lambda is outside allowed interval [0.01, 1]: " << LAMBDA_START << std::endl; 330 | write_usage(); 331 | return 0; 332 | } 333 | LAMBDA_STEP = 1; 334 | LAMBDA_END = K_START; 335 | std::cout << LAMBDA_START << std::endl; 336 | } 337 | } 338 | else if ((argv_str.compare("-i") == 0)) { 339 | INPUT_DIR = std::string(argv[i+1]); 340 | if (INPUT_DIR.at(INPUT_DIR.length()-1) != '/') 341 | INPUT_DIR += "/"; 342 | } 343 | else if ((argv_str.compare("-o") == 0)) { 344 | OUTPUT_DIR = std::string(argv[i+1]); 345 | if (OUTPUT_DIR.at(OUTPUT_DIR.length()-1) != '/') 346 | OUTPUT_DIR += "/"; 347 | } 348 | else if ((argv_str.compare("-e") == 0)) { 349 | INPUT_FILE_EXT = std::string(argv[i+1]); 350 | } 351 | else { 352 | std::cout << "ERROR: Invalid option found: " << argv_str << std::endl; 353 | write_usage(); 354 | return 0; 355 | } 356 | // increment to get next option 357 | i += 2; 358 | } 359 | } 360 | if (VERBOSE) { 361 | std::cout << "Arguments parsed (or default) that are going to be going to be used:" << std::endl; 362 | std::string loop_option_str = "No"; 363 | if (loop_option) 364 | loop_option_str = "Yes! Loop de loop!"; 365 | std::cout << "Looping: " << loop_option_str << std::endl; 366 | std::cout << "K_START: " << K_START << std::endl; 367 | std::cout << "K_STEP: " << K_STEP << std::endl; 368 | std::cout << "K_END: " << K_END << std::endl; 369 | std::cout << "LAMBDA_START: " << LAMBDA_START << std::endl; 370 | std::cout << "LAMBDA_STEP: " << LAMBDA_STEP << std::endl; 371 | std::cout << "LAMBDA_END: " << LAMBDA_END << std::endl; 372 | std::cout << "INPUT_DIR: " << INPUT_DIR << std::endl; 373 | std::cout << "OUTPUT_DIR: " << OUTPUT_DIR << std::endl; 374 | std::cout << "INPUT_FILE_EXT: " << INPUT_FILE_EXT; 375 | if (INPUT_FILE_EXT.empty()) 376 | std::cout << "No mesh format conversion required"; 377 | std::cout << std::endl << std::endl; 378 | } 379 | if (INPUT_DIR.empty()) { 380 | std::cout << "Input directory cannot be empty. Please give an input directory through option -i" << std::endl; 381 | write_usage(); 382 | return 0; 383 | } 384 | if (OUTPUT_DIR.empty()) { 385 | std::cout << "Output directory cannot be empty. Please give an output directory through option -o" << std::endl; 386 | write_usage(); 387 | return 0; 388 | } 389 | return 1; 390 | } 391 | 392 | // convert a color as an int[3] RGB to a std::string 393 | std::string color_intarray2string(int *color_int) { 394 | std::string color_str = ""; 395 | for (int i=0;i<3;i++) { 396 | char int_char_array[4]; 397 | snprintf(int_char_array, 4, "%d", color_int[i]); 398 | color_str += std::string(int_char_array) + " "; 399 | } 400 | return color_str; 401 | } 402 | 403 | // get a color as RGB in a int[3] array given an index 404 | // color order: red - green - blue - yellow - cyan - magenta - white 405 | // further colors (in order) are darker versions of each above 406 | int* get_color(uint index) { 407 | index++; 408 | std::bitset<3> index_bits = index % 7; 409 | //std::cout << "Index in bits:\t" << index_bits[0] << " " << index_bits[1] << " " << index_bits[2] << std::endl; 410 | int darken_decay_factor = std::floor((double)index/7); 411 | double darken_factor = 1.0/std::pow(2.0,darken_decay_factor); 412 | //std::cout << "Darken decay and full factor:\t" << " " << darken_decay_factor << " " << darken_factor << std::endl; 413 | int *color = new int[3]; 414 | for (int i=0;i<3;i++) 415 | color[i] = index_bits[i] * std::floor(darken_factor*255); 416 | //std::cout << "Index color:\t" << color[0] << " " << color[1] << " " << color[2] << std::endl; 417 | return color; 418 | } 419 | 420 | // adds a suffix to a filename that has an extension 421 | // e.g. adding suffix "out" to filename "mymesh.off" outputs "mymesh_out.off" 422 | std::string add_suffix_filename(std::string filename, std::string suffix) { 423 | std::string file_shortname = filename.substr(0,filename.length()-4); 424 | std::string file_ext = filename.substr(filename.length()-3,filename.length()-1); 425 | return file_shortname + suffix + "." + file_ext; 426 | } 427 | 428 | std::string change_filename_ext(std::string filename, std::string new_ext) { 429 | if (new_ext.empty()) 430 | return std::string(filename.substr(0,filename.length()-4)); 431 | else 432 | return std::string(filename.substr(0,filename.length()-3)) + new_ext; 433 | } 434 | 435 | // get all files in a given directory 436 | // files are any string with lenght > 4 and with a '.' at end - 4 437 | int get_files_in_dir (std::string dir, std::vector &files, std::string ext){ 438 | DIR *dp; 439 | struct dirent *dirp; 440 | if((dp = opendir(dir.c_str())) == NULL) { 441 | std::cout << "Error (" << errno << ") opening folder: " << dir << std::endl; 442 | return 0; 443 | } 444 | 445 | while ((dirp = readdir(dp)) != NULL) { 446 | std::string file_name = std::string(dirp->d_name); 447 | bool file_has_min_lenght = file_name.length() > 4; 448 | if (file_has_min_lenght) { 449 | bool is_a_file = file_name[file_name.length() - 4] == '.'; 450 | std::string file_ext = file_name.substr(file_name.length() - 3); 451 | bool file_has_ext = (file_ext.compare(ext) == 0); 452 | if (is_a_file && file_has_ext) { 453 | std::string filename = std::string(dirp->d_name); 454 | files.push_back(filename); 455 | if (VERBOSE) std::cout << filename << std::endl; 456 | } 457 | 458 | } 459 | } 460 | closedir(dp); 461 | return 1; 462 | } 463 | 464 | std::string get_filepath_from_k_and_lambda(std::string orig_filepath, int k, float lambda) { 465 | //std::string output_filename = mesh_filepath.substr(0,mesh_filepath.length()-4) + "_out.off"; 466 | std::string output_filepath = orig_filepath; 467 | char buffer_k [2]; 468 | std::sprintf(buffer_k,"%d",k); 469 | std::string k_str = std::string(buffer_k); 470 | char buffer_lambda [4]; 471 | int lambda_int = floor(lambda*100); 472 | std::sprintf(buffer_lambda,"%d",lambda_int); 473 | std::string lambda_str = std::string(buffer_lambda); 474 | std::string output_filepath_suffix = "_out_" + k_str + "_" + lambda_str; 475 | output_filepath = add_suffix_filename(output_filepath, output_filepath_suffix); 476 | return output_filepath; 477 | } 478 | 479 | // write mesh to an .OFF file 480 | void write_mesh_to_off_file(std::string orig_filepath, Polyhedron mesh, Facet_with_id_pmap segment_property_map, int n_segms, int k, float lambda) { 481 | // get complete filepath 482 | std::string output_filepath = get_filepath_from_k_and_lambda(orig_filepath, k, lambda); 483 | // get stream output 484 | std::ofstream output(output_filepath.c_str()); 485 | if (VERBOSE) std::cout << "Writing to file (" << output_filepath << ")" << std::endl; 486 | // Write polyhedron in Object File Format (OFF) - ASCII 487 | CGAL::set_ascii_mode( output ); 488 | // write header 489 | output << "# File generated By Paulo Abelha (github/pauloabelha)" << std::endl; 490 | output << "# Code file: segment_meshes.cpp" << std::endl; 491 | output << "# Using the library CGAL 4.9" << std::endl; 492 | output << "# Based on http://doc.cgal.org/latest/Surface_mesh_segmentation/index.html" << std::endl; 493 | output << "# n_segms " << n_segms << std::endl; 494 | output << "OFF" << std::endl << mesh.size_of_vertices() << ' ' << mesh.size_of_facets() << " 0" << std::endl; 495 | //write points 496 | if (VERBOSE) std::cout << "\tWriting " << mesh.size_of_vertices() << " points..." << std::endl; 497 | std::copy( mesh.points_begin(), mesh.points_end(), std::ostream_iterator( output, "\n")); 498 | // write faces 499 | if (VERBOSE) std::cout << "\tWriting " << mesh.size_of_facets() << " faces..." << std::endl; 500 | for (Facet_iterator i = mesh.facets_begin(); i != mesh.facets_end(); ++i) { 501 | Halfedge_facet_circulator j = i->facet_begin(); 502 | // Facets in polyhedral surfaces are at least triangles 503 | CGAL_assertion( CGAL::circulator_size(j) >= 3); 504 | output << CGAL::circulator_size(j) << ' '; 505 | do { 506 | output << ' ' << std::distance(mesh.vertices_begin(), j->vertex()); 507 | } while ( ++j != i->facet_begin()); 508 | // put color in the face 509 | int *color = get_color(segment_property_map[i]); 510 | std::string color_str = color_intarray2string(color); 511 | output << ' ' << color_str; 512 | output << std::endl; 513 | } 514 | output.close(); 515 | if (VERBOSE) std::cout << "OK" << std::endl; 516 | } 517 | 518 | 519 | // return the segm ID for each vertex from the segm ID for each face 520 | // we count, for each vertex, the number of times a given segm ID is given to each face to each it belongs 521 | // the s of each vertex is then the one that happens the most 522 | std::vector get_vertices_segm_ids(Polyhedron mesh, Facet_with_id_pmap segment_property_map, int n_segms) { 523 | // matrix V x S, V is number of vertices and S is number of segments 524 | // it holds for each segment, the number of times it has appeared in a face with the given segm ID 525 | std::vector< std::vector > vertex_segm_ids(mesh.size_of_vertices(), std::vector(n_segms)); 526 | // run through faces and fill the matrix 527 | for (Facet_iterator i = mesh.facets_begin(); i != mesh.facets_end(); ++i) { 528 | Halfedge_facet_circulator j = i->facet_begin(); 529 | // Facets in polyhedral surfaces are at least triangles 530 | CGAL_assertion( CGAL::circulator_size(j) >= 3); 531 | do { 532 | int vertex_ix = std::distance(mesh.vertices_begin(), j->vertex()); 533 | vertex_segm_ids[vertex_ix][segment_property_map[i]]++; 534 | } while ( ++j != i->facet_begin()); 535 | } 536 | std::vector vertices_segm_ids(mesh.size_of_vertices()); 537 | for (int i=0; i<=mesh.size_of_vertices()-1; i++) { 538 | int max = -1; 539 | for (int j = 0; j<=n_segms - 1; j++) { 540 | if (vertex_segm_ids[i][j] > max) { 541 | vertices_segm_ids[i] = j; 542 | max = vertex_segm_ids[i][j]; 543 | } 544 | } 545 | } 546 | return vertices_segm_ids; 547 | } 548 | 549 | // write a ply header 550 | void write_ply_header(std::ofstream & output, int n_segms, int n_points, int n_faces) { 551 | output << "ply" << std::endl; 552 | output << "format ascii 1.0" << std::endl; 553 | output << "comment File generated By Paulo Abelha (github/pauloabelha)" << std::endl; 554 | output << "comment Code file: segment_meshes.cpp" << std::endl; 555 | output << "comment Using the library CGAL 4.9" << std::endl; 556 | output << "comment Based on http://doc.cgal.org/latest/Surface_mesh_segmentation/index.html" << std::endl; 557 | output << "comment n_segms " << n_segms << std::endl; 558 | output << "element vertex " << n_points << std::endl; 559 | output << "property float x" << std::endl; 560 | output << "property float y" << std::endl; 561 | output << "property float z" << std::endl; 562 | output << "property int segm" << std::endl; 563 | output << "property uchar red" << std::endl; 564 | output << "property uchar green" << std::endl; 565 | output << "property uchar blue" << std::endl; 566 | output << "element face " << n_faces << std::endl; 567 | output << "property list uchar int vertex_indices" << std::endl; 568 | output << "end_header" << std::endl; 569 | } 570 | 571 | // write mesh to an .PLY file 572 | void write_mesh_to_ply_file(std::string orig_filepath, Polyhedron mesh, Facet_with_id_pmap segment_property_map, int n_segms, int k, float lambda) { 573 | // get complete filepath 574 | std::string output_filepath = get_filepath_from_k_and_lambda(orig_filepath, k, lambda); 575 | // change file extension to .PLY 576 | output_filepath = change_filename_ext(output_filepath, "ply"); 577 | // get stream output 578 | std::ofstream output(output_filepath.c_str()); 579 | if (VERBOSE) std::cout << "Writing to file (" << output_filepath << ")" << std::endl; 580 | // Write polyhedron in Object File Format (OFF) - ASCII 581 | CGAL::set_ascii_mode( output ); 582 | // write header 583 | write_ply_header(output, n_segms, mesh.size_of_vertices(), mesh.size_of_facets()); 584 | //write points 585 | if (VERBOSE) std::cout << "\tCalculating vertices colors from face colors for " << mesh.size_of_vertices() << " points and " << mesh.size_of_facets() << " faces..." << std::endl; 586 | std::vector vertices_segm_ids = get_vertices_segm_ids(mesh, segment_property_map, n_segms); 587 | int vertex_ix = 0; 588 | if (VERBOSE) std::cout << "\tWriting " << mesh.size_of_vertices() << " points..." << std::endl; 589 | for ( Vertex_iterator v = mesh.vertices_begin(); v != mesh.vertices_end(); ++v) { 590 | int vertex_segm_id = vertices_segm_ids[vertex_ix]; 591 | int *color = get_color(vertex_segm_id); 592 | std::string color_str = color_intarray2string(color); 593 | output << v->point() << " " << vertex_segm_id << " " << color_str << std::endl; 594 | vertex_ix++; 595 | } 596 | // write faces 597 | if (VERBOSE) std::cout << "\tWriting " << mesh.size_of_facets() << " faces..." << std::endl; 598 | for (Facet_iterator i = mesh.facets_begin(); i != mesh.facets_end(); ++i) { 599 | Halfedge_facet_circulator j = i->facet_begin(); 600 | // Facets in polyhedral surfaces are at least triangles 601 | CGAL_assertion( CGAL::circulator_size(j) >= 3); 602 | output << CGAL::circulator_size(j); 603 | do { 604 | output << ' ' << std::distance(mesh.vertices_begin(), j->vertex()); 605 | } while ( ++j != i->facet_begin()); 606 | output << std::endl; 607 | } 608 | output.close(); 609 | if (VERBOSE) std::cout << "Done" << std::endl; 610 | } 611 | 612 | // create and read mesh as a Polyhedron (defined through typedef above) 613 | int get_mesh_from_off_file(std::string mesh_filepath, Polyhedron & mesh) { 614 | if (VERBOSE) std::cout << "Reading mesh file (" << mesh_filepath << ") as a Polyhedron..."; 615 | std::ifstream input(mesh_filepath.c_str()); 616 | if ( !input ) { 617 | if (VERBOSE) std::cout << std::endl; 618 | std::cout << "ERROR: Could not read stream from file - going to next mesh" << std::endl << std::endl; 619 | return 0; 620 | } 621 | if ( !(input >> mesh)) { 622 | if (VERBOSE) std::cout << std::endl; 623 | std::cout << "ERROR: The .off file is invalid - going to next mesh" << std::endl << std::endl; 624 | return 0; 625 | } 626 | if ( mesh.empty() ) { 627 | if (VERBOSE) std::cout << std::endl; 628 | std::cout << "ERROR: Created Polyhedron is empty - going to next mesh" << std::endl << std::endl; 629 | return 0; 630 | } 631 | if (VERBOSE) std::cout << "OK" << std::endl; 632 | if (VERBOSE) std::cout << "Mesh has " << mesh.size_of_facets() << " faces" << std::endl; 633 | } 634 | 635 | int convert_meshes(std::string exec_fullpath, std::string working_dir, std::string OUTPUT_DIR, std::vector meshes_filenames, std::string ext_out) { 636 | for(std::vector::iterator it = meshes_filenames.begin(); it != meshes_filenames.end(); ++it) { 637 | std::string mesh_filepath_in = working_dir + *it; 638 | std::string mesh_filepath_out = OUTPUT_DIR + *it; 639 | std::string meshlab_script_name = "make_cgal_friendly.mlx"; 640 | std::string meshlabserver_command = 641 | "meshlabserver -i " + mesh_filepath_in + 642 | " -o " + change_filename_ext(mesh_filepath_out,ext_out) + 643 | " -s " + exec_fullpath + meshlab_script_name + 644 | " -om vn vf fn ff"; 645 | if (system(NULL)) 646 | system(meshlabserver_command.c_str()); 647 | else { 648 | std::cout << "ERROR: Could not get a shell to run MeshlabServer application" << std::endl; 649 | return 0; 650 | } 651 | if (VERBOSE) std::cout << "Meshlabserver command: " << meshlabserver_command << std::endl; 652 | } 653 | return 1; 654 | } 655 | 656 | // convert meshes in a given directory 657 | int convert_meshes_in_dir(std::string exec_fullpath, std::string & INPUT_DIR, std::string OUTPUT_DIR, std::string INPUT_FILE_EXT) { 658 | if (!INPUT_FILE_EXT.empty()) { 659 | // get the meshes filenames to convert to .OFF 660 | std::vector meshes_filenames_to_convert = std::vector(); 661 | if (VERBOSE) std::cout << "Reading file names from directory " << INPUT_DIR << std::endl; 662 | if(!get_files_in_dir(INPUT_DIR, meshes_filenames_to_convert, INPUT_FILE_EXT)) 663 | return 0; 664 | // convert meshes to .OFF 665 | if (VERBOSE) std::cout << "Converting meshes in " << INPUT_DIR << " and saving them in " << OUTPUT_DIR << std::endl; 666 | if (!convert_meshes(exec_fullpath, INPUT_DIR, OUTPUT_DIR, meshes_filenames_to_convert, "off")) { 667 | std::cout << "ERROR: Could not convert meshes" << std::endl; 668 | return 0; 669 | } 670 | if (VERBOSE) std::cout << std::endl; 671 | INPUT_DIR = OUTPUT_DIR; 672 | } 673 | return 1; 674 | } 675 | 676 | int get_meshes_filenames(std::string INPUT_DIR, std::vector & meshes_filenames, bool sorted = false) { 677 | meshes_filenames = std::vector(); 678 | if(!get_files_in_dir(INPUT_DIR, meshes_filenames, "off")) 679 | return 0; 680 | if (VERBOSE) std::cout << std::endl; 681 | if (meshes_filenames.size() == 0) { 682 | std::cout << meshes_filenames.size() << " .OFF files found in directory: " << INPUT_DIR << std::endl; 683 | std::cout << "Segmentation requires .OFF files. Please add the extension you are using. For .PLY add: -e ply" << std::endl; 684 | return 0; 685 | } 686 | if (sorted) 687 | std::sort(meshes_filenames.begin(), meshes_filenames.end()); 688 | return 1; 689 | } 690 | 691 | double sesc2HHMM(double secs, double & minutes, double & hours, int round) { 692 | hours = std::floor(secs/3600); 693 | minutes = ((int)secs % 3600)/60; 694 | double round_factor = std::pow(10,round); 695 | minutes = floorf( (minutes*round_factor)/round_factor ); 696 | } 697 | 698 | void DisplayEstimatedTimeOfLoop( double tot_toc, int curr_ix, int tot_iter, std::string prefix ) { 699 | double minutes = 0; 700 | double hours = 0; 701 | if (curr_ix == tot_iter) { 702 | sesc2HHMM(tot_toc, minutes, hours, 2); 703 | std::cout << prefix << "Total elapsed time (HH:MM): " << hours << ":" << minutes << std::endl; 704 | } 705 | else { 706 | double avg_toc = tot_toc/curr_ix; 707 | sesc2HHMM(avg_toc*(tot_iter-curr_ix), minutes, hours, 2); 708 | std::cout << prefix << "Estimated time (HH:MM): " << hours << ":" << minutes << " " << std::floor(curr_ix*100/tot_iter) << "%" << std::endl; 709 | } 710 | } 711 | 712 | // get full path to folder where the executable is running 713 | // https://www.linuxquestions.org/questions/programming-9/get-full-path-of-a-command-in-c-117965/ 714 | std::string GetFullPathWhereProgramRuns() { 715 | const int MAXPATHLEN = 200; /* make this larger if you need to. */ 716 | int length; 717 | char fullpath[MAXPATHLEN]; 718 | 719 | /* /proc/self is a symbolic link to the process-ID subdir 720 | * of /proc, e.g. /proc/4323 when the pid of the process 721 | * of this program is 4323. 722 | * 723 | * Inside /proc/ there is a symbolic link to the 724 | * executable that is running as this . This symbolic 725 | * link is called "exe". 726 | * 727 | * So if we read the path where the symlink /proc/self/exe 728 | * points to we have the full path of the executable. 729 | */ 730 | 731 | length = readlink("/proc/self/exe", fullpath, sizeof(fullpath)); 732 | /* Catch some errors: */ 733 | if (length < 0) { 734 | fprintf(stderr, "Error resolving symlink /proc/self/exe.\n"); 735 | exit(EXIT_FAILURE); 736 | } 737 | if (length >= MAXPATHLEN) { 738 | fprintf(stderr, "Path too long. Truncated.\n"); 739 | exit(EXIT_FAILURE); 740 | } 741 | 742 | /* I don't know why, but the string this readlink() function 743 | * returns is appended with a '@'. 744 | */ 745 | fullpath[length] = '\0'; /* Strip '@' off the end. */ 746 | 747 | std::string fullpath_str = fullpath; 748 | fullpath_str = fullpath_str.substr(0,fullpath_str.size()-14); 749 | return fullpath_str;; 750 | } 751 | 752 | // segment every mesh in a given directory 753 | int main(int argc, char *argv[]){ 754 | // parse args 755 | if (!parse_args(argc, argv)) 756 | return 0; 757 | 758 | // get full path to folder where the executable is running 759 | std::string exec_fullpath = GetFullPathWhereProgramRuns(); 760 | 761 | // make output directory 762 | if (VERBOSE) std::cout << "Creating directory " << OUTPUT_DIR << std::endl; 763 | std::string command_mkdir = "mkdir " + OUTPUT_DIR; 764 | system(command_mkdir.c_str()); 765 | 766 | // convert meshes if necessary 767 | if(!convert_meshes_in_dir(exec_fullpath, INPUT_DIR, OUTPUT_DIR, INPUT_FILE_EXT)) 768 | return 0; 769 | 770 | //get meshes filenames 771 | std::vector meshes_filenames; 772 | if(!get_meshes_filenames(INPUT_DIR, meshes_filenames)) 773 | return 0; 774 | 775 | // run through each mesh in INPUT_DIR (getting SDF values only once) 776 | // run through k number of clusters 777 | // run through smoothing lambdas 778 | // segment and write .OFF file 779 | double tot_toc = 0; 780 | int curr_ix = 0; 781 | int n_pcls = meshes_filenames.size(); 782 | for(std::vector::iterator it = meshes_filenames.begin(); it != meshes_filenames.end(); ++it) { 783 | // variables to measure time elapsed 784 | curr_ix++; 785 | std::clock_t tic = std::clock(); 786 | 787 | // get filepath to write to 788 | std::string mesh_filename = *it; 789 | std::string mesh_filepath = INPUT_DIR + mesh_filename; 790 | 791 | // get mesh from .OFF file 792 | // if there is a problem continue the loop for next mesh 793 | Polyhedron mesh; 794 | if(!get_mesh_from_off_file(mesh_filepath, mesh)) 795 | continue; 796 | 797 | // assign id field for each face 798 | if (VERBOSE) std::cout << "Assigning a different ID to each face..."; 799 | std::size_t facet_id = 0; 800 | for(Polyhedron::Facet_iterator facet_it = mesh.facets_begin(); facet_it != mesh.facets_end(); ++facet_it, ++facet_id) 801 | facet_it->id() = facet_id; 802 | if (VERBOSE) std::cout << "OK" << std::endl; 803 | 804 | // create a property-map for SDF values 805 | // to access SDF values with constant-complexity 806 | if (VERBOSE) std::cout << "Creating an index for SDF values to access them with constant-complexity..."; 807 | std::vector sdf_values(mesh.size_of_facets()); 808 | Facet_with_id_pmap sdf_property_map(sdf_values); 809 | CGAL::sdf_values(mesh, sdf_property_map); 810 | if (VERBOSE) std::cout << "OK" << std::endl; 811 | 812 | // create a property-map for segment IDs 813 | // so we can access a face's segment ID with constant-complexity 814 | if (VERBOSE) std::cout << "Creating an index for face segment IDS to access them with constant-complexity..."; 815 | std::vector segment_ids(mesh.size_of_facets()); 816 | Facet_with_id_pmap segment_property_map(segment_ids); 817 | if (VERBOSE) std::cout << "OK" << std::endl; 818 | std::cout << std::endl; 819 | 820 | // run through ks and lambdas, segment and write to .OFF file 821 | double tot_toc_per_mesh = 0; 822 | int curr_ix_mesh = 0; 823 | int n_ks_tries = 0; 824 | for (int k=K_START; k <= K_END; k += K_STEP) 825 | n_ks_tries++; 826 | int n_lambda_tries = 0; 827 | for (float lambda=LAMBDA_START; lambda <= LAMBDA_END; lambda += LAMBDA_STEP) 828 | n_lambda_tries++; 829 | for (int k=K_START; k <= K_END; k += K_STEP) { 830 | curr_ix_mesh++; 831 | int curr_ix_lambda = 0; 832 | double tot_toc_per_lambda = 0; 833 | for (float lambda=LAMBDA_START; lambda <= LAMBDA_END; lambda += LAMBDA_STEP) { 834 | curr_ix_lambda++; 835 | // segment the mesh with params k and lambda 836 | if (VERBOSE) std::cout << "Segmenting..."; 837 | int n_segms = CGAL::segmentation_from_sdf_values(mesh, sdf_property_map, segment_property_map, k, lambda); 838 | if (VERBOSE) std::cout << "OK" << std::endl << "Number of segments: " << n_segms << std::endl; 839 | 840 | // write mesh to .PLY or .OFF file 841 | if (INPUT_FILE_EXT.compare("ply") == 0) 842 | write_mesh_to_ply_file(OUTPUT_DIR + mesh_filename, mesh, segment_property_map, n_segms, k, lambda); 843 | else 844 | write_mesh_to_off_file(OUTPUT_DIR + mesh_filename, mesh, segment_property_map, n_segms, k, lambda); 845 | 846 | 847 | if (VERBOSE) std::cout << std::endl; 848 | tot_toc_per_lambda += double(std::clock() - tic) / CLOCKS_PER_SEC; 849 | std::cout << std::endl; 850 | DisplayEstimatedTimeOfLoop( tot_toc_per_lambda, curr_ix_lambda, n_lambda_tries, "Loop for each lambda per mesh "); 851 | } 852 | tot_toc_per_mesh += double(std::clock() - tic) / CLOCKS_PER_SEC; 853 | std::cout << std::endl; 854 | DisplayEstimatedTimeOfLoop( tot_toc_per_mesh, curr_ix_mesh, n_ks_tries, "Loop for each K per mesh "); 855 | std::cout << std::endl; 856 | } 857 | tot_toc += double(std::clock() - tic) / CLOCKS_PER_SEC; 858 | std::cout << std::endl; 859 | DisplayEstimatedTimeOfLoop( tot_toc, curr_ix, n_pcls, "Loop for all meshes "); 860 | std::cout << std::endl; 861 | } 862 | } 863 | --------------------------------------------------------------------------------