├── .gitmodules ├── CMake ├── FindLibrary.cmake.in ├── GenerateLibraryConfig.cmake ├── InstallLibrary.cmake ├── LibraryConfig.cmake.in ├── UseLibrary.cmake.in └── VTKSURFACEConfig.cmake.in ├── CMakeLists.txt ├── Compression ├── CMakeLists.txt ├── DisplayWavelet.cxx ├── SWA_TWA.cxx ├── vtkArithmeticCoder.cxx ├── vtkArithmeticCoder.h ├── vtkMultiresolutionIO.cxx ├── vtkMultiresolutionIO.h ├── vtkMultiresolutionIOSeqII.cxx ├── vtkMultiresolutionIOSeqII.h ├── vtkSparseMatrix.cxx ├── vtkSparseMatrix.h ├── vtkWaveletSubdivisionFilter.cxx ├── vtkWaveletSubdivisionFilter.h └── wavemesh.cxx ├── LICENSE.txt ├── RangeCoding ├── CMakeLists.txt ├── QuasiStaticModel.cxx ├── QuasiStaticModel.h ├── RangeDecoder.cxx ├── RangeDecoder.h ├── RangeDecoder2.h ├── RangeEncoder.cxx ├── RangeEncoder.h ├── port.h ├── vtkArithmeticCoderBase.cxx └── vtkArithmeticCoderBase.h ├── Readme.md ├── VectorCompression ├── CMakeLists.txt ├── decodeCoeffs.cxx ├── encodeCoeffs.cxx └── io.h └── doc ├── CMakeLists.txt ├── DoxyMainPage.txt └── doxygen.config.in /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ACVD"] 2 | path = ACVD 3 | url = https://github.com/valette/ACVD 4 | -------------------------------------------------------------------------------- /CMake/FindLibrary.cmake.in: -------------------------------------------------------------------------------- 1 | # - Find a library installation or build tree. 2 | # 3 | # The following variables are set if @LIBRARY_NAME@ is found. If @LIBRARY_NAME@ is not 4 | # found, @LIBRARY_NAME@_FOUND is set to false. 5 | # @LIBRARY_NAME@_FOUND - Set to true when @LIBRARY_NAME@ is found. 6 | # @LIBRARY_NAME@_USE_FILE - CMake file to use @LIBRARY_NAME@. 7 | # @LIBRARY_NAME@_MAJOR_VERSION - The @LIBRARY_NAME@ major version number. 8 | # @LIBRARY_NAME@_MINOR_VERSION - The @LIBRARY_NAME@ minor version number 9 | # (odd non-release). 10 | # @LIBRARY_NAME@_BUILD_VERSION - The @LIBRARY_NAME@ patch level 11 | # (meaningless for odd minor). 12 | # @LIBRARY_NAME@_INCLUDE_DIRS - Include directories for @LIBRARY_NAME@ 13 | # @LIBRARY_NAME@_LIBRARY_DIRS - Link directories for @LIBRARY_NAME@ libraries 14 | # @LIBRARY_NAME@_KITS - List of @LIBRARY_NAME@ kits, in CAPS 15 | # (COMMON,IO,) etc. 16 | # @LIBRARY_NAME@_LANGUAGES - List of wrapped languages, in CAPS 17 | # (TCL, PYHTON,) etc. 18 | # The following cache entries must be set by the user to locate @LIBRARY_NAME@: 19 | # @LIBRARY_NAME@_DIR - The directory containing @LIBRARY_NAME@Config.cmake. 20 | # This is either the root of the build tree, 21 | # or the lib/vtk directory. This is the 22 | # only cache entry. 23 | 24 | 25 | # Construct consitent error messages for use below. 26 | SET(@LIBRARY_NAME@_DIR_DESCRIPTION "directory containing @LIBRARY_NAME@Config.cmake. This is either the root of the build tree, or PREFIX/lib/@LIBRARY_NAME@ for an installation.") 27 | SET(@LIBRARY_NAME@_DIR_MESSAGE "@LIBRARY_NAME@ not found. Set the @LIBRARY_NAME@_DIR cmake cache entry to the ${@LIBRARY_NAME@_DIR_DESCRIPTION}") 28 | 29 | # Search only if the location is not already known. 30 | IF(NOT @LIBRARY_NAME@_DIR) 31 | # Get the system search path as a list. 32 | IF(UNIX) 33 | STRING(REGEX MATCHALL "[^:]+" @LIBRARY_NAME@_DIR_SEARCH1 "$ENV{PATH}") 34 | ELSE(UNIX) 35 | STRING(REGEX REPLACE "\\\\" "/" @LIBRARY_NAME@_DIR_SEARCH1 "$ENV{PATH}") 36 | ENDIF(UNIX) 37 | STRING(REGEX REPLACE "/;" ";" @LIBRARY_NAME@_DIR_SEARCH2 "${@LIBRARY_NAME@_DIR_SEARCH1}") 38 | 39 | # Construct a set of paths relative to the system search path. 40 | SET(@LIBRARY_NAME@_DIR_SEARCH "") 41 | FOREACH(dir ${@LIBRARY_NAME@_DIR_SEARCH2}) 42 | SET(@LIBRARY_NAME@_DIR_SEARCH ${@LIBRARY_NAME@_DIR_SEARCH} 43 | ${dir}/../lib/@LIBRARY_NAME@ 44 | ) 45 | ENDFOREACH(dir) 46 | 47 | # 48 | # Look for an installation or build tree. 49 | # 50 | FIND_PATH(@LIBRARY_NAME@_DIR Use@LIBRARY_NAME@.cmake 51 | # Look for an environment variable @LIBRARY_NAME@_DIR. 52 | $ENV{@LIBRARY_NAME@_DIR} 53 | 54 | # Look in places relative to the system executable search path. 55 | ${@LIBRARY_NAME@_DIR_SEARCH} 56 | 57 | # Look in standard UNIX install locations. 58 | /usr/local/lib/@LIBRARY_NAME@ 59 | /usr/lib/@LIBRARY_NAME@ 60 | 61 | # Read from the CMakeSetup registry entries. It is likely that 62 | # @LIBRARY_NAME@ will have been recently built. 63 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] 64 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] 65 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] 66 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4] 67 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5] 68 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6] 69 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7] 70 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8] 71 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9] 72 | [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10] 73 | 74 | # Help the user find it if we cannot. 75 | DOC "The ${@LIBRARY_NAME@_DIR_DESCRIPTION}" 76 | ) 77 | ENDIF(NOT @LIBRARY_NAME@_DIR) 78 | 79 | # If @LIBRARY_NAME@ was found, load the configuration file to get the rest of the 80 | # settings. 81 | IF(@LIBRARY_NAME@_DIR) 82 | # Make sure the @LIBRARY_NAME@Config.cmake file exists in the directory provided. 83 | IF(EXISTS ${@LIBRARY_NAME@_DIR}/@LIBRARY_NAME@Config.cmake) 84 | 85 | # We found @LIBRARY_NAME@. Load the settings. 86 | SET(@LIBRARY_NAME@_FOUND 1) 87 | INCLUDE(${@LIBRARY_NAME@_DIR}/@LIBRARY_NAME@Config.cmake) 88 | 89 | ENDIF(EXISTS ${@LIBRARY_NAME@_DIR}/@LIBRARY_NAME@Config.cmake) 90 | ELSE(@LIBRARY_NAME@_DIR) 91 | # We did not find @LIBRARY_NAME@. 92 | SET(@LIBRARY_NAME@_FOUND 0) 93 | ENDIF(@LIBRARY_NAME@_DIR) 94 | 95 | #----------------------------------------------------------------------------- 96 | IF(NOT @LIBRARY_NAME@_FOUND) 97 | # @LIBRARY_NAME@ not found, explain to the user how to specify its location. 98 | IF(NOT @LIBRARY_NAME@_FIND_QUIETLY) 99 | MESSAGE(FATAL_ERROR ${@LIBRARY_NAME@_DIR_MESSAGE}) 100 | ELSE(NOT @LIBRARY_NAME@_FIND_QUIETLY) 101 | IF(@LIBRARY_NAME@_FIND_REQUIRED) 102 | MESSAGE(FATAL_ERROR ${@LIBRARY_NAME@_DIR_MESSAGE}) 103 | ENDIF(@LIBRARY_NAME@_FIND_REQUIRED) 104 | ENDIF(NOT @LIBRARY_NAME@_FIND_QUIETLY) 105 | ENDIF(NOT @LIBRARY_NAME@_FOUND) 106 | -------------------------------------------------------------------------------- /CMake/GenerateLibraryConfig.cmake: -------------------------------------------------------------------------------- 1 | # Generate the ${LIBRARY_NAME}Config.cmake file in the build tree. 2 | # Also configure one for installation. 3 | # The file tells external projects how to use ${LIBRARY_NAME}. 4 | 5 | #----------------------------------------------------------------------------- 6 | # Global settings 7 | SET(LIB_MAJOR_VERSION_CONFIG ${${LIBRARY_NAME}_MAJOR_VERSION}) 8 | SET(LIB_MINOR_VERSION_CONFIG ${${LIBRARY_NAME}_MINOR_VERSION}) 9 | SET(LIB_BUILD_VERSION_CONFIG ${${LIBRARY_NAME}_BUILD_VERSION}) 10 | SET(LIB_VERSION_CONFIG 11 | ${${LIBRARY_NAME}_MAJOR_VERSION}.${${LIBRARY_NAME}_MINOR_VERSION}.${${LIBRARY_NAME}_BUILD_VERSION}) 12 | 13 | SET(LIB_REQUIRED_C_FLAGS_CONFIG ${${LIBRARY_NAME}_REQUIRED_C_FLAGS}) 14 | SET(LIB_REQUIRED_CXX_FLAGS_CONFIG ${${LIBRARY_NAME}_CXX_FLAGS}) 15 | SET(LIB_REQUIRED_LINK_FLAGS_CONFIG ${${LIBRARY_NAME}_LINK_FLAGS}) 16 | #----------------------------------------------------------------------------- 17 | 18 | 19 | #----------------------------------------------------------------------------- 20 | # Settings specific to the install tree. 21 | 22 | # The "use" file. 23 | SET(LIB_USE_FILE_CONFIG 24 | ${CMAKE_INSTALL_PREFIX}/lib/${LIBRARY_NAME}/Use${LIBRARY_NAME}.cmake) 25 | 26 | # The build settings file. 27 | SET(LIB_BUILD_SETTINGS_FILE_CONFIG 28 | ${CMAKE_INSTALL_PREFIX}/lib/${LIBRARY_NAME}/${LIBRARY_NAME}BuildSettings.cmake) 29 | 30 | # Include directories. 31 | SET(LIB_INCLUDE_DIRS_CONFIG 32 | ${CMAKE_INSTALL_PREFIX}/include/${LIBRARY_NAME} 33 | ) 34 | 35 | # Link directories. 36 | SET(LIB_LIBRARY_DIRS_CONFIG ${CMAKE_INSTALL_PREFIX}/lib) 37 | 38 | #----------------------------------------------------------------------------- 39 | # Configure ${LIBRARY_NAME}Config.cmake for the install tree. 40 | CONFIGURE_FILE(${INSTALL_LIBRARY_FILES_DIR}/LibraryConfig.cmake.in 41 | ${PROJECT_BINARY_DIR}/cmake/${LIBRARY_NAME}Config.cmake 42 | @ONLY IMMEDIATE) 43 | 44 | INSTALL( 45 | FILES ${PROJECT_BINARY_DIR}/cmake/${LIBRARY_NAME}Config.cmake 46 | DESTINATION lib/${LIBRARY_NAME} 47 | ) 48 | #INSTALL_FILES(/lib/${LIBRARY_NAME} .cmake ${LIBRARY_NAME}Config) 49 | 50 | #----------------------------------------------------------------------------- 51 | # Settings specific to the build tree. 52 | 53 | # The "use" file. 54 | SET(LIB_USE_FILE_CONFIG 55 | ${CMAKE_CURRENT_BINARY_DIR}/Use${LIBRARY_NAME}.cmake) 56 | 57 | # The build settings file. 58 | SET(LIB_BUILD_SETTINGS_FILE_CONFIG 59 | ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}BuildSettings.cmake) 60 | 61 | # Library directory. 62 | SET(LIB_LIBRARY_DIRS_CONFIG ${LIBRARY_OUTPUT_PATH}) 63 | 64 | # Determine the include directories needed. 65 | SET(LIB_INCLUDE_DIRS_CONFIG 66 | ${CMAKE_CURRENT_SOURCE_DIR} 67 | ) 68 | 69 | #----------------------------------------------------------------------------- 70 | # Configure ${LIBRARY_NAME}Config.cmake for the build tree. 71 | CONFIGURE_FILE(${INSTALL_LIBRARY_FILES_DIR}/LibraryConfig.cmake.in 72 | ${LIBRARY_NAME_BUILD_TREE_CONFIG}/${LIBRARY_NAME}Config.cmake 73 | @ONLY IMMEDIATE) 74 | -------------------------------------------------------------------------------- /CMake/InstallLibrary.cmake: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | #----------------------------------------------------------------------------- 6 | # INSTALLATION OF FindLibrary.cmake in CMake/Modules dir 7 | 8 | # ON WINDOWS : NO INSTALL MECHANISM; DIRTY COPY ALLOWED 9 | IF (WIN32) 10 | # CONFIGURE_FILE( 11 | # ${INSTALL_LIBRARY_FILES_DIR}/FindLibrary.cmake.in 12 | # ${CMAKE_ROOT}/Modules/Find${LIBRARY_NAME}.cmake 13 | # @ONLY IMMEDIATE 14 | # ) 15 | # CONFIGURE_FILE( 16 | # ${INSTALL_LIBRARY_FILES_DIR}/UseLibrary.cmake.in 17 | # ${CURRENT_BINARY_DIR}/Use${LIBRARY_NAME}.cmake 18 | # @ONLY IMMEDIATE 19 | # ) 20 | # # Create the LibraryConfig.cmake file containing the Library configuration. 21 | # INCLUDE (${INSTALL_LIBRARY_FILES_DIR}/GenerateLibraryConfig.cmake) 22 | # # Save the compiler settings so another project can import them. 23 | # INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake) 24 | # CMAKE_EXPORT_BUILD_SETTINGS(${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}BuildSettings.cmake) 25 | 26 | # INSTALL( 27 | # FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}BuildSettings.cmake 28 | # DESTINATION lib/${LIBRARY_NAME} 29 | # ) 30 | 31 | # ON LINUX : FILES MUST BE INSTALLED BY make install 32 | ELSE (WIN32) 33 | 34 | CONFIGURE_FILE( 35 | ${INSTALL_LIBRARY_FILES_DIR}/FindLibrary.cmake.in 36 | ${CMAKE_CURRENT_BINARY_DIR}/Find${LIBRARY_NAME}.cmake 37 | @ONLY IMMEDIATE 38 | ) 39 | INSTALL( 40 | # FILES ${CMAKE_CURRENT_BINARY_DIR}/Find${LIBRARY_NAME}.cmake 41 | # DESTINATION ${CMAKE_ROOT}/Modules 42 | ) 43 | CONFIGURE_FILE( 44 | ${INSTALL_LIBRARY_FILES_DIR}/UseLibrary.cmake.in 45 | ${CMAKE_CURRENT_BINARY_DIR}/Use${LIBRARY_NAME}.cmake 46 | @ONLY IMMEDIATE 47 | ) 48 | INSTALL( 49 | FILES ${CMAKE_CURRENT_BINARY_DIR}/Use${LIBRARY_NAME}.cmake 50 | DESTINATION lib/${LIBRARY_NAME} 51 | ) 52 | 53 | # Create the LibraryConfig.cmake file containing the lib configuration. 54 | INCLUDE (${INSTALL_LIBRARY_FILES_DIR}/GenerateLibraryConfig.cmake) 55 | 56 | # Save the compiler settings so another project can import them. 57 | INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake) 58 | CMAKE_EXPORT_BUILD_SETTINGS(${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}BuildSettings.cmake) 59 | 60 | INSTALL( 61 | FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}BuildSettings.cmake 62 | DESTINATION lib/${LIBRARY_NAME} 63 | ) 64 | 65 | ENDIF(WIN32) 66 | #----------------------------------------------------------------------------- 67 | -------------------------------------------------------------------------------- /CMake/LibraryConfig.cmake.in: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------------------------------- 2 | # 3 | # @LIBRARY_NAME@Config.cmake - CMake configuration file for external projects. 4 | # 5 | # This file is configured by cmake and used by the 6 | # Use@LIBRARY_NAME@.cmake module to load the lib settings 7 | # for an external project. 8 | 9 | # The @LIBRARY_NAME@ include file directories. 10 | SET(@LIBRARY_NAME@_INCLUDE_DIRS "@LIB_INCLUDE_DIRS_CONFIG@") 11 | 12 | # The @LIBRARY_NAME@ library directories. 13 | SET(@LIBRARY_NAME@_LIBRARY_DIRS "@LIB_LIBRARY_DIRS_CONFIG@") 14 | 15 | # The C and C++ flags added by @LIBRARY_NAME@ to the cmake-configured flags. 16 | SET(@LIBRARY_NAME@_REQUIRED_C_FLAGS "@LIB_REQUIRED_C_FLAGS_CONFIG@") 17 | SET(@LIBRARY_NAME@_REQUIRED_CXX_FLAGS "@LIB_REQUIRED_CXX_FLAGS_CONFIG@") 18 | SET(@LIBRARY_NAME@_REQUIRED_LINK_FLAGS "@LIB_REQUIRED_LINK_FLAGS_CONFIG@") 19 | 20 | # The @LIBRARY_NAME@ version 21 | SET(@LIBRARY_NAME@_MAJOR_VERSION @LIB_MAJOR_VERSION_CONFIG@) 22 | SET(@LIBRARY_NAME@_MINOR_VERSION @LIB_MINOR_VERSION_CONFIG@) 23 | SET(@LIBRARY_NAME@_BUILD_VERSION @LIB_BUILD_VERSION_CONFIG@) 24 | SET(@LIBRARY_NAME@_VERSION @LIB_VERSION_CONFIG@) 25 | 26 | 27 | # The location of the Use@LIBRARY_NAME@.cmake file. 28 | SET(@LIBRARY_NAME@_USE_FILE "@LIB_USE_FILE_CONFIG@") 29 | 30 | # The build settings file. 31 | SET(@LIBRARY_NAME@_BUILD_SETTINGS_FILE "@LIB_BUILD_SETTINGS_FILE_CONFIG@") 32 | 33 | # A list of all libraries for @LIBRARY_NAME@. Those listed here should 34 | # automatically pull in their dependencies. 35 | SET(@LIBRARY_NAME@_LIBRARIES @LIBRARY_NAME@ @LIB_LINK_LIBRARIES_CONFIG@) 36 | 37 | -------------------------------------------------------------------------------- /CMake/UseLibrary.cmake.in: -------------------------------------------------------------------------------- 1 | # This is an implementation detail for using @LIBRARY_NAME@ with the 2 | # Find@LIBRARY_NAME@.cmake module. Do not include directly by name. 3 | # This should be included only when Find@LIBRARY_NAME@.cmake sets 4 | # the @LIBRARY_NAME@_USE_FILE variable to point here. 5 | 6 | # Load the compiler settings used for @LIBRARY_NAME@. 7 | IF(@LIBRARY_NAME@_BUILD_SETTINGS_FILE) 8 | INCLUDE(CMakeImportBuildSettings) 9 | CMAKE_IMPORT_BUILD_SETTINGS(${@LIBRARY_NAME@_BUILD_SETTINGS_FILE}) 10 | ENDIF(@LIBRARY_NAME@_BUILD_SETTINGS_FILE) 11 | 12 | # Add compiler flags needed to use @LIBRARY_NAME@. 13 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${@LIBRARY_NAME@_REQUIRED_C_FLAGS}") 14 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${@LIBRARY_NAME@_REQUIRED_CXX_FLAGS}") 15 | 16 | # Add include directories needed to use @LIBRARY_NAME@. 17 | INCLUDE_DIRECTORIES(${@LIBRARY_NAME@_INCLUDE_DIRS}) 18 | 19 | # Add link directories needed to use @LIBRARY_NAME@. 20 | LINK_DIRECTORIES(${@LIBRARY_NAME@_LIBRARY_DIRS}) 21 | 22 | # Set the version 23 | ADD_DEFINITIONS( -D@LIBRARY_NAME@_VERSION="${@LIBRARY_NAME@_VERSION}" ) 24 | -------------------------------------------------------------------------------- /CMake/VTKSURFACEConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # VTKSURFACEConfig.cmake - VTKSURFACE CMake configuration file for external 3 | # projects. 4 | # 5 | 6 | # -------------------------------------------------------------------------- 7 | # The vtkSurface include file directories. 8 | SET(VTKSURFACE_INCLUDE_DIR "@VTKSURFACE_INCLUDE_DIR@") 9 | SET(VTKCGAL_INCLUDE_DIR "@VTKCGAL_INCLUDE_DIR@") 10 | SET(VTKDISCRETEREMESHING_INCLUDE_DIR "@VTKDISCRETEREMESHING_INCLUDE_DIR@") 11 | 12 | # -------------------------------------------------------------------------- 13 | # The ImageToImplicit library directories. 14 | SET(VTKSURFACE_LIBRARY_DIRS "@VTKSURFACE_BINARY_DIR@/bin") 15 | LINK_DIRECTORIES(${VTKSURFACE_LIBRARY_DIRS}) 16 | 17 | # -------------------------------------------------------------------------- 18 | # The ImageToImplicit libraries. 19 | SET(VTKSURFACE_LIBRARIES "vtkSurface") 20 | SET(VTKCGAL_LIBRARIES "vtkcgal") 21 | ## eof 22 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(Wavemesh) 2 | 3 | cmake_minimum_required(VERSION 3.5) 4 | if(COMMAND cmake_policy) 5 | cmake_policy(SET CMP0003 NEW) 6 | endif(COMMAND cmake_policy) 7 | 8 | OPTION(BUILD_SHARED_LIBS "Build vtkSurface with shared libraries." ON) 9 | 10 | SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.") 11 | SET (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") 12 | MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) 13 | 14 | find_package(VTK REQUIRED NO_MODULE) 15 | include(${VTK_USE_FILE}) 16 | 17 | SET(VTKSURFACE_PROJECT_DIR ${PROJECT_SOURCE_DIR}) 18 | SET(VTKSURFACE_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/ACVD/Common) 19 | SET(VTKWAVEMESH_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/Compression) 20 | SET(VTKRANGECODING_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/RangeCoding) 21 | 22 | # The main library 23 | ADD_SUBDIRECTORY(ACVD/Common) 24 | ADD_SUBDIRECTORY(RangeCoding) 25 | ADD_SUBDIRECTORY(Compression) 26 | -------------------------------------------------------------------------------- /Compression/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | INCLUDE_DIRECTORIES( 3 | ${VTK_INCLUDE_DIR} 4 | ${VTKSURFACE_INCLUDE_DIR} 5 | ${VTKRANGECODING_INCLUDE_DIR} 6 | ) 7 | 8 | # -------------------------------------------------------------------------- 9 | # Library compilation 10 | ADD_LIBRARY(vtkWavemesh 11 | vtkArithmeticCoder.cxx 12 | vtkMultiresolutionIO.cxx 13 | vtkSparseMatrix.cxx 14 | vtkWaveletSubdivisionFilter.cxx 15 | ) 16 | 17 | 18 | # Set the added libraries 19 | SET(LIB_ADDED vtkRangeCoding vtkSurface ${VTK_LIBRARIES}) 20 | 21 | TARGET_LINK_LIBRARIES(vtkWavemesh ${LIB_ADDED}) 22 | 23 | SET(WAVEMESH_EXAMPLES 24 | wavemesh 25 | DisplayWavelet 26 | ) 27 | FOREACH(loop_var ${WAVEMESH_EXAMPLES}) 28 | ADD_EXECUTABLE(${loop_var} ${loop_var}.cxx) 29 | TARGET_LINK_LIBRARIES(${loop_var} vtkWavemesh ${LIB_ADDED}) 30 | ENDFOREACH(loop_var) 31 | 32 | -------------------------------------------------------------------------------- /Compression/DisplayWavelet.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: DisplayWavelet 4 | Module: DisplayWavelet.cxx 5 | Language: C++ 6 | Date: 2010/09 7 | Auteur: Sebastien Valette 8 | This software is governed by the GPL license (see License.txt) 9 | =========================================================================*/ 10 | // .NAME DisplayWavelet 11 | // .SECTION Description 12 | 13 | #include "RenderWindow.h" 14 | #include "vtkWaveletSubdivisionFilter.h" 15 | 16 | int main( int argc, char *argv[] ) 17 | { 18 | 19 | vtkSurface *Mesh = vtkSurface::New(); 20 | Mesh->AddVertex(-1,-0.8,0); 21 | Mesh->AddVertex(1,-0.8,0); 22 | Mesh->AddVertex(0,1,0); 23 | Mesh->AddFace(0,1,2); 24 | 25 | int NumberOfFilters=5; 26 | vtkWaveletSubdivisionFilter *Filters[NumberOfFilters]; 27 | 28 | for (int i=0;iSetArithmeticType(Arithmetics); 43 | } 44 | 45 | if (strcmp(argv[ArgumentsIndex],"-l")==0) 46 | { 47 | int Lifting=atoi(argv[ArgumentsIndex+1]); 48 | if (Lifting==-1) 49 | { 50 | cout<<"Lifting scheme deactivated"<SetLifting(0); 53 | } 54 | else 55 | { 56 | for (int i=0;iSetLifting(1); 59 | Filters[i]->SetLiftingRadius(Lifting); 60 | } 61 | cout<<"Lifting radius : "<SetInput(Mesh); 69 | for (int i=0;iSubdivide(); 72 | if (i!=NumberOfFilters-1) 73 | Filters[i+1]->SetInput(Filters[i]->GetOutput()); 74 | } 75 | 76 | 77 | Filters[NumberOfFilters-1]->DisplayWavelet(); 78 | 79 | RenderWindow *Window=RenderWindow::New(); 80 | Window->SetInputData(Filters[NumberOfFilters-1]->GetOutput()); 81 | 82 | Window->Render(); 83 | Window->Interact(); 84 | 85 | } 86 | 87 | -------------------------------------------------------------------------------- /Compression/SWA_TWA.cxx: -------------------------------------------------------------------------------- 1 | /*================================================================================================================================== 2 | 3 | Program: Test module for 3D mesh sequence coding using the combination of spatial and temporal wavelet analysis (Creatis 1997 ~) 4 | Module: SWA_TWA.cxx (SWA : Spatial Wavelet Transform + TWA : Temporal Wavelet Analysis) 5 | Language: C++ 6 | Date: 2006/10 7 | Auteurs: Jae-Won CHO 8 | ==================================================================================================================================*/ 9 | 10 | // .NAME wavemesh 11 | // .SECTION Description 12 | #include "vtkPolyDataWriter.h" 13 | #include "vtkPolyDataReader.h" 14 | #include "vtkPolyData.h" 15 | #include "vtkPoints.h" 16 | 17 | #include "vtkSurface.h" 18 | #include "vtkWaveletSubdivisionFilter.h" 19 | #include "vtkMultiresolutionIOSeqII.h" 20 | #include "math.h" 21 | 22 | 23 | //*************************************************************************************************** 24 | //test module for 3D mesh sequence coding using the combination of spatial and temporal wavelet analysis. 25 | //It uses the class, "vtkMultiresolutionIOSeqII". 26 | 27 | //Input arguments : 28 | //arg1 = the prefix of 3D dynamic mesh file name 29 | //arg2 = index of the first frame 30 | //arg3 = index of the last frame 31 | //arg4 = quantization level 32 | //arg5 = temporal wavelet decomposition level 33 | //arg6 = temporal wavelet analysis/synthesis mode (0 : dyadic, 1 : packet) 34 | //arg7 = temporal wavelet analysis/synthesis filter (0 : Harr(2/2 tap), 1 : Le Gall(5/3 tap), 2 : Daubechies(9/7 tap)) 35 | // 36 | //Example : cowheavy 0 127 12 5 0 2 37 | //******************************************************************************************************* 38 | 39 | char inputfilename[100]; 40 | char prefixOfFilename[100]; 41 | char outputfilename[100]; 42 | char buf[1000]; 43 | 44 | int quantize; // quantization level 45 | double Factor, Tx, Ty, Tz; // To use the same scaling factors for "quantize" and "unquantize" 46 | vtkIdType i, j, k; 47 | 48 | vtkIdType first; // index of the first frame 49 | vtkIdType last; // index of the last frame 50 | 51 | vtkIdType tempoWaveDecompLevel; // temporal wavelet decomposition level 52 | vtkIdType tempoWaveMode; // temporal wavelet analysis/synthesis mode : 0 = dyadic, 1 = packet 53 | vtkIdType tempoWaveFilter; // temporal wavelet analysis/synthesis filter : 0 = Haar(2/2 tap), 1 = Le Gall(5/3 tap), 2 = Daubechies(9/7 tap) 54 | 55 | int main( int argc, char *argv[] ) 56 | { 57 | strcpy(prefixOfFilename,argv[1]); //load prefix only. 58 | first = atoi(argv[2]); 59 | last = atol(argv[3]); 60 | quantize = atoi(argv[4]); 61 | tempoWaveDecompLevel = atoi(argv[5]); 62 | 63 | if(tempoWaveDecompLevel != 0) // If temporal wavelet decomposition level is 0, it means that we use only spatial wavelet analysis for each frame 64 | { 65 | tempoWaveMode = atoi(argv[6]); 66 | tempoWaveFilter = atoi(argv[7]); 67 | } 68 | 69 | /////Begin of Compression/////////////////////////////////////////////////////// 70 | vtkMultiresolutionIOSeqII *MWriter=vtkMultiresolutionIOSeqII::New(); 71 | MWriter->SetFileType(1); // 0 : IV format; 1 : PLY format. 72 | MWriter->SetDisplay(0); // 0 = No display ; 1 = Display auto ; 2 = Display interactif 73 | MWriter->SetWriteRepport(0); 74 | MWriter->SetWriteOutput(1); // 1 = Write output mesh of each level, 0 = Do not write output mesh 75 | MWriter->SetDisplayText(0); 76 | MWriter->SetDisplayTime(0.5); 77 | MWriter->SetCapture(0); // IF on decompresse, ecrit un fichier BMP pour chaque maillage 78 | MWriter->SetGeometryPrediction(0); // Use prediction based on Buterfly scheme 79 | MWriter->SetGeometricalConstraint(0); // 1 = use A geometry based criterion to constraint coarsening 80 | MWriter->SetEdgeAngleThreshold(0.3); // IF geometry, define feature edges 81 | MWriter->SetWGC(0.1); // IF geometry, define the threshold on Wavelet coefficient to decide to remove or not a point. 82 | MWriter->SetNumberOfBitPlanes(12); // IF arithm = 0; number of maximum bit planes to transfert 83 | 84 | MWriter->SetArithmeticType(1); // 0 = flottants; 1 = entiers; 85 | MWriter->SetLifting(2); // 0 = No Lifting; 1 = Lifting; 2 = Fast Lifting; 86 | MWriter->SetLiftingRadius(1); // IF lifting == 1; Radius of the lifting computation 87 | 88 | MWriter->SetQuantization(quantize); 89 | 90 | MWriter->SetFileNamePrefix(prefixOfFilename); 91 | MWriter->SetFirstFrameId(first); 92 | MWriter->SetLastFrameId(last); 93 | MWriter->SetTempoWaveDecompLevel(tempoWaveDecompLevel); 94 | MWriter->SetTempoWaveMode(tempoWaveMode); 95 | MWriter->SetTempoWaveFilter(tempoWaveFilter); 96 | 97 | MWriter->EncodeSequence(); 98 | MWriter->Delete(); 99 | /////End of Compression/////////////////////////////////////////////////////// 100 | 101 | /////Begin of Decompression/////////////////////////////////////////////////// 102 | vtkMultiresolutionIOSeqII *MReader=vtkMultiresolutionIOSeqII::New(); 103 | MReader->SetFileNamePrefix(prefixOfFilename); 104 | MReader->SetFirstFrameId(first); 105 | MReader->SetLastFrameId(last); 106 | MReader->SetTempoWaveDecompLevel(tempoWaveDecompLevel); 107 | MReader->SetTempoWaveMode(tempoWaveMode); 108 | MReader->SetTempoWaveFilter(tempoWaveFilter); 109 | MReader->SetQuantization(quantize); 110 | MReader->DecodeSequence(); 111 | MReader->Delete(); 112 | //////End of Decompression/////////////////////////////////////////////////// 113 | 114 | return(0); 115 | } 116 | -------------------------------------------------------------------------------- /Compression/vtkArithmeticCoder.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valette/Wavemesh/451c9f8a564655a8e94a506a66fd2f41fd502267/Compression/vtkArithmeticCoder.cxx -------------------------------------------------------------------------------- /Compression/vtkArithmeticCoder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valette/Wavemesh/451c9f8a564655a8e94a506a66fd2f41fd502267/Compression/vtkArithmeticCoder.h -------------------------------------------------------------------------------- /Compression/vtkMultiresolutionIO.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valette/Wavemesh/451c9f8a564655a8e94a506a66fd2f41fd502267/Compression/vtkMultiresolutionIO.cxx -------------------------------------------------------------------------------- /Compression/vtkMultiresolutionIO.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valette/Wavemesh/451c9f8a564655a8e94a506a66fd2f41fd502267/Compression/vtkMultiresolutionIO.h -------------------------------------------------------------------------------- /Compression/vtkMultiresolutionIOSeqII.h: -------------------------------------------------------------------------------- 1 | /*================================================================================================================== 2 | Program: 3D mesh sequence coding using the combination of spatial and temporal wavelet analysis (Creatis 1997 ~) 3 | Module: vtkMultiresolutionIOSeqII.h 4 | Language: C++ 5 | Date: 2006/10 6 | Auteurs: Jae-Won Cho 7 | Base codeur: vtkMultiresolutionIO.h (Sebastien Valette), vtkMultiresolutionIOSeq.h (Min-Su Kim and Jae-Won Cho) 8 | ==================================================================================================================*/ 9 | // .NAME vtkMultiresolutionIOSeqII 10 | // .SECTION Description 11 | 12 | #ifndef __vtkMultiresolutionIOSeqII_h 13 | #define __vtkMultiresolutionIOSeqII_h 14 | 15 | #include "vtkMultiresolutionIO.h" 16 | 17 | class VTK_EXPORT vtkMultiresolutionIOSeqII : public vtkMultiresolutionIO 18 | { 19 | public: 20 | 21 | vtkTypeMacro(vtkMultiresolutionIOSeqII,vtkMultiresolutionIO); 22 | 23 | static vtkMultiresolutionIOSeqII *New(); 24 | 25 | vtkMultiresolutionIOSeqII(); 26 | ~vtkMultiresolutionIOSeqII(); 27 | 28 | void SetFileNamePrefix(char *prefix){ strcpy(this->prefixOfFilename, prefix);}; // set prefix of filename 29 | 30 | void SetFirstFrameId(int i) { this->first = i; }; // set the first frame index 31 | 32 | void SetLastFrameId(int i) { this->last = i; }; // set the last frame index 33 | 34 | void SetTempoWaveDecompLevel(int i){ this->tempoWaveDecompLevel = i; }; // set the temporal wavelet decomposition level 35 | 36 | void SetTempoWaveMode(int i){ this->tempoWaveMode = i; }; // set the temporal wavelet analysis/synthesis mode (0 : dyadic, 1 : packet) 37 | 38 | void SetTempoWaveFilter(int i){ this->tempoWaveFilter = i; }; // set the temporal wavelet filter bank (0 : Haar, 1 : Le Gall, 2 : Daubechies) 39 | 40 | void WriteIFrame(int frameindex); // write the first framme 41 | 42 | void WritePFrame(int frameindex); // write the other frames 43 | 44 | void ReadIFrame(int frameindex); // read the first frame 45 | 46 | void ReadPFrame(int frameindex); // read the other frames 47 | 48 | void UpdateGeometry(vtkSurface *Mesh); // for the other frame coding 49 | 50 | void CopyForEncoding(int frameindex, int mode); // for storing spatial wavelet coefficients into buffer for temporal wavelet transform(when encoding) 51 | 52 | void CopyForDecoding(int frameindex, int mode); // for storing temporal wavelet coefficients into buffer for temporal inverse wavelet transform(when decoding) 53 | 54 | void EncodeSequence(); // encoding sequence 55 | 56 | void DecodeSequence(); // decoding sequence 57 | 58 | void GetGlobalBitrate(); // calculate global bitrate 59 | 60 | void GetLocalBitrate(); // calculate local bitrate 61 | 62 | void TemporalWaveletDecomposition(); // temporal wavelet decomposition 63 | 64 | void TemporalWaveletReconstruction(); // temporal wavelet reconstruction 65 | 66 | void oneD_DWT_Dyadic(double *InputData, vtkIdType data_leng, vtkIdType level); // dyadic wavelet 67 | 68 | void oneD_IDWT_Dyadic(double *InputData, vtkIdType data_leng, vtkIdType level); // dyadic inverse wavelet 69 | 70 | void oneD_DWT_Packet(double *InputData, vtkIdType data_leng, vtkIdType level); // packet wavelet 71 | 72 | void oneD_IDWT_Packet(double *InputData, vtkIdType data_leng, vtkIdType level); // packet inverse wavelet 73 | 74 | void fHarr(double *InputData, vtkIdType sub_data_leng); // wavelet filter 0 : haar 75 | 76 | void iHarr(double *InputData, vtkIdType sub_data_leng); // wavelet filter 0 : haar 77 | 78 | void forward_lifting_53(double *InputData, vtkIdType sub_data_leng); // wavelet filter 1 : 5/3 tap lifting 79 | 80 | void inverse_lifting_53(double *InputData, vtkIdType sub_data_leng); // wavelet filter 1 : 5/3 tap lifting 81 | 82 | void forward_lifting_97(double *InputData, vtkIdType sub_data_leng); // wavelet filter 2 : 9/7 tap lifting 83 | 84 | void inverse_lifting_97(double *InputData, vtkIdType sub_data_leng); // wavelet filter 2 : 9/7 tap lifting 85 | 86 | private: 87 | 88 | void Encode(int frameindex, int mode); // encode frame 89 | 90 | void Decode(int frameindex, int mode); // decode frame 91 | 92 | vtkPoints *BaseMeshEncodingBuffer[8192]; // base mesh buffer for encoding (maximum frame length : 8192) 93 | 94 | vtkPoints *BaseMeshDecodingBuffer[8192]; // base mesh buffer for decoding 95 | 96 | vtkSurface *BaseMesh; 97 | 98 | vtkIntArray *WaveletsEncodingBuffer[8192][100]; // wavelet coefficients buffer for encoding (maximum frame length : 8192, maximum spatial resolution level : 100) 99 | 100 | vtkIntArray *WaveletsDecodingBuffer[8192][100]; // wavelet coefficients buffer for decoding 101 | 102 | char inputfilename[1000]; 103 | char prefixOfFilename[1000]; 104 | char outputfilename[1000]; 105 | char buf[1000]; 106 | 107 | vtkIdType first; // first index of the input sequence 108 | vtkIdType last; // last index of the input sequence 109 | int tempoWaveDecompLevel; // temporal wavelet decomposition level 110 | int tempoWaveMode; // temporal wavelet mode : 0 = dyadic, 1 = packet 111 | int tempoWaveFilter; // temporal wavelet filter : 0 = harr, 1 = 5/3 tap lifting, 2 = 9/7 tap lifting 112 | int subfixOfFilename; 113 | double Factor; 114 | double Tx; 115 | double Ty; 116 | double Tz; 117 | 118 | // for evaluation // 119 | int globalConnectivityBits; 120 | int globalGeometryBits; 121 | int globalTotalBits; 122 | 123 | int localConnectivityBits[100]; 124 | int localGeometryBits[100]; 125 | int localTotalBits[100]; 126 | 127 | int NumOfPoints; 128 | int FileSize; 129 | 130 | }; 131 | 132 | #endif 133 | -------------------------------------------------------------------------------- /Compression/vtkSparseMatrix.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valette/Wavemesh/451c9f8a564655a8e94a506a66fd2f41fd502267/Compression/vtkSparseMatrix.cxx -------------------------------------------------------------------------------- /Compression/vtkSparseMatrix.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Classe pour matrices creuses (Creatis 1997/2002) 4 | Module: vtkSparseMatrix.h 5 | Language: C++ 6 | Date: 2002/03 7 | Auteurs: Sebastien Valette 8 | This software is governed by the GPL license (see License.txt) 9 | =========================================================================*/ 10 | // .NAME vtkSparseMatrix 11 | // .SECTION Description 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #ifndef __vtkSparseMatrix_h 19 | #define __vtkSPArseMatrix_h 20 | //---------------------------------------------------------------------- 21 | /** 22 | ** DECLARATION 23 | ** 24 | **/ 25 | 26 | class VTK_EXPORT vtkSparseMatrix : public vtkObject 27 | //class vtkSparseMatrix :public vtkObject 28 | { 29 | public: 30 | 31 | class NonZeroElement 32 | { 33 | public: 34 | 35 | double Value; 36 | int i,j; 37 | NonZeroElement *NextHor, *NextVer; 38 | 39 | NonZeroElement () {this->NextHor=0; this->NextVer=0;}; 40 | 41 | }; 42 | 43 | static vtkSparseMatrix *New(); 44 | vtkTypeMacro(vtkSparseMatrix,vtkObject); 45 | 46 | 47 | // Description: 48 | // Create a similar type object. 49 | // vtkDataObject *MakeObject() {return vtkSparseMatrix::New();}; 50 | 51 | //BTX 52 | std::vector FirstHor; 53 | std::vector FirstVer; 54 | //ETX 55 | 56 | void Init(int i,int j); 57 | void AddValue(int i, int j, double Value); 58 | void Multiply(vtkPoints *in, vtkPoints *out) {}; 59 | void Multiply(vtkSparseMatrix *in, vtkSparseMatrix *out) {}; 60 | 61 | vtkSparseMatrix(const vtkSparseMatrix&) {}; 62 | void operator=(const vtkSparseMatrix&) {}; 63 | 64 | protected: 65 | 66 | vtkSparseMatrix() {}; //constructeur 67 | ~vtkSparseMatrix(); //Destructeur 68 | 69 | private: 70 | 71 | 72 | }; 73 | 74 | #endif 75 | 76 | -------------------------------------------------------------------------------- /Compression/vtkWaveletSubdivisionFilter.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valette/Wavemesh/451c9f8a564655a8e94a506a66fd2f41fd502267/Compression/vtkWaveletSubdivisionFilter.cxx -------------------------------------------------------------------------------- /Compression/vtkWaveletSubdivisionFilter.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Mailleur 3D multi-r?olution 4 | Module: vtkWaveletSubdivisionFilter.h 5 | Language: C++ 6 | Date: 2002/05 7 | Auteur: Sebastien VALETTE 8 | This software is governed by the GPL license (see License.txt) 9 | =========================================================================*/ 10 | 11 | #ifndef __vtkWaveletSubdivisionFilter_h 12 | #define __vtkWaveletSubdivisionFilter_h 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | 22 | #include "vtkSurface.h" 23 | #include "vtkSparseMatrix.h" 24 | #include "vtkArithmeticCoder.h" 25 | 26 | 27 | #define CHILD 1 28 | #define PARENT 2 29 | 30 | /** 31 | * A Wavelet-based Multiresolution analysis filter 32 | * The vtkWaveletSubdivisionFilter is an efficient reversible mesh 33 | * simplification and reconstruction Class. It can process integer or 34 | * double coordinates, handles compression. 35 | */ 36 | class VTK_EXPORT vtkWaveletSubdivisionFilter : public vtkObject 37 | { 38 | class contour_element 39 | { 40 | public: 41 | contour_element *PreviousElement,*NextElement; 42 | vtkIdType edge; 43 | }; 44 | 45 | class edge 46 | { 47 | public: 48 | contour_element *contour; 49 | vtkIdType child; 50 | char type; 51 | edge() : contour(0){}; 52 | }; 53 | 54 | class face 55 | { 56 | public: 57 | char lowrestype; 58 | char hirestype; 59 | vtkIdType vertex; //indice de sommet servant au détrompage (subdivision 1:3 ou 1:2 avec permutation d'arête) 60 | face() : lowrestype (-1),hirestype(-1),vertex(-1){}; 61 | }; 62 | 63 | class vertex 64 | { 65 | public: 66 | char type; 67 | short valence; 68 | vtkIdType old_to_new; 69 | vtkIdType new_to_old; 70 | vtkIdType parent1; 71 | vtkIdType parent2; 72 | 73 | vertex() {old_to_new=-1;new_to_old=-1;type=-1;}; 74 | }; 75 | 76 | public: 77 | //BTX 78 | vtkArithmeticCoder *ArithmeticCoder; 79 | //ETX 80 | 81 | int ConnectivityOnly; 82 | int LiftNum; 83 | int LiftDen; 84 | 85 | int GeometryPrediction; 86 | 87 | static vtkWaveletSubdivisionFilter *New(); 88 | vtkTypeMacro(vtkWaveletSubdivisionFilter,vtkObject); 89 | 90 | 91 | 92 | void SetDisplayEfficiency(int D) 93 | {this->DisplayEfficiency=D;}; 94 | int DisplayEfficiency; 95 | 96 | /** 97 | ** Sparse Matrix Alpha. 98 | ** Used for Lifting 99 | **/ 100 | vtkSparseMatrix *Alpha; 101 | 102 | /** 103 | ** Sparse Matrix P. 104 | ** Used for Lifting 105 | **/ 106 | vtkSparseMatrix *P; 107 | 108 | /** 109 | ** Geometry compression estimations 110 | **/ 111 | double EstimatedGeometryBits; 112 | 113 | /** 114 | ** =0 if the mesh was entirely simplified. If >0, the simplification 115 | ** is not reversible. 116 | **/ 117 | int remaining_faces; 118 | 119 | /** 120 | ** Number of 4:1 mergings 121 | **/ 122 | int M4to1; 123 | 124 | /** 125 | ** Number of 3:1 mergings 126 | **/ 127 | int M3to1; 128 | 129 | /** 130 | ** Number of 2:1 mergings 131 | **/ 132 | int M2to1; 133 | 134 | /** 135 | ** Number of 1:1 mergings 136 | **/ 137 | int M1to1; 138 | 139 | 140 | /** 141 | ** Number of edge swaps (type 1) 142 | **/ 143 | int Swap1; 144 | 145 | /** 146 | ** Number of edge swaps (type 2) 147 | **/ 148 | int Swap2; 149 | 150 | 151 | /** 152 | ** Number of raw bits needed for encoding midpoints (before entropy coding) 153 | **/ 154 | int BitsMidPoints; 155 | 156 | /** 157 | ** Number of raw bits set to 1 needed for encoding midpoints (before entropy coding) 158 | **/ 159 | int BitsMidPoints1; 160 | 161 | /** 162 | ** Number of supplementary bits for 1:3 subdivisions 163 | **/ 164 | int Bits1to3; 165 | 166 | /** 167 | ** Number of supplementary bits for 1:2 subdivisions 168 | **/ 169 | int Bits1to2; 170 | 171 | /** 172 | ** Number of supplementary bits for edge swaps 173 | **/ 174 | int BitsSwap; 175 | 176 | /** 177 | ** Estimation of bits needed for midpoints encoding 178 | **/ 179 | double RealBitsMidPoints; 180 | 181 | /** 182 | ** Quantization factor 183 | **/ 184 | int Quantization; 185 | /** 186 | ** Number of bits needed for encoding the low resolution mesh 187 | **/ 188 | int LowresBits; 189 | 190 | /** 191 | ** Data size (in bits) of the encoded connectivity 192 | **/ 193 | int ConnectivityBits; 194 | 195 | /** 196 | ** Data size (in bits) of the encoded geometry 197 | **/ 198 | double GeometryBits; 199 | 200 | /** 201 | ** Takes this->MergeInput mesh and simplifies it to a new mesh : 202 | ** this->MergeOutput 203 | **/ 204 | void SolveInverseProblem (vtkIdType initial_face); 205 | 206 | /** 207 | ** After this call, the filter will use fast 0-ring lifting 208 | **/ 209 | void SetFastLiftingOn() {this->ProcessLifting=2;}; 210 | 211 | /** 212 | ** After this call, the filter will use lifting 213 | **/ 214 | void SetLiftingOn() {this->ProcessLifting=1;}; 215 | 216 | /** 217 | ** After this call, the filter will use : 218 | ** 0 : no lifting 219 | ** 1 : lifting 220 | ** 2 : fast 0-ring Lifting 221 | **/ 222 | void SetLifting(int lift) {this->ProcessLifting=lift;}; 223 | 224 | /** 225 | ** After this call, the filter will not process lifting 226 | **/ 227 | void SetLiftingOff() {this->ProcessLifting=0;}; 228 | 229 | 230 | /** 231 | ** Returns the lifting process state : 232 | ** 0 : no lifting 233 | ** 1 : lifting 234 | ** 2 : fast 0-ring lifting 235 | **/ 236 | int IsLiftingOn() {return (this->ProcessLifting);}; 237 | 238 | /** 239 | ** Sets the size of the wavelet support for lifting (0-ring, 1-ring etc...). 240 | ** Note : 0<=Radius 241 | **/ 242 | void SetLiftingRadius(int Radius) {this->LiftingRadius=Radius;}; 243 | 244 | /** 245 | ** Returns the size of the wavelet support for lifting (0-ring, 1-ring etc...) 246 | **/ 247 | int GetLiftingRadius() {return (this->LiftingRadius);}; 248 | 249 | /** 250 | ** After calling this->SolveInverseProblem, this function returns the number of non merged faces 251 | ** Note : if the mesh was correctly simplified, the function must return 0 252 | **/ 253 | int GetRemainingFaces() {return (this->remaining_faces);}; 254 | 255 | /** 256 | ** Sets the arithmetic used for the wavelet decomposition. 257 | ** 0 : double arithmetics, 1 : integer arithmetics 258 | ** Note : for Compression, you must use integer arithmetics 259 | **/ 260 | void SetArithmeticType (int Type) {this->ArithmeticType=Type;}; 261 | 262 | /** 263 | ** Sets the arithmetic used for the wavelet decomposition. 264 | ** 0 : double arithmetics, 1 : integer arithmetics 265 | ** Note : for Compression, you must use integer arithmetics 266 | **/ 267 | int GetArithmeticType () {return (this->ArithmeticType);}; 268 | 269 | 270 | /** 271 | ** Sets the subdivision type : 272 | ** 0 : regular subdivision (Loop). 273 | ** 1 : irregular subdivision. 274 | ** Note : by default, the type is 0, but when calling this->Solve InverseProblem, it is automatically set to 1. 275 | **/ 276 | void SetSubdivisionType(int Type) {this->SubdivisionType=Type;}; 277 | 278 | /** 279 | ** Returns the subdivision type : 280 | ** 0 : regular subdivision . 281 | ** 1 : irregular subdivision. 282 | ** Note : by default, the type is 0, but when calling this->Solve InverseProblem, it is automatically set to 1. 283 | **/ 284 | int GetSubdivisionType() {return (this->SubdivisionType);}; 285 | 286 | 287 | /** 288 | ** Array used for storing the wavelets coefficients after calling this->Approximate(). 289 | ** Note : this array is used only when double arithmetic is used. 290 | **/ 291 | vtkDoubleArray *Wavelets; 292 | 293 | /** 294 | ** Array used for storing the wavelets coefficients after calling this->Approximate(). 295 | ** Note : this array is used only when integer arithmetic is used 296 | **/ 297 | vtkIntArray *IntegerWavelets; 298 | 299 | /** 300 | ** Subdivides this->SubdivisionInput mesh to this->SubdivisionOutput mesh. 301 | ** Note : it is also used for writing and reading data to file using the IOType parameter. 302 | **/ 303 | virtual void Subdivide(); 304 | 305 | /** 306 | ** Sets the direction of the file transfer before calling this->Execute() or this->Subdivide(): 307 | ** 0 : no file transfer (for compression, you have to do it once for each filter, to build the subdivided meshes) 308 | ** 1 : write to file 309 | ** 2 : read from file 310 | **/ 311 | void SetIOType(int Type) {this->IOType=Type;}; 312 | 313 | /** 314 | ** Returns the direction of the file transfer before calling this->Execute() or this->Subdivide(): 315 | ** 0 : no file transfer (for compression, you have to do it once for each filter, to build the subdivided meshes) 316 | ** 1 : write to file 317 | ** 2 : read from file 318 | **/ 319 | int GetIOType() {return (this->IOType);}; 320 | 321 | 322 | /** 323 | ** Returns the simplified mesh after calling this->SolveInverseProblem 324 | **/ 325 | vtkSurface *GetMergeOutput() {return (this->MergeOutput);}; 326 | 327 | /** 328 | ** Returns the mesh to be simplified 329 | **/ 330 | vtkSurface *GetMergeInput() {return (this->MergeInput);}; 331 | 332 | /** 333 | ** Sets the mesh to be simplified 334 | **/ 335 | void SetMergeInput(vtkSurface *Input) {this->MergeInput=Input;this->Modified();Input->Register(this);}; 336 | 337 | /** 338 | ** Sets an array of PointIds, used for vertices renumbering 339 | **/ 340 | void SetPointsIds(vtkIdList *PtIds) {this->PointsIds=PtIds;this->Modified();}; 341 | 342 | /** 343 | ** Sets the mesh to be subdivided 344 | **/ 345 | void SetInput(vtkSurface *input); 346 | 347 | /** 348 | ** Void function, written for vtkPolyDataToPolyDatafilter compatibility 349 | **/ 350 | vtkPolyData * GetInput(); 351 | 352 | /** 353 | ** Returns the mesh to be subdivided 354 | **/ 355 | vtkSurface * GetSubdivisionInput(){return (this->SubdivisionInput);}; 356 | 357 | /** 358 | ** Returns the result of the subdivision 359 | **/ 360 | vtkSurface * GetOutput() {return (this->SubdivisionOutput);}; 361 | 362 | /** 363 | ** Performs the geometrical approximation of M(j) to M(j-1). 364 | ** NOTE : must be called only after calling this->Subdivide or this->Execute. 365 | **/ 366 | void Approximate(); 367 | 368 | /** 369 | ** Performs the geometrical reconstruction of M(j) from M(j-1). 370 | ** NOTE : must be called only after calling this->Subdivide or this->Execute 371 | **/ 372 | void Reconstruct(); 373 | 374 | /** 375 | ** Do not use, this function is only made for research purpose.... 376 | **/ 377 | void DisplayWavelet(); 378 | void DisplayScalingFunction(); 379 | void ClearWavelets(); 380 | 381 | /** 382 | ** Sets wether the filter will use a geometrical criterion WGC. 383 | ** 0 : no WGC; 1: use WGC 384 | **/ 385 | void SetGeometryCriterion(int criterion) {this->GeometryCriterion=criterion;}; 386 | 387 | /** 388 | ** Sets the curvature threshold for the WGC. 389 | ** Note : 0CurvatureTreshold=treshold;}; 393 | 394 | /** 395 | ** Sets the Wavelet threshold for the WGC. 396 | ** Note : 0WaveletTreshold=treshold;}; 399 | 400 | void Orthogonalize (); 401 | 402 | void SetGeometryPrediction(int p) 403 | { this->GeometryPrediction=p;}; 404 | 405 | /** 406 | ** for compression purpose 407 | ** 408 | **/ 409 | void WriteCoefficients(); 410 | void ReadCoefficients(); 411 | 412 | vtkIdList *TreeFirstChildEdge; 413 | vtkIdList *TreeNextChildEdge; 414 | vtkIdList *TreeParentEdge; 415 | vtkIdList *EdgeMidPoints; 416 | 417 | //BTX 418 | std::vector edgesvector; 419 | std::vector faces; 420 | std::vector vertices; 421 | //ETX 422 | 423 | void InitTree(); 424 | void AddChildEdgeToTree(vtkIdType Child, vtkIdType Parent); 425 | 426 | void Subdivision(); 427 | 428 | void SaveWavelets(const char *Filename); 429 | 430 | 431 | protected: 432 | 433 | vtkWaveletSubdivisionFilter():FirstElement(0), LastElement(0) , 434 | FirstElementRegular(0),LastElementRegular(0){ 435 | this->SubdivisionType=0; 436 | this->ProcessLifting=0; 437 | this->LiftingRadius=0; 438 | this->Alpha=vtkSparseMatrix::New(); 439 | this->P=vtkSparseMatrix::New(); 440 | 441 | this->SubdivisionOutput=vtkSurface::New(); 442 | this->SubdivisionOutput->Register(this); 443 | this->SubdivisionOutput->Delete(); 444 | this->MergeOutput=vtkSurface::New(); 445 | this->MergeInput=0; 446 | this->SubdivisionInput=0; 447 | this->Wavelets=0; 448 | this->IntegerWavelets=0; 449 | this->IOType=0; 450 | this->ArithmeticType=0; 451 | this->EdgeMidPoints=vtkIdList::New(); 452 | this->IOStarted=0; 453 | this->GeometryCriterion=0; 454 | this->CurvatureTreshold=0; 455 | this->WaveletTreshold=0; 456 | this->CoordinatesCoupling=0; 457 | this->vlist=vtkIdList::New(); 458 | this->CellTypes=vtkIntArray::New(); 459 | this->DisplayEfficiency=0; 460 | this->GeometryPrediction=0; 461 | this->LiftNum=0; 462 | this->LiftDen=100; 463 | this->RegularSubdivisionFlag=0; 464 | this->ConnectivityOnly=0; 465 | this->TreeFirstChildEdge=vtkIdList::New(); 466 | this->TreeNextChildEdge=vtkIdList::New(); 467 | this->TreeParentEdge=vtkIdList::New(); 468 | this->ArithmeticCoder=0; 469 | this->FileType=0; 470 | }; 471 | 472 | ~vtkWaveletSubdivisionFilter() { 473 | this->Alpha->Delete(); 474 | this->P->Delete(); 475 | if (this->Wavelets) 476 | this->Wavelets->Delete(); 477 | if (this->IntegerWavelets) 478 | this->IntegerWavelets->Delete(); 479 | this->EdgeMidPoints->Delete(); 480 | this->TreeFirstChildEdge->Delete(); 481 | this->TreeNextChildEdge->Delete(); 482 | this->TreeParentEdge->Delete(); 483 | this->vlist->Delete(); 484 | this->CellTypes->Delete(); 485 | 486 | if (this->SubdivisionOutput) 487 | this->SubdivisionOutput->UnRegister(this); 488 | this->MergeOutput->UnRegister(this); 489 | if (this->MergeInput) 490 | this->MergeInput->UnRegister(this); 491 | }; 492 | 493 | vtkWaveletSubdivisionFilter(const vtkWaveletSubdivisionFilter&) {}; 494 | void operator=(const vtkWaveletSubdivisionFilter&) {}; 495 | 496 | 497 | void Execute() {}; 498 | 499 | vtkSurface *SubdivisionInput; 500 | vtkSurface *SubdivisionOutput; 501 | void EncodeMidpoint(int code); 502 | 503 | int DecodeMidpoint(); 504 | int IOStarted; 505 | 506 | 507 | private: 508 | 509 | void ComputeNewVertexCoordinates(vtkIdType p1,vtkIdType p2, double *V1); 510 | void ComputeVertexContribution(vtkIdType p1,vtkIdType p2, double *V1); 511 | void ComputeVertexContribution2(vtkIdType p1,vtkIdType p2, double *V1); 512 | 513 | void ConquerRegularSubdivisions(); 514 | void SolveInverseSubdivision4(vtkIdType initial_face); 515 | 516 | int CoordinatesCoupling; // if set to 1, the three coordinates will be encoded in the same context; 517 | 518 | vtkIdList *vlist; 519 | 520 | 521 | int FileType; //==0 : .iv 1 : .ply output 522 | int GeometryCriterion; 523 | double CurvatureTreshold; 524 | double WaveletTreshold; 525 | int SolveProcess; 526 | int ArithmeticType; //=0 si on utilise des flottants =1 pour arithmetique enti?e 527 | int SubdivisionType; //=0 si subdivision r?uli?e =1 si subdivision irr?uli?e 528 | 529 | int RegularSubdivisionFlag; 530 | 531 | 532 | int IOType; //=0 si on fait tout en m?oire, =1 pour ?rire sur le disque, 2 pour lire 533 | int ProcessLifting; //0: pas de lifting; 1:lifting classique; 2:lifting rapide 534 | int LiftingRadius; // Rayon du support des ondelettes 535 | vtkIdList *PointsIds; 536 | 537 | 538 | vtkSurface *MergeInput; 539 | vtkSurface *MergeOutput; 540 | 541 | vtkIntArray *CellTypes; 542 | 543 | contour_element *FirstElement; 544 | contour_element *LastElement; 545 | contour_element *FirstElementRegular; 546 | contour_element *LastElementRegular; 547 | void Merge1To1(vtkIdType v1,vtkIdType v2, vtkIdType v3, vtkIdType f1); 548 | void Merge2To1(vtkIdType v1,vtkIdType v2, vtkIdType v3, vtkIdType v4,vtkIdType f1,vtkIdType f2); 549 | void Merge3To1(vtkIdType v1,vtkIdType v2, vtkIdType v3, vtkIdType v4, vtkIdType v5,vtkIdType f1,vtkIdType f2,vtkIdType f3); 550 | 551 | void EncodeFaceSwap(int code,int pos); 552 | void EncodeEdgeSwap(int code,int pos); 553 | int DecodeFaceSwap(int pos); 554 | int DecodeEdgeSwap(int pos); 555 | 556 | 557 | 558 | 559 | int PossibleParent(vtkIdType v1); 560 | void ConquerEdge(vtkIdType v1,vtkIdType v2,vtkIdType & face,vtkIdType &vertex); 561 | int AddFace(vtkIdType v1,vtkIdType v2,vtkIdType v3,vtkIdType& edge1,vtkIdType& edge2,vtkIdType& edge3); 562 | void switchcontour(vtkIdType edge); 563 | void switchcontour2(vtkIdType edge); 564 | 565 | int MatchParents(vtkIdType v1,vtkIdType p1,vtkIdType p2,vtkIdType f1,vtkIdType f2,int incidentfaces); 566 | int MatchParents2(vtkIdType v1,vtkIdType p1,vtkIdType p2,vtkIdType f1,vtkIdType f2,int incidentfaces); 567 | void MergeAndSwap1(vtkIdType v1,vtkIdType v2, vtkIdType v3, vtkIdType v4,vtkIdType v5,vtkIdType f1,vtkIdType f2,vtkIdType f3); 568 | void MergeAndSwap2(vtkIdType v1,vtkIdType v2, vtkIdType v3, 569 | vtkIdType v4,vtkIdType v5,vtkIdType v6,vtkIdType f1,vtkIdType f2,vtkIdType f3, vtkIdType f4); 570 | vtkIdType GetEdgeMidPoint(vtkIdType v1,vtkIdType v2); 571 | int IsFaceSwitch(vtkIdType v1,vtkIdType v2,vtkIdType v3); 572 | vtkIdType GetEdgeSwap(vtkIdType v1,vtkIdType v2,vtkIdType v3); 573 | void MakeInMatrixWeighted(vtkSurface *ptr,vtkSparseMatrix *In); 574 | void MakeInMatrixUnweighted(vtkSurface *ptr, vtkSparseMatrix *In); 575 | void MakePMatrix(vtkSurface *ptr,vtkSurface *ptr2); 576 | 577 | void ComputeFastLiftingCoeff(); 578 | 579 | }; 580 | 581 | #endif 582 | -------------------------------------------------------------------------------- /Compression/wavemesh.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Wavemesh : a progressive lossless compression scheme for 3D triagular meshes 4 | Module: wavemesh.cxx 5 | Language: C++ 6 | Date: 2008/08 7 | Auteur: Sebastien Valette 8 | This software is governed by the GPL license (see License.txt) 9 | =========================================================================*/ 10 | // .NAME wavemesh 11 | // .SECTION Description 12 | 13 | #include "vtkMultiresolutionIO.h" 14 | 15 | int main( int argc, char *argv[] ) 16 | { 17 | cout << "Wavemesh, a wavelet based 3D mesh compression"<SetDisplay(Display); 63 | cout<<"Display="<SetArithmeticType(Arithmetics); 71 | } 72 | 73 | if (strcmp(argv[ArgumentsIndex],"-q")==0) 74 | { 75 | int Quantization=atoi(argv[ArgumentsIndex+1]); 76 | cout<<"Coordinates Quantization :"<SetQuantization(Quantization); 78 | } 79 | 80 | if (strcmp(argv[ArgumentsIndex],"-b")==0) 81 | { 82 | int NumberOfBitPlanes=atoi(argv[ArgumentsIndex+1]); 83 | cout<<"Number Of BitPlanes :"<SetNumberOfBitPlanes(NumberOfBitPlanes); 85 | } 86 | 87 | if (strcmp(argv[ArgumentsIndex],"-l")==0) 88 | { 89 | int Lifting=atoi(argv[ArgumentsIndex+1]); 90 | if (Lifting==-1) 91 | { 92 | cout<<"Lifting scheme deactivated"<SetLifting(0); 94 | } 95 | else 96 | { 97 | MIO->SetLifting(1); 98 | MIO->SetLiftingRadius(Lifting); 99 | cout<<"Lifting radius : "<SetGeometricalConstraint(Geometry); 108 | } 109 | 110 | if (strcmp(argv[ArgumentsIndex],"-et")==0) 111 | { 112 | double Threshold=atof(argv[ArgumentsIndex+1]); 113 | cout<<"Edge angle threshold :"<SetEdgeAngleThreshold(Threshold); 115 | } 116 | 117 | if (strcmp(argv[ArgumentsIndex],"-wt")==0) 118 | { 119 | double Threshold=atof(argv[ArgumentsIndex+1]); 120 | cout<<"Wavelet ratio threshold :"<SetWGC(Threshold); 122 | } 123 | 124 | if (strcmp(argv[ArgumentsIndex],"-o")==0) 125 | { 126 | cout<<"Output File : "<SetFileName(argv[ArgumentsIndex+1]); 128 | } 129 | ArgumentsIndex+=2; 130 | } 131 | 132 | if (strcmp(argv[1],"c")==0) 133 | { 134 | vtkSurface *Mesh = vtkSurface::New(); 135 | cout<<"Load : "<CreateFromFile(argv[2]); 137 | Mesh->DisplayMeshProperties(); 138 | 139 | if (Arithmetics==1) 140 | Mesh->QuantizeCoordinates(MIO->GetQuantization()); 141 | 142 | MIO->SetInput(Mesh); 143 | 144 | MIO->Analyse(); 145 | MIO->Synthetize(); 146 | MIO->Approximate(); 147 | MIO->Write(); 148 | Mesh->Delete(); 149 | } 150 | else 151 | { 152 | MIO->SetFileName(argv[2]); 153 | MIO->Read(); 154 | } 155 | 156 | MIO->Delete(); 157 | } 158 | 159 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /RangeCoding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | INCLUDE_DIRECTORIES( 3 | ${VTK_INCLUDE_DIR} 4 | ) 5 | 6 | # -------------------------------------------------------------------------- 7 | # Library compilation 8 | ADD_LIBRARY(vtkRangeCoding 9 | QuasiStaticModel.cxx 10 | RangeDecoder.cxx 11 | RangeEncoder.cxx 12 | vtkArithmeticCoderBase.cxx 13 | ) 14 | 15 | TARGET_LINK_LIBRARIES(vtkRangeCoding ${VTK_LIBRARIES}) 16 | 17 | -------------------------------------------------------------------------------- /RangeCoding/QuasiStaticModel.cxx: -------------------------------------------------------------------------------- 1 | /* 2 | qsmodel.c headerfile for quasistatic probability model 3 | 4 | (c) Michael Schindler 5 | 1997, 1998, 2000 6 | http://www.compressconsult.com/ 7 | michael@compressconsult.com 8 | 9 | This program is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation; either version 2 of the License, or 12 | (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. It may be that this 18 | program violates local patents in your country, however it is 19 | belived (NO WARRANTY!) to be patent-free here in Austria. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, 24 | MA 02111-1307, USA. 25 | 26 | Qsmodel is a quasistatic probability model that periodically 27 | (at chooseable intervals) updates probabilities of symbols; 28 | it also allows to initialize probabilities. Updating is done more 29 | frequent in the beginning, so it adapts very fast even without 30 | initialisation. 31 | 32 | it provides function for creation, deletion, query for probabilities 33 | and symbols and model updating. 34 | 35 | for usage see example.c 36 | */ 37 | #include "QuasiStaticModel.h" 38 | 39 | /* default tablesize 1<nextleft) /* we have some more before actual rescaling */ 47 | { 48 | this->incr++; 49 | this->left = this->nextleft; 50 | this->nextleft = 0; 51 | return; 52 | } 53 | 54 | if (this->rescale < this->targetrescale) /* double rescale interval if needed */ 55 | { 56 | this->rescale <<= 1; 57 | if (this->rescale > this->targetrescale) 58 | this->rescale = this->targetrescale; 59 | } 60 | 61 | cf = missing = this->cf[this->n]; /* do actual rescaling */ 62 | 63 | for (i=this->n-1; i; i--) 64 | { 65 | int tmp = this->newf[i]; 66 | cf -= tmp; 67 | this->cf[i] = cf; 68 | tmp = tmp>>1 | 1; 69 | missing -= tmp; 70 | this->newf[i] = tmp; 71 | } 72 | 73 | if (cf!=this->newf[0]) 74 | { 75 | this->deleteqsmodel(); 76 | std::cout<<"BUG: rescaling left %d total frequency"<newf[0] = this->newf[0]>>1 | 1; 80 | missing -= this->newf[0]; 81 | this->incr = missing / this->rescale; 82 | this->nextleft = missing % this->rescale; 83 | this->left = this->rescale - this->nextleft; 84 | if (this->search != NULL) 85 | { 86 | i=this->n; 87 | while (i) 88 | { int start, end; 89 | end = (this->cf[i]-1) >> this->searchshift; 90 | i--; 91 | start = this->cf[i] >> this->searchshift; 92 | while (start<=end) 93 | { 94 | this->search[start] = i; 95 | start++; 96 | } 97 | } 98 | } 99 | } 100 | 101 | /* initialisation of qsmodel */ 102 | /* m qsmodel to be initialized */ 103 | /* n number of symbols in that model */ 104 | /* lg_totf base2 log of total frequency count */ 105 | /* rescale desired rescaling interval, should be < 1<<(lg_totf+1) */ 106 | /* init array of int's to be used for initialisation (NULL ok) */ 107 | /* compress set to 1 on compression, 0 on decompression */ 108 | void qsmodel::initqsmodel(int n, int lg_totf, int rescale, int *init, int compress ) 109 | { 110 | this->deleteqsmodel(); 111 | this->n = n; 112 | this->targetrescale = rescale; 113 | this->searchshift = lg_totf - TBLSHIFT; 114 | if (this->searchshift < 0) 115 | this->searchshift = 0; 116 | 117 | this->cf = new uint2[n+1];//malloc(test); 118 | this->newf = new int[n+1]; //)*sizeof(uint2)); 119 | this->cf[n] = 1<cf[0] = 0; 121 | if (compress) 122 | this->search = NULL; 123 | else 124 | { 125 | this->search = new int[(1<search[1<resetqsmodel(init); 129 | } 130 | 131 | /* reinitialisation of qsmodel */ 132 | /* m qsmodel to be initialized */ 133 | /* init array of int's to be used for initialisation (NULL ok) */ 134 | void qsmodel::resetqsmodel(int *init) 135 | { 136 | int i, end, initval; 137 | this->rescale = this->n>>4 | 2; 138 | this->nextleft = 0; 139 | if (init == NULL) 140 | { 141 | initval = this->cf[this->n] / this->n; 142 | end = this->cf[this->n] % this->n; 143 | for (i=0; inewf[i] = initval+1; 145 | for (; in; i++) 146 | this->newf[i] = initval; 147 | } 148 | else 149 | for(i=0; in; i++) 150 | this->newf[i] = init[i]; 151 | this->dorescale(); 152 | } 153 | 154 | /* deletion of qsmodel m */ 155 | void qsmodel::deleteqsmodel() 156 | { 157 | if (this->cf==0) 158 | return; 159 | 160 | delete [] this->cf; 161 | delete [] this->newf; 162 | if (this->search != NULL) 163 | delete [] this->search; 164 | } 165 | 166 | /* retrieval of estimated frequencies for a symbol */ 167 | /* m qsmodel to be questioned */ 168 | /* sym symbol for which data is desired; must be cf[sym+1] - (*lt_f = this->cf[sym]); 175 | } 176 | 177 | /* find out symbol for a given cumulative frequency */ 178 | /* m qsmodel to be questioned */ 179 | /* lt_f cumulative frequency */ 180 | int qsmodel::qsgetsym(int lt_f ) 181 | { 182 | int lo, hi; 183 | int *tmp; 184 | tmp = &this->search[(lt_f>>this->searchshift)]; 185 | lo = *tmp; 186 | hi = *(tmp+1) + 1; 187 | while (lo+1 < hi ) 188 | { 189 | int mid = (lo+hi)>>1; 190 | if (lt_f < this->cf[mid]) 191 | hi = mid; 192 | else 193 | lo = mid; 194 | } 195 | return lo; 196 | } 197 | 198 | /* update model */ 199 | /* m qsmodel to be updated */ 200 | /* sym symbol that occurred (must be left <= 0) 204 | dorescale(); 205 | this->left--; 206 | this->newf[sym] += this->incr; 207 | } 208 | 209 | qsmodel::qsmodel() 210 | { 211 | this->cf=0; 212 | } 213 | 214 | qsmodel::~qsmodel() 215 | { 216 | this->deleteqsmodel(); 217 | } 218 | 219 | -------------------------------------------------------------------------------- /RangeCoding/QuasiStaticModel.h: -------------------------------------------------------------------------------- 1 | /* 2 | qsmodel.h headerfile for quasistatic probability model 3 | 4 | (c) Michael Schindler 5 | 1997, 1998, 2000 6 | http://www.compressconsult.com/ 7 | michael@compressconsult.com 8 | 9 | c++ port by Sebastien Valette 10 | 11 | This program is free software; you can redistribute it and/or modify 12 | it under the terms of the GNU General Public License as published by 13 | the Free Software Foundation; either version 2 of the License, or 14 | (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | GNU General Public License for more details. It may be that this 20 | program violates local patents in your country, however it is 21 | belived (NO WARRANTY!) to be patent-free here in Austria. 22 | 23 | You should have received a copy of the GNU General Public License 24 | along with this program; if not, write to the Free Software 25 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, 26 | MA 02111-1307, USA. 27 | 28 | Qsmodel is a quasistatic probability model that periodically 29 | (at chooseable intervals) updates probabilities of symbols; 30 | it also allows to initialize probabilities. Updating is done more 31 | frequent in the beginning, so it adapts very fast even without 32 | initialisation. 33 | 34 | it provides function for creation, deletion, query for probabilities 35 | and symbols and model updating. 36 | 37 | */ 38 | 39 | #ifndef QUASISTATICMODEL_H 40 | #define QUASISTATICMODEL_H 41 | #include 42 | 43 | #include "port.h" 44 | #include 45 | 46 | class VTK_EXPORT qsmodel 47 | { 48 | public: 49 | 50 | /* initialisation of qsmodel */ 51 | /* m qsmodel to be initialized */ 52 | /* n number of symbols in that model */ 53 | /* lg_totf base2 log of total frequency count */ 54 | /* rescale desired rescaling interval, should be < 1<<(lg_totf+1) */ 55 | /* init array of int's to be used for initialisation (NULL ok) */ 56 | /* compress set to 1 on compression, 0 on decompression */ 57 | void initqsmodel(int n, int lg_totf, int rescale, 58 | int *init, int compress ); 59 | 60 | /* reinitialisation of qsmodel */ 61 | /* m qsmodel to be initialized */ 62 | /* init array of int's to be used for initialisation (NULL ok) */ 63 | void resetqsmodel(int *init); 64 | 65 | /* retrieval of estimated frequencies for a symbol */ 66 | /* m qsmodel to be questioned */ 67 | /* sym symbol for which data is desired; must be > 8) 87 | 88 | unsigned char rangedecoder::inbyte() 89 | { 90 | unsigned char TempChar; 91 | this->InputFile.read((char*) &TempChar,sizeof (char)); 92 | return (TempChar); 93 | } 94 | 95 | 96 | void rangedecoder::open_file(const char* file) 97 | { 98 | this->InputFile.open (file, std::ofstream::in|std::ios::binary); 99 | } 100 | void rangedecoder::close_file() 101 | { 102 | this->InputFile.close(); 103 | }; 104 | 105 | /* Start the decoder */ 106 | /* rc is the range coder to be used */ 107 | /* returns the char from start_encoding or EOF */ 108 | int rangedecoder::start_decoding() 109 | { 110 | char c=this->inbyte(); 111 | if (c==EOF) 112 | return EOF; 113 | this->buffer = this->inbyte(); 114 | this->low = this->buffer >> (8-EXTRA_BITS); 115 | this->range = (code_value)1 << EXTRA_BITS; 116 | return c; 117 | } 118 | 119 | 120 | void rangedecoder::dec_normalize() 121 | { 122 | while (this->range <= Bottom_value) 123 | { 124 | this->low = (this->low<<8) | ((this->buffer<buffer = this->inbyte(); 126 | this->low |= this->buffer >> (8-EXTRA_BITS); 127 | this->range <<= 8; 128 | } 129 | } 130 | 131 | /* Calculate culmulative frequency for next symbol. Does NO update!*/ 132 | /* rc is the range coder to be used */ 133 | /* tot_f is the total frequency */ 134 | /* or: totf is (code_value)1<dec_normalize(); 140 | this->help = this->range/tot_f; 141 | tmp = this->low/this->help; 142 | #ifdef EXTRAFAST 143 | return tmp; 144 | #else 145 | return (tmp>=tot_f ? tot_f-1 : tmp); 146 | #endif 147 | } 148 | 149 | freq rangedecoder::decode_culshift(freq shift ) 150 | { 151 | freq tmp; 152 | this->dec_normalize(); 153 | this->help = this->range>>shift; 154 | tmp = this->low/this->help; 155 | #ifdef EXTRAFAST 156 | return tmp; 157 | #else 158 | return (tmp>>shift ? ((code_value)1<help * lt_f; 172 | this->low -= tmp; 173 | #ifdef EXTRAFAST 174 | this->range = this->help * sy_f; 175 | #else 176 | if (lt_f + sy_f < tot_f) 177 | this->range = this->help * sy_f; 178 | else 179 | this->range -= tmp; 180 | #endif 181 | } 182 | 183 | 184 | /* Decode a byte/short without modelling */ 185 | /* rc is the range coder to be used */ 186 | unsigned char rangedecoder::decode_byte() 187 | { 188 | unsigned char tmp = this->decode_culshift(8); 189 | this->decode_update(1,tmp,(freq)1<<8); 190 | return tmp; 191 | } 192 | 193 | unsigned short rangedecoder::decode_short() 194 | { 195 | unsigned short tmp = this->decode_culshift(16); 196 | this->decode_update(1,tmp,(freq)1<<16); 197 | return tmp; 198 | } 199 | 200 | 201 | /* Finish decoding */ 202 | /* rc is the range coder to be used */ 203 | void rangedecoder::done_decoding() 204 | { 205 | this->dec_normalize(); /* normalize to use up all bytes */ 206 | } 207 | -------------------------------------------------------------------------------- /RangeCoding/RangeDecoder.h: -------------------------------------------------------------------------------- 1 | #ifndef rangedecod_h 2 | #define rangedecod_h 3 | 4 | /* 5 | rangedecoder.h headerfile for range encoding 6 | 7 | (c) Michael Schindler 8 | 1997, 1998, 1999, 2000 9 | http://www.compressconsult.com/ 10 | michael@compressconsult.com 11 | 12 | C++ port by Sebastien Valette 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. It may be that this 23 | program violates local patents in your country, however it is 24 | belived (NO WARRANTY!) to be patent-free here in Austria. Glen 25 | Langdon also confirmed my poinion that IBM UK did not protect that 26 | method. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program; if not, write to the Free Software 30 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, 31 | MA 02111-1307, USA. 32 | 33 | Range encoding is based on an article by G.N.N. Martin, submitted 34 | March 1979 and presented on the Video & Data Recording Conference, 35 | Southampton, July 24-27, 1979. If anyone can name the original 36 | copyright holder of that article please contact me; this might 37 | allow me to make that article available on the net for general 38 | public. 39 | 40 | Range coding is closely related to arithmetic coding, except that 41 | it does renormalisation in larger units than bits and is thus 42 | faster. An earlier version of this code was distributed as byte 43 | oriented arithmetic coding, but then I had no knowledge of Martin's 44 | paper from 1979. 45 | 46 | The input and output is done by the INBYTE and OUTBYTE macros 47 | defined in the .c file; change them as needed; the first parameter 48 | passed to them is a pointer to the rangecoder structure; extend that 49 | structure as needed (and don't forget to initialize the values in 50 | start_encoding resp. start_decoding). This distribution writes to 51 | stdout and reads from stdin. 52 | 53 | There are no global or static var's, so if the IO is thread save the 54 | whole rangecoder is - unless GLOBALRANGECODER in rangecod.h is defined. 55 | 56 | For error recovery the last 3 bytes written contain the total number 57 | of bytes written since starting the encoder. This can be used to 58 | locate the beginning of a block if you have only the end. 59 | */ 60 | #include 61 | #include 62 | #include 63 | #include "port.h" 64 | 65 | extern char coderversion[]; 66 | 67 | typedef uint4 code_value; /* Type of a rangecode value */ 68 | /* must accomodate 32 bits */ 69 | /* it is highly recommended that the total frequency count is less */ 70 | /* than 1 << 19 to minimize rounding effects. */ 71 | /* the total frequency count MUST be less than 1<<23 */ 72 | 73 | typedef uint4 freq; 74 | 75 | class VTK_EXPORT rangedecoder 76 | { 77 | public: 78 | 79 | // open a file for coding 80 | void open_file(const char* file); 81 | 82 | // close the opened file 83 | void close_file(); 84 | 85 | /* Start the decoder */ 86 | /* rc is the range coder to be used */ 87 | /* returns the char from start_encoding or EOF */ 88 | int start_decoding(); 89 | 90 | /* Calculate culmulative frequency for next symbol. Does NO update!*/ 91 | /* rc is the range coder to be used */ 92 | /* tot_f is the total frequency */ 93 | /* or: totf is 1<decode_update((freq)(f1),(freq)(f2),(freq)1<<(f3));}; 106 | 107 | /* Decode a byte/short without modelling */ 108 | /* rc is the range coder to be used */ 109 | unsigned char decode_byte(); 110 | unsigned short decode_short(); 111 | 112 | 113 | /* Finish decoding */ 114 | /* rc is the range coder to be used */ 115 | void done_decoding(); 116 | 117 | rangedecoder(){}; 118 | virtual ~rangedecoder(){}; 119 | 120 | protected: 121 | 122 | // this method is virtual so that class derivation allows other IO types 123 | virtual unsigned char inbyte(); 124 | 125 | private: 126 | uint4 low; /* low end of interval */ 127 | uint4 range; /* length of interval */ 128 | uint4 help; /* bytes_to_follow resp. intermediate value */ 129 | unsigned char buffer;/* buffer for input/output */ 130 | 131 | std::fstream InputFile; 132 | 133 | void dec_normalize(); 134 | 135 | }; 136 | #endif 137 | -------------------------------------------------------------------------------- /RangeCoding/RangeDecoder2.h: -------------------------------------------------------------------------------- 1 | #ifndef rangedecod2_h 2 | #define rangedecod2_h 3 | 4 | #include "RangeDecoder.h" 5 | 6 | class VTK_EXPORT RangeDecoderHook 7 | { 8 | public: 9 | virtual void ByteRead(){}; 10 | 11 | RangeDecoderHook(){}; 12 | ~RangeDecoderHook(){}; 13 | }; 14 | 15 | class rangedecoder2 : public rangedecoder 16 | { 17 | public: 18 | 19 | void SetHook(RangeDecoderHook *Hook) 20 | { 21 | this->Hook=Hook; 22 | } 23 | 24 | rangedecoder2() 25 | { 26 | this->Hook=0; 27 | }; 28 | 29 | ~rangedecoder2(){}; 30 | 31 | protected: 32 | 33 | virtual unsigned char inbyte() 34 | { 35 | if (this->Hook) 36 | this->Hook->ByteRead(); 37 | 38 | return this->rangedecoder::inbyte(); 39 | }; 40 | 41 | RangeDecoderHook *Hook; 42 | }; 43 | #endif 44 | -------------------------------------------------------------------------------- /RangeCoding/RangeEncoder.cxx: -------------------------------------------------------------------------------- 1 | /* 2 | rangecod.c range encoding 3 | 4 | (c) Michael Schindler 5 | 1997, 1998, 1999, 2000 6 | http://www.compressconsult.com/ 7 | michael@compressconsult.com 8 | 9 | C++ port by Sebastien Valette 10 | 11 | This program is free software; you can redistribute it and/or modify 12 | it under the terms of the GNU General Public License as published by 13 | the Free Software Foundation; either version 2 of the License, or 14 | (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | GNU General Public License for more details. It may be that this 20 | program violates local patents in your country, however it is 21 | belived (NO WARRANTY!) to be patent-free. Glen Langdon also 22 | confirmed my poinion that IBM UK did not protect that method. 23 | 24 | 25 | You should have received a copy of the GNU General Public License 26 | along with this program; if not, write to the Free Software 27 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, 28 | MA 02111-1307, USA. 29 | 30 | Range encoding is based on an article by G.N.N. Martin, submitted 31 | March 1979 and presented on the Video & Data Recording Conference, 32 | Southampton, July 24-27, 1979. If anyone can name the original 33 | copyright holder of that article please contact me; this might 34 | allow me to make that article available on the net for general 35 | public. 36 | 37 | Range coding is closely related to arithmetic coding, except that 38 | it does renormalisation in larger units than bits and is thus 39 | faster. An earlier version of this code was distributed as byte 40 | oriented arithmetic coding, but then I had no knowledge of Martin's 41 | paper from 1997. 42 | 43 | The input and output is done by the inbyte and outbyte macros 44 | defined in the .c file; change them as needed; the first parameter 45 | passed to them is a pointer to the rangeencoder structure; extend that 46 | structure as needed (and don't forget to initialize the values in 47 | start_encoding resp. start_decoding). This distribution writes to 48 | stdout and reads from stdin. 49 | 50 | There are no global or static var's, so if the IO is thread save the 51 | whole rangeencoder is - unless GLOBALRANGECODER in rangecod.h is defined. 52 | 53 | For error recovery the last 3 bytes written contain the total number 54 | of bytes written since starting the encoder. This can be used to 55 | locate the beginning of a block if you have only the end. The header 56 | size you pass to initrangecoder is included in that count. 57 | 58 | There is a supplementary file called renorm95.c available at the 59 | website (www.compressconsult.com/rangecoder/) that changes the range 60 | coder to an arithmetic coder for speed comparisons. 61 | 62 | define RENORM95 if you want the arithmetic coder type renormalisation. 63 | Requires renorm95.c 64 | Note that the old version does not write out the bytes since init. 65 | you should not define GLOBALRANGECODER then. This Flag is provided 66 | only for spped comparisons between both renormalizations, see my 67 | data compression conference article 1998 for details. 68 | */ 69 | /* #define RENORM95 */ 70 | 71 | /* 72 | define NOWARN if you do not expect more than 2^32 outstanding bytes 73 | since I recommend restarting the coder in intervals of less than 74 | 2^23 symbols for error tolerance this is not expected 75 | */ 76 | #define NOWARN 77 | 78 | /* 79 | define EXTRAFAST for increased speed; you loose compression and 80 | compatibility in exchange. 81 | */ 82 | /* #define EXTRAFAST */ 83 | 84 | #include "port.h" 85 | #include "RangeEncoder.h" 86 | 87 | /* SIZE OF RANGE ENCODING CODE VALUES. */ 88 | 89 | #define CODE_BITS 32 90 | #define Top_value ((code_value)1 << (CODE_BITS-1)) 91 | 92 | 93 | #define SHIFT_BITS (CODE_BITS - 9) 94 | #define EXTRA_BITS ((CODE_BITS-2) % 8 + 1) 95 | #define Bottom_value (Top_value >> 8) 96 | 97 | #ifdef NOWARN 98 | char coderversion[]="rangecoder 1.3 NOWARN (c) 1997-2000 Michael Schindler"; 99 | #else 100 | char coderversion[]="rangecoder 1.3 (c) 1997-2000 Michael Schindler"; 101 | #endif 102 | 103 | void rangeencoder::outbyte(unsigned char a) 104 | { 105 | unsigned char TempChar=a; 106 | this->OutputFile.write((char*)&TempChar, sizeof (char)); 107 | } 108 | 109 | void rangeencoder::open_file(const char* file) 110 | { 111 | this->OutputFile.open (file, std::ofstream::out | std::ofstream::trunc|std::ios::binary); 112 | } 113 | void rangeencoder::close_file() 114 | { 115 | this->OutputFile.close(); 116 | }; 117 | 118 | /* rc is the range coder to be used */ 119 | /* c is written as first byte in the datastream */ 120 | /* one could do without c, but then you have an additional if */ 121 | /* per outputbyte. */ 122 | void rangeencoder::start_encoding(char c, int initlength ) 123 | { 124 | this->low = 0; /* Full code range */ 125 | this->range = Top_value; 126 | this->buffer = c; 127 | this->help = 0; /* No bytes to follow */ 128 | this->bytecount = initlength; 129 | } 130 | 131 | /* I do the normalization before I need a defined state instead of */ 132 | /* after messing it up. This simplifies starting and ending. */ 133 | void rangeencoder::enc_normalize() 134 | { 135 | while(this->range <= Bottom_value) /* do we need renormalisation? */ 136 | { 137 | if (this->low < (code_value)0xff< output */ 138 | { outbyte(this->buffer); 139 | for(; this->help; this->help--) 140 | this->outbyte(0xff); 141 | this->buffer = (unsigned char)(this->low >> SHIFT_BITS); 142 | } 143 | else if (this->low & Top_value) /* carry now, no future carry */ 144 | { this->outbyte(this->buffer+1); 145 | for(; this->help; this->help--) 146 | this->outbyte(0); 147 | this->buffer = (unsigned char)(this->low >> SHIFT_BITS); 148 | } else /* passes on a potential carry */ 149 | #ifdef NOWARN 150 | this->help++; 151 | #else 152 | if (this->bytestofollow++ == 0xffffffffL) 153 | { 154 | cerr<<"Too many bytes outstanding - File too large"<range <<= 8; 159 | this->low = (this->low<<8) & (Top_value-1); 160 | this->bytecount++; 161 | } 162 | } 163 | 164 | /* Encode a symbol using frequencies */ 165 | /* rc is the range coder to be used */ 166 | /* sy_f is the interval length (frequency of the symbol) */ 167 | /* lt_f is the lower end (frequency sum of < symbols) */ 168 | /* tot_f is the total interval length (total frequency sum) */ 169 | /* or (faster): tot_f = (code_value)1<enc_normalize(); 174 | r = this->range / tot_f; 175 | tmp = r * lt_f; 176 | this->low += tmp; 177 | #ifdef EXTRAFAST 178 | this->range = r * sy_f; 179 | #else 180 | if (lt_f+sy_f < tot_f) 181 | this->range = r * sy_f; 182 | else 183 | this->range -= tmp; 184 | #endif 185 | } 186 | 187 | void rangeencoder::encode_shift(freq sy_f, freq lt_f, freq shift ) 188 | { 189 | code_value r, tmp; 190 | this->enc_normalize(); 191 | r = this->range >> shift; 192 | tmp = r * lt_f; 193 | this->low += tmp; 194 | #ifdef EXTRAFAST 195 | this->range = r * sy_f; 196 | #else 197 | if ((lt_f+sy_f) >> shift) 198 | this->range -= tmp; 199 | else 200 | this->range = r * sy_f; 201 | #endif 202 | } 203 | 204 | /* Finish encoding */ 205 | /* rc is the range coder to be used */ 206 | /* actually not that many bytes need to be output, but who */ 207 | /* cares. I output them because decode will read them :) */ 208 | /* the return value is the number of bytes written */ 209 | uint4 rangeencoder::done_encoding() 210 | { 211 | uint tmp; 212 | this->enc_normalize(); /* now we have a normalized state */ 213 | this->bytecount += 5; 214 | if ((this->low & (Bottom_value-1)) < ((this->bytecount&0xffffffL)>>1)) 215 | tmp = this->low >> SHIFT_BITS; 216 | else 217 | tmp = (this->low >> SHIFT_BITS) + 1; 218 | if (tmp > 0xff) /* we have a carry */ 219 | { this->outbyte(this->buffer+1); 220 | for(; this->help; this->help--) 221 | this->outbyte(0); 222 | } else /* no carry */ 223 | { this->outbyte(this->buffer); 224 | for(; this->help; this->help--) 225 | this->outbyte(0xff); 226 | } 227 | this->outbyte((tmp & 0xff)); 228 | this->outbyte((this->bytecount>>16) & 0xff); 229 | this->outbyte((this->bytecount>>8) & 0xff); 230 | this->outbyte(this->bytecount & 0xff); 231 | return this->bytecount; 232 | } 233 | -------------------------------------------------------------------------------- /RangeCoding/RangeEncoder.h: -------------------------------------------------------------------------------- 1 | #ifndef rangecod_h 2 | #define rangecod_h 3 | 4 | /* 5 | rangecod.h headerfile for range encoding 6 | 7 | (c) Michael Schindler 8 | 1997, 1998, 1999, 2000 9 | http://www.compressconsult.com/ 10 | michael@compressconsult.com 11 | 12 | C++ port by Sebastien Valette 13 | 14 | This program is free software; you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation; either version 2 of the License, or 17 | (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. It may be that this 23 | program violates local patents in your country, however it is 24 | belived (NO WARRANTY!) to be patent-free here in Austria. Glen 25 | Langdon also confirmed my poinion that IBM UK did not protect that 26 | method. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program; if not, write to the Free Software 30 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, 31 | MA 02111-1307, USA. 32 | 33 | Range encoding is based on an article by G.N.N. Martin, submitted 34 | March 1979 and presented on the Video & Data Recording Conference, 35 | Southampton, July 24-27, 1979. If anyone can name the original 36 | copyright holder of that article please contact me; this might 37 | allow me to make that article available on the net for general 38 | public. 39 | 40 | Range coding is closely related to arithmetic coding, except that 41 | it does renormalisation in larger units than bits and is thus 42 | faster. An earlier version of this code was distributed as byte 43 | oriented arithmetic coding, but then I had no knowledge of Martin's 44 | paper from 1979. 45 | 46 | The input and output is done by the INBYTE and OUTBYTE macros 47 | defined in the .c file; change them as needed; the first parameter 48 | passed to them is a pointer to the rangecoder structure; extend that 49 | structure as needed (and don't forget to initialize the values in 50 | start_encoding resp. start_decoding). This distribution writes to 51 | stdout and reads from stdin. 52 | 53 | There are no global or static var's, so if the IO is thread save the 54 | whole rangecoder is - unless GLOBALRANGECODER in rangecod.h is defined. 55 | 56 | For error recovery the last 3 bytes written contain the total number 57 | of bytes written since starting the encoder. This can be used to 58 | locate the beginning of a block if you have only the end. 59 | */ 60 | #include 61 | #include 62 | #include 63 | #include "port.h" 64 | 65 | extern char coderversion[]; 66 | 67 | typedef uint4 code_value; /* Type of an rangecode value */ 68 | /* must accomodate 32 bits */ 69 | /* it is highly recommended that the total frequency count is less */ 70 | /* than 1 << 19 to minimize rounding effects. */ 71 | /* the total frequency count MUST be less than 1<<23 */ 72 | 73 | typedef uint4 freq; 74 | 75 | /* make the following private in the arithcoder object in C++ */ 76 | 77 | class VTK_EXPORT rangeencoder 78 | { 79 | public: 80 | // open a file for coding 81 | void open_file(const char* file); 82 | 83 | // close the opened file 84 | void close_file(); 85 | 86 | /* Start the encoder */ 87 | /* rc is the range coder to be used */ 88 | /* c is written as first byte in the datastream (header,...) */ 89 | void start_encoding(char c, int initlength); 90 | 91 | /* Finish encoding */ 92 | /* rc is the range coder to be shut down */ 93 | /* returns number of bytes written */ 94 | uint4 done_encoding(); 95 | 96 | /* Encode a symbol using frequencies */ 97 | /* rc is the range coder to be used */ 98 | /* sy_f is the interval length (frequency of the symbol) */ 99 | /* lt_f is the lower end (frequency sum of < symbols) */ 100 | /* tot_f is the total interval length (total frequency sum) */ 101 | /* or (a lot faster): tot_f = 1< 4 | 5 | #ifdef GCC 6 | #define Inline inline 7 | #else 8 | #define Inline __inline 9 | #endif 10 | 11 | #if INT_MAX > 0x7FFF 12 | typedef unsigned short uint2; /* two-byte integer (large arrays) */ 13 | typedef unsigned int uint4; /* four-byte integers (range needed) */ 14 | #else 15 | typedef unsigned int uint2; 16 | typedef unsigned long uint4; 17 | #endif 18 | 19 | typedef unsigned int uint; /* fast unsigned integer, 2 or 4 bytes */ 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /RangeCoding/vtkArithmeticCoderBase.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valette/Wavemesh/451c9f8a564655a8e94a506a66fd2f41fd502267/RangeCoding/vtkArithmeticCoderBase.cxx -------------------------------------------------------------------------------- /RangeCoding/vtkArithmeticCoderBase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valette/Wavemesh/451c9f8a564655a8e94a506a66fd2f41fd502267/RangeCoding/vtkArithmeticCoderBase.h -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | Wavemesh 2 | ======== 3 |

4 | 5 |

6 | 7 | ### References ### 8 | This code is the implementation deriving from those papers: 9 | 10 | [VALE-04a] Valette S., Prost R., "Wavelet Based Multiresolution Analysis of Irregular Surface Meshes", IEEE Trans Visu Comp Grap, vol. 10, no. 2, pp. 113-122, 2004 . 11 | 12 | [VALE-99a] Valette S., Kim Y S., Jung H Y., Magnin I E., Prost R., "A multiresolution wavelet scheme for irregularly subdivided 3D triangular mesh", IEEE International Conference on Image Processing ICIP'99, vol. 1, Kobe, Japan, pp. 171-174, 1999. 13 | 14 | [VALE-04d] Valette S., Prost R., "A Wavelet-Based Progressive Compression Scheme For Triangle Meshes : Wavemesh", IEEE Trans Visu Comp Grap, vol. 10, no. 2, pp. 123-129, 2004 . 15 | 16 | [VALE-04b] Valette S., Gouaillard A., Prost R., "Compression of 3D Triangular Meshes with Progressive Precision", Computers and Graphics, vol. 28, no. 1, pp. 35-42, 2004 . 17 | 18 | This code is cross-platform and should compile under Linux and Window$ OS. 19 | 20 | ### License ### 21 | This code is distributed under the GPL License 22 | (copyright CNRS, INSA-Lyon, UCBL, INSERM.) 23 | 24 | ### Dependencies: ### 25 | * VTK www.vtk.org 26 | * CMAKE www.cmake.org 27 | 28 | ### Simple compilation HowTo under Linux ### 29 | 30 | git clone https://github.com/valette/Wavemesh.git 31 | git submodule init 32 | git submodule update 33 | cd Wavemesh 34 | cmake . -DCMAKE_BUILD_TYPE=Release 35 | make 36 | 37 | the executables (wavemesh and others should be found under the "bin" subdirectory) 38 | 39 | ### Options ### 40 | execute wavemesh without arguments to see the available options. 41 | 42 | comments, suggestions : https://github.com/valette/Wavemesh/issues 43 | 44 | 45 | -------------------------------------------------------------------------------- /VectorCompression/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | INCLUDE_DIRECTORIES( 3 | ${VTK_INCLUDE_DIR} 4 | ${VTKRANGECODING_INCLUDE_DIR} 5 | ) 6 | 7 | 8 | SET(VECTOR_COMPRESSION_PROGS 9 | encodeCoeffs 10 | decodeCoeffs 11 | ) 12 | FOREACH(loop_var ${VECTOR_COMPRESSION_PROGS}) 13 | ADD_EXECUTABLE(${loop_var} ${loop_var}.cxx) 14 | TARGET_LINK_LIBRARIES(${loop_var} vtkRangeCoding vtkHybrid) 15 | ENDFOREACH(loop_var) 16 | 17 | -------------------------------------------------------------------------------- /VectorCompression/decodeCoeffs.cxx: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "io.h" 9 | 10 | int main( int argc, char *argv[] ) 11 | { 12 | int quantization = 8; 13 | char *outputFile = 0; 14 | 15 | if(argc < 1) 16 | { 17 | std::cout << "Usage :" << std::endl; 18 | std::cout << "decodeCoeffs inputfile" << std::endl; 19 | return (0); 20 | } 21 | 22 | char* verificationFile = 0; 23 | 24 | // Parse optionnal arguments 25 | int ArgumentsIndex = 2; 26 | while (ArgumentsIndex < argc) { 27 | if (strcmp(argv[ArgumentsIndex],"-v")==0) { 28 | verificationFile = argv[ArgumentsIndex + 1]; 29 | } 30 | if (strcmp(argv[ArgumentsIndex],"-o")==0) { 31 | outputFile = argv[ArgumentsIndex + 1]; 32 | } 33 | ArgumentsIndex+=2; 34 | } 35 | 36 | coeffs result = decode(argv[1]); 37 | if (outputFile) { 38 | writeFile(result, outputFile); 39 | } else { 40 | writeFile(result, "decoded.txt"); 41 | } 42 | 43 | if (verificationFile) { 44 | coeffs reference = readFile(verificationFile); 45 | double maxError = 0; 46 | for (int i = 0; i != reference.size(); i++) { 47 | coefficient tempCoeff = reference[i]; 48 | for (int j = 0; j != tempCoeff.size(); j++) { 49 | double error = fabs(tempCoeff[j] - result[i][j]); 50 | if (maxError < error) { 51 | maxError = error; 52 | } 53 | } 54 | } 55 | std::cout << "Maximum error : " << maxError << std::endl; 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /VectorCompression/encodeCoeffs.cxx: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "io.h" 9 | 10 | int main( int argc, char *argv[] ) 11 | { 12 | int quantization = 8; 13 | char *outputFile = 0; 14 | 15 | if(argc < 1) 16 | { 17 | std::cout << "Usage :" << std::endl; 18 | std::cout << "encode inputfile" << std::endl; 19 | return (0); 20 | } 21 | 22 | // Parse optionnal arguments 23 | int ArgumentsIndex = 2; 24 | while (ArgumentsIndex < argc) { 25 | if (strcmp(argv[ArgumentsIndex],"-q")==0) { 26 | quantization = atoi(argv[ArgumentsIndex + 1]); 27 | } 28 | if (strcmp(argv[ArgumentsIndex],"-o")==0) { 29 | outputFile = argv[ArgumentsIndex + 1]; 30 | } 31 | ArgumentsIndex+=2; 32 | } 33 | 34 | std::cout << "Quantization : " << quantization << " bits" << std::endl; 35 | coeffs input = readFile(argv[1]); 36 | std::cout << input.size() << " coefficients" << std::endl; 37 | std::cout << input[0].size() << " scalars per coefficient" << std::endl; 38 | if (outputFile) { 39 | encode(input, outputFile, quantization); 40 | } else { 41 | encode(input, "compressed.svc", quantization); 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /VectorCompression/io.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include "vtkArithmeticCoderBase.h" 3 | #include "QuasiStaticModel.h" 4 | 5 | typedef std::vector coefficient; 6 | typedef std::vector coeffs; 7 | 8 | void encode(coeffs coefficients, const char *outputFile, int quantization) { 9 | double max = 0; 10 | for (int i = 0; i != coefficients.size(); i++) { 11 | coefficient tempCoeff = coefficients[i]; 12 | for (int j = 0; j != tempCoeff.size(); j++) { 13 | double temp = fabs(tempCoeff[j]); 14 | if (max < temp) { 15 | max = temp; 16 | } 17 | } 18 | } 19 | 20 | std::cout<< "maximum absolute scalar value : " << max << std::endl; 21 | vtkArithmeticCoderBase *Coder = vtkArithmeticCoderBase::New(); 22 | Coder->OpenFile(outputFile, 1); 23 | Coder->StartCoding(); 24 | Coder->EncodeByte(quantization); 25 | Coder->EncodeFloat(max); 26 | Coder->EncodeInt(coefficients.size()); 27 | Coder->EncodeInt(coefficients[0].size()); 28 | 29 | double imax = 2 << (quantization - 1) - 1; 30 | qsmodel model; 31 | model.initqsmodel(imax + 1, 15, 1000, NULL, 1); 32 | for (int i = 0; i != coefficients.size(); i++) { 33 | coefficient tempCoeff = coefficients[i]; 34 | for (int j = 0; j != tempCoeff.size(); j++) { 35 | double scalar = tempCoeff[j]; 36 | int iScalar = floor (0.5 + imax * fabs(scalar) / max); 37 | //std::cout<Encode(iScalar, &model); 39 | if (iScalar != 0) { 40 | Coder->EncodeBit(scalar<0); 41 | } 42 | } 43 | } 44 | 45 | 46 | int size = Coder->StopCoding(); 47 | cout << size << " bytes written" << std::endl; 48 | Coder->CloseFile(); 49 | } 50 | 51 | coeffs decode(const char *inputFile) { 52 | coeffs coefficients; 53 | vtkArithmeticCoderBase *Coder = vtkArithmeticCoderBase::New(); 54 | Coder->OpenFile(inputFile, 0); 55 | Coder->StartDecoding(); 56 | int quantization = Coder->DecodeByte(); 57 | double max = Coder->DecodeFloat(); 58 | std::cout << "Quantization : " << quantization << " bits/scalar" << std::endl; 59 | std::cout << "Max scalar value : " << max << std::endl; 60 | 61 | int numCoeffs = Coder->DecodeInt(); 62 | int coeffSize = Coder->DecodeInt(); 63 | std::cout << numCoeffs << " vectors" << std::endl; 64 | std::cout << coeffSize << " scalars per vector" << std::endl; 65 | 66 | double imax = 2 << (quantization - 1) - 1; 67 | 68 | qsmodel model; 69 | model.initqsmodel(imax + 1, 15, 1000, NULL, 0); 70 | for (int i = 0; i != numCoeffs; i++) { 71 | coefficient tempCoeff; 72 | for (int j = 0; j != coeffSize; j++) { 73 | double iScalar = Coder->Decode(&model); 74 | double scalar = iScalar * max / (double) imax; 75 | if (iScalar != 0) { 76 | if (Coder->DecodeBit()) { 77 | scalar = -scalar; 78 | } 79 | } 80 | // std::cout << scalar << std::endl; 81 | tempCoeff.push_back(scalar); 82 | } 83 | coefficients.push_back(tempCoeff); 84 | } 85 | Coder->StopDecoding(); 86 | return coefficients; 87 | } 88 | 89 | void writeFile (coeffs input, const char *file) { 90 | fstream output; 91 | output.open (file, ofstream::out | ofstream::trunc); 92 | for (int i = 0; i != input.size(); i++) { 93 | coefficient tempCoeff = input[i]; 94 | for (int j = 0; j != tempCoeff.size(); j++) { 95 | output << tempCoeff[j]; 96 | if (j != tempCoeff.size() -1) { 97 | output << " "; 98 | } else { 99 | if (i != input.size() -1) { 100 | output << std::endl; 101 | } 102 | } 103 | } 104 | } 105 | } 106 | 107 | 108 | coeffs readFile (const char *file) { 109 | coeffs result; 110 | std::string line; 111 | 112 | std::ifstream pFile (file); 113 | int vectorSize = -1; 114 | 115 | if (pFile.is_open()) { 116 | while(!pFile.eof()) { 117 | coefficient tempCoeff; 118 | getline(pFile, line); 119 | std::stringstream ss(line); 120 | double coeff; 121 | while(ss >> coeff) { 122 | tempCoeff.push_back(coeff); 123 | } 124 | if (tempCoeff.size()) { 125 | if (vectorSize <0) { 126 | vectorSize = tempCoeff.size(); 127 | } else { 128 | if (tempCoeff.size() != vectorSize) { 129 | std::cout << "Error while reading file!" << std::endl; 130 | std::cout << "only " << tempCoeff.size() << "coefficients where read" << std::endl; 131 | return result; 132 | } 133 | } 134 | result.push_back(tempCoeff); 135 | } 136 | // if (result.size()>10) break; 137 | } 138 | pFile.close(); 139 | return result; 140 | } 141 | else { 142 | std::cout << "Unable to open file"; 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------------------------------- 2 | # Build the documentation 3 | SET(PROJECT_HTML_OUTPUT "html.user") 4 | SET(PROJECT_DOC_LOGFILE "${PROJECT_BINARY_DIR}/doc/${PROJECT_HTML_OUTPUT}.log") 5 | 6 | # Doc input 7 | SET(PROJECT_DOC_INPUT 8 | ${PROJECT_SOURCE_DIR}/doc/DoxyMainPage.txt 9 | ) 10 | 11 | SET(PROJECT_DOC_INPUT 12 | ${PROJECT_SOURCE_DIR}/Common 13 | ${PROJECT_SOURCE_DIR}/DiscreteRemeshing 14 | ${PROJECT_SOURCE_DIR}/Compression 15 | ${PROJECT_SOURCE_DIR}/ParametrizationAndRemeshing 16 | ${PROJECT_SOURCE_DIR}/Geodesics 17 | ${PROJECT_SOURCE_DIR}/GeneticAlgorithm 18 | ${PROJECT_SOURCE_DIR}/VolumeMeshing 19 | ${PROJECT_SOURCE_DIR}/NormalBasedReconstruction 20 | ) 21 | STRING(REGEX REPLACE ";" " " PROJECT_DOC_INPUT "${PROJECT_DOC_INPUT}") 22 | 23 | # Doc exclude 24 | SET(PROJECT_DOC_EXCLUDE "") 25 | STRING(REGEX REPLACE ";" " " PROJECT_DOC_EXCLUDE "${PROJECT_DOC_EXCLUDE}") 26 | 27 | #----------------------------------------------------------------------------- 28 | # DOT verification 29 | IF(DOT) 30 | GET_FILENAME_COMPONENT(PROJECT_DOC_DOT_PATH ${DOT} PATH) 31 | SET(PROJECT_DOC_HAVE_DOT "YES") 32 | ELSE(DOT) 33 | SET(PROJECT_DOC_DOT_PATH "") 34 | SET(PROJECT_DOC_HAVE_DOT "NO") 35 | ENDIF(DOT) 36 | 37 | #----------------------------------------------------------------------------- 38 | # Create file and project 39 | CONFIGURE_FILE( 40 | ${PROJECT_SOURCE_DIR}/doc/doxygen.config.in 41 | ${PROJECT_BINARY_DIR}/doc/DoxyfileUsers 42 | IMMEDIATE 43 | ) 44 | 45 | ADD_CUSTOM_TARGET(doc-user 46 | ALL 47 | ${DOXYGEN} 48 | ${PROJECT_BINARY_DIR}/doc/DoxyfileUsers 49 | ) 50 | 51 | #----------------------------------------------------------------------------- 52 | -------------------------------------------------------------------------------- /doc/DoxyMainPage.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * \mainpage owLib documentation 3 | */ 4 | -------------------------------------------------------------------------------- /doc/doxygen.config.in: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.2.14 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project 5 | # 6 | # All text after a hash (#) is considered a comment and will be ignored 7 | # The format is: 8 | # TAG = value [value, ...] 9 | # For lists items can also be appended using: 10 | # TAG += value [value, ...] 11 | # Values that contain spaces should be placed between quotes (" ") 12 | 13 | #--------------------------------------------------------------------------- 14 | # General configuration options 15 | #--------------------------------------------------------------------------- 16 | 17 | # The PROJECT_NAME tag is a single word (or a sequence of words surrounded 18 | # by quotes) that should identify the project. 19 | PROJECT_NAME = @PROJECT_NAME@ 20 | 21 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. 22 | # This could be handy for archiving the generated documentation or 23 | # if some version control system is used. 24 | PROJECT_NUMBER = @PROJECT_VERSION@ 25 | 26 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 27 | # base path where the generated documentation will be put. 28 | # If a relative path is entered, it will be relative to the location 29 | # where doxygen was started. If left blank the current directory will be used. 30 | OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/doc/ 31 | 32 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 33 | # documentation generated by doxygen is written. Doxygen will use this 34 | # information to generate all constant output in the proper language. 35 | # The default language is English, other supported languages are: 36 | # Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, 37 | # German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, 38 | # Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish. 39 | OUTPUT_LANGUAGE = English 40 | 41 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 42 | # documentation are documented, even if no documentation was available. 43 | # Private class members and static file members will be hidden unless 44 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 45 | EXTRACT_ALL = YES 46 | 47 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class 48 | # will be included in the documentation. 49 | EXTRACT_PRIVATE = YES 50 | 51 | # If the EXTRACT_STATIC tag is set to YES all static members of a file 52 | # will be included in the documentation. 53 | EXTRACT_STATIC = YES 54 | 55 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 56 | # defined locally in source files will be included in the documentation. 57 | # If set to NO only classes defined in header files are included. 58 | EXTRACT_LOCAL_CLASSES = YES 59 | 60 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 61 | # undocumented members of documented classes, files or namespaces. 62 | # If set to NO (the default) these members will be included in the 63 | # various overviews, but no documentation section is generated. 64 | # This option has no effect if EXTRACT_ALL is enabled. 65 | HIDE_UNDOC_MEMBERS = NO 66 | 67 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 68 | # undocumented classes that are normally visible in the class hierarchy. 69 | # If set to NO (the default) these class will be included in the various 70 | # overviews. This option has no effect if EXTRACT_ALL is enabled. 71 | HIDE_UNDOC_CLASSES = NO 72 | 73 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 74 | # include brief member descriptions after the members that are listed in 75 | # the file and class documentation (similar to JavaDoc). 76 | # Set to NO to disable this. 77 | BRIEF_MEMBER_DESC = YES 78 | 79 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 80 | # the brief description of a member or function before the detailed description. 81 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 82 | # brief descriptions will be completely suppressed. 83 | REPEAT_BRIEF = YES 84 | 85 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 86 | # Doxygen will generate a detailed section even if there is only a brief 87 | # description. 88 | ALWAYS_DETAILED_SEC = YES 89 | 90 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 91 | # members of a class in the documentation of that class as if those members were 92 | # ordinary class members. Constructors, destructors and assignment operators of 93 | # the base classes will not be shown. 94 | INLINE_INHERITED_MEMB = NO 95 | 96 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 97 | # path before files name in the file list and in the header files. If set 98 | # to NO the shortest path that makes the file name unique will be used. 99 | FULL_PATH_NAMES = NO 100 | 101 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 102 | # can be used to strip a user defined part of the path. Stripping is 103 | # only done if one of the specified strings matches the left-hand part of 104 | # the path. It is allowed to use relative paths in the argument list. 105 | STRIP_FROM_PATH = 106 | 107 | # The INTERNAL_DOCS tag determines if documentation 108 | # that is typed after a \internal command is included. If the tag is set 109 | # to NO (the default) then the documentation will be excluded. 110 | # Set it to YES to include the internal documentation. 111 | INTERNAL_DOCS = NO 112 | 113 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 114 | # doxygen to hide any special comment blocks from generated source code 115 | # fragments. Normal C and C++ comments will always remain visible. 116 | STRIP_CODE_COMMENTS = YES 117 | 118 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 119 | # file names in lower case letters. If set to YES upper case letters are also 120 | # allowed. This is useful if you have classes or files whose names only differ 121 | # in case and if your file system supports case sensitive file names. Windows 122 | # users are adviced to set this option to NO. 123 | CASE_SENSE_NAMES = YES 124 | 125 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 126 | # (but less readable) file names. This can be useful is your file systems 127 | # doesn't support long names like on DOS, Mac, or CD-ROM. 128 | SHORT_NAMES = NO 129 | 130 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 131 | # will show members with their full class and namespace scopes in the 132 | # documentation. If set to YES the scope will be hidden. 133 | HIDE_SCOPE_NAMES = NO 134 | 135 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 136 | # will generate a verbatim copy of the header file for each class for 137 | # which an include is specified. Set to NO to disable this. 138 | VERBATIM_HEADERS = YES 139 | 140 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 141 | # will put list of the files that are included by a file in the documentation 142 | # of that file. 143 | SHOW_INCLUDE_FILES = YES 144 | 145 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 146 | # will interpret the first line (until the first dot) of a JavaDoc-style 147 | # comment as the brief description. If set to NO, the JavaDoc 148 | # comments will behave just like the Qt-style comments (thus requiring an 149 | # explict @brief command for a brief description. 150 | JAVADOC_AUTOBRIEF = NO 151 | 152 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 153 | # member inherits the documentation from any documented member that it 154 | # reimplements. 155 | INHERIT_DOCS = YES 156 | 157 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 158 | # is inserted in the documentation for inline members. 159 | INLINE_INFO = YES 160 | 161 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 162 | # will sort the (detailed) documentation of file and class members 163 | # alphabetically by member name. If set to NO the members will appear in 164 | # declaration order. 165 | SORT_MEMBER_DOCS = YES 166 | 167 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 168 | # tag is set to YES, then doxygen will reuse the documentation of the first 169 | # member in the group (if any) for the other members of the group. By default 170 | # all members of a group must be documented explicitly. 171 | DISTRIBUTE_GROUP_DOC = NO 172 | 173 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. 174 | # Doxygen uses this value to replace tabs by spaces in code fragments. 175 | TAB_SIZE = 8 176 | 177 | # The GENERATE_TODOLIST tag can be used to enable (YES) or 178 | # disable (NO) the todo list. This list is created by putting \todo 179 | # commands in the documentation. 180 | GENERATE_TODOLIST = YES 181 | 182 | # The GENERATE_TESTLIST tag can be used to enable (YES) or 183 | # disable (NO) the test list. This list is created by putting \test 184 | # commands in the documentation. 185 | GENERATE_TESTLIST = YES 186 | 187 | # The GENERATE_BUGLIST tag can be used to enable (YES) or 188 | # disable (NO) the bug list. This list is created by putting \bug 189 | # commands in the documentation. 190 | GENERATE_BUGLIST = YES 191 | 192 | # This tag can be used to specify a number of aliases that acts 193 | # as commands in the documentation. An alias has the form "name=value". 194 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to 195 | # put the command \sideeffect (or @sideeffect) in the documentation, which 196 | # will result in a user defined paragraph with heading "Side Effects:". 197 | # You can put \n's in the value part of an alias to insert newlines. 198 | ALIASES = 199 | 200 | # The ENABLED_SECTIONS tag can be used to enable conditional 201 | # documentation sections, marked by \if sectionname ... \endif. 202 | ENABLED_SECTIONS = 203 | 204 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines 205 | # the initial value of a variable or define consist of for it to appear in 206 | # the documentation. If the initializer consists of more lines than specified 207 | # here it will be hidden. Use a value of 0 to hide initializers completely. 208 | # The appearance of the initializer of individual variables and defines in the 209 | # documentation can be controlled using \showinitializer or \hideinitializer 210 | # command in the documentation regardless of this setting. 211 | MAX_INITIALIZER_LINES = 30 212 | 213 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 214 | # only. Doxygen will then generate output that is more tailored for C. 215 | # For instance some of the names that are used will be different. The list 216 | # of all members will be omitted, etc. 217 | OPTIMIZE_OUTPUT_FOR_C = NO 218 | 219 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated 220 | # at the bottom of the documentation of classes and structs. If set to YES the 221 | # list will mention the files that were used to generate the documentation. 222 | SHOW_USED_FILES = YES 223 | 224 | #--------------------------------------------------------------------------- 225 | # configuration options related to warning and progress messages 226 | #--------------------------------------------------------------------------- 227 | 228 | # The QUIET tag can be used to turn on/off the messages that are generated 229 | # by doxygen. Possible values are YES and NO. If left blank NO is used. 230 | QUIET = YES 231 | 232 | # The WARNINGS tag can be used to turn on/off the warning messages that are 233 | # generated by doxygen. Possible values are YES and NO. If left blank 234 | # NO is used. 235 | WARNINGS = YES 236 | 237 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 238 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will 239 | # automatically be disabled. 240 | WARN_IF_UNDOCUMENTED = YES 241 | 242 | # If WARN_IF_DOC_ERROR is set to YES, then doxygen will generate warnings 243 | # for error documented members. If EXTRACT_ALL is set to YES then this flag will 244 | # automatically be disabled. 245 | WARN_IF_DOC_ERROR = YES 246 | 247 | # The WARN_FORMAT tag determines the format of the warning messages that 248 | # doxygen can produce. The string should contain the $file, $line, and $text 249 | # tags, which will be replaced by the file and line number from which the 250 | # warning originated and the warning text. 251 | WARN_FORMAT = "$file:$line: $text" 252 | 253 | # The WARN_LOGFILE tag can be used to specify a file to which warning 254 | # and error messages should be written. If left blank the output is written 255 | # to stderr. 256 | WARN_LOGFILE = @PROJECT_DOC_LOGFILE@ 257 | 258 | #--------------------------------------------------------------------------- 259 | # configuration options related to the input files 260 | #--------------------------------------------------------------------------- 261 | 262 | # The INPUT tag can be used to specify the files and/or directories that contain 263 | # documented source files. You may enter file names like "myfile.cpp" or 264 | # directories like "/usr/src/myproject". Separate the files or directories 265 | # with spaces. 266 | INPUT = @PROJECT_DOC_INPUT@ 267 | 268 | # If the value of the INPUT tag contains directories, you can use the 269 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 270 | # and *.h) to filter out the source-files in the directories. If left 271 | # blank the following patterns are tested: 272 | # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 273 | # *.h++ *.idl *.odl 274 | FILE_PATTERNS = *.h *.cxx *.txx 275 | 276 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories 277 | # should be searched for input files as well. Possible values are YES and NO. 278 | # If left blank NO is used. 279 | RECURSIVE = NO 280 | 281 | # The EXCLUDE tag can be used to specify files and/or directories that should 282 | # excluded from the INPUT source files. This way you can easily exclude a 283 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 284 | EXCLUDE = @PROJECT_DOC_EXCLUDE@ 285 | 286 | # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 287 | # that are symbolic links (a Unix filesystem feature) are excluded from the input. 288 | EXCLUDE_SYMLINKS = NO 289 | 290 | # If the value of the INPUT tag contains directories, you can use the 291 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 292 | # certain files from those directories. 293 | EXCLUDE_PATTERNS = 294 | 295 | # The EXAMPLE_PATH tag can be used to specify one or more files or 296 | # directories that contain example code fragments that are included (see 297 | # the \include command). 298 | EXAMPLE_PATH = 299 | 300 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 301 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 302 | # and *.h) to filter out the source-files in the directories. If left 303 | # blank all files are included. 304 | EXAMPLE_PATTERNS = *.cxx 305 | 306 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 307 | # searched for input files to be used with the \include or \dontinclude 308 | # commands irrespective of the value of the RECURSIVE tag. 309 | # Possible values are YES and NO. If left blank NO is used. 310 | EXAMPLE_RECURSIVE = NO 311 | 312 | # The IMAGE_PATH tag can be used to specify one or more files or 313 | # directories that contain image that are included in the documentation (see 314 | # the \image command). 315 | IMAGE_PATH = 316 | 317 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 318 | # invoke to filter for each input file. Doxygen will invoke the filter program 319 | # by executing (via popen()) the command , where 320 | # is the value of the INPUT_FILTER tag, and is the name of an 321 | # input file. Doxygen will then use the output that the filter program writes 322 | # to standard output. 323 | INPUT_FILTER = 324 | 325 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 326 | # INPUT_FILTER) will be used to filter the input files when producing source 327 | # files to browse. 328 | FILTER_SOURCE_FILES = NO 329 | 330 | #--------------------------------------------------------------------------- 331 | # configuration options related to source browsing 332 | #--------------------------------------------------------------------------- 333 | 334 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will 335 | # be generated. Documented entities will be cross-referenced with these sources. 336 | SOURCE_BROWSER = NO 337 | 338 | # Setting the INLINE_SOURCES tag to YES will include the body 339 | # of functions and classes directly in the documentation. 340 | INLINE_SOURCES = YES 341 | 342 | # If the REFERENCED_BY_RELATION tag is set to YES (the default) 343 | # then for each documented function all documented 344 | # functions referencing it will be listed. 345 | REFERENCED_BY_RELATION = NO 346 | 347 | # If the REFERENCES_RELATION tag is set to YES (the default) 348 | # then for each documented function all documented entities 349 | # called/used by that function will be listed. 350 | REFERENCES_RELATION = NO 351 | 352 | #--------------------------------------------------------------------------- 353 | # configuration options related to the alphabetical class index 354 | #--------------------------------------------------------------------------- 355 | 356 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 357 | # of all compounds will be generated. Enable this if the project 358 | # contains a lot of classes, structs, unions or interfaces. 359 | ALPHABETICAL_INDEX = YES 360 | 361 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 362 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 363 | # in which this list will be split (can be a number in the range [1..20]) 364 | COLS_IN_ALPHA_INDEX = 3 365 | 366 | # In case all classes in a project start with a common prefix, all 367 | # classes will be put under the same header in the alphabetical index. 368 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that 369 | # should be ignored while generating the index headers. 370 | IGNORE_PREFIX = 371 | 372 | #--------------------------------------------------------------------------- 373 | # configuration options related to the HTML output 374 | #--------------------------------------------------------------------------- 375 | 376 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will 377 | # generate HTML output. 378 | GENERATE_HTML = YES 379 | 380 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 381 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 382 | # put in front of it. If left blank `html' will be used as the default path. 383 | HTML_OUTPUT = @PROJECT_HTML_OUTPUT@ 384 | 385 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for 386 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank 387 | # doxygen will generate files with .html extension. 388 | HTML_FILE_EXTENSION = .html 389 | 390 | # The HTML_HEADER tag can be used to specify a personal HTML header for 391 | # each generated HTML page. If it is left blank doxygen will generate a 392 | # standard header. 393 | HTML_HEADER = 394 | 395 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for 396 | # each generated HTML page. If it is left blank doxygen will generate a 397 | # standard footer. 398 | HTML_FOOTER = 399 | 400 | # The HTML_STYLESHEET tag can be used to specify a user defined cascading 401 | # style sheet that is used by each HTML page. It can be used to 402 | # fine-tune the look of the HTML output. If the tag is left blank doxygen 403 | # will generate a default style sheet 404 | HTML_STYLESHEET = 405 | 406 | # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 407 | # files or namespaces will be aligned in HTML using tables. If set to 408 | # NO a bullet list will be used. 409 | HTML_ALIGN_MEMBERS = YES 410 | 411 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files 412 | # will be generated that can be used as input for tools like the 413 | # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 414 | # of the generated HTML documentation. 415 | GENERATE_HTMLHELP = NO 416 | 417 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 418 | # controls if a separate .chi index file is generated (YES) or that 419 | # it should be included in the master .chm file (NO). 420 | GENERATE_CHI = NO 421 | 422 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 423 | # controls whether a binary table of contents is generated (YES) or a 424 | # normal table of contents (NO) in the .chm file. 425 | BINARY_TOC = NO 426 | 427 | # The TOC_EXPAND flag can be set to YES to add extra items for group members 428 | # to the contents of the Html help documentation and to the tree view. 429 | TOC_EXPAND = NO 430 | 431 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index at 432 | # top of each HTML page. The value NO (the default) enables the index and 433 | # the value YES disables it. 434 | DISABLE_INDEX = NO 435 | 436 | # This tag can be used to set the number of enum values (range [1..20]) 437 | # that doxygen will group on one line in the generated HTML documentation. 438 | ENUM_VALUES_PER_LINE = 4 439 | 440 | # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be 441 | # generated containing a tree-like index structure (just like the one that 442 | # is generated for HTML Help). For this to work a browser that supports 443 | # JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, 444 | # or Internet explorer 4.0+). Note that for large projects the tree generation 445 | # can take a very long time. In such cases it is better to disable this feature. 446 | # Windows users are probably better off using the HTML help feature. 447 | GENERATE_TREEVIEW = YES 448 | 449 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 450 | # used to set the initial width (in pixels) of the frame in which the tree 451 | # is shown. 452 | TREEVIEW_WIDTH = 250 453 | 454 | #--------------------------------------------------------------------------- 455 | # configuration options related to the LaTeX output 456 | #--------------------------------------------------------------------------- 457 | 458 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 459 | # generate Latex output. 460 | GENERATE_LATEX = NO 461 | 462 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 463 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 464 | # put in front of it. If left blank `latex' will be used as the default path. 465 | LATEX_OUTPUT = latex 466 | 467 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 468 | # LaTeX documents. This may be useful for small projects and may help to 469 | # save some trees in general. 470 | COMPACT_LATEX = NO 471 | 472 | # The PAPER_TYPE tag can be used to set the paper type that is used 473 | # by the printer. Possible values are: a4, a4wide, letter, legal and 474 | # executive. If left blank a4wide will be used. 475 | PAPER_TYPE = a4wide 476 | 477 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 478 | # packages that should be included in the LaTeX output. 479 | EXTRA_PACKAGES = 480 | 481 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for 482 | # the generated latex document. The header should contain everything until 483 | # the first chapter. If it is left blank doxygen will generate a 484 | # standard header. Notice: only use this tag if you know what you are doing! 485 | LATEX_HEADER = 486 | 487 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 488 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will 489 | # contain links (just like the HTML output) instead of page references 490 | # This makes the output suitable for online browsing using a pdf viewer. 491 | PDF_HYPERLINKS = NO 492 | 493 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 494 | # plain latex in the generated Makefile. Set this option to YES to get a 495 | # higher quality PDF documentation. 496 | USE_PDFLATEX = NO 497 | 498 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 499 | # command to the generated LaTeX files. This will instruct LaTeX to keep 500 | # running if errors occur, instead of asking the user for help. 501 | # This option is also used when generating formulas in HTML. 502 | LATEX_BATCHMODE = NO 503 | 504 | #--------------------------------------------------------------------------- 505 | # configuration options related to the RTF output 506 | #--------------------------------------------------------------------------- 507 | 508 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 509 | # The RTF output is optimised for Word 97 and may not look very pretty with 510 | # other RTF readers or editors. 511 | GENERATE_RTF = NO 512 | 513 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 514 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 515 | # put in front of it. If left blank `rtf' will be used as the default path. 516 | RTF_OUTPUT = rtf 517 | 518 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact 519 | # RTF documents. This may be useful for small projects and may help to 520 | # save some trees in general. 521 | COMPACT_RTF = NO 522 | 523 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 524 | # will contain hyperlink fields. The RTF file will 525 | # contain links (just like the HTML output) instead of page references. 526 | # This makes the output suitable for online browsing using WORD or other 527 | # programs which support those fields. 528 | # Note: wordpad (write) and others do not support links. 529 | RTF_HYPERLINKS = NO 530 | 531 | # Load stylesheet definitions from file. Syntax is similar to doxygen's 532 | # config file, i.e. a series of assigments. You only have to provide 533 | # replacements, missing definitions are set to their default value. 534 | RTF_STYLESHEET_FILE = 535 | 536 | # Set optional variables used in the generation of an rtf document. 537 | # Syntax is similar to doxygen's config file. 538 | RTF_EXTENSIONS_FILE = 539 | 540 | #--------------------------------------------------------------------------- 541 | # configuration options related to the man page output 542 | #--------------------------------------------------------------------------- 543 | 544 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will 545 | # generate man pages 546 | GENERATE_MAN = NO 547 | 548 | # The MAN_OUTPUT tag is used to specify where the man pages will be put. 549 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 550 | # put in front of it. If left blank `man' will be used as the default path. 551 | MAN_OUTPUT = man 552 | 553 | # The MAN_EXTENSION tag determines the extension that is added to 554 | # the generated man pages (default is the subroutine's section .3) 555 | MAN_EXTENSION = .3 556 | 557 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output, 558 | # then it will generate one additional man file for each entity 559 | # documented in the real man page(s). These additional files 560 | # only source the real man page, but without them the man command 561 | # would be unable to find the correct page. The default is NO. 562 | MAN_LINKS = NO 563 | 564 | #--------------------------------------------------------------------------- 565 | # configuration options related to the XML output 566 | #--------------------------------------------------------------------------- 567 | 568 | # If the GENERATE_XML tag is set to YES Doxygen will 569 | # generate an XML file that captures the structure of 570 | # the code including all documentation. Note that this 571 | # feature is still experimental and incomplete at the 572 | # moment. 573 | GENERATE_XML = NO 574 | 575 | #--------------------------------------------------------------------------- 576 | # configuration options for the AutoGen Definitions output 577 | #--------------------------------------------------------------------------- 578 | 579 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 580 | # generate an AutoGen Definitions (see autogen.sf.net) file 581 | # that captures the structure of the code including all 582 | # documentation. Note that this feature is still experimental 583 | # and incomplete at the moment. 584 | GENERATE_AUTOGEN_DEF = NO 585 | 586 | #--------------------------------------------------------------------------- 587 | # Configuration options related to the preprocessor 588 | #--------------------------------------------------------------------------- 589 | 590 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 591 | # evaluate all C-preprocessor directives found in the sources and include 592 | # files. 593 | ENABLE_PREPROCESSING = YES 594 | 595 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 596 | # names in the source code. If set to NO (the default) only conditional 597 | # compilation will be performed. Macro expansion can be done in a controlled 598 | # way by setting EXPAND_ONLY_PREDEF to YES. 599 | MACRO_EXPANSION = YES 600 | 601 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 602 | # then the macro expansion is limited to the macros specified with the 603 | # PREDEFINED and EXPAND_AS_PREDEFINED tags. 604 | EXPAND_ONLY_PREDEF = NO 605 | 606 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 607 | # in the INCLUDE_PATH (see below) will be search if a #include is found. 608 | SEARCH_INCLUDES = YES 609 | 610 | # The INCLUDE_PATH tag can be used to specify one or more directories that 611 | # contain include files that are not input files but should be processed by 612 | # the preprocessor. 613 | INCLUDE_PATH = 614 | 615 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 616 | # patterns (like *.h and *.hpp) to filter out the header-files in the 617 | # directories. If left blank, the patterns specified with FILE_PATTERNS will 618 | # be used. 619 | INCLUDE_FILE_PATTERNS = 620 | 621 | # The PREDEFINED tag can be used to specify one or more macro names that 622 | # are defined before the preprocessor is started (similar to the -D option of 623 | # gcc). The argument of the tag is a list of macros of the form: name 624 | # or name=definition (no spaces). If the definition and the = are 625 | # omitted =1 is assumed. 626 | PREDEFINED = 627 | 628 | # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then 629 | # this tag can be used to specify a list of macro names that should be expanded. 630 | # The macro definition that is found in the sources will be used. 631 | # Use the PREDEFINED tag if you want to use a different macro definition. 632 | EXPAND_AS_DEFINED = 633 | 634 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 635 | # doxygen's preprocessor will remove all function-like macros that are alone 636 | # on a line and do not end with a semicolon. Such function macros are typically 637 | # used for boiler-plate code, and will confuse the parser if not removed. 638 | SKIP_FUNCTION_MACROS = YES 639 | 640 | #--------------------------------------------------------------------------- 641 | # Configuration::addtions related to external references 642 | #--------------------------------------------------------------------------- 643 | 644 | # The TAGFILES tag can be used to specify one or more tagfiles. 645 | TAGFILES = 646 | 647 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create 648 | # a tag file that is based on the input files it reads. 649 | GENERATE_TAGFILE = 650 | 651 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed 652 | # in the class index. If set to NO only the inherited external classes 653 | # will be listed. 654 | ALLEXTERNALS = NO 655 | 656 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 657 | # in the modules index. If set to NO, only the current project's groups will 658 | # be listed. 659 | EXTERNAL_GROUPS = YES 660 | 661 | # The PERL_PATH should be the absolute path and name of the perl script 662 | # interpreter (i.e. the result of `which perl'). 663 | PERL_PATH = /usr/bin/perl 664 | 665 | #--------------------------------------------------------------------------- 666 | # Configuration options related to the dot tool 667 | #--------------------------------------------------------------------------- 668 | 669 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 670 | # generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 671 | # super classes. Setting the tag to NO turns the diagrams off. Note that this 672 | # option is superceded by the HAVE_DOT option below. This is only a fallback. It is 673 | # recommended to install and use dot, since it yield more powerful graphs. 674 | CLASS_DIAGRAMS = YES 675 | 676 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 677 | # available from the path. This tool is part of Graphviz, a graph visualization 678 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section 679 | # have no effect if this option is set to NO (the default) 680 | HAVE_DOT = @PROJECT_DOC_HAVE_DOT@ 681 | 682 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 683 | # will generate a graph for each documented class showing the direct and 684 | # indirect inheritance relations. Setting this tag to YES will force the 685 | # the CLASS_DIAGRAMS tag to NO. 686 | CLASS_GRAPH = YES 687 | 688 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 689 | # will generate a graph for each documented class showing the direct and 690 | # indirect implementation dependencies (inheritance, containment, and 691 | # class references variables) of the class with other documented classes. 692 | COLLABORATION_GRAPH = YES 693 | 694 | # If set to YES, the inheritance and collaboration graphs will show the 695 | # relations between templates and their instances. 696 | TEMPLATE_RELATIONS = YES 697 | 698 | # If set to YES, the inheritance and collaboration graphs will hide 699 | # inheritance and usage relations if the target is undocumented 700 | # or is not a class. 701 | HIDE_UNDOC_RELATIONS = YES 702 | 703 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 704 | # tags are set to YES then doxygen will generate a graph for each documented 705 | # file showing the direct and indirect include dependencies of the file with 706 | # other documented files. 707 | INCLUDE_GRAPH = YES 708 | 709 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 710 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each 711 | # documented header file showing the documented files that directly or 712 | # indirectly include this file. 713 | INCLUDED_BY_GRAPH = YES 714 | 715 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 716 | # will graphical hierarchy of all classes instead of a textual one. 717 | GRAPHICAL_HIERARCHY = YES 718 | 719 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 720 | # generated by dot. Possible values are gif, jpg, and png 721 | # If left blank gif will be used. 722 | DOT_IMAGE_FORMAT = png 723 | 724 | # The tag DOT_PATH can be used to specify the path where the dot tool can be 725 | # found. If left blank, it is assumed the dot tool can be found on the path. 726 | DOT_PATH = @PROJECT_DOC_DOT_PATH@ 727 | 728 | # The DOTFILE_DIRS tag can be used to specify one or more directories that 729 | # contain dot files that are included in the documentation (see the 730 | # \dotfile command). 731 | DOTFILE_DIRS = 732 | 733 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 734 | # generate a legend page explaining the meaning of the various boxes and 735 | # arrows in the dot generated graphs. 736 | GENERATE_LEGEND = YES 737 | 738 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 739 | # remove the intermedate dot files that are used to generate 740 | # the various graphs. 741 | DOT_CLEANUP = YES 742 | 743 | #--------------------------------------------------------------------------- 744 | # Configuration::addtions related to the search engine 745 | #--------------------------------------------------------------------------- 746 | 747 | # The SEARCHENGINE tag specifies whether or not a search engine should be 748 | # used. If set to NO the values of all tags below this one will be ignored. 749 | SEARCHENGINE = NO 750 | --------------------------------------------------------------------------------