├── .clang-format ├── .clang-tidy ├── .gitattributes ├── .gitignore ├── .gitlab-ci.yml ├── .gitlab ├── artifacts.yml ├── ci │ ├── CMakePresets.json │ ├── buildcache.ps1 │ ├── checkout_trigger_submodule.ps1 │ ├── checkout_trigger_submodule.sh │ ├── clang_format_check.sh │ ├── clang_tidy_check.sh │ ├── cmake.sh │ ├── configure_cache.cmake │ ├── configure_common.cmake │ ├── configure_ubuntu22_debug.cmake │ ├── configure_ubuntu22_debug_tidy.cmake │ ├── configure_windows_vs2019.cmake │ ├── docker │ │ ├── fedora35 │ │ │ ├── Dockerfile │ │ │ ├── install_ceres.sh │ │ │ ├── install_deps.sh │ │ │ ├── install_nanoflann.sh │ │ │ └── install_paraview.sh │ │ └── ubuntu22 │ │ │ ├── Dockerfile │ │ │ ├── install_ceres.sh │ │ │ ├── install_deps.sh │ │ │ ├── install_nanoflann.sh │ │ │ ├── install_paraview.sh │ │ │ ├── install_tins.sh │ │ │ └── tins-fix-cmake-config-install.patch │ ├── excluded_tests.md │ ├── json_schema_check.sh │ ├── ninja.ps1 │ ├── ninja.sh │ ├── scripts │ │ ├── build_deps.ps1 │ │ ├── configure_superbuild_deps.cmake │ │ └── download_superbuild_deps.cmake │ └── vcvarsall.ps1 ├── os-linux.yml ├── os-windows.yml └── rules.yml ├── .gitmodules ├── .readthedocs.yml ├── Application ├── CMakeLists.txt ├── Client │ ├── CMakeLists.txt │ ├── LidarViewMainWindow.cxx │ ├── LidarViewMainWindow.h │ ├── LidarViewMainWindow.ui │ ├── MacOSXBundleInfo.plist.in.in │ ├── Resources │ │ ├── Icons │ │ │ ├── absolute.png │ │ │ ├── connect.svg │ │ │ ├── crop.svg │ │ │ ├── gps.svg │ │ │ ├── icon_motion.png │ │ │ ├── logo.png │ │ │ ├── map.png │ │ │ ├── planefit.png │ │ │ └── trailingframes.png │ │ ├── Images │ │ │ ├── About.png │ │ │ ├── LidarView-splash.svg │ │ │ ├── LidarViewExample.png │ │ │ ├── LidarViewLayout.svg │ │ │ ├── LidarViewLogo.svg │ │ │ ├── LidarViewMark.svg │ │ │ ├── ParaviewLidar.svg │ │ │ ├── Splash.jpg │ │ │ ├── bottom_logo.png │ │ │ ├── logo.icns │ │ │ ├── logo.ico │ │ │ └── logo.iconset │ │ │ │ ├── icon_128x128.png │ │ │ │ ├── icon_256x256.png │ │ │ │ ├── icon_32x32.png │ │ │ │ └── icon_512x512.png │ │ └── lvResources.qrc │ ├── lvFilters.xml │ └── lvSources.xml ├── Qt │ ├── ApplicationComponents │ │ ├── CMakeLists.txt │ │ ├── Resources │ │ │ ├── UI │ │ │ │ ├── lqEditMenuBuilder.ui │ │ │ │ ├── lqFileMenuBuilder.ui │ │ │ │ ├── lqHelpMenuBuilder.ui │ │ │ │ ├── lqInterfaceControlsToolbar.ui │ │ │ │ ├── lqMainControlsToolbar.ui │ │ │ │ └── lqWelcomeDialog.ui │ │ │ ├── interface_modes_config.json │ │ │ └── interface_modes_config.schema.json │ │ ├── lqAboutDialogReaction.cxx │ │ ├── lqAboutDialogReaction.h │ │ ├── lqChangeInterfaceReaction.cxx │ │ ├── lqChangeInterfaceReaction.h │ │ ├── lqCommandLineOptionsBehavior.cxx │ │ ├── lqCommandLineOptionsBehavior.h │ │ ├── lqInterfaceControlsToolbar.cxx │ │ ├── lqInterfaceControlsToolbar.h │ │ ├── lqLidarViewManager.cxx │ │ ├── lqLidarViewManager.h │ │ ├── lqLidarViewMenuBuilders.cxx │ │ ├── lqLidarViewMenuBuilders.h │ │ ├── lqMainControlsToolbar.cxx │ │ ├── lqMainControlsToolbar.h │ │ ├── lqMenuSaveAsReaction.cxx │ │ ├── lqMenuSaveAsReaction.h │ │ ├── lqStatusBar.cxx │ │ ├── lqStatusBar.h │ │ ├── lqViewFrameActionsImplementation.cxx │ │ ├── lqViewFrameActionsImplementation.h │ │ ├── lqWelcomeDialog.cxx │ │ ├── lqWelcomeDialog.h │ │ └── vtk.module │ └── Components │ │ ├── CMakeLists.txt │ │ ├── Resources │ │ ├── Icons │ │ │ ├── AboutDialog.png │ │ │ ├── LidarViewAbout.svg │ │ │ ├── lvAdvancedModeSetup.svg │ │ │ ├── lvCalibrationFile.svg │ │ │ ├── lvLidarViewerSetup.svg │ │ │ ├── lvMenuRecentPcap.svg │ │ │ ├── lvOpenPcap.svg │ │ │ ├── lvOpenStream.svg │ │ │ ├── lvPointCloudToolSetup.svg │ │ │ ├── lvPythonShell.svg │ │ │ ├── lvSaveAs.svg │ │ │ └── lvSavePcap.svg │ │ ├── UI │ │ │ └── lqAboutDialog.ui │ │ └── lvComponents.qrc │ │ ├── lqAboutDialog.cxx │ │ ├── lqAboutDialog.h │ │ └── vtk.module └── Wrapping │ └── Python │ ├── CMakeLists.txt │ ├── __init__.py │ ├── planefit.py │ └── simple.py ├── CMake ├── FindSphinx.cmake ├── LidarViewOptions.cmake └── SetBranding.cmake ├── CMakeLists.txt ├── Documentation ├── BasicUsage.rst ├── CMakeLists.txt ├── StreamPCAPFile.rst ├── Tutorial.rst ├── UsersGuide.rst ├── conf.py ├── images │ ├── AdvancedFeatures.png │ ├── MenuAndToolbar.png │ └── UserInterface.png ├── index.rst └── requirements.txt ├── LICENSE ├── README.md └── version.txt /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # This configuration requires clang-format 8.0 or higher. 3 | BasedOnStyle: Mozilla 4 | AlignAfterOpenBracket: DontAlign 5 | AlignOperands: false 6 | AlwaysBreakAfterReturnType: None 7 | AlwaysBreakAfterDefinitionReturnType: None 8 | BreakBeforeBraces: Allman 9 | ColumnLimit: 100 10 | SpaceAfterTemplateKeyword: true 11 | Standard: Cpp11 12 | StatementMacros: 13 | - vtkAbstractTypeMacro 14 | - vtkTypeMacro 15 | - vtkGetObjectMacro 16 | - vtkSetObjectMacro 17 | - vtkCustomSetMacro 18 | - vtkBaseTypeMacro 19 | - vtkAbstractTemplateTypeMacro 20 | - vtkAbstractTypeMacroWithNewInstanceType 21 | - vtkStandardNewMacro 22 | ... 23 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | --- 2 | Checks: "-*,\ 3 | boost-*,\ 4 | bugprone-*,\ 5 | -bugprone-argument-comment,\ 6 | -bugprone-branch-clone,\ 7 | -bugprone-easily-swappable-parameters,\ 8 | -bugprone-implicit-widening-of-multiplication-result,\ 9 | -bugprone-incorrect-roundings,\ 10 | -bugprone-macro-parentheses,\ 11 | -bugprone-misplaced-widening-cast,\ 12 | -bugprone-narrowing-conversions,\ 13 | -bugprone-not-null-terminated-result,\ 14 | -bugprone-parent-virtual-call,\ 15 | -bugprone-reserved-identifier,\ 16 | -bugprone-signed-char-misuse,\ 17 | -bugprone-sizeof-expression,\ 18 | -bugprone-string-constructor,\ 19 | -bugprone-suspicious-enum-usage,\ 20 | -bugprone-suspicious-include,\ 21 | -bugprone-throw-keyword-missing,\ 22 | -bugprone-unhandled-self-assignment,\ 23 | clang-analyzer-*,\ 24 | -clang-analyzer-core.CallAndMessage,\ 25 | -clang-analyzer-core.NonNullParamChecker,\ 26 | -clang-analyzer-core.NullDereference,\ 27 | -clang-analyzer-core.StackAddressEscape,\ 28 | -clang-analyzer-core.UndefinedBinaryOperatorResult,\ 29 | -clang-analyzer-core.uninitialized.ArraySubscript,\ 30 | -clang-analyzer-core.uninitialized.Assign,\ 31 | -clang-analyzer-core.uninitialized.Branch,\ 32 | -clang-analyzer-core.uninitialized.UndefReturn,\ 33 | -clang-analyzer-cplusplus.InnerPointer,\ 34 | -clang-analyzer-cplusplus.NewDelete,\ 35 | -clang-analyzer-cplusplus.NewDeleteLeaks,\ 36 | -clang-analyzer-deadcode.DeadStores,\ 37 | -clang-analyzer-optin.cplusplus.UninitializedObject,\ 38 | -clang-analyzer-optin.cplusplus.VirtualCall,\ 39 | -clang-analyzer-security.FloatLoopCounter,\ 40 | -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,\ 41 | -clang-analyzer-security.insecureAPI.strcpy,\ 42 | -clang-analyzer-unix.Malloc,\ 43 | -clang-analyzer-unix.MismatchedDeallocator,\ 44 | misc-*,\ 45 | -misc-no-recursion,\ 46 | -misc-non-private-member-variables-in-classes,\ 47 | -misc-redundant-expression,\ 48 | -misc-unconventional-assign-operator,\ 49 | modernize-*,\ 50 | -modernize-avoid-c-arrays,\ 51 | -modernize-loop-convert,\ 52 | -modernize-make-unique,\ 53 | -modernize-pass-by-value,\ 54 | -modernize-raw-string-literal,\ 55 | -modernize-redundant-void-arg,\ 56 | -modernize-replace-random-shuffle,\ 57 | -modernize-return-braced-init-list,\ 58 | -modernize-shrink-to-fit,\ 59 | -modernize-use-auto,\ 60 | -modernize-use-bool-literals,\ 61 | -modernize-use-default-member-init,\ 62 | -modernize-use-emplace,\ 63 | -modernize-use-equals-delete,\ 64 | -modernize-use-trailing-return-type,\ 65 | -modernize-use-using,\ 66 | -modernize-use-transparent-functors,\ 67 | openmp-*,\ 68 | performance-*,\ 69 | -performance-for-range-copy,\ 70 | -performance-inefficient-string-concatenation,\ 71 | -performance-inefficient-vector-operation,\ 72 | -performance-move-const-arg,\ 73 | -performance-no-automatic-move,\ 74 | -performance-trivially-destructible,\ 75 | -performance-type-promotion-in-math-fn,\ 76 | -performance-unnecessary-copy-initialization,\ 77 | -performance-unnecessary-value-param,\ 78 | portability-*,\ 79 | readability-*,\ 80 | -readability-braces-around-statements,\ 81 | -readability-convert-member-functions-to-static,\ 82 | -readability-function-cognitive-complexity,\ 83 | -readability-function-size,\ 84 | -readability-implicit-bool-conversion,\ 85 | -readability-inconsistent-declaration-parameter-name,\ 86 | -readability-isolate-declaration,\ 87 | -readability-magic-numbers,\ 88 | -readability-make-member-function-const,\ 89 | -readability-named-parameter,\ 90 | -readability-non-const-parameter,\ 91 | -readability-qualified-auto,\ 92 | -readability-redundant-declaration,\ 93 | -readability-redundant-preprocessor,\ 94 | -readability-simplify-boolean-expr,\ 95 | -readability-static-accessed-through-instance,\ 96 | -readability-static-definition-in-anonymous-namespace,\ 97 | -readability-string-compare,\ 98 | -readability-uppercase-literal-suffix,\ 99 | -readability-use-anyofallof,\ 100 | -readability-identifier-length,\ 101 | " 102 | WarningsAsErrors: "*" 103 | ... 104 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.patch -text 2 | *.pdf binary 3 | *.h format.clang-format 4 | *.cxx format.clang-format 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | *.pyc 10 | build/ 11 | 12 | # IDE # 13 | ####### 14 | *.user 15 | *.config 16 | *.creator 17 | *.files 18 | *.includes 19 | 20 | # Packages # 21 | ############ 22 | # it's better to unpack these files and commit the raw source 23 | # git has its own built in compression methods 24 | *.7z 25 | *.dmg 26 | *.gz 27 | *.iso 28 | *.jar 29 | *.rar 30 | *.tar 31 | *.zip 32 | 33 | # Logs and databases # 34 | ###################### 35 | *.log 36 | *.sql 37 | *.sqlite 38 | 39 | # OS generated files # 40 | ###################### 41 | .DS_Store 42 | .DS_Store? 43 | ._* 44 | .Spotlight-V100 45 | .Trashes 46 | ehthumbs.db 47 | Thumbs.db 48 | 49 | # Others # 50 | ###################### 51 | .*~ 52 | /Documentation/html 53 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | # Metadata shared my many jobs 3 | - local: .gitlab/rules.yml 4 | - local: .gitlab/artifacts.yml 5 | 6 | # OS builds. 7 | - local: .gitlab/os-linux.yml 8 | - local: .gitlab/os-windows.yml 9 | 10 | stages: 11 | - build 12 | - test 13 | - analyse 14 | 15 | ################################################################################ 16 | # Job declarations 17 | # 18 | # Each job must pull in each of the following keys: 19 | # 20 | # - a "base image" 21 | # - a build script 22 | # - tags for the jobs 23 | # - already provided for upload and CI update jobs 24 | # - rules for when to run the job 25 | # 26 | # Additionally, jobs may also contain: 27 | # 28 | # - artifacts 29 | # - dependency/needs jobs for required jobs 30 | ################################################################################ 31 | 32 | # Linux 33 | 34 | ubuntu22-debug:build: 35 | extends: 36 | - .ubuntu22_debug 37 | - .cmake_build_linux 38 | - .linux_builder_tags 39 | - .cmake_build_artifacts 40 | - .run_manually 41 | needs: [] 42 | 43 | ubuntu22-debug:test: 44 | extends: 45 | - .ubuntu22_debug 46 | - .cmake_test_linux 47 | - .linux_tester_tags 48 | - .cmake_test_artifacts 49 | - .run_automatically 50 | dependencies: 51 | - ubuntu22-debug:build 52 | needs: 53 | - ubuntu22-debug:build 54 | 55 | ubuntu22-debug-tidy:build: 56 | extends: 57 | - .ubuntu22_debug_tidy 58 | - .cmake_build_linux 59 | - .linux_builder_tags 60 | - .cmake_tidy_artifacts 61 | - .run_manually 62 | needs: [] 63 | 64 | clang-format-check:analyse: 65 | extends: 66 | - .ubuntu22 67 | - .clang_format_check 68 | - .linux_tester_tags 69 | - .run_automatically 70 | needs: [] 71 | 72 | clang-tidy-check:analyse: 73 | extends: 74 | - .ubuntu22 75 | - .clang_tidy_check 76 | - .linux_tester_tags 77 | - .run_automatically 78 | dependencies: 79 | - ubuntu22-debug-tidy:build 80 | needs: 81 | - ubuntu22-debug-tidy:build 82 | 83 | # Windows 84 | 85 | windows-vs2019:build: 86 | extends: 87 | - .windows_vs2019 88 | - .cmake_build_windows 89 | - .windows_builder_tags 90 | - .cmake_build_artifacts 91 | - .run_manually 92 | needs: [] 93 | 94 | windows-vs2019:test: 95 | extends: 96 | - .windows_vs2019 97 | - .cmake_test_windows 98 | - .windows_test_tags 99 | - .cmake_test_artifacts 100 | - .run_automatically 101 | dependencies: 102 | - windows-vs2019:build 103 | needs: 104 | - windows-vs2019:build 105 | -------------------------------------------------------------------------------- /.gitlab/artifacts.yml: -------------------------------------------------------------------------------- 1 | # Lists of paths for artifacts of various stages. 2 | 3 | .cmake_build_artifacts: 4 | artifacts: 5 | expire_in: 1d 6 | # Because build logs are in here, we should always upload artifacts. 7 | when: always 8 | paths: 9 | # Logs of the build 10 | - compile_output.log 11 | 12 | # The artifacts of the build. 13 | - build/bin/ 14 | - build/lib/ 15 | - build/share/ 16 | 17 | # Python packages go here 18 | - build/lib64/ 19 | 20 | # Test-data fetched at config time 21 | - build/_data/ 22 | 23 | # Needed for installation. 24 | - build/CMakeCache.txt 25 | - build/build.ninja 26 | - build/rules.ninja 27 | - build/CMakeFiles/rules.ninja 28 | - build/cmake_install.cmake 29 | - build/**/cmake_install.cmake 30 | 31 | # CTest files. 32 | - build/CTestCustom.cmake 33 | - build/CTestTestfile.cmake 34 | - build/**/CTestTestfile.cmake 35 | - build/**/*.h 36 | - build/**/*.hxx 37 | - build/**/*.mod 38 | - build/ExternalData/ 39 | - build/Testing/ 40 | - build/Testing/Temporary/ 41 | 42 | .cmake_tidy_artifacts: 43 | artifacts: 44 | expire_in: 1d 45 | # Because build logs are in here, we should always upload artifacts. 46 | when: always 47 | paths: 48 | # Logs of the build 49 | - compile_output.log 50 | - build/compile_commands.json 51 | 52 | # The artifacts of Qt generation. 53 | - build/**/*.h 54 | - build/**/*.hxx 55 | 56 | .cmake_test_artifacts: 57 | artifacts: 58 | expire_in: 1d 59 | # Tests failing should still upload the artifact for further testing. 60 | when: always 61 | paths: 62 | # Debugging logs 63 | - build/Testing/Temporary/Last*.log 64 | - build/Testing/Temporary/*.png 65 | -------------------------------------------------------------------------------- /.gitlab/ci/CMakePresets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "cmakeMinimumRequired": { 4 | "major": 3, 5 | "minor": 21, 6 | "patch": 0 7 | }, 8 | 9 | "configurePresets": [ 10 | { 11 | "name": "ci_common", 12 | "binaryDir": "${sourceDir}/build/" 13 | } 14 | ], 15 | "testPresets": [ 16 | { 17 | "name": "ci_common", 18 | "configurePreset": "ci_common", 19 | "hidden": true, 20 | "output": {"outputOnFailure": true}, 21 | "execution": { 22 | "jobs": 1, 23 | "repeat": {"mode": "until-pass", "count": 3}, 24 | "timeout": 120, 25 | "noTestsAction": "error" 26 | } 27 | }, 28 | { 29 | "name": "ci_ubuntu22_debug", 30 | "inherits": ["ci_common"], 31 | "filter": { 32 | "exclude": {"name": "TestVelodyneHDLPositionReader|TestVelodyneLidarStream_HDL_64_Dual|TestExtractPointSelection"} 33 | } 34 | }, 35 | { 36 | "name": "ci_windows_vs2019", 37 | "inherits": ["ci_common"], 38 | "filter": { 39 | "exclude": {"name": "lv|Python|TestVelodyneLidarStream_HDL_64"} 40 | } 41 | } 42 | ] 43 | } -------------------------------------------------------------------------------- /.gitlab/ci/buildcache.ps1: -------------------------------------------------------------------------------- 1 | $erroractionpreference = "stop" 2 | 3 | $version = "0.27.6" 4 | $sha256sum = "48631671fd26a6f5bb4b6755afb3cd9618194c74b93ec5abd633c22343045134" 5 | $filename = "buildcache-windows" 6 | $tarball = "$filename.zip" 7 | 8 | $outdir = $pwd.Path 9 | $outdir = "$outdir\.gitlab" 10 | $ProgressPreference = "SilentlyContinue" 11 | Invoke-WebRequest -Uri "https://github.com/mbitsnbites/buildcache/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball" 12 | $hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 13 | if ($hash.Hash -ne $sha256sum) { 14 | exit 1 15 | } 16 | 17 | Add-Type -AssemblyName System.IO.Compression.FileSystem 18 | [System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir") 19 | -------------------------------------------------------------------------------- /.gitlab/ci/checkout_trigger_submodule.ps1: -------------------------------------------------------------------------------- 1 | $erroractionpreference = "stop" 2 | 3 | if (Test-Path env:TRIGGER_MODULE_PATH) { 4 | git -C "$env:TRIGGER_MODULE_PATH" fetch 5 | git -C "$env:TRIGGER_MODULE_PATH" checkout "$env:TRIGGER_MODULE_BRANCH" 6 | git -C "$env:TRIGGER_MODULE_PATH" reset --hard origin/"$env:TRIGGER_MODULE_BRANCH" 7 | git -C "$env:TRIGGER_MODULE_PATH" pull 8 | git -C "$env:TRIGGER_MODULE_PATH" submodule sync --recursive 9 | git -C "$env:TRIGGER_MODULE_PATH" submodule update --init --recursive 10 | git -C "$env:TRIGGER_MODULE_PATH" log --oneline -n1 --no-abbrev 11 | } else { 12 | Write-Output "Using default submodules SHA" 13 | } 14 | -------------------------------------------------------------------------------- /.gitlab/ci/checkout_trigger_submodule.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ -z "${TRIGGER_MODULE_PATH}" ]; then 6 | echo "Using default submodules SHA" 7 | else 8 | git -C $TRIGGER_MODULE_PATH fetch 9 | git -C $TRIGGER_MODULE_PATH checkout $TRIGGER_MODULE_BRANCH 10 | git -C $TRIGGER_MODULE_PATH reset --hard origin/$TRIGGER_MODULE_BRANCH 11 | git -C $TRIGGER_MODULE_PATH pull 12 | git -C $TRIGGER_MODULE_PATH submodule sync --recursive 13 | git -C $TRIGGER_MODULE_PATH submodule update --init --recursive 14 | git -C $TRIGGER_MODULE_PATH log --oneline -n1 --no-abbrev 15 | fi 16 | -------------------------------------------------------------------------------- /.gitlab/ci/clang_format_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | target_repository="" 6 | 7 | if [ -z "${TRIGGER_MODULE_PATH}" ]; then 8 | if [ -z "${CI_COMMIT_REF_NAME}" ]; then 9 | echo "Missing CI_COMMIT_REF_NAME env variable" 10 | exit 1 11 | fi 12 | target_repository="." 13 | else 14 | target_repository="$TRIGGER_MODULE_PATH" 15 | fi 16 | 17 | cd $target_repository 18 | 19 | exit_code=0 20 | 21 | current_SHA=$(git rev-parse HEAD) 22 | ancestor_SHA=$(git merge-base $current_SHA origin/master) 23 | modified_files=$(git diff --name-only $ancestor_SHA $current_SHA *.{h,cxx,txx}) 24 | 25 | declare -a existing_files 26 | 27 | for file in $modified_files; do 28 | test -e $file && existing_files+=("$file") 29 | done 30 | 31 | if [ ${#existing_files[@]} -eq 0 ]; then 32 | echo "No c++ files detected in changes for clang-format to run against" 33 | else 34 | echo "Performing clang-format check on: ${existing_files[@]}" 35 | clang-format --dry-run -Werror ${existing_files[@]} 36 | exit_code=`echo $?` 37 | fi 38 | 39 | exit $exit_code 40 | -------------------------------------------------------------------------------- /.gitlab/ci/clang_tidy_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [ -z "${CI_PROJECT_DIR}" ]; then 6 | echo "Missing CI_PROJECT_DIR env variable" 7 | exit 1 8 | fi 9 | 10 | target_repository="" 11 | 12 | if [ -z "${TRIGGER_MODULE_PATH}" ]; then 13 | if [ -z "${CI_COMMIT_REF_NAME}" ]; then 14 | echo "Missing CI_COMMIT_REF_NAME env variable" 15 | exit 1 16 | fi 17 | target_repository="." 18 | else 19 | target_repository="$TRIGGER_MODULE_PATH" 20 | fi 21 | 22 | cd $target_repository 23 | 24 | exit_code=0 25 | 26 | current_SHA=$(git rev-parse HEAD) 27 | ancestor_SHA=$(git merge-base $current_SHA origin/master) 28 | modified_files=$(git diff --name-only $ancestor_SHA $current_SHA *.{h,cxx,txx}) 29 | 30 | declare -a existing_files 31 | 32 | for file in $modified_files; do 33 | test -e $file && existing_files+=("$file") 34 | done 35 | 36 | if [ ${#existing_files[@]} -eq 0 ]; then 37 | echo "No c++ files detected in changes for clang-tidy to run against" 38 | else 39 | # Remove -fno-fat-lto-objects flags (unsupported by clang-tidy) 40 | sed -i 's/-fno-fat-lto-objects //g' $CI_PROJECT_DIR/build/compile_commands.json 41 | 42 | echo "Performing clang-format check on: ${existing_files[@]}" 43 | run-clang-tidy -p $CI_PROJECT_DIR/build/ ${existing_files[@]} 44 | exit_code=`echo $?` 45 | fi 46 | 47 | exit $exit_code 48 | -------------------------------------------------------------------------------- /.gitlab/ci/cmake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | readonly mindeps_version="3.12.4" 6 | readonly latest_version="3.21.2" 7 | 8 | case "$( uname -s )" in 9 | Linux) 10 | shatool="sha256sum" 11 | mindeps_sha256sum="486edd6710b5250946b4b199406ccbf8f567ef0e23cfe38f7938b8c78a2ffa5f" 12 | mindeps_platform="Linux-x86_64" 13 | latest_sha256sum="d5517d949eaa8f10a149ca250e811e1473ee3f6f10935f1f69596a1e184eafc1" 14 | latest_platform="linux-x86_64" 15 | ;; 16 | Darwin) 17 | shatool="shasum -a 256" 18 | mindeps_sha256sum="95d76c00ccb9ecb5cb51de137de00965c5e8d34b2cf71556cf8ba40577d1cff3" 19 | mindeps_platform="Darwin-x86_64" 20 | latest_sha256sum="25e3f439c19185f51136126a06e14b4873243ea1b4a37678881adde05433ae9b" 21 | latest_platform="macos-universal" 22 | ;; 23 | *) 24 | echo "Unrecognized platform $( uname -s )" 25 | exit 1 26 | ;; 27 | esac 28 | readonly shatool 29 | readonly mindeps_sha256sum 30 | readonly mindeps_platform 31 | readonly latest_sha256sum 32 | readonly latest_platform 33 | 34 | use_mindeps=false 35 | if [ "$CI_JOB_STAGE" = "test" ]; then 36 | : # Skip old CMake for testing as some of the features are useful. 37 | elif echo "$CMAKE_CONFIGURATION" | grep -q -e 'mindeps'; then 38 | use_mindeps=true 39 | fi 40 | 41 | readonly use_mindeps 42 | 43 | if $use_mindeps; then 44 | version="$mindeps_version" 45 | sha256sum="$mindeps_sha256sum" 46 | platform="$mindeps_platform" 47 | else 48 | version="$latest_version" 49 | sha256sum="$latest_sha256sum" 50 | platform="$latest_platform" 51 | fi 52 | readonly version 53 | readonly sha256sum 54 | readonly platform 55 | 56 | readonly filename="cmake-$version-$platform" 57 | readonly tarball="$filename.tar.gz" 58 | 59 | cd .gitlab 60 | 61 | echo "$sha256sum $tarball" > cmake.sha256sum 62 | curl -OL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" 63 | $shatool --check cmake.sha256sum 64 | tar xf "$tarball" 65 | mv "$filename" cmake 66 | 67 | if [ "$( uname -s )" = "Darwin" ]; then 68 | ln -s CMake.app/Contents/bin cmake/bin 69 | fi 70 | 71 | if [ "$CI_JOB_NAME" = "build:spack-centos7" ]; then 72 | mkdir -p "$CI_PROJECT_DIR/build/spack" 73 | sed \ 74 | -e "s/CMAKE_VERSION/$version/" \ 75 | -e "s,CMAKE_PREFIX,$PWD/cmake," \ 76 | < "$CI_PROJECT_DIR/Utilities/spack/configs/gitlab-ci/packages.yaml.in" \ 77 | > "$CI_PROJECT_DIR/build/spack/packages.yaml" 78 | fi 79 | -------------------------------------------------------------------------------- /.gitlab/ci/configure_cache.cmake: -------------------------------------------------------------------------------- 1 | if ("$ENV{CI_JOB_NAME}" MATCHES "windows") 2 | set(CMAKE_C_COMPILER_LAUNCHER "buildcache" CACHE STRING "") 3 | set(CMAKE_CXX_COMPILER_LAUNCHER "buildcache" CACHE STRING "") 4 | set(CMAKE_CUDA_COMPILER_LAUNCHER "buildcache" CACHE STRING "") 5 | set(paraview_replace_uncacheable_flags ON CACHE BOOL "") 6 | else () 7 | set(CMAKE_C_COMPILER_LAUNCHER "sccache" CACHE STRING "") 8 | set(CMAKE_CXX_COMPILER_LAUNCHER "sccache" CACHE STRING "") 9 | set(CMAKE_CUDA_COMPILER_LAUNCHER "sccache" CACHE STRING "") 10 | endif () 11 | -------------------------------------------------------------------------------- /.gitlab/ci/configure_common.cmake: -------------------------------------------------------------------------------- 1 | # Stock CI builds test everything possible (platforms will disable modules as 2 | # needed). 3 | set(BUILD_ALL_MODULES ON CACHE BOOL "") 4 | set(BUILD_EXAMPLES ON CACHE BOOL "") 5 | set(BUILD_TESTING ON CACHE STRING "") 6 | 7 | set(LIDARVIEW_USE_PDAL ON CACHE STRING "") 8 | set(LIDARVIEW_USE_CERES ON CACHE STRING "") 9 | set(LIDARVIEW_USE_NANOFLANN ON CACHE STRING "") 10 | set(LIDARVIEW_USE_YAMLCPP ON CACHE STRING "") 11 | set(LIDARVIEW_USE_OPENCV OFF CACHE STRING "") 12 | 13 | # Default to Release builds. 14 | if ("$ENV{CMAKE_BUILD_TYPE}" STREQUAL "") 15 | set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") 16 | else () 17 | set(CMAKE_BUILD_TYPE "$ENV{CMAKE_BUILD_TYPE}" CACHE STRING "") 18 | endif () 19 | -------------------------------------------------------------------------------- /.gitlab/ci/configure_ubuntu22_debug.cmake: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") 2 | 3 | set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "") 4 | -------------------------------------------------------------------------------- /.gitlab/ci/configure_ubuntu22_debug_tidy.cmake: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/configure_ubuntu22_debug.cmake") 2 | 3 | # Treats warnings as errors 4 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra" CACHE STRING "") 5 | 6 | # Ignore deprecation warning to be able to build 7 | set(LIDARVIEW_HIDE_DEPRECATION_WARNINGS ON CACHE BOOL "") 8 | 9 | # Create a compilation database for the analize stage (clang-tidy) 10 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "") 11 | -------------------------------------------------------------------------------- /.gitlab/ci/configure_windows_vs2019.cmake: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") 2 | 3 | set(lvsb_dir) 4 | if (NOT DEFINED "ENV{LVSB_PATH}") 5 | get_filename_component(lvsb_dir "${CMAKE_CURRENT_LIST_DIR}/../../LVSB-DEPS/install/" ABSOLUTE) 6 | else () 7 | get_filename_component(lvsb_dir "$ENV{LVSB_PATH}/install/" ABSOLUTE) 8 | endif () 9 | list(APPEND lvsb_dir "${lvsb_dir}/Python") 10 | message(STATUS "CMAKE_PREFIX_PATH setted to ${lvsb_dir}") 11 | set(CMAKE_PREFIX_PATH "${lvsb_dir}" CACHE PATH "") 12 | 13 | set(Boost_USE_STATIC_LIBS OFF CACHE STRING "") 14 | 15 | # Treats warnings as errors 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX /W4") 17 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/fedora35/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fedora:35 2 | MAINTAINER Timothée Couble 3 | 4 | COPY install_deps.sh /root/install_deps.sh 5 | RUN sh /root/install_deps.sh 6 | 7 | COPY install_paraview.sh /root/install_paraview.sh 8 | RUN sh /root/install_paraview.sh 9 | 10 | COPY install_ceres.sh /root/install_ceres.sh 11 | RUN sh /root/install_ceres.sh 12 | 13 | COPY install_nanoflann.sh /root/install_nanoflann.sh 14 | RUN sh /root/install_nanoflann.sh 15 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/fedora35/install_ceres.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Ceres dependencies 6 | dnf install -y --setopt=install_weak_deps=False \ 7 | gflags-devel glog-devel atlas-devel 8 | 9 | readonly version="2.1.0" 10 | readonly tarball="ceres-solver-$version.tar.gz" 11 | readonly sha256sum="f7d74eecde0aed75bfc51ec48c91d01fe16a6bf16bce1987a7073286701e2fc6" 12 | 13 | readonly ceres_root="$HOME/ceres" 14 | readonly ceres_src="$ceres_root/src" 15 | readonly ceres_build_root="$ceres_root/build" 16 | 17 | mkdir -p "$ceres_root" 18 | cd "$ceres_root" 19 | 20 | echo "$sha256sum $tarball" > ceres.sha256sum 21 | curl -OL "http://ceres-solver.org/ceres-solver-$version.tar.gz" 22 | sha256sum --check ceres.sha256sum 23 | mkdir -p "$ceres_src" 24 | tar -xf "$tarball" -C "$ceres_src" --strip-components 1 25 | 26 | ceres_build () { 27 | local prefix="$1" 28 | shift 29 | 30 | cmake -GNinja \ 31 | -S "$ceres_src" \ 32 | -B "$ceres_build_root" \ 33 | -DCMAKE_BUILD_TYPE=Release \ 34 | -DBUILD_TESTING=OFF \ 35 | "-DCMAKE_INSTALL_PREFIX=$prefix" \ 36 | "$@" 37 | cmake --build "$ceres_build_root" --target install 38 | } 39 | 40 | ceres_build /usr 41 | 42 | rm -rf "$ceres_root" 43 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/fedora35/install_deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | dnf install -y --setopt=install_weak_deps=False \ 6 | glx-utils mesa-dri-drivers mesa-libGL* libxcrypt-compat.x86_64 libxkbcommon \ 7 | libxkbcommon-x11 8 | 9 | # Install xvfb for offline graphical testing 10 | dnf install -y --setopt=install_weak_deps=False \ 11 | xorg-x11-server-Xvfb 12 | 13 | # Install extra dependencies for ParaView 14 | dnf install -y --setopt=install_weak_deps=False \ 15 | bzip2 patch doxygen git-core git-lfs 16 | 17 | # Qt dependencies 18 | dnf install -y --setopt=install_weak_deps=False \ 19 | qt5-qtbase-devel qt5-qtbase-private-devel qt5-qttools-devel qt5-qtsvg-devel \ 20 | qt5-qtxmlpatterns-devel qt5-qtmultimedia-devel qt5-qttools-static 21 | 22 | # GNOME theme requirements 23 | dnf install -y --setopt=install_weak_deps=False \ 24 | abattis-cantarell-fonts 25 | 26 | # Development tools 27 | dnf install -y --setopt=install_weak_deps=False \ 28 | libasan libtsan libubsan clang-tools-extra \ 29 | gcc gcc-c++ gcc-gfortran \ 30 | ninja-build 31 | 32 | # External dependencies 33 | dnf install -y --setopt=install_weak_deps=False \ 34 | libXcursor-devel libharu-devel utf8cpp-devel pugixml-devel libtiff-devel \ 35 | eigen3-devel double-conversion-devel glew-devel jsoncpp-devel boost-devel \ 36 | libpcap-devel gdal-devel PDAL-devel pcl-devel yaml-cpp-devel 37 | 38 | # Python dependencies 39 | dnf install -y --setopt=install_weak_deps=False \ 40 | python3-twisted python3-autobahn python3 python3-devel python3-numpy \ 41 | python3-pandas python3-pandas-datareader python3-sphinx python3-pip \ 42 | python3-mpi4py-mpich python3-mpi4py-openmpi python3-matplotlib 43 | 44 | python3 -m pip install wslink cftime 45 | 46 | dnf clean all 47 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/fedora35/install_nanoflann.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | readonly nanoflann_repo="https://github.com/jlblancoc/nanoflann.git" 6 | readonly nanoflann_commit="v1.4.3" 7 | 8 | readonly nanoflann_root="$HOME/nanoflann" 9 | readonly nanoflann_src="$nanoflann_root/src" 10 | readonly nanoflann_build_root="$nanoflann_root/build" 11 | 12 | git clone "$nanoflann_repo" "$nanoflann_src" 13 | git -C "$nanoflann_src" checkout "$nanoflann_commit" 14 | 15 | nanoflann_build () { 16 | local prefix="$1" 17 | shift 18 | 19 | cmake -GNinja \ 20 | -S "$nanoflann_src" \ 21 | -B "$nanoflann_build_root" \ 22 | "-DCMAKE_INSTALL_PREFIX=$prefix" \ 23 | "$@" 24 | cmake --build "$nanoflann_build_root" --target install 25 | } 26 | 27 | nanoflann_build /usr 28 | 29 | rm -rf "$nanoflann_root" 30 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/fedora35/install_paraview.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | readonly paraview_repo="https://gitlab.kitware.com/paraview/paraview.git" 6 | readonly paraview_commit="b5bd6d8beff4d9acdce5b44e0da951710809e4ca" # Waiting for new release 7 | 8 | readonly paraview_root="$HOME/paraview" 9 | readonly paraview_src="$paraview_root/src" 10 | readonly paraview_build_root="$paraview_root/build" 11 | 12 | git clone "$paraview_repo" "$paraview_src" --recursive 13 | git -C "$paraview_src" checkout "$paraview_commit" --recurse-submodules 14 | 15 | paraview_build () { 16 | local prefix="$1" 17 | shift 18 | 19 | cmake -GNinja \ 20 | -S "$paraview_src" \ 21 | -B "$paraview_build_root" \ 22 | -DCMAKE_BUILD_TYPE=Release \ 23 | -DPARAVIEW_BUILD_TESTING=OFF \ 24 | -DPARAVIEW_ENABLE_GDAL=ON \ 25 | -DPARAVIEW_ENABLE_PDAL=ON \ 26 | -DPARAVIEW_ENABLE_LAS=ON \ 27 | -DPARAVIEW_USE_VTKM=OFF \ 28 | -DPARAVIEW_USE_QT=ON \ 29 | -DPARAVIEW_USE_PYTHON=ON \ 30 | "-DCMAKE_INSTALL_PREFIX=$prefix" \ 31 | "$@" 32 | cmake --build "$paraview_build_root" --target install 33 | } 34 | 35 | paraview_build /usr 36 | 37 | rm -rf "$paraview_root" 38 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/ubuntu22/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:22.04 2 | LABEL maintainer="Timothée Couble " 3 | 4 | COPY install_deps.sh /root/install_deps.sh 5 | RUN sh /root/install_deps.sh 6 | 7 | COPY install_paraview.sh /root/install_paraview.sh 8 | RUN sh /root/install_paraview.sh 9 | 10 | COPY install_ceres.sh /root/install_ceres.sh 11 | RUN sh /root/install_ceres.sh 12 | 13 | COPY install_nanoflann.sh /root/install_nanoflann.sh 14 | RUN sh /root/install_nanoflann.sh 15 | 16 | COPY install_tins.sh /root/install_tins.sh 17 | COPY tins-fix-cmake-config-install.patch /root/tins-fix-cmake-config-install.patch 18 | RUN sh /root/install_tins.sh 19 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/ubuntu22/install_ceres.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | readonly version="2.1.0" 6 | readonly tarball="ceres-solver-$version.tar.gz" 7 | readonly sha256sum="f7d74eecde0aed75bfc51ec48c91d01fe16a6bf16bce1987a7073286701e2fc6" 8 | 9 | readonly ceres_root="$HOME/ceres" 10 | readonly ceres_src="$ceres_root/src" 11 | readonly ceres_build_root="$ceres_root/build" 12 | 13 | mkdir -p "$ceres_root" 14 | cd "$ceres_root" 15 | 16 | echo "$sha256sum $tarball" > ceres.sha256sum 17 | curl -OL "http://ceres-solver.org/ceres-solver-$version.tar.gz" 18 | sha256sum --check ceres.sha256sum 19 | mkdir -p "$ceres_src" 20 | tar -xf "$tarball" -C "$ceres_src" --strip-components 1 --no-same-owner 21 | 22 | ceres_build () { 23 | local prefix="$1" 24 | shift 25 | 26 | cmake -GNinja \ 27 | -S "$ceres_src" \ 28 | -B "$ceres_build_root" \ 29 | -DCMAKE_BUILD_TYPE=Release \ 30 | -DBUILD_TESTING=OFF \ 31 | "-DCMAKE_INSTALL_PREFIX=$prefix" \ 32 | "$@" 33 | cmake --build "$ceres_build_root" --target install 34 | } 35 | 36 | ceres_build /usr 37 | 38 | rm -rf "$ceres_root" 39 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/ubuntu22/install_deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | apt update 6 | 7 | # Install xvfb for offline graphical testing 8 | apt install -y --no-install-recommends \ 9 | xvfb libxcursor1 10 | 11 | # Install extra dependencies for ParaView 12 | apt install -y --no-install-recommends \ 13 | libglvnd-dev bzip2 patch doxygen git git-lfs 14 | 15 | # Qt extra depency 16 | DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \ 17 | tzdata 18 | 19 | # Qt dependencies 20 | apt install -y --no-install-recommends \ 21 | qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtmultimedia5-dev \ 22 | qtbase5-private-dev libqt5x11extras5-dev libqt5svg5-dev qttools5-dev \ 23 | libqt5help5 qtmultimedia5-dev qtbase5-private-dev libqt5x11extras5-dev \ 24 | libqt5svg5-dev libqt5xmlpatterns5 qttools5-dev qtxmlpatterns5-dev-tools 25 | 26 | # Development tools 27 | apt install -y --no-install-recommends \ 28 | clang-tools clang-tidy clang-format cmake cmake-curses-gui \ 29 | gcc g++ ninja-build curl cppcheck 30 | 31 | # External dependencies 32 | apt install -y --no-install-recommends \ 33 | libpugixml-dev libtiff-dev libeigen3-dev libdouble-conversion-dev libglew-dev \ 34 | libjsoncpp-dev libboost-dev libpcap-dev libgdal-dev libpdal-dev libpcl-dev \ 35 | libyaml-cpp-dev 36 | 37 | # Ceres dependencies 38 | apt install -y --no-install-recommends \ 39 | libgflags-dev libgoogle-glog-dev libatlas-base-dev 40 | 41 | # Python dependencies 42 | apt install -y --no-install-recommends \ 43 | python3-twisted python3-autobahn python3 python3-dev python3-numpy \ 44 | python3-pandas python3-sphinx python3-pip python3-matplotlib 45 | 46 | python3 -m pip install wslink cftime json-spec 47 | 48 | apt clean all 49 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/ubuntu22/install_nanoflann.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | readonly nanoflann_repo="https://github.com/jlblancoc/nanoflann.git" 6 | readonly nanoflann_commit="v1.5.4" 7 | 8 | readonly nanoflann_root="$HOME/nanoflann" 9 | readonly nanoflann_src="$nanoflann_root/src" 10 | readonly nanoflann_build_root="$nanoflann_root/build" 11 | 12 | git clone "$nanoflann_repo" "$nanoflann_src" 13 | git -C "$nanoflann_src" checkout "$nanoflann_commit" 14 | 15 | nanoflann_build () { 16 | local prefix="$1" 17 | shift 18 | 19 | cmake -GNinja \ 20 | -S "$nanoflann_src" \ 21 | -B "$nanoflann_build_root" \ 22 | "-DCMAKE_INSTALL_PREFIX=$prefix" \ 23 | "$@" 24 | cmake --build "$nanoflann_build_root" --target install 25 | } 26 | 27 | nanoflann_build /usr 28 | 29 | rm -rf "$nanoflann_root" 30 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/ubuntu22/install_paraview.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | readonly paraview_repo="https://gitlab.kitware.com/paraview/paraview.git" 6 | readonly paraview_commit="v5.13.1" 7 | 8 | readonly paraview_root="$HOME/paraview" 9 | readonly paraview_src="$paraview_root/src" 10 | readonly paraview_build_root="$paraview_root/build" 11 | 12 | git clone "$paraview_repo" "$paraview_src" --recursive 13 | git -C "$paraview_src" checkout "$paraview_commit" --recurse-submodules 14 | 15 | paraview_build () { 16 | local prefix="$1" 17 | shift 18 | 19 | cmake -GNinja \ 20 | -S "$paraview_src" \ 21 | -B "$paraview_build_root" \ 22 | -DCMAKE_BUILD_TYPE=Release \ 23 | -DPARAVIEW_BUILD_TESTING=OFF \ 24 | -DPARAVIEW_ENABLE_GDAL=ON \ 25 | -DPARAVIEW_ENABLE_PDAL=ON \ 26 | -DPARAVIEW_USE_VTKM=OFF \ 27 | -DPARAVIEW_USE_QT=ON \ 28 | -DPARAVIEW_USE_PYTHON=ON \ 29 | "-DCMAKE_INSTALL_PREFIX=$prefix" \ 30 | "$@" 31 | cmake --build "$paraview_build_root" --target install 32 | } 33 | 34 | paraview_build /usr 35 | 36 | rm -rf "$paraview_root" 37 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/ubuntu22/install_tins.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | readonly version="4.5" 6 | readonly tarball="v$version.tar.gz" 7 | readonly sha256sum="6ff5fe1ada10daef8538743dccb9c9b3e19d05d028ffdc24838e62ff3fc55841" 8 | 9 | readonly tins_root="$HOME/tins" 10 | readonly tins_src="$tins_root/src" 11 | readonly tins_build_root="$tins_root/build" 12 | 13 | mkdir -p "$tins_root" 14 | cd "$tins_root" 15 | 16 | echo "$sha256sum $tarball" > tins.sha256sum 17 | curl -OL "https://github.com/mfontanini/libtins/archive/refs/tags/v$version.tar.gz" 18 | sha256sum --check tins.sha256sum 19 | mkdir -p "$tins_src" 20 | tar -xf "$tarball" -C "$tins_src" --strip-components 1 --no-same-owner 21 | cd "$tins_src" && git apply "/root/tins-fix-cmake-config-install.patch" 22 | 23 | tins_build () { 24 | local prefix="$1" 25 | shift 26 | 27 | cmake -GNinja \ 28 | -S "$tins_src" \ 29 | -B "$tins_build_root" \ 30 | -DCMAKE_BUILD_TYPE=Release \ 31 | -DLIBTINS_BUILD_TESTS=OFF \ 32 | -DLIBTINS_BUILD_EXAMPLES=OFF \ 33 | "-DCMAKE_INSTALL_PREFIX=$prefix" \ 34 | "$@" 35 | cmake --build "$tins_build_root" --target install 36 | } 37 | 38 | tins_build /usr 39 | 40 | rm -rf "$tins_root" 41 | -------------------------------------------------------------------------------- /.gitlab/ci/docker/ubuntu22/tins-fix-cmake-config-install.patch: -------------------------------------------------------------------------------- 1 | diff --git a/CMakeLists.txt b/CMakeLists.txt 2 | index 696385f..81ad0c9 100644 3 | --- a/CMakeLists.txt 4 | +++ b/CMakeLists.txt 5 | @@ -1,4 +1,4 @@ 6 | -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.1) 7 | +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) 8 | PROJECT(libtins) 9 | 10 | OPTION(LIBTINS_BUILD_EXAMPLES "Build examples" ON) 11 | @@ -317,11 +317,7 @@ ENDIF() 12 | # CMake project configuration export 13 | # ********************************** 14 | 15 | -if(UNIX) 16 | - set(CONF_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/libtins") 17 | -else() 18 | - set(CONF_CMAKE_INSTALL_DIR CMake) 19 | -endif() 20 | +set(CONF_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/libtins") 21 | 22 | # Add all targets to the build-tree export set 23 | EXPORT( 24 | @@ -332,23 +328,33 @@ EXPORT( 25 | # Export the package for use from the build-tree 26 | # (this registers the build-tree with a global CMake-registry) 27 | EXPORT(PACKAGE libtins) 28 | +INCLUDE(CMakePackageConfigHelpers) 29 | 30 | # Create the libtinsConfig.cmake and libtinsConfigVersion.cmake files 31 | # for the build tree 32 | -SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include") 33 | -CONFIGURE_FILE( 34 | +SET(CONF_INCLUDE_DIRS "include") 35 | +CONFIGURE_PACKAGE_CONFIG_FILE( 36 | cmake/libtinsConfig.cmake.in 37 | - "${PROJECT_BINARY_DIR}/libtinsConfig.cmake" @ONLY 38 | + "${PROJECT_BINARY_DIR}/libtinsConfig.cmake" 39 | + INSTALL_DESTINATION ${CONF_CMAKE_INSTALL_DIR} 40 | + PATH_VARS CONF_INCLUDE_DIRS 41 | ) 42 | CONFIGURE_FILE( 43 | cmake/libtinsConfigVersion.cmake.in 44 | "${PROJECT_BINARY_DIR}/libtinsConfigVersion.cmake" @ONLY 45 | ) 46 | +CONFIGURE_FILE( 47 | + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/FindPCAP.cmake" 48 | + "${PROJECT_BINARY_DIR}/FindPCAP.cmake" 49 | + COPYONLY 50 | +) 51 | + 52 | # Install the libtinsConfig.cmake and libtinsConfigVersion.cmake 53 | INSTALL( 54 | FILES 55 | "${PROJECT_BINARY_DIR}/libtinsConfig.cmake" 56 | "${PROJECT_BINARY_DIR}/libtinsConfigVersion.cmake" 57 | + "${PROJECT_BINARY_DIR}/FindPCAP.cmake" 58 | DESTINATION ${CONF_CMAKE_INSTALL_DIR} 59 | COMPONENT dev 60 | ) 61 | diff --git a/cmake/Modules/FindPCAP.cmake b/cmake/Modules/FindPCAP.cmake 62 | index 388b30b..f931e31 100644 63 | --- a/cmake/Modules/FindPCAP.cmake 64 | +++ b/cmake/Modules/FindPCAP.cmake 65 | @@ -42,10 +42,18 @@ find_library(PCAP_LIBRARY 66 | HINTS ${HINT_DIR} 67 | ) 68 | 69 | +if (PCAP_LIBRARY AND PCAP_INCLUDE_DIR) 70 | + add_library(PCAP::pcap UNKNOWN IMPORTED) 71 | + set_target_properties(PCAP::pcap 72 | + PROPERTIES 73 | + IMPORTED_LOCATION "${PCAP_LIBRARY}" 74 | + INTERFACE_INCLUDE_DIRECTORIES "${PCAP_INCLUDE_DIR}") 75 | + set(PCAP_LIBRARIES PCAP::pcap) 76 | +endif () 77 | + 78 | include(FindPackageHandleStandardArgs) 79 | find_package_handle_standard_args(PCAP DEFAULT_MSG 80 | - PCAP_LIBRARY 81 | - PCAP_INCLUDE_DIR 82 | + PCAP_LIBRARIES PCAP_LIBRARY PCAP_INCLUDE_DIR 83 | ) 84 | 85 | include(CheckCXXSourceCompiles) 86 | diff --git a/cmake/libtinsConfig.cmake.in b/cmake/libtinsConfig.cmake.in 87 | index 183b245..fa8fd2f 100644 88 | --- a/cmake/libtinsConfig.cmake.in 89 | +++ b/cmake/libtinsConfig.cmake.in 90 | @@ -3,14 +3,29 @@ 91 | # LIBTINS_INCLUDE_DIRS - include directories for libtins 92 | # LIBTINS_LIBRARIES - libraries to link against 93 | 94 | -# Compute paths 95 | +@PACKAGE_INIT@ 96 | + 97 | +set("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save" "${CMAKE_MODULE_PATH}") 98 | +list(INSERT CMAKE_MODULE_PATH 0 99 | + "${CMAKE_CURRENT_LIST_DIR}") 100 | + 101 | get_filename_component(LIBTINS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 102 | -set(LIBTINS_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") 103 | +set_and_check(LIBTINS_INCLUDE_DIRS "@PACKAGE_CONF_INCLUDE_DIRS@") 104 | + 105 | +include(CMakeFindDependencyMacro) 106 | +find_dependency(PCAP) 107 | 108 | # Our library dependencies (contains definitions for IMPORTED targets) 109 | if(NOT TARGET libtins AND NOT LIBTINS_BINARY_DIR) 110 | include("${LIBTINS_CMAKE_DIR}/libtinsTargets.cmake") 111 | + 112 | + set_target_properties(tins 113 | + PROPERTIES 114 | + INTERFACE_INCLUDE_DIRECTORIES "${LIBTINS_INCLUDE_DIRS}") 115 | endif() 116 | 117 | # These are IMPORTED targets created by libtinsTargets.cmake 118 | set(LIBTINS_LIBRARIES tins) 119 | + 120 | +set(CMAKE_MODULE_PATH "${${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save}") 121 | +unset("${CMAKE_FIND_PACKAGE_NAME}_CMAKE_MODULE_PATH_save") 122 | \ No newline at end of file 123 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt 124 | index 88f47a2..e14f519 100644 125 | --- a/src/CMakeLists.txt 126 | +++ b/src/CMakeLists.txt 127 | @@ -212,7 +212,7 @@ ADD_LIBRARY( 128 | ${HEADERS} 129 | ) 130 | 131 | -TARGET_LINK_LIBRARIES(tins ${PCAP_LIBRARY} ${OPENSSL_LIBRARIES} ${LIBTINS_OS_LIBS}) 132 | +TARGET_LINK_LIBRARIES(tins PUBLIC ${PCAP_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBTINS_OS_LIBS}) 133 | 134 | SET_TARGET_PROPERTIES(tins PROPERTIES OUTPUT_NAME tins) 135 | SET_TARGET_PROPERTIES(tins PROPERTIES VERSION ${LIBTINS_VERSION} SOVERSION ${LIBTINS_VERSION} ) 136 | -------------------------------------------------------------------------------- /.gitlab/ci/excluded_tests.md: -------------------------------------------------------------------------------- 1 | ## ci-windows 2 | 3 | - `lv` -> LidarView ci doesn't support UI tests on all platforms. 4 | - `Python` -> Segfault need investigation. 5 | - `TestVelodyneLidarStream_HDL_64` -> Stream frame delayed since [velodyneplugin!12](https://gitlab.kitware.com/LidarView/velodyneplugin/-/merge_requests/12) update 6 | 7 | 8 | ## ci-ubuntu22-debug 9 | 10 | - `TestVelodyneHDLPositionReader` -> doesn't find proj.db, gdal issue? 11 | - `TestVelodyneLidarStream_HDL_64` -> Stream 2nd frame wrong since [lidarview-core!542](https://gitlab.kitware.com/LidarView/lidarview-core/-/merge_requests/542) update 12 | -------------------------------------------------------------------------------- /.gitlab/ci/json_schema_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | readonly resources_path="Application/Qt/ApplicationComponents/Resources" 6 | readonly schema_name="interface_modes_config.schema.json" 7 | readonly json_name="interface_modes_config.json" 8 | 9 | json validate --schema-file="$resources_path/$schema_name" --document-file="$resources_path/$json_name" 10 | -------------------------------------------------------------------------------- /.gitlab/ci/ninja.ps1: -------------------------------------------------------------------------------- 1 | $erroractionpreference = "stop" 2 | 3 | $version = "1.10.2" 4 | $sha256sum = "BBDE850D247D2737C5764C927D1071CBB1F1957DCABDA4A130FA8547C12C695F" 5 | $filename = "ninja-win" 6 | $tarball = "$filename.zip" 7 | 8 | $outdir = $pwd.Path 9 | $outdir = "$outdir\.gitlab" 10 | $ProgressPreference = "SilentlyContinue" 11 | Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball" 12 | $hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 13 | if ($hash.Hash -ne $sha256sum) { 14 | exit 1 15 | } 16 | 17 | Add-Type -AssemblyName System.IO.Compression.FileSystem 18 | [System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir") 19 | -------------------------------------------------------------------------------- /.gitlab/ci/ninja.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | readonly version="1.10.2" 6 | 7 | case "$( uname -s )" in 8 | Linux) 9 | shatool="sha256sum" 10 | sha256sum="763464859c7ef2ea3a0a10f4df40d2025d3bb9438fcb1228404640410c0ec22d" 11 | platform="linux" 12 | ;; 13 | Darwin) 14 | shatool="shasum -a 256" 15 | sha256sum="6fa359f491fac7e5185273c6421a000eea6a2f0febf0ac03ac900bd4d80ed2a5" 16 | platform="mac" 17 | ;; 18 | *) 19 | echo "Unrecognized platform $( uname -s )" 20 | exit 1 21 | ;; 22 | esac 23 | readonly shatool 24 | readonly sha256sum 25 | readonly platform 26 | 27 | readonly filename="ninja-$platform" 28 | readonly tarball="$filename.zip" 29 | 30 | cd .gitlab 31 | 32 | echo "$sha256sum $tarball" > ninja.sha256sum 33 | curl -OL "https://github.com/ninja-build/ninja/releases/download/v$version/$tarball" 34 | $shatool --check ninja.sha256sum 35 | ./cmake/bin/cmake -E tar xf "$tarball" 36 | -------------------------------------------------------------------------------- /.gitlab/ci/scripts/build_deps.ps1: -------------------------------------------------------------------------------- 1 | $lvsb_path = "C:\lidarview-ci\LVSB-DEPS" 2 | $qtbinaries = "C:\Qt\Qt5.12.9\5.12.9\msvc2017_64\bin" 3 | 4 | cmake -DLVSB_PATH=$lvsb_path -P .gitlab/ci/download_superbuild_deps.cmake 5 | cmake -S $lvsb_path/src -B $lvsb_path -C .gitlab/ci/configure_superbuild_deps.cmake -GNinja -DQTBINARIES=$qtbinaries 6 | cmake --build $lvsb_path --parallel 8 7 | -------------------------------------------------------------------------------- /.gitlab/ci/scripts/configure_superbuild_deps.cmake: -------------------------------------------------------------------------------- 1 | if (NOT DEFINED "${QTBINARIES}") 2 | message(FATAL_ERROR "QTBINARIES is not defined.") 3 | else() 4 | get_filename_component(qt5_cmake_dir "${QTBINARIES}/../lib/cmake/Qt5" ABSOLUTE) 5 | message(STATUS "Found Qt5 at ${qt5_cmake_dir}") 6 | endif() 7 | 8 | set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") 9 | set(BUILD_TESTING OFF CACHE STRING "") 10 | 11 | # Disable lidarview as will be built later. 12 | set(ENABLE_lidarview OFF CACHE STRING "") 13 | 14 | # LidarView required dependencies 15 | set(ENABLE_paraview ON CACHE STRING "") 16 | set(ENABLE_qt5 ON CACHE STRING "") 17 | set(ENABLE_pcap ON CACHE STRING "") 18 | set(ENABLE_boost ON CACHE STRING "") 19 | set(ENABLE_eigen ON CACHE STRING "") 20 | set(ENABLE_las ON CACHE STRING "") 21 | set(ENABLE_yaml ON CACHE STRING "") 22 | set(ENABLE_python3 ON CACHE STRING "") 23 | set(ENABLE_numpy ON CACHE STRING "") 24 | 25 | # LidarView optionnal dependencies 26 | set(ENABLE_slam ON CACHE STRING "") 27 | set(ENABLE_hesaisdk ON CACHE STRING "") 28 | set(ENABLE_pcl ON CACHE STRING "") 29 | set(ENABLE_ceres ON CACHE STRING "") 30 | set(ENABLE_opencv OFF CACHE STRING "") 31 | set(ENABLE_nanoflann ON CACHE STRING "") 32 | 33 | # System Qt5 34 | set(USE_SYSTEM_qt5 ON CACHE STRING "") 35 | set(Qt5_DIR ${qt5_cmake_dir} CACHE STRING "") 36 | -------------------------------------------------------------------------------- /.gitlab/ci/scripts/download_superbuild_deps.cmake: -------------------------------------------------------------------------------- 1 | if (NOT DEFINED "${LVSB_PATH}") 2 | message(FATAL_ERROR "LVSB_PATH is not defined.") 3 | else() 4 | get_filename_component(lvsb_deps_path "${LVSB_PATH}" ABSOLUTE) 5 | endif() 6 | 7 | # Remove current deps folder 8 | message(STATUS "Cleaning old dependencies folder") 9 | file(REMOVE_RECURSE ${lvsb_deps_path}) 10 | 11 | set(lvsb_deps_binary_dir "${lvsb_deps_path}") 12 | set(lvsb_deps_source_dir "${lvsb_deps_path}/src") 13 | set(lvsb_deps_subbuild_dir "${lvsb_deps_path}/subbuild") 14 | 15 | message(STATUS "Cloning lvsb repository to build LidarView dependencies") 16 | include(FetchContent) 17 | FetchContent_Populate( 18 | lvsb_deps 19 | GIT_REPOSITORY https://gitlab.kitware.com/LidarView/lidarview-superbuild.git 20 | GIT_TAG master 21 | BINARY_DIR ${lvsb_deps_binary_dir} 22 | SOURCE_DIR ${lvsb_deps_source_dir} 23 | SUBBUILD_DIR ${lvsb_deps_subbuild_dir} 24 | QUIET 25 | ) 26 | -------------------------------------------------------------------------------- /.gitlab/ci/vcvarsall.ps1: -------------------------------------------------------------------------------- 1 | $erroractionpreference = "stop" 2 | 3 | cmd /c "`"$env:VCVARSALL`" $env:VCVARSPLATFORM -vcvars_ver=$env:VCVARSVERSION & set" | 4 | foreach { 5 | if ($_ -match "=") { 6 | $v = $_.split("=") 7 | [Environment]::SetEnvironmentVariable($v[0], $v[1]) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.gitlab/os-linux.yml: -------------------------------------------------------------------------------- 1 | # Linux-specific builder configurations and build commands 2 | 3 | ## Base configurations 4 | .linux: 5 | variables: 6 | GIT_CLONE_PATH: $CI_BUILDS_DIR/kitware-lidarview-ci 7 | GIT_SUBMODULE_STRATEGY: none 8 | 9 | .ubuntu22: 10 | extends: .linux 11 | image: "gitlab.kitware.com:4567/lidarview/lidarview:ci-ubuntu22-20241104" 12 | 13 | .ubuntu22_debug: 14 | extends: .ubuntu22 15 | 16 | variables: 17 | CMAKE_CONFIGURATION: ubuntu22_debug 18 | 19 | .ubuntu22_debug_tidy: 20 | extends: .ubuntu22_debug 21 | 22 | variables: 23 | CMAKE_CONFIGURATION: ubuntu22_debug_tidy 24 | 25 | ## Tags 26 | 27 | .linux_builder_tags: 28 | tags: 29 | - build 30 | - docker 31 | - linux-x86_64 32 | - lidarview 33 | 34 | .linux_tester_tags: 35 | tags: 36 | - docker 37 | - lidarview 38 | - linux-x86_64 39 | 40 | ## Linux-specific scripts 41 | 42 | .before_script_linux: &before_script_linux 43 | - .gitlab/ci/cmake.sh 44 | - .gitlab/ci/ninja.sh 45 | - export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH 46 | - cmake --version 47 | - ninja --version 48 | - "git submodule update --init --recursive || :" 49 | - git submodule sync --recursive 50 | - git submodule update --init --recursive --force 51 | - .gitlab/ci/checkout_trigger_submodule.sh 52 | 53 | .cmake_build_linux: 54 | stage: build 55 | 56 | script: 57 | - *before_script_linux 58 | - cmake -S $CI_PROJECT_DIR -B $CI_PROJECT_DIR/build -C .gitlab/ci/configure_$CMAKE_CONFIGURATION.cmake -GNinja 59 | - cmake --build $CI_PROJECT_DIR/build --parallel 8 60 | interruptible: true 61 | 62 | .cmake_test_linux: 63 | stage: test 64 | 65 | script: 66 | - *before_script_linux 67 | - cp .gitlab/ci/CMakePresets.json $CI_PROJECT_DIR 68 | - xvfb-run ctest --preset ci_$CMAKE_CONFIGURATION 69 | 70 | interruptible: true 71 | 72 | .clang_format_check: 73 | stage: analyse 74 | 75 | script: 76 | - *before_script_linux 77 | - git fetch --all 78 | - .gitlab/ci/clang_format_check.sh 79 | - .gitlab/ci/json_schema_check.sh 80 | allow_failure: 81 | exit_codes: 1 82 | 83 | interruptible: true 84 | 85 | .clang_tidy_check: 86 | stage: analyse 87 | 88 | script: 89 | - *before_script_linux 90 | - git fetch --all 91 | - cp .clang-tidy $CI_PROJECT_DIR/build 92 | - .gitlab/ci/clang_tidy_check.sh 93 | allow_failure: 94 | exit_codes: 1 95 | 96 | interruptible: true 97 | -------------------------------------------------------------------------------- /.gitlab/os-windows.yml: -------------------------------------------------------------------------------- 1 | # Windows-specific builder configurations and build commands 2 | 3 | ## Base configurations 4 | .windows: 5 | variables: 6 | GIT_CLONE_PATH: "$CI_BUILDS_DIR\\lidarview-ci\\$CI_PROJECT_ID" 7 | LVSB_PATH: "$CI_BUILDS_DIR\\lidarview-ci\\DEPS-241015" 8 | GIT_SUBMODULE_DEPTH: 1 9 | 10 | # Force "desktop" OpenGL support. Qt seems to want to use EGL when run 11 | # from GitLab-CI by default (it runs as a Windows service). 12 | QT_OPENGL: desktop 13 | 14 | .windows_vs2019: 15 | extends: .windows 16 | 17 | variables: 18 | CMAKE_CONFIGURATION: windows_vs2019 19 | QTBINARIES: "C:\\Qt\\Qt5.12.9\\5.12.9\\msvc2017_64\\bin" 20 | VCVARSALL: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat" 21 | VCVARSPLATFORM: "x64" 22 | VCVARSVERSION: "14.29.30133" 23 | 24 | ## Tags 25 | 26 | .windows_builder_tags: 27 | tags: 28 | - lidarview 29 | - msvc-19.29 30 | - shell 31 | - windows-x86_64 32 | - qt-5.12.9 33 | 34 | .windows_test_tags: 35 | tags: 36 | - lidarview 37 | - msvc-19.29 38 | - vs2019 39 | - windows-x86_64 40 | - qt-5.12.9 41 | 42 | ## Windows-specific scripts 43 | 44 | .before_script_windows: &before_script_windows 45 | - $pwdpath = $pwd.Path 46 | - powershell -File ".gitlab/ci/ninja.ps1" 47 | - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$env:PATH" 48 | - cmake --version 49 | - ninja --version 50 | - git submodule sync --recursive 51 | - git submodule update --init --recursive --force 52 | - powershell -File ".gitlab/ci/checkout_trigger_submodule.ps1" 53 | 54 | .before_script_windows_deps: &before_script_windows_deps 55 | - Set-Item -Force -Path "env:PATH" -Value "$QTBINARIES;$env:PATH" 56 | - Set-Item -Force -Path "env:PATH" -Value "$LVSB_PATH\install\bin;$env:PATH" 57 | - Set-Item -Force -Path "env:PYTHONHOME" -Value "$LVSB_PATH\install\Python" 58 | 59 | .cmake_build_windows: 60 | stage: build 61 | 62 | script: 63 | - *before_script_windows 64 | - *before_script_windows_deps 65 | - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1 66 | - cmake -S $CI_PROJECT_DIR -B $CI_PROJECT_DIR/build -C .gitlab/ci/configure_$CMAKE_CONFIGURATION.cmake -GNinja 67 | - cmake --build $CI_PROJECT_DIR/build --parallel 8 68 | interruptible: true 69 | 70 | .cmake_test_windows: 71 | stage: test 72 | 73 | script: 74 | - *before_script_windows 75 | - *before_script_windows_deps 76 | # Some tests are in LidarView plugins directories 77 | - Set-Item -Force -Path "env:PATH" -Value "$CI_PROJECT_DIR\build\bin;$env:PATH" 78 | - Set-Item -Force -Path "env:PYTHONPATH" -Value "$LVSB_PATH\install\Python\Lib\site-packages" 79 | # Some tests run CMake steps, so we need a compiler environment. 80 | - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1 81 | - Copy-Item -Path ".gitlab\ci\CMakePresets.json" -Destination "$CI_PROJECT_DIR" 82 | - ctest --preset ci_$CMAKE_CONFIGURATION 83 | interruptible: true 84 | -------------------------------------------------------------------------------- /.gitlab/rules.yml: -------------------------------------------------------------------------------- 1 | # Rules for where jobs can run 2 | # Create a pipeline only in some cases : merge_request, tag or master branch 3 | 4 | .run_automatically: 5 | rules: 6 | - if: '$CI_MERGE_REQUEST_ID' 7 | when: on_success 8 | - if: '$TRIGGER_MODULE_PATH' 9 | when: on_success 10 | - if: $CI_COMMIT_TAG 11 | when: on_success 12 | - if: $CI_COMMIT_BRANCH == "master" 13 | when: on_success 14 | - when: never 15 | 16 | .run_manually: 17 | rules: 18 | - if: '$CI_MERGE_REQUEST_ID' 19 | # when: manual 20 | - if: '$TRIGGER_MODULE_PATH && $TRIGGER_MODULE_BRANCH != "master"' 21 | # when: manual 22 | - if: $TRIGGER_MODULE_BRANCH == "master" 23 | - if: $CI_COMMIT_TAG 24 | - if: $CI_COMMIT_BRANCH == "master" 25 | - when: never 26 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "LVCore"] 2 | path = LVCore 3 | url = https://gitlab.kitware.com/LidarView/lidarview-core.git 4 | branch = master 5 | [submodule "Plugins/VelodynePlugin"] 6 | path = Plugins/VelodynePlugin 7 | url = https://gitlab.kitware.com/LidarView/velodyneplugin.git 8 | [submodule "Plugins/HesaiPlugin"] 9 | path = Plugins/HesaiPlugin 10 | url = https://gitlab.kitware.com/LidarView/HesaiPlugin.git 11 | [submodule "Plugins/LivoxPlugin"] 12 | path = Plugins/LivoxPlugin 13 | url = https://gitlab.kitware.com/LidarView/livoxplugin.git 14 | [submodule "Plugins/LeishenPlugin"] 15 | path = Plugins/LeishenPlugin 16 | url = https://gitlab.kitware.com/LidarView/leishenplugin.git 17 | [submodule "Plugins/RobosensePlugin"] 18 | path = Plugins/RobosensePlugin 19 | url = https://gitlab.kitware.com/LidarView/robosenseplugin.git 20 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | submodules: 4 | include: 5 | - LVCore 6 | 7 | python: 8 | install: 9 | - requirements: doc/requirements.txt 10 | -------------------------------------------------------------------------------- /Application/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #-------------------------------------- 2 | # Scan and find LidarViewApp vtk modules 3 | #-------------------------------------- 4 | set(lidarview_source_directories 5 | "${CMAKE_CURRENT_SOURCE_DIR}/Qt" 6 | ) 7 | 8 | vtk_module_find_modules(lidarview_module_files ${lidarview_source_directories}) 9 | vtk_module_scan( 10 | MODULE_FILES ${lidarview_module_files} 11 | PROVIDES_MODULES lidarview_modules 12 | REQUIRES_MODULES lidarview_required_modules 13 | UNRECOGNIZED_MODULES lidarview_unrecognized_modules 14 | WANT_BY_DEFAULT ON) 15 | 16 | set(lidarview_unrecognized_lidarview_modules) 17 | foreach (lidarview_module IN LISTS lidarview_unrecognized_modules) 18 | if (lidarview_module MATCHES "LidarViewApp::") 19 | list(APPEND lidarview_unrecognized_lidarview_modules 20 | "${lidarview_module}") 21 | endif () 22 | endforeach () 23 | 24 | if (lidarview_unrecognized_lidarview_modules) 25 | message(FATAL_ERROR 26 | "The following modules were requested or required, but not found: " 27 | "${lidarview_unrecognized_lidarview_modules}.") 28 | endif () 29 | 30 | #-------------------------------------- 31 | # Build LidarViewApp vtk modules 32 | #-------------------------------------- 33 | vtk_module_build( 34 | MODULES ${lidarview_modules} 35 | PACKAGE LidarViewApp 36 | INSTALL_EXPORT LidarViewApp 37 | INSTALL_HEADERS "${LIDARVIEW_INSTALL_DEVELOPMENT_FILES}" 38 | HEADERS_DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/lidarview" 39 | CMAKE_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/lidarview" 40 | VERSION "${LIDARVIEW_VERSION}" 41 | ENABLE_WRAPPING OFF) 42 | 43 | #-------------------------------------- 44 | # Build LidarView binary 45 | #-------------------------------------- 46 | add_subdirectory(Client) 47 | 48 | #-------------------------------------- 49 | # Export python wrapping 50 | #-------------------------------------- 51 | add_subdirectory(Wrapping/Python) -------------------------------------------------------------------------------- /Application/Client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Sanitize checks 2 | if(NOT SOFTWARE_NAME OR NOT SOFTWARE_VENDOR) 3 | message(FATAL_ERROR "SOFTWARE_NAME or SOFTWARE_VENDOR branding not set") 4 | endif() 5 | if(NOT LIDARVIEW_VERSION_FULL) 6 | message(FATAL_ERROR "LIDARVIEW_VERSION_ variables not set") 7 | endif() 8 | 9 | set(CMAKE_AUTOMOC ON) 10 | set(CMAKE_AUTORCC ON) 11 | set(CMAKE_AUTOUIC ON) 12 | 13 | if (APPLE) 14 | # Enable high resolution when using Qt5 15 | set(high_resolution_capable "true") 16 | configure_file( 17 | "${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist.in.in" 18 | "${CMAKE_CURRENT_BINARY_DIR}/MacOSXBundleInfo.plist.in" 19 | @ONLY) 20 | unset(high_resolution_capable) 21 | endif () 22 | 23 | set(sources 24 | LidarViewMainWindow.h 25 | LidarViewMainWindow.cxx 26 | LidarViewMainWindow.ui 27 | ) 28 | 29 | set(resource_files 30 | Resources/lvResources.qrc 31 | ) 32 | 33 | set(plugins_targets 34 | ParaView::paraview_plugins 35 | LidarView::lidarview_plugins 36 | ) 37 | 38 | if (LIDARVIEW_USE_LIDARSLAM_PLUGIN) 39 | list(APPEND plugins_targets LidarSlam::paraview_wrapping) 40 | endif () 41 | 42 | paraview_client_add( 43 | NAME ${SOFTWARE_NAME} 44 | NAMESPACE "${SOFTWARE_NAME}" 45 | EXPORT "LidarViewClient" 46 | VERSION "${LIDARVIEW_VERSION_MAJOR}.${LIDARVIEW_VERSION_MINOR}.${LIDARVIEW_VERSION_PATCH}" 47 | APPLICATION_NAME "${SOFTWARE_NAME}" 48 | ORGANIZATION "${SOFTWARE_VENDOR}" 49 | TITLE "${SOFTWARE_NAME} ${LIDARVIEW_VERSION_FULL}" 50 | SPLASH_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/Resources/Images/Splash.jpg" 51 | BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Resources/Images/logo.icns" 52 | BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/MacOSXBundleInfo.plist.in" 53 | APPLICATION_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Resources/Images/logo.ico" 54 | 55 | PLUGINS_TARGETS ${plugins_targets} 56 | REQUIRED_PLUGINS LidarCorePlugin 57 | 58 | MAIN_WINDOW_CLASS LidarViewMainWindow 59 | MAIN_WINDOW_INCLUDE LidarViewMainWindow.h 60 | SOURCES ${sources} ${resource_files} 61 | APPLICATION_XMLS 62 | ${CMAKE_CURRENT_SOURCE_DIR}/lvSources.xml 63 | ${CMAKE_CURRENT_SOURCE_DIR}/lvFilters.xml 64 | 65 | RUNTIME_DESTINATION ${CMAKE_INSTALL_BINDIR} 66 | LIBRARY_DESTINATION ${CMAKE_INSTALL_LIBDIR} 67 | ) 68 | 69 | target_include_directories(${SOFTWARE_NAME} 70 | PRIVATE 71 | ${CMAKE_CURRENT_SOURCE_DIR} 72 | ${CMAKE_CURRENT_BINARY_DIR} 73 | ) 74 | 75 | target_link_libraries(${SOFTWARE_NAME} 76 | PRIVATE 77 | LidarView::lqApplicationComponents # Common LVCore code base 78 | LidarViewApp::lvApplicationComponents # Specific LidarView code base 79 | ) 80 | -------------------------------------------------------------------------------- /Application/Client/LidarViewMainWindow.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: LidarViewMainWindow.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef LidarViewMainWindow_h 17 | #define LidarViewMainWindow_h 18 | 19 | #include 20 | 21 | class LidarViewMainWindow : public QMainWindow 22 | { 23 | Q_OBJECT 24 | typedef QMainWindow Superclass; 25 | 26 | public: 27 | LidarViewMainWindow(); 28 | virtual ~LidarViewMainWindow() override; 29 | 30 | protected: 31 | void dragEnterEvent(QDragEnterEvent* evt) override; 32 | void dropEvent(QDropEvent* evt) override; 33 | void showEvent(QShowEvent* evt) override; 34 | void closeEvent(QCloseEvent* evt) override; 35 | 36 | protected Q_SLOTS: 37 | void handleMessage(const QString&, int); 38 | void showWelcomeDialog(); 39 | void updateFontSize(); 40 | 41 | private: 42 | Q_DISABLE_COPY(LidarViewMainWindow) 43 | 44 | class lqInternals; 45 | lqInternals* Internals; 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Application/Client/MacOSXBundleInfo.plist.in.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${MACOSX_BUNDLE_EXECUTABLE_NAME} 9 | CFBundleGetInfoString 10 | ${MACOSX_BUNDLE_INFO_STRING} 11 | CFBundleIconFile 12 | ${MACOSX_BUNDLE_ICON_FILE} 13 | CFBundleIdentifier 14 | ${MACOSX_BUNDLE_GUI_IDENTIFIER} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | ${MACOSX_BUNDLE_LONG_VERSION_STRING} 19 | CFBundleName 20 | ${MACOSX_BUNDLE_BUNDLE_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | ${MACOSX_BUNDLE_SHORT_VERSION_STRING} 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | ${MACOSX_BUNDLE_BUNDLE_VERSION} 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | NSHumanReadableCopyright 34 | ${MACOSX_BUNDLE_COPYRIGHT} 35 | NSHighResolutionCapable 36 | <@high_resolution_capable@/> 37 | 38 | 39 | -------------------------------------------------------------------------------- /Application/Client/Resources/Icons/absolute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Icons/absolute.png -------------------------------------------------------------------------------- /Application/Client/Resources/Icons/connect.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 39 | 41 | 42 | 44 | image/svg+xml 45 | 47 | 48 | 49 | 50 | 51 | 55 | 61 | 64 | 69 | 74 | 75 | 80 | 86 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /Application/Client/Resources/Icons/crop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 42 | 45 | 46 | 48 | 49 | 51 | image/svg+xml 52 | 54 | 55 | 56 | 57 | 58 | 62 | 67 | 72 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /Application/Client/Resources/Icons/icon_motion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Icons/icon_motion.png -------------------------------------------------------------------------------- /Application/Client/Resources/Icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Icons/logo.png -------------------------------------------------------------------------------- /Application/Client/Resources/Icons/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Icons/map.png -------------------------------------------------------------------------------- /Application/Client/Resources/Icons/planefit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Icons/planefit.png -------------------------------------------------------------------------------- /Application/Client/Resources/Icons/trailingframes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Icons/trailingframes.png -------------------------------------------------------------------------------- /Application/Client/Resources/Images/About.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/About.png -------------------------------------------------------------------------------- /Application/Client/Resources/Images/LidarViewExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/LidarViewExample.png -------------------------------------------------------------------------------- /Application/Client/Resources/Images/LidarViewLogo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Application/Client/Resources/Images/LidarViewMark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Application/Client/Resources/Images/Splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/Splash.jpg -------------------------------------------------------------------------------- /Application/Client/Resources/Images/bottom_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/bottom_logo.png -------------------------------------------------------------------------------- /Application/Client/Resources/Images/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/logo.icns -------------------------------------------------------------------------------- /Application/Client/Resources/Images/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/logo.ico -------------------------------------------------------------------------------- /Application/Client/Resources/Images/logo.iconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/logo.iconset/icon_128x128.png -------------------------------------------------------------------------------- /Application/Client/Resources/Images/logo.iconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/logo.iconset/icon_256x256.png -------------------------------------------------------------------------------- /Application/Client/Resources/Images/logo.iconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/logo.iconset/icon_32x32.png -------------------------------------------------------------------------------- /Application/Client/Resources/Images/logo.iconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Client/Resources/Images/logo.iconset/icon_512x512.png -------------------------------------------------------------------------------- /Application/Client/Resources/lvResources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Icons/absolute.png 4 | Icons/icon_motion.png 5 | Icons/logo.png 6 | Icons/map.png 7 | Icons/planefit.png 8 | Icons/trailingframes.png 9 | Images/About.png 10 | Images/bottom_logo.png 11 | 12 | 13 | -------------------------------------------------------------------------------- /Application/Client/lvFilters.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /Application/Client/lvSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(classes 2 | lqAboutDialogReaction 3 | lqChangeInterfaceReaction 4 | lqCommandLineOptionsBehavior 5 | lqInterfaceControlsToolbar 6 | lqLidarViewManager 7 | lqLidarViewMenuBuilders 8 | lqMainControlsToolbar 9 | lqMenuSaveAsReaction 10 | lqStatusBar 11 | lqViewFrameActionsImplementation 12 | lqWelcomeDialog 13 | ) 14 | 15 | set(ui_files 16 | Resources/UI/lqFileMenuBuilder.ui 17 | Resources/UI/lqEditMenuBuilder.ui 18 | Resources/UI/lqHelpMenuBuilder.ui 19 | Resources/UI/lqInterfaceControlsToolbar.ui 20 | Resources/UI/lqMainControlsToolbar.ui 21 | Resources/UI/lqWelcomeDialog.ui 22 | ) 23 | 24 | set(CMAKE_AUTOMOC 1) 25 | set(CMAKE_AUTORCC 1) 26 | set(CMAKE_AUTOUIC 1) 27 | set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Resources/UI") 28 | 29 | vtk_module_add_module(LidarViewApp::lvApplicationComponents 30 | CLASSES ${classes} 31 | HEADERS ${headers} 32 | SOURCES ${ui_files}) 33 | vtk_module_link(LidarViewApp::lvApplicationComponents 34 | PRIVATE 35 | "Qt${PARAVIEW_QT_MAJOR_VERSION}::Core" 36 | "Qt${PARAVIEW_QT_MAJOR_VERSION}::Widgets") 37 | vtk_module_definitions(LidarViewApp::lvApplicationComponents PRIVATE QT_NO_KEYWORDS) 38 | 39 | include(FileModuleInstaller) 40 | 41 | # Install interface mode json configuration file in the share folder, 42 | # in the build directory and in the install location. 43 | file_module_install( 44 | NAME interface_config 45 | FILES 46 | Resources/interface_modes_config.json 47 | INSTALL_DIRECTORY "share" 48 | ) 49 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/Resources/UI/lqEditMenuBuilder.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | lqEditMenuBuilder 4 | 5 | 6 | &Edit 7 | 8 | 9 | 10 | 11 | :/lvComponents/Icons/lvCalibrationFile.svg:/lvComponents/Icons/lvCalibrationFile.svg 12 | 13 | 14 | Change LiDAR &Configuration... 15 | 16 | 17 | 18 | 19 | true 20 | 21 | 22 | true 23 | 24 | 25 | Show Measurement Grid 26 | 27 | 28 | Ctrl+G 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/Resources/UI/lqFileMenuBuilder.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | lqFileMenuBuilder 4 | 5 | 6 | &File 7 | 8 | 9 | 10 | 11 | :/lvComponents/Icons/lvOpenPcap.svg:/lvComponents/Icons/lvOpenPcap.svg 12 | 13 | 14 | &Open Pcap File... 15 | 16 | 17 | Open a Wireshark-format capture file (.pcap) with data collected from a lidar sensor. 18 | 19 | 20 | Open Pcap File 21 | 22 | 23 | Ctrl+P 24 | 25 | 26 | 27 | 28 | 29 | :/lvComponents/Icons/lvOpenStream.svg:/lvComponents/Icons/lvOpenStream.svg 30 | 31 | 32 | Open Sensor &Stream... 33 | 34 | 35 | 36 | 37 | 38 | :/pqWidgets/Icons/pqSave.svg:/pqWidgets/Icons/pqSave.svg 39 | 40 | 41 | Save Data... 42 | 43 | 44 | Ctrl+S 45 | 46 | 47 | 48 | 49 | 50 | :/lvComponents/Icons/lvSavePcap.svg:/lvComponents/Icons/lvSavePcap.svg 51 | 52 | 53 | Save to Pcap File... 54 | 55 | 56 | Save to Pcap File 57 | 58 | 59 | Save to Pcap File 60 | 61 | 62 | 63 | 64 | &Open... 65 | 66 | 67 | 68 | :/pqWidgets/Icons/pqOpen.svg:/pqWidgets/Icons/pqOpen.svg 69 | 70 | 71 | 72 | 73 | 74 | 75 | &Save as... 76 | 77 | 78 | 79 | :/lvComponents/Icons/lvSaveAs.svg:/lvComponents/Icons/lvSaveAs.svg 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/Resources/UI/lqHelpMenuBuilder.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | lqHelpMenuBuilder 4 | 5 | 6 | &Help 7 | 8 | 9 | 10 | How To SLAM 11 | 12 | 13 | 14 | 15 | Professional Support 16 | 17 | 18 | 19 | 20 | LidarView Web Site 21 | 22 | 23 | 24 | 25 | LidarView Release Notes 26 | 27 | 28 | 29 | 30 | LidarView / ParaView Community Support 31 | 32 | 33 | 34 | 35 | ParaView Guide 36 | 37 | 38 | 39 | 40 | ParaView Online Tutorials 41 | 42 | 43 | 44 | 45 | ParaView Web Site 46 | 47 | 48 | 49 | 50 | Report a bug 51 | 52 | 53 | 54 | 55 | About... 56 | 57 | 58 | 59 | 60 | &More About ParaView... 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/Resources/UI/lqInterfaceControlsToolbar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | lqInterfaceControlsToolbar 4 | 5 | 6 | 7 | 0 8 | 0 9 | 464 10 | 39 11 | 12 | 13 | 14 | User Interface Controls 15 | 16 | 17 | Qt::Horizontal 18 | 19 | 20 | 21 | true 22 | 23 | 24 | 25 | :/lvComponents/Icons/lvLidarViewerSetup.svg:/lvComponents/Icons/lvLidarViewerSetup.svg 26 | 27 | 28 | Lidar Viewer 29 | 30 | 31 | Switch to "Lidar Viewer" mode, for connecting, observing, and recording lidar data. 32 | 33 | 34 | 35 | 36 | true 37 | 38 | 39 | 40 | :/lvComponents/Icons/lvPointCloudToolSetup.svg:/lvComponents/Icons/lvPointCloudToolSetup.svg 41 | 42 | 43 | Point Cloud Tool 44 | 45 | 46 | Switch to "Point Cloud Tool" mode, to process and apply filters on non-temporal point clouds. 47 | 48 | 49 | 50 | 51 | true 52 | 53 | 54 | 55 | :/lvComponents/Icons/lvAdvancedModeSetup.svg:/lvComponents/Icons/lvAdvancedModeSetup.svg 56 | 57 | 58 | Advanced Mode 59 | 60 | 61 | Switch to "Advanced Mode" for an enhanced experience with the complete user interface and extra ParaView tools. 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/Resources/UI/lqMainControlsToolbar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | lqMainControlsToolbar 4 | 5 | 6 | 7 | 0 8 | 0 9 | 464 10 | 39 11 | 12 | 13 | 14 | Main Controls 15 | 16 | 17 | Qt::Horizontal 18 | 19 | 20 | 21 | 22 | :/lvComponents/Icons/lvOpenPcap.svg:/lvComponents/Icons/lvOpenPcap.svg 23 | 24 | 25 | Open Pcap File... 26 | 27 | 28 | Open Pcap File 29 | 30 | 31 | Open Pcap File 32 | 33 | 34 | 35 | 36 | 37 | :/lvComponents/Icons/lvSavePcap.svg:/lvComponents/Icons/lvSavePcap.svg 38 | 39 | 40 | Save to Pcap File... 41 | 42 | 43 | Save to Pcap File 44 | 45 | 46 | Save to Pcap File 47 | 48 | 49 | 50 | 51 | 52 | :/lvComponents/Icons/lvOpenStream.svg:/lvComponents/Icons/lvOpenStream.svg 53 | 54 | 55 | Open Sensor Stream... 56 | 57 | 58 | Open Sensor Stream 59 | 60 | 61 | 62 | 63 | 64 | :/lvComponents/Icons/lvCalibrationFile.svg:/lvComponents/Icons/lvCalibrationFile.svg 65 | 66 | 67 | Chaneg LiDAR &Configuration... 68 | 69 | 70 | 71 | 72 | true 73 | 74 | 75 | 76 | 77 | 78 | 79 | :/pqWidgets/Icons/pqOpen.svg:/pqWidgets/Icons/pqOpen.svg 80 | 81 | 82 | Open... 83 | 84 | 85 | Open 86 | 87 | 88 | 89 | 90 | 91 | :/pqWidgets/Icons/pqSave.svg:/pqWidgets/Icons/pqSave.svg 92 | 93 | 94 | Save Data... 95 | 96 | 97 | 98 | 99 | 100 | :/pqWidgets/Icons/pqResetSession.svg:/pqWidgets/Icons/pqResetSession.svg 101 | 102 | 103 | Reset Session 104 | 105 | 106 | Reset Session 107 | 108 | 109 | Reset Session 110 | 111 | 112 | 113 | 114 | 115 | :pqWidgets/Icons/pqUndo.svg:pqWidgets/Icons/pqUndo.svg 116 | 117 | 118 | &Undo 119 | 120 | 121 | 122 | 123 | 124 | :/pqWidgets/Icons/pqRedo.svg:/pqWidgets/Icons/pqRedo.svg 125 | 126 | 127 | &Redo 128 | 129 | 130 | 131 | 132 | 133 | :/pqWidgets/Icons/pqPalette.svg:/pqWidgets/Icons/pqPalette.svg 134 | 135 | 136 | Load Palette 137 | 138 | 139 | Load a color palette 140 | 141 | 142 | 143 | 144 | true 145 | 146 | 147 | 148 | :/pqWidgets/Icons/pqAutoApply.svg:/pqWidgets/Icons/pqAutoApply.svg 149 | 150 | 151 | Auto Apply 152 | 153 | 154 | Apply changes to parameters automatically 155 | 156 | 157 | 158 | 159 | false 160 | 161 | 162 | true 163 | 164 | 165 | 166 | :/pqWidgets/Icons/pqFindData.svg:/pqWidgets/Icons/pqFindData.svg 167 | 168 | 169 | Find Data... 170 | 171 | 172 | Find data matching various criteria from the current source (v) 173 | 174 | 175 | 176 | 177 | 178 | :/lvComponents/Icons/lvPythonShell.svg:/lvComponents/Icons/lvPythonShell.svg 179 | 180 | 181 | Open Python Shell view 182 | 183 | 184 | Open Python Shell 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/Resources/interface_modes_config.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "LidarView interface modes config schema.", 3 | "$defs": { 4 | "widgets": { 5 | "type": "object", 6 | "properties": { 7 | "show": { 8 | "type": "array", 9 | "items": { 10 | "type": "string" 11 | } 12 | }, 13 | "hide": { 14 | "type": "array", 15 | "items": { 16 | "type": "string" 17 | } 18 | } 19 | } 20 | }, 21 | "interfaceMode": { 22 | "type": "object", 23 | "properties": { 24 | "dockWidgets": { 25 | "type": "array", 26 | "items": { 27 | "type": "string" 28 | } 29 | }, 30 | "menus": { 31 | "$ref": "#/$defs/widgets" 32 | }, 33 | "toolbars": { 34 | "$ref": "#/$defs/widgets" 35 | }, 36 | "automaticallyShowScalarBars": { 37 | "type": "boolean" 38 | }, 39 | "showFrameDecoration": { 40 | "type": "boolean" 41 | } 42 | }, 43 | "required": [ 44 | "dockWidgets", 45 | "menus", 46 | "toolbars", 47 | "showFrameDecoration" 48 | ], 49 | "additionalProperties": false 50 | } 51 | }, 52 | "type": "object", 53 | "properties": { 54 | "lidarViewer": { 55 | "$ref": "#/$defs/interfaceMode" 56 | }, 57 | "pointCloudTool": { 58 | "$ref": "#/$defs/interfaceMode" 59 | }, 60 | "advancedMode": { 61 | "$ref": "#/$defs/interfaceMode" 62 | } 63 | }, 64 | "required": [ 65 | "lidarViewer", 66 | "pointCloudTool", 67 | "advancedMode" 68 | ], 69 | "additionalProperties": false 70 | } -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqAboutDialogReaction.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqAboutDialogReaction.cxx 5 | 6 | Copyright (c) Kitware, Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqAboutDialogReaction.h" 17 | 18 | #include "lqAboutDialog.h" 19 | #include "pqCoreUtilities.h" 20 | 21 | //----------------------------------------------------------------------------- 22 | lqAboutDialogReaction::lqAboutDialogReaction(QAction* parentObject) 23 | : Superclass(parentObject) 24 | { 25 | } 26 | 27 | //----------------------------------------------------------------------------- 28 | void lqAboutDialogReaction::showAboutDialog() 29 | { 30 | lqAboutDialog about_dialog(pqCoreUtilities::mainWidget()); 31 | about_dialog.exec(); 32 | } 33 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqAboutDialogReaction.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqAboutDialogReaction.h 5 | 6 | Copyright (c) Kitware, Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqAboutDialogReaction_h 17 | #define lqAboutDialogReaction_h 18 | 19 | #include "lvApplicationComponentsModule.h" 20 | 21 | #include "pqReaction.h" 22 | 23 | /** 24 | * @ingroup Reactions 25 | * lqAboutDialogReaction used to show the standard about dialog for the 26 | * application. 27 | */ 28 | class LVAPPLICATIONCOMPONENTS_EXPORT lqAboutDialogReaction : public pqReaction 29 | { 30 | Q_OBJECT 31 | typedef pqReaction Superclass; 32 | 33 | public: 34 | lqAboutDialogReaction(QAction* parent); 35 | 36 | /** 37 | * Shows the about dialog for the application. 38 | */ 39 | static void showAboutDialog(); 40 | 41 | protected: 42 | /** 43 | * Called when the action is triggered. 44 | */ 45 | void onTriggered() override { lqAboutDialogReaction::showAboutDialog(); } 46 | 47 | private: 48 | Q_DISABLE_COPY(lqAboutDialogReaction) 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqChangeInterfaceReaction.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqChangeInterfaceReaction.cxx 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqChangeInterfaceReaction.h" 17 | 18 | #include "lqLidarViewManager.h" 19 | 20 | //----------------------------------------------------------------------------- 21 | lqChangeInterfaceReaction::lqChangeInterfaceReaction(QAction* parent, 22 | lqLidarViewManager::InterfaceModes mode) 23 | : Superclass(parent) 24 | , interfaceMode(mode) 25 | { 26 | this->connect(lqLidarViewManager::instance(), 27 | &lqLidarViewManager::interfaceLayoutUpdated, 28 | this, 29 | &lqChangeInterfaceReaction::updateEnableState); 30 | } 31 | 32 | //----------------------------------------------------------------------------- 33 | void lqChangeInterfaceReaction::updateEnableState(lqLidarViewManager::InterfaceModes currentMode) 34 | { 35 | bool currentActionChanged = currentMode == this->interfaceMode; 36 | this->parentAction()->blockSignals(true); 37 | this->parentAction()->setChecked(currentActionChanged); 38 | this->parentAction()->setEnabled(!currentActionChanged); 39 | this->parentAction()->blockSignals(false); 40 | } 41 | 42 | //----------------------------------------------------------------------------- 43 | void lqChangeInterfaceReaction::onTriggered() 44 | { 45 | lqLidarViewManager::instance()->updateInterfaceLayout(this->interfaceMode); 46 | } 47 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqChangeInterfaceReaction.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqChangeInterfaceReaction.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqChangeInterfaceReaction_h 17 | #define lqChangeInterfaceReaction_h 18 | 19 | #include "lvApplicationComponentsModule.h" 20 | 21 | #include 22 | #include 23 | 24 | #include 25 | 26 | #include "lqLidarViewManager.h" 27 | 28 | /** 29 | * lqChangeInterfaceReaction is used to switch LidarView different interface mode. 30 | * Each reaction is bind to a button for one mode and then call lqLidarViewManager 31 | * to do the switch. 32 | */ 33 | class LVAPPLICATIONCOMPONENTS_EXPORT lqChangeInterfaceReaction : public pqReaction 34 | { 35 | Q_OBJECT 36 | typedef pqReaction Superclass; 37 | 38 | public: 39 | /** 40 | * Constructor. Parent cannot be nullptr. 41 | */ 42 | lqChangeInterfaceReaction(QAction* parent, lqLidarViewManager::InterfaceModes mode); 43 | 44 | protected Q_SLOTS: 45 | /** 46 | * Whenn triggered, call lqLidarViewManager::updateInterfaceLayout() 47 | */ 48 | void onTriggered() override; 49 | 50 | /** 51 | * Refresh the enabled state. Applications need not explicitly call this. 52 | * Refreshed each a new interface is enabled. 53 | */ 54 | void updateEnableState(lqLidarViewManager::InterfaceModes currentMode); 55 | 56 | private: 57 | Q_DISABLE_COPY(lqChangeInterfaceReaction) 58 | 59 | const lqLidarViewManager::InterfaceModes interfaceMode; 60 | }; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqCommandLineOptionsBehavior.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqCommandLineOptionsBehavior.cxx 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqCommandLineOptionsBehavior.h" 17 | 18 | #include 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | #include 31 | 32 | //----------------------------------------------------------------------------- 33 | lqCommandLineOptionsBehavior::lqCommandLineOptionsBehavior(QObject* parentObject) 34 | : Superclass(parentObject) 35 | { 36 | QObject::connect(&pqActiveObjects::instance(), 37 | &pqActiveObjects::viewChanged, 38 | this, 39 | &lqCommandLineOptionsBehavior::onActiveViewChanged); 40 | 41 | // The process must be started from a "main" connection (otherwise xvfb-run will timeout) 42 | // that is why can't trigger it directly from onActiveViewChanged. 43 | QObject::connect(this, 44 | &lqCommandLineOptionsBehavior::lidarGridViewActive, 45 | this, 46 | &lqCommandLineOptionsBehavior::processCommandLineOptions); 47 | } 48 | 49 | //----------------------------------------------------------------------------- 50 | void lqCommandLineOptionsBehavior::onActiveViewChanged(pqView* view) 51 | { 52 | pqRenderView* renderView = dynamic_cast(view); 53 | if (renderView) 54 | { 55 | const std::string viewName = view->getViewProxy()->GetVTKClassName(); 56 | if (viewName == "vtkLidarGridView" && !signalEmitted) 57 | { 58 | signalEmitted = true; 59 | // Delay signal emission as in paraview 60 | pqTimer::singleShot(250, this, SLOT(emitLidarGridViewActive())); 61 | } 62 | } 63 | } 64 | 65 | //----------------------------------------------------------------------------- 66 | void lqCommandLineOptionsBehavior::emitLidarGridViewActive() 67 | { 68 | Q_EMIT this->lidarGridViewActive(); 69 | } 70 | 71 | //----------------------------------------------------------------------------- 72 | void lqCommandLineOptionsBehavior::processCommandLineOptions() 73 | { 74 | // Handle server connection. 75 | pqCommandLineOptionsBehavior::processServerConnection(); 76 | 77 | // Handle plugins to load at startup. 78 | pqCommandLineOptionsBehavior::processPlugins(); 79 | 80 | // Handle data. 81 | pqCommandLineOptionsBehavior::processData(); 82 | 83 | // Handle state file. 84 | pqCommandLineOptionsBehavior::processState(); 85 | 86 | // Handle script. 87 | pqCommandLineOptionsBehavior::processScript(); 88 | 89 | // Process live 90 | pqCommandLineOptionsBehavior::processLive(); 91 | 92 | auto rcConfig = vtkRemotingCoreConfiguration::GetInstance(); 93 | if (rcConfig->GetDisableRegistry()) 94 | { 95 | // a cout for test playback. 96 | std::cout << "Process started" << std::endl; 97 | } 98 | 99 | // Process tests. 100 | const bool success = pqCommandLineOptionsBehavior::processTests(); 101 | if (pqCoreConfiguration::instance()->exitApplicationWhenTestsDone()) 102 | { 103 | if (pqCoreConfiguration::instance()->testMaster()) 104 | { 105 | pqCollaborationEventPlayer::wait(1000); 106 | } 107 | 108 | // Make sure that the pqApplicationCore::prepareForQuit() method 109 | // get called 110 | QApplication::closeAllWindows(); 111 | QApplication::instance()->exit(success ? 0 : 1); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqCommandLineOptionsBehavior.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqCommandLineOptionsBehavior.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | /** 17 | * @class lqCommandLineOptionsBehavior 18 | * 19 | * This class use pqCommandLineOptionsBehavior methods internally, it is needed 20 | * to be able to test LidarView with the LidarGridView. 21 | */ 22 | 23 | #ifndef lqCommandLineOptionsBehavior_h 24 | #define lqCommandLineOptionsBehavior_h 25 | 26 | #include 27 | 28 | #include "lvApplicationComponentsModule.h" 29 | 30 | class pqView; 31 | 32 | class LVAPPLICATIONCOMPONENTS_EXPORT lqCommandLineOptionsBehavior : public QObject 33 | { 34 | Q_OBJECT 35 | typedef QObject Superclass; 36 | 37 | public: 38 | lqCommandLineOptionsBehavior(QObject* parent = nullptr); 39 | 40 | Q_SIGNALS: 41 | /** 42 | * Signal that trigger processCommandLineOptions() when 43 | * the render view is ready to be tested. 44 | */ 45 | void lidarGridViewActive(); 46 | 47 | private Q_SLOTS: 48 | /** 49 | * Slot triggered each time the active view is changed. 50 | * Check if the active view is a LidarGridView and emit only one 51 | * lidarGridViewActive. 52 | */ 53 | void onActiveViewChanged(pqView* view); 54 | 55 | /** 56 | * Called by a timer to emit lidarGridViewActive 57 | */ 58 | void emitLidarGridViewActive(); 59 | 60 | /** 61 | * Copy of pqCommandLineOptionsBehavior::processCommandLineOptions() 62 | */ 63 | void processCommandLineOptions(); 64 | 65 | private: 66 | Q_DISABLE_COPY(lqCommandLineOptionsBehavior) 67 | 68 | bool signalEmitted = false; 69 | }; 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqInterfaceControlsToolbar.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqInterfaceControlsToolbar.cxx 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqInterfaceControlsToolbar.h" 17 | #include "ui_lqInterfaceControlsToolbar.h" 18 | 19 | #include "lqChangeInterfaceReaction.h" 20 | 21 | //----------------------------------------------------------------------------- 22 | void lqInterfaceControlsToolbar::constructor() 23 | { 24 | Ui::lqInterfaceControlsToolbar ui; 25 | ui.setupUi(this); 26 | 27 | new lqChangeInterfaceReaction( 28 | ui.actionLidarViewerSetup, lqLidarViewManager::InterfaceModes::LIDAR_VIEWER); 29 | new lqChangeInterfaceReaction( 30 | ui.actionPointCloudToolSetup, lqLidarViewManager::InterfaceModes::POINT_CLOUD_TOOL); 31 | new lqChangeInterfaceReaction( 32 | ui.actionAdvancedModeSetup, lqLidarViewManager::InterfaceModes::ADVANCED_MODE); 33 | } 34 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqInterfaceControlsToolbar.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqInterfaceControlsToolbar.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqInterfaceControlsToolbar_h 17 | #define lqInterfaceControlsToolbar_h 18 | 19 | #include "lvApplicationComponentsModule.h" 20 | 21 | #include 22 | 23 | /** 24 | * lqInterfaceControlsToolbar is the toolbar used to switch LidarView interface. 25 | */ 26 | class LVAPPLICATIONCOMPONENTS_EXPORT lqInterfaceControlsToolbar : public QToolBar 27 | { 28 | Q_OBJECT 29 | typedef QToolBar Superclass; 30 | 31 | public: 32 | lqInterfaceControlsToolbar(const QString& title, QWidget* parentObject = nullptr) 33 | : Superclass(title, parentObject) 34 | { 35 | this->constructor(); 36 | } 37 | lqInterfaceControlsToolbar(QWidget* parentObject = nullptr) 38 | : Superclass(parentObject) 39 | { 40 | this->constructor(); 41 | } 42 | 43 | private: 44 | Q_DISABLE_COPY(lqInterfaceControlsToolbar) 45 | 46 | void constructor(); 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqLidarViewManager.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqLidarViewManager.h 5 | 6 | Copyright (c) Kitware, Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqLidarViewManager_h 17 | #define lqLidarViewManager_h 18 | 19 | #include 20 | 21 | #include "lvApplicationComponentsModule.h" 22 | 23 | #include 24 | 25 | class LVAPPLICATIONCOMPONENTS_EXPORT lqLidarViewManager : public lqLidarCoreManager 26 | { 27 | 28 | Q_OBJECT 29 | typedef lqLidarCoreManager Superclass; 30 | 31 | public: 32 | enum InterfaceModes 33 | { 34 | LIDAR_VIEWER = 0, 35 | POINT_CLOUD_TOOL, 36 | ADVANCED_MODE 37 | }; 38 | 39 | lqLidarViewManager(QObject* parent = nullptr); 40 | ~lqLidarViewManager() override; 41 | 42 | /** 43 | * Returns the lqLidarViewManager instance. If no lqLidarViewManager has been 44 | * created then return nullptr. 45 | */ 46 | static lqLidarViewManager* instance() 47 | { 48 | return qobject_cast(Superclass::instance()); 49 | } 50 | 51 | /** 52 | * Change ParaView default settings value such as background color 53 | * and LUT for lidar scalars. 54 | */ 55 | static void setLidarViewDefaultSettings(); 56 | 57 | /** 58 | * Switch to a new interface layout defined by InterfaceModes. 59 | * The modes are defined in json config files. Mode layout configurations 60 | * are stored in memory, which means that when you switch modes while 61 | * LidarView is running, any changes to the layout will be preserved. 62 | * 63 | * Note that a signal interfaceLayoutUpdated will be emitted with the 64 | * new mode, and it will be saved in GeneralSettings.InterfaceMode 65 | */ 66 | void updateInterfaceLayout(InterfaceModes mode); 67 | 68 | /** 69 | * Restore last interface layout used. 70 | */ 71 | void restoreSavedInterfaceLayout(); 72 | 73 | Q_SIGNALS: 74 | /** 75 | * Signal emitted when a new interface mode is changed. 76 | */ 77 | void interfaceLayoutUpdated(InterfaceModes mode); 78 | 79 | private: 80 | Q_DISABLE_COPY(lqLidarViewManager) 81 | 82 | struct lqInternals; 83 | QScopedPointer Internals; 84 | }; 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqLidarViewMenuBuilders.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqLidarViewMenuBuilders.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqLidarViewMenuBuilders_h 17 | #define lqLidarViewMenuBuilders_h 18 | 19 | class pqPropertiesPanel; 20 | class QMenu; 21 | class QMainWindow; 22 | class QString; 23 | 24 | #include "lvApplicationComponentsModule.h" 25 | 26 | /** 27 | * lqLidarViewMenuBuilders provides helper methods to build menus that are 28 | * exactly as used by LidarView client. Simply call the appropriate method with 29 | * the menu as an argument, and it will be populated with actions and reactions 30 | * for standard LidarView behavior. 31 | */ 32 | class LVAPPLICATIONCOMPONENTS_EXPORT lqLidarViewMenuBuilders 33 | { 34 | public: 35 | /** 36 | * Builds standard File menu. 37 | */ 38 | static void buildFileMenu(QMenu& menu); 39 | 40 | /** 41 | * Builds standard Edit menu. 42 | */ 43 | static void buildEditMenu(QMenu& menu, pqPropertiesPanel* propertiesPanel); 44 | 45 | /** 46 | * Builds standard Help menu. 47 | */ 48 | static void buildHelpMenu(QMenu& menu); 49 | 50 | /** 51 | * Builds and adds all standard LidarView toolbars. 52 | */ 53 | static void buildToolbars(QMainWindow& mainWindow); 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqMainControlsToolbar.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqMainControlsToolbar.cxx 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqMainControlsToolbar.h" 17 | #include "ui_lqMainControlsToolbar.h" 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include "vtkSMInterpretersManagerProxy.h" 29 | 30 | #include "lqEnableAdvancedArraysReaction.h" 31 | #include "lqOpenLidarReaction.h" 32 | #include "lqPythonShellReaction.h" 33 | #include "lqSavePcapReaction.h" 34 | #include "lqUpdateConfigurationReaction.h" 35 | #include "pqLoadPaletteReaction.h" 36 | 37 | //----------------------------------------------------------------------------- 38 | void lqMainControlsToolbar::constructor() 39 | { 40 | Ui::lqMainControlsToolbar ui; 41 | ui.setupUi(this); 42 | 43 | new lqOpenLidarReaction(ui.actionOpenPcap, vtkSMInterpretersManagerProxy::Mode::READER); 44 | new lqSavePcapReaction(ui.actionSavePcap); 45 | new lqOpenLidarReaction(ui.actionOpenSensorStream, vtkSMInterpretersManagerProxy::Mode::STREAM); 46 | new lqUpdateConfigurationReaction(ui.actionUpdateConfiguration); 47 | new lqEnableAdvancedArraysReaction(ui.actionToggleAdvancedArrays); 48 | new pqLoadDataReaction(ui.actionOpenData); 49 | new pqSaveDataReaction(ui.actionSaveData); 50 | new pqDeleteReaction(ui.actionDeleteAll, pqDeleteReaction::DeleteModes::ALL); 51 | new pqUndoRedoReaction(ui.actionUndo, true); 52 | new pqUndoRedoReaction(ui.actionRedo, false); 53 | new pqLoadPaletteReaction(ui.actionLoadPalette); 54 | new pqAutoApplyReaction(ui.actionAutoApply); 55 | new pqDataQueryReaction(ui.actionQuery); 56 | new lqPythonShellReaction(ui.actionPythonShell); 57 | 58 | QToolButton* tb = qobject_cast(this->widgetForAction(ui.actionLoadPalette)); 59 | if (tb) 60 | { 61 | tb->setPopupMode(QToolButton::InstantPopup); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqMainControlsToolbar.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqMainControlsToolbar.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqMainControlsToolbar_h 17 | #define lqMainControlsToolbar_h 18 | 19 | #include "lvApplicationComponentsModule.h" 20 | 21 | #include 22 | 23 | /** 24 | * lqMainControlsToolbar is the toolbar with actions (and reactions) for the 25 | * "Main Controls" toolbar in LidarView. 26 | * Simply instantiate this and put it in your application UI file or 27 | * QMainWindow to use it. 28 | */ 29 | class LVAPPLICATIONCOMPONENTS_EXPORT lqMainControlsToolbar : public QToolBar 30 | { 31 | Q_OBJECT 32 | typedef QToolBar Superclass; 33 | 34 | public: 35 | lqMainControlsToolbar(const QString& title, QWidget* parentObject = nullptr) 36 | : Superclass(title, parentObject) 37 | { 38 | this->constructor(); 39 | } 40 | lqMainControlsToolbar(QWidget* parentObject = nullptr) 41 | : Superclass(parentObject) 42 | { 43 | this->constructor(); 44 | } 45 | 46 | private: 47 | Q_DISABLE_COPY(lqMainControlsToolbar) 48 | 49 | void constructor(); 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqMenuSaveAsReaction.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqMenuSaveAsReaction.cxx 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqMenuSaveAsReaction.h" 17 | 18 | #include 19 | 20 | #include "lqHelper.h" 21 | #include "lqSaveLidarFrameReaction.h" 22 | 23 | #include 24 | #include 25 | 26 | //----------------------------------------------------------------------------- 27 | lqMenuSaveAsReaction::lqMenuSaveAsReaction(QMenu* parentObject) 28 | : Superclass(parentObject) 29 | { 30 | auto* core = pqApplicationCore::instance(); 31 | 32 | pqServerManagerModel* smmodel = core->getServerManagerModel(); 33 | this->connect( 34 | smmodel, SIGNAL(sourceAdded(pqPipelineSource*)), SLOT(onUpdateUI(pqPipelineSource*))); 35 | this->connect( 36 | smmodel, SIGNAL(sourceRemoved(pqPipelineSource*)), SLOT(onUpdateUI(pqPipelineSource*))); 37 | 38 | this->onUpdateUI(nullptr); 39 | this->populateMenu(); 40 | } 41 | 42 | //----------------------------------------------------------------------------- 43 | void lqMenuSaveAsReaction::onUpdateUI(pqPipelineSource*) 44 | { 45 | bool hasLidarReader = HasProxy(); 46 | this->parentMenu()->setEnabled(hasLidarReader); 47 | } 48 | 49 | //----------------------------------------------------------------------------- 50 | void lqMenuSaveAsReaction::populateMenu() 51 | { 52 | std::vector supportedExtensions = { "pcd", "csv", "ply", "las" }; 53 | std::vector writers = { 54 | "PCDWriter", "DataSetCSVWriter", "PPLYWriter", "PLASWriter" 55 | }; 56 | 57 | for (unsigned int i = 0; i < supportedExtensions.size(); i++) 58 | { 59 | const char* writer = writers[i].c_str(); 60 | std::string label = "Save as " + supportedExtensions[i] + "..."; 61 | std::string actionName = "actionSave" + supportedExtensions[i]; 62 | QAction* actn = new QAction(label.c_str()); 63 | actn->setObjectName(actionName.c_str()); 64 | new lqSaveLidarFrameReaction(actn, writer, supportedExtensions[i].c_str()); 65 | this->parentMenu()->addAction(actn); 66 | } 67 | } -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqMenuSaveAsReaction.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqMenuSaveAsReaction.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqMenuSaveAsReaction_h 17 | #define lqMenuSaveAsReaction_h 18 | 19 | #include "lvApplicationComponentsModule.h" 20 | 21 | #include 22 | #include 23 | 24 | class pqPipelineSource; 25 | 26 | /** 27 | * @ingroup Reactions 28 | * Reaction to save data files. 29 | */ 30 | class LVAPPLICATIONCOMPONENTS_EXPORT lqMenuSaveAsReaction : public QObject 31 | { 32 | Q_OBJECT 33 | typedef QObject Superclass; 34 | 35 | public: 36 | /** 37 | * Constructor. Parent cannot be nullptr. 38 | */ 39 | lqMenuSaveAsReaction(QMenu* parent); 40 | 41 | /** 42 | * Provides access to the parent menu. 43 | */ 44 | QMenu* parentMenu() const { return qobject_cast(this->parent()); } 45 | 46 | public Q_SLOTS: 47 | /** 48 | * Updates the enabled state. Applications need not explicitly call this. 49 | */ 50 | void onUpdateUI(pqPipelineSource*); 51 | 52 | private: 53 | /** 54 | * Add writers in the menu save as with lqSaveLidarFrameReaction. 55 | */ 56 | void populateMenu(); 57 | 58 | private: 59 | Q_DISABLE_COPY(lqMenuSaveAsReaction) 60 | }; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqStatusBar.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqStatusBar.cxx 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqStatusBar.h" 17 | 18 | #include "lqSensorListWidget.h" 19 | #include "vtkSMLidarProxy.h" 20 | #include "vtkSMLidarStreamProxy.h" 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | //----------------------------------------------------------------------------- 35 | lqStatusBar::lqStatusBar(QWidget* parentObject) 36 | : Superclass(parentObject) 37 | { 38 | this->filenameLabel = new QLabel(this); 39 | this->sensorInfoLabel = new QLabel(this); 40 | 41 | QObject::connect(&pqActiveObjects::instance(), 42 | &pqActiveObjects::sourceChanged, 43 | this, 44 | &lqStatusBar::onActiveSourceChanged); 45 | 46 | this->addWidget(this->filenameLabel); 47 | this->addWidget(this->sensorInfoLabel); 48 | } 49 | 50 | //----------------------------------------------------------------------------- 51 | void lqStatusBar::onActiveSourceChanged(pqPipelineSource* activeSource) 52 | { 53 | // Check if we have an active source 54 | if (!activeSource) 55 | { 56 | return; 57 | } 58 | // Get lidar source even with TrailingFrame filter 59 | pqPipelineSource* lidarSource = lqSensorListWidget::instance()->getActiveLidarSource(); 60 | if (lidarSource) 61 | { 62 | activeSource = lidarSource; 63 | } 64 | 65 | if (vtkSMSourceProxy* proxy = vtkSMSourceProxy::SafeDownCast(activeSource->getProxy())) 66 | { 67 | if (auto svp = vtkSMStringVectorProperty::SafeDownCast(proxy->GetProperty("FileName"))) 68 | { 69 | std::string filename = svp->GetElement(0); 70 | if (!filename.empty()) 71 | { 72 | QFileInfo fileInfo(QString::fromStdString(filename)); 73 | std::string message = "File: " + fileInfo.fileName().toStdString(); 74 | this->filenameLabel->setText(message.c_str()); 75 | } 76 | } 77 | else 78 | { 79 | this->filenameLabel->clear(); 80 | } 81 | 82 | vtkSMLidarProxy* lidarProxy = vtkSMLidarProxy::SafeDownCast(proxy); 83 | if (lidarProxy && !lidarProxy->GetLidarInformation().empty()) 84 | { 85 | std::string message = "Interpreter: " + lidarProxy->GetLidarInformation(); 86 | this->sensorInfoLabel->setText(message.c_str()); 87 | } 88 | else 89 | { 90 | this->sensorInfoLabel->clear(); 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqStatusBar.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqStatusBar.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqStatusBar_h 17 | #define lqStatusBar_h 18 | 19 | #include 20 | #include 21 | 22 | #include "vtkNew.h" 23 | 24 | #include "lvApplicationComponentsModule.h" 25 | 26 | class pqPipelineSource; 27 | 28 | /** 29 | * lqStatusBar extends QStatusBar to show filename and sensor info 30 | * of the active source. 31 | */ 32 | class LVAPPLICATIONCOMPONENTS_EXPORT lqStatusBar : public QStatusBar 33 | { 34 | Q_OBJECT 35 | typedef QStatusBar Superclass; 36 | 37 | public: 38 | lqStatusBar(QWidget* parent = nullptr); 39 | ~lqStatusBar() = default; 40 | 41 | protected Q_SLOTS: 42 | /** 43 | * Change filename and (sensor info label if present), when the source change. 44 | */ 45 | void onActiveSourceChanged(pqPipelineSource* activeSource); 46 | 47 | private: 48 | QLabel* filenameLabel; 49 | QLabel* sensorInfoLabel; 50 | 51 | Q_DISABLE_COPY(lqStatusBar) 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqViewFrameActionsImplementation.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqViewFrameActionsImplementation.cxx 5 | 6 | Copyright (c) Kitware, Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqViewFrameActionsImplementation.h" 17 | 18 | //----------------------------------------------------------------------------- 19 | lqViewFrameActionsImplementation::lqViewFrameActionsImplementation(QObject* parent) 20 | : Superclass(parent) 21 | { 22 | } 23 | 24 | //----------------------------------------------------------------------------- 25 | QList 26 | lqViewFrameActionsImplementation::availableViewTypes() 27 | { 28 | std::vector> option_view{ { "LidarGridView", "Render View" }, 29 | { "ComparativeRenderView", "Comparative Render View" }, 30 | { "RenderViewWithEDL", "Eye Dome Lighting Render View" }, 31 | { "SpreadSheetView", "SpreadSheet View" }, 32 | { "XYHistogramChartView", "Histogram View" }, 33 | { "XYChartView", "Line Chart View" }, 34 | { "PythonView", "Python View" } }; 35 | QList views; 36 | for (const auto& [key, value] : option_view) 37 | { 38 | pqStandardViewFrameActionsImplementation::ViewType info; 39 | info.Name = QString(key.c_str()); 40 | info.Label = QString(value.c_str()); 41 | views.push_back(info); 42 | } 43 | return views; 44 | } 45 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqViewFrameActionsImplementation.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqViewFrameActionsImplementation.h 5 | 6 | Copyright (c) Kitware, Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqViewFrameActionsImplementation_h 17 | #define lqViewFrameActionsImplementation_h 18 | 19 | #include 20 | 21 | #include 22 | 23 | #include "lvApplicationComponentsModule.h" 24 | 25 | class LVAPPLICATIONCOMPONENTS_EXPORT lqViewFrameActionsImplementation 26 | : public pqStandardViewFrameActionsImplementation 27 | { 28 | Q_OBJECT 29 | typedef pqStandardViewFrameActionsImplementation Superclass; 30 | 31 | public: 32 | lqViewFrameActionsImplementation(QObject* parent = 0); 33 | ~lqViewFrameActionsImplementation() override = default; 34 | 35 | protected: 36 | /** 37 | * Returns available view types in LidarView. 38 | */ 39 | QList availableViewTypes() override; 40 | 41 | private: 42 | Q_DISABLE_COPY(lqViewFrameActionsImplementation); 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqWelcomeDialog.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqWelcomeDialog.cxx 5 | 6 | Copyright (c) Kitware, Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #include "lqWelcomeDialog.h" 17 | #include "ui_lqWelcomeDialog.h" 18 | 19 | #include 20 | #include 21 | 22 | #include 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | //----------------------------------------------------------------------------- 29 | lqWelcomeDialog::lqWelcomeDialog(QWidget* Parent) 30 | : QDialog(Parent) 31 | , Ui(new Ui::lqWelcomeDialog()) 32 | { 33 | auto& ui = this->Ui; 34 | ui->setupUi(this); 35 | this->setObjectName("lqWelcomeDialog"); 36 | // hide the Context Help item (it's a "?" in the Title Bar for Windows, a menu item for Linux) 37 | this->setWindowFlags(this->windowFlags().setFlag(Qt::WindowContextHelpButtonHint, false)); 38 | 39 | modeLabelList[lqLidarViewManager::LIDAR_VIEWER] = ui->labelLidarViewer; 40 | modeLabelList[lqLidarViewManager::POINT_CLOUD_TOOL] = ui->labelPointCloudTool; 41 | modeLabelList[lqLidarViewManager::ADVANCED_MODE] = ui->labelAdvancedMode; 42 | for (auto&& label : this->modeLabelList) 43 | { 44 | label->setVisible(false); 45 | label->setStyleSheet("background-color: white;"); 46 | } 47 | ui->labelAboutImage->setStyleSheet("background-color: white;"); 48 | 49 | ui->comboBoxMode->currentIndexChanged(this->currentMode); 50 | this->currentModeChanged(this->currentMode); 51 | QObject::connect( 52 | ui->comboBoxMode, SIGNAL(currentIndexChanged(int)), this, SLOT(currentModeChanged(int))); 53 | this->onDoNotShowAgainStateChanged(ui->DoNotShowAgainButton->checkState()); 54 | QObject::connect(ui->DoNotShowAgainButton, 55 | SIGNAL(stateChanged(int)), 56 | this, 57 | SLOT(onDoNotShowAgainStateChanged(int))); 58 | } 59 | 60 | //----------------------------------------------------------------------------- 61 | lqWelcomeDialog::~lqWelcomeDialog() 62 | { 63 | delete this->Ui; 64 | } 65 | 66 | //------------------------------------------------------------------------------------------- 67 | void lqWelcomeDialog::currentModeChanged(int modeIdx) 68 | { 69 | this->modeLabelList[this->currentMode]->setVisible(false); 70 | this->modeLabelList[modeIdx]->setVisible(true); 71 | this->currentMode = static_cast(modeIdx); 72 | 73 | lqLidarViewManager::instance()->updateInterfaceLayout(this->currentMode); 74 | } 75 | 76 | //----------------------------------------------------------------------------- 77 | void lqWelcomeDialog::onDoNotShowAgainStateChanged(int state) 78 | { 79 | bool showDialog = (state != Qt::Checked); 80 | 81 | pqSettings* settings = pqApplicationCore::instance()->settings(); 82 | settings->setValue("GeneralSettings.ShowWelcomeDialog", showDialog ? 1 : 0); 83 | 84 | pqServer* server = pqApplicationCore::instance()->getActiveServer(); 85 | if (!server) 86 | { 87 | qCritical("No active server available!"); 88 | return; 89 | } 90 | 91 | vtkSMSessionProxyManager* pxm = server->proxyManager(); 92 | if (!pxm) 93 | { 94 | qCritical("No proxy manager!"); 95 | return; 96 | } 97 | 98 | vtkSMProxy* proxy = pxm->GetProxy("settings", "GeneralSettings"); 99 | if (proxy) 100 | { 101 | vtkSMPropertyHelper(proxy, "ShowWelcomeDialog").Set(showDialog ? 1 : 0); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/lqWelcomeDialog.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqWelcomeDialog.h 5 | 6 | Copyright (c) Kitware, Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqWelcomeDialog_h 17 | #define lqWelcomeDialog_h 18 | 19 | #include 20 | #include 21 | 22 | #include "lqLidarViewManager.h" 23 | 24 | #include 25 | 26 | // For export module 27 | #include "lvApplicationComponentsModule.h" 28 | 29 | namespace Ui 30 | { 31 | class lqWelcomeDialog; 32 | } 33 | 34 | /** 35 | * lqWelcomeDialog is the dialog shown at LidarView first launch. 36 | * Helps to choose wich interface mode they want to start with. 37 | */ 38 | class LVAPPLICATIONCOMPONENTS_EXPORT lqWelcomeDialog : public QDialog 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | lqWelcomeDialog(QWidget* Parent); 44 | ~lqWelcomeDialog() override; 45 | 46 | private Q_SLOTS: 47 | ///@{ 48 | /** 49 | * React to checkbox events 50 | */ 51 | void currentModeChanged(int modeIdx); 52 | void onDoNotShowAgainStateChanged(int state); 53 | ///@} 54 | 55 | private: 56 | Q_DISABLE_COPY(lqWelcomeDialog) 57 | Ui::lqWelcomeDialog* const Ui; 58 | 59 | lqLidarViewManager::InterfaceModes currentMode = lqLidarViewManager::LIDAR_VIEWER; 60 | std::array modeLabelList; 61 | }; 62 | 63 | #endif // !lqWelcomeDialog_h 64 | -------------------------------------------------------------------------------- /Application/Qt/ApplicationComponents/vtk.module: -------------------------------------------------------------------------------- 1 | NAME 2 | LidarViewApp::lvApplicationComponents 3 | LIBRARY_NAME 4 | lvApplicationComponents 5 | DEPENDS 6 | ParaView::pqApplicationComponents 7 | ParaView::pqCore 8 | ParaView::pqWidgets 9 | ParaView::pqComponents 10 | ParaView::pqPython 11 | ParaView::pvpythonmodules 12 | ParaView::PythonInitializer 13 | ParaView::RemotingAnimation 14 | ParaView::RemotingApplication 15 | ParaView::RemotingClientServerStream 16 | ParaView::RemotingCore 17 | ParaView::RemotingLive 18 | ParaView::RemotingMisc 19 | ParaView::RemotingServerManager 20 | ParaView::RemotingServerManagerPython 21 | ParaView::RemotingSettings 22 | ParaView::RemotingViews 23 | ParaView::RemotingViewsPython 24 | LidarView::lqApplicationComponents 25 | LidarView::lqCore 26 | LidarView::Versioning 27 | LidarViewApp::lvComponents 28 | PRIVATE_DEPENDS 29 | VTK::nlohmannjson 30 | EXCLUDE_WRAP 31 | -------------------------------------------------------------------------------- /Application/Qt/Components/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(classes 2 | lqAboutDialog 3 | ) 4 | 5 | set(ui_files 6 | Resources/UI/lqAboutDialog.ui 7 | ) 8 | 9 | set(resource_files 10 | Resources/lvComponents.qrc 11 | ) 12 | 13 | source_group("Resources" FILES 14 | ${ui_files} 15 | ${resource_files}) 16 | 17 | set(CMAKE_AUTOMOC 1) 18 | set(CMAKE_AUTORCC 1) 19 | set(CMAKE_AUTOUIC 1) 20 | set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Resources/UI") 21 | 22 | vtk_module_add_module(LidarViewApp::lvComponents 23 | CLASSES ${classes} 24 | SOURCES ${ui_files} 25 | ${resource_files}) 26 | vtk_module_link(LidarViewApp::lvComponents 27 | PRIVATE 28 | "Qt${PARAVIEW_QT_MAJOR_VERSION}::Core" 29 | "Qt${PARAVIEW_QT_MAJOR_VERSION}::Widgets") 30 | 31 | target_compile_definitions(lvComponents PRIVATE QT_NO_KEYWORDS) 32 | -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/Icons/AboutDialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Application/Qt/Components/Resources/Icons/AboutDialog.png -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/Icons/lvCalibrationFile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 16 | 18 | 19 | 21 | image/svg+xml 22 | 24 | 25 | 26 | 27 | 29 | 33 | 37 | 42 | 49 | 53 | 58 | 62 | 66 | 70 | 74 | 78 | 82 | 86 | 90 | 94 | 98 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/Icons/lvLidarViewerSetup.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 14 | 16 | 19 | 23 | 27 | 28 | 31 | 35 | 39 | 42 | 44 | 48 | 49 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/Icons/lvMenuRecentPcap.svg: -------------------------------------------------------------------------------- 1 | 2 | 97 | -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/Icons/lvOpenPcap.svg: -------------------------------------------------------------------------------- 1 | 2 | 72 | -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/Icons/lvOpenStream.svg: -------------------------------------------------------------------------------- 1 | 2 | 39 | -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/Icons/lvSaveAs.svg: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 19 | 26 | 27 | -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/Icons/lvSavePcap.svg: -------------------------------------------------------------------------------- 1 | 2 | 72 | -------------------------------------------------------------------------------- /Application/Qt/Components/Resources/lvComponents.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Icons/AboutDialog.png 4 | Icons/lvAdvancedModeSetup.svg 5 | Icons/lvCalibrationFile.svg 6 | Icons/lvLidarViewerSetup.svg 7 | Icons/lvMenuRecentPcap.svg 8 | Icons/lvOpenPcap.svg 9 | Icons/lvOpenStream.svg 10 | Icons/lvPointCloudToolSetup.svg 11 | Icons/lvPythonShell.svg 12 | Icons/lvSaveAs.svg 13 | Icons/lvSavePcap.svg 14 | 15 | 16 | -------------------------------------------------------------------------------- /Application/Qt/Components/lqAboutDialog.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqAboutDialog.h 5 | 6 | Copyright (c) Kitware, Inc. 7 | All rights reserved. 8 | See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #ifndef lqAboutDialog_h 17 | #define lqAboutDialog_h 18 | 19 | #include "lvComponentsModule.h" 20 | #include 21 | 22 | namespace Ui 23 | { 24 | class lqAboutDialog; 25 | } 26 | 27 | class pqServer; 28 | class QTreeWidget; 29 | 30 | /** 31 | * lqAboutDialog is the about dialog used by LidarView. 32 | * It provides information about LidarView and current configuration. 33 | */ 34 | class LVCOMPONENTS_EXPORT lqAboutDialog : public QDialog 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | lqAboutDialog(QWidget* Parent); 40 | ~lqAboutDialog() override; 41 | 42 | /** 43 | * Format the about dialog content into textual form 44 | */ 45 | QString formatToText(); 46 | 47 | public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers) 48 | 49 | /** 50 | * Saves about dialog formatted output to a file. 51 | */ 52 | void saveToFile(); 53 | 54 | /** 55 | * Copy about dialog formatted output to the clipboard. 56 | */ 57 | void copyToClipboard(); 58 | 59 | protected: 60 | void AddInformationPanel(); 61 | void AddClientInformation(); 62 | QString formatToText(QTreeWidget* tree); 63 | 64 | private: 65 | Q_DISABLE_COPY(lqAboutDialog) 66 | Ui::lqAboutDialog* const Ui; 67 | }; 68 | 69 | #endif // !lqAboutDialog_h 70 | -------------------------------------------------------------------------------- /Application/Qt/Components/vtk.module: -------------------------------------------------------------------------------- 1 | NAME 2 | LidarViewApp::lvComponents 3 | LIBRARY_NAME 4 | lvComponents 5 | DEPENDS 6 | ParaView::pqCore 7 | PRIVATE_DEPENDS 8 | LidarView::lqCore 9 | LidarView::Versioning 10 | ParaView::pqComponents 11 | ParaView::RemotingViews 12 | VTK::CommonCore 13 | Tins::tins 14 | EXCLUDE_WRAP 15 | -------------------------------------------------------------------------------- /Application/Wrapping/Python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(FileModuleInstaller) 2 | 3 | python_module_install( 4 | NAME lidarview 5 | FILES 6 | __init__.py 7 | planefit.py 8 | simple.py 9 | OUTPUT_DIRECTORY lidarview 10 | ) 11 | -------------------------------------------------------------------------------- /Application/Wrapping/Python/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- -------------------------------------------------------------------------------- /Application/Wrapping/Python/planefit.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Velodyne Acoustics, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Imports 16 | import paraview.simple as smp 17 | from paraview import vtk, servermanager 18 | 19 | # Use Named filters 20 | planefitter_name = 'PlaneFitter' # PlaneFitter Instance 21 | selection_copy_name = 'SelectedPointsCopy' # Trivial copy of the selected points 22 | 23 | # Clean planefitter's state 24 | def cleanState(): 25 | # Remove PlaneFitter 26 | planefitter = smp.FindSource(planefitter_name) 27 | if planefitter is not None: 28 | smp.Delete(planefitter) 29 | del planefitter 30 | 31 | # Remove Selection copy TrivialProducer 32 | trivialproducer = smp.FindSource(selection_copy_name) 33 | if trivialproducer is not None: 34 | smp.Delete(trivialproducer) 35 | del trivialproducer 36 | 37 | # Find or create a 'SpreadSheet View' to display plane fitting statistics 38 | def showStats(planefitter, actionSpreadsheet=None): 39 | 40 | # Check for SpreadSheetReaction 41 | if actionSpreadsheet is None: 42 | print("Unable to display stats : SpreadSheet action is not defined") 43 | return 44 | 45 | # Check if main spreadsheet view exist or can be created 46 | spreadSheetView1 = smp.FindView('main spreadsheet view') 47 | if spreadSheetView1 is None: 48 | # try to trigger actionSpreadsheet to display main spreadsheet view 49 | actionSpreadsheet.trigger() 50 | spreadSheetView1 = smp.FindView('main spreadsheet view') 51 | if spreadSheetView1 is None: 52 | print("Unable to get main spreadsheet view") 53 | return 54 | 55 | # Display stats in main spreadsheet view 56 | spreadSheetView1.ColumnToSort = '' 57 | spreadSheetView1.BlockSize = 1024 58 | spreadSheetView1.FieldAssociation = 'Row Data' 59 | smp.Show(planefitter, spreadSheetView1) 60 | 61 | # Main Method 62 | def fitPlane(actionSpreadsheet=None): 63 | # Get Selected Source 64 | src = smp.GetActiveSource() 65 | if src is None: 66 | print("A source need to be selected before running plane fitting") 67 | return 68 | 69 | # Clean plane fitting state before processing a new one 70 | cleanState() 71 | 72 | # Check Selection 73 | selection = src.GetSelectionInput(src.Port) 74 | if selection is None: 75 | print("A selection has to be defined to run plane fitting") 76 | return 77 | 78 | # Extract Selection - vtkMultiBlockDataSet(vtkUnstructuredGrid) 79 | extractor = smp.ExtractSelection() 80 | extractor.Selection = selection 81 | extractor.Input = src 82 | 83 | # Extract first Block - vtkUnstructuredGrid 84 | merger = smp.MergeBlocks(Input=extractor) 85 | 86 | # Convert to polydata - vtkPolyData 87 | extractsurf = smp.ExtractSurface(Input=merger) 88 | extractsurf.UpdatePipeline() 89 | 90 | # Create a Trivial Producer HardCopy of selected points 91 | trivialproducer = smp.PVTrivialProducer() 92 | smp.RenameSource(selection_copy_name, trivialproducer) 93 | trivialproducer.GetClientSideObject().SetOutput(extractsurf.GetClientSideObject().GetOutput()) 94 | 95 | # PlaneFitter - Using a fixed input 96 | planefitter = smp.PlaneFitter(Input=trivialproducer) 97 | smp.RenameSource(planefitter_name, planefitter) 98 | 99 | # Determine Laser ID Array Name 100 | try: 101 | # if laser_id is the name of the array in Legacy and Special Velarray mode 102 | # LCN is the name of the array in APF mode 103 | for arr in extractor.PointData: 104 | if arr.Name == "laser_id": 105 | planefitter.laserIDArray = "laser_id" 106 | elif arr.Name == "LCN": 107 | planefitter.laserIDArray = "LCN" 108 | planefitter.UpdatePipeline() 109 | 110 | # Display results on the main spreadsheet view 111 | showStats(planefitter, actionSpreadsheet) 112 | 113 | # Show Model 114 | smp.Show(servermanager.OutputPort(planefitter, outputPort=1)) 115 | except : 116 | print("PlaneFit error: Unable to select appropriate laserIDArray") 117 | finally: 118 | smp.Delete(extractsurf) 119 | smp.Delete(merger) 120 | smp.Delete(extractor) 121 | smp.SetActiveSource(src) # Restore Active Source 122 | 123 | -------------------------------------------------------------------------------- /Application/Wrapping/Python/simple.py: -------------------------------------------------------------------------------- 1 | #============================================================================== 2 | # 3 | # Program: LidarView 4 | # Module: simple.py 5 | # 6 | # Copyright (c) Kitware, Inc. 7 | # All rights reserved. 8 | # See LICENSE or http://www.apache.org/licenses/LICENSE-2.0 for details. 9 | # 10 | # This software is distributed WITHOUT ANY WARRANTY; without even 11 | # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | # PURPOSE. See the above copyright notice for more information. 13 | # 14 | #============================================================================== 15 | 16 | # Import all lidarviewcore common functions 17 | from lidarviewcore.simple import * 18 | -------------------------------------------------------------------------------- /CMake/FindSphinx.cmake: -------------------------------------------------------------------------------- 1 | # Quick and dirty sphinx finder 2 | 3 | find_program(SPHINX_EXECUTABLE NAMES sphinx-build) 4 | include(FindPackageHandleStandardArgs) 5 | find_package_handle_standard_args(Sphinx DEFAULT_MSG SPHINX_EXECUTABLE) 6 | mark_as_advanced(SPHINX_EXECUTABLE) 7 | -------------------------------------------------------------------------------- /CMake/LidarViewOptions.cmake: -------------------------------------------------------------------------------- 1 | #======================================================================== 2 | # COMMON LIDARVIEW OPTIONS 3 | #======================================================================== 4 | include(CommonLidarViewOptions) 5 | 6 | #======================================================================== 7 | # LIDARVIEW BUILD OPTIONS 8 | #======================================================================== 9 | 10 | lidarview_deprecated_setting(doc_default BUILD_DOCUMENTATION BUILD_DOC "OFF") 11 | option(BUILD_DOCUMENTATION "Enable LidarView Documentation" ${doc_default}) 12 | 13 | #======================================================================== 14 | # OBSOLETE PLUGIN OPTIONS 15 | #======================================================================== 16 | lidarview_obsolete_setting(LIDARVIEW_BUILD_VELODYNE) 17 | lidarview_obsolete_setting(LIDARVIEW_BUILD_HESAI) 18 | -------------------------------------------------------------------------------- /CMake/SetBranding.cmake: -------------------------------------------------------------------------------- 1 | # Every Brand related names / resource paths should be declared here 2 | 3 | # Software Name / Vendor 4 | set(SOFTWARE_NAME "LidarView") 5 | set(SOFTWARE_VENDOR "Kitware") 6 | set(SOFTWARE_TARGET "LidarView::LidarView") 7 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20.3 FATAL_ERROR) 2 | project(LidarView) 3 | 4 | # Add path to get all the needed modules used to config Lidarview 5 | set(lidarview_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/CMake") 6 | set(lvcore_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/LVCore/CMake") 7 | if (NOT IS_DIRECTORY "${lvcore_cmake_dir}") 8 | message(FATAL_ERROR 9 | "Failed to find the LVCore CMake directory. Did you forget to initialize the " 10 | "submodule? (git submodule update --init --recursive)") 11 | endif () 12 | list(APPEND CMAKE_MODULE_PATH 13 | "${lidarview_cmake_dir}" 14 | "${lvcore_cmake_dir}") 15 | 16 | include(SetBranding) 17 | include(LidarViewSupportMacros) 18 | include(LidarViewOptions) 19 | 20 | include(SetupLidarviewProject) 21 | 22 | # Add plugins to be searched by default in LVCore CMakeLists.txt 23 | set(lidarview_available_interpreters_plugins 24 | VelodynePlugin 25 | LeishenPlugin 26 | LivoxPlugin 27 | RobosensePlugin 28 | HesaiPlugin) 29 | set(lidarview_interpreters_plugin_directories "${CMAKE_CURRENT_SOURCE_DIR}/Plugins") 30 | add_subdirectory(LVCore) 31 | 32 | # Build lidarview application & QT module specific 33 | add_subdirectory(Application) 34 | 35 | if (BUILD_DOCUMENTATION) 36 | add_subdirectory(Documentation) 37 | endif () 38 | -------------------------------------------------------------------------------- /Documentation/BasicUsage.rst: -------------------------------------------------------------------------------- 1 | .. _chapter:BasicUsage: 2 | 3 | Basic Usage 4 | ########### 5 | 6 | Let us get started using **LidarView**. In order to follow along, you will 7 | need your own installation of **LidarView**. If you do not already have **LidarView**, 8 | you can download the current release of LidarView_. 9 | **LidarView** launches like most other applications. On Windows, the 10 | launcher is located in the start menu. On Macintosh, open the 11 | application bundle that you installed. On Linux, execute ``LidarView`` from a 12 | command prompt (you will need to set your path to point to where you unpacked 13 | LidarView). 14 | 15 | User Interface 16 | ============== 17 | 18 | .. figure:: ./images/UserInterface.png 19 | 20 | The **LidarView** GUI conforms to the platform on which it is running, but on 21 | all platforms it behaves basically the same. The layout shown here is 22 | the default layout given when **LidarView** is first started. The GUI 23 | includes a Menu Bar as well as a Tool Bar that give access to the various 24 | features of the application. 25 | 26 | Menu Bar 27 | This gives access to File related options like opening PCAP files and 28 | sensor streams, a Tools and View menu, and a general Help menu. 29 | 30 | .. figure:: ./images/MenuAndToolbar.png 31 | 32 | The Tool Bar can be broked up into several separate sections described below. 33 | 34 | Open Data Toolbar 35 | This part of the toolbar includes buttons to manage opening PCAP files and 36 | sensor streams, loading and saving **LidarView** state files, and importing 37 | calibration files. 38 | 39 | Shortcuts Toolbar 40 | This section of the toolbar gives quick access to the spreadsheet view and 41 | the python and error consoles as wells as the ability to selects points from 42 | the current active data. 43 | 44 | Playback Controls 45 | These controls allow the user to temporally navigate the Lidar data. The 46 | data can be played through, advanced one frame at a time, or a specific 47 | time can be selected. 48 | 49 | Color Controls 50 | These controls allow the user to select what data field determines how the 51 | point cloud is colored and adjust the color map used to represent the range 52 | of the selected data field. 53 | 54 | View Controls 55 | These controls allow the user to set the prespective that the point cloud is 56 | viewed from. 57 | 58 | Loading Data 59 | ================= 60 | 61 | There are two ways to load Lidar sensor data into **LidarView**. You can connect 62 | to a sensor steam or open a recorded sensor stream saved to a PCAP file. These 63 | can both be found on the Menu Bar (File->Open) or on the Open Data Toolbar. 64 | 65 | .. exercise:: Opening a saved sensor stream 66 | :label: OpenSaveSensorStream 67 | :class: note 68 | 69 | Let's start with opening a saved sensor stream file. If you don't have access 70 | to PCAP file with a saved sensor stream you can download an example: 71 | CarLoop_VLP16_. Go to the the File menu and select Open and then Capture File. 72 | Alternatively you can click on the the Open PCAP File button |OpenPCAP| in 73 | the Open Data section of the toolbar. Select the PCAP file you wish to open 74 | and click OK, and then select the appropriate sensor interpeter and click OK. 75 | You should now see the first frame of the saved sensor data displayed in the 76 | main render view. 77 | 78 | .. exercise:: Connecting to a sensor stream 79 | :label: ConnectToSensorStream 80 | :class: note 81 | 82 | Now let's connect **LidarView** to an active Lidar sensor stream. If you 83 | don't have accessing to a sensor stream LidarView includes a command line 84 | tool to create one from a PCAP file described in :numref:`StreamAPCAPFile`. 85 | Go to the the File menu and select Open and then Sensor Stream. Alternatively 86 | you can click on the Sensor Stream button |OpenStream| in the Open Data section 87 | of the toolbar. Select the appropriate sensor interpeter and click OK. By 88 | default LidarView assumes the sensor stream will be available on the network 89 | port 2368. You should now see the streaming Lidar data in the main window. 90 | 91 | .. exercise:: Accessing advanced sensor configuration 92 | :label: AdvancedSensorConfiguration 93 | :class: note 94 | 95 | Sometimes when opening a sensor stream needs to access options such as 96 | specifying data origin and sensor orientation or adjusting the port number 97 | that the data is arriving on. Follow the same steps in either 98 | :numref:`OpenSaveSensorStream` or :numref:`ConnectToSensorStream` till you 99 | get to the window to select the sensor interpeter. At the bottom left of this 100 | window there will be a check box labeled "Advanced configuration". Check the 101 | box and you should see several advanced options for the sensor configuration. 102 | 103 | .. |OpenPCAP| image:: ../Application/Ui/Widgets/images/WiresharkDoc-128.png 104 | :height: 20px 105 | 106 | .. |OpenStream| image:: ../Application/Ui/Widgets/images/lidar.png 107 | :height: 20px 108 | 109 | Interacting with Lidar Data 110 | ============================ 111 | 112 | Now that we have loaded data into LidarView we want to explore and interact with 113 | this data. 114 | 115 | .. exercise:: Playback Sensor Stream 116 | :label: PlaybackSensorStream 117 | :class: note 118 | 119 | This is a continuation of :numref:`OpenSaveSensorStream`. You will need to 120 | finish that exercise before beginning this one. 121 | 122 | Now that we have loaded a saved sensor stream we can play it back. Click 123 | on the |Play| button in the Playback Controls to have LidarView playback the 124 | sensor stream. The playback can be paused at any time by clicking on the 125 | |Pause| button which replaces the |Play| button while the stream is advancing. 126 | 127 | .. exercise:: Enabling Advanced Features 128 | :label: EnablingAdvancedFeatures 129 | :class: note 130 | 131 | There are advanced features available in **LidarView** that are not enabled 132 | by default. In particular, many of the tools from **ParaView** can be accessed 133 | by enabling these advanced features. To enable these features, go to the Help 134 | menu and then select Advanced Feature. You will now see four more sections 135 | on the Menu Bar: Sources, Filters, Views, and Advance. The image below shows 136 | how the Menu Bar and Toolbar should appear now. You will also see a 137 | new Toolbar at the top of the Render View. These are controls for the Render 138 | View from **ParaView**. 139 | 140 | .. figure:: ./images/AdvancedFeatures.png 141 | 142 | .. |Play| image:: ../LVCore/Qt/ApplicationComponents/Resources/Icons/media-playback-start.png 143 | :height: 20px 144 | 145 | .. |Pause| image:: ../LVCore/Qt/ApplicationComponents/Resources/Icons/media-playback-pause.png 146 | :height: 20px 147 | 148 | .. _LidarView: https://gitlab.kitware.com/LidarView/lidarview/-/releases 149 | .. _CarLoop_VLP16: https://drive.google.com/file/d/1eARfsQWMcAa34GBHfDOs1JQ7nazQM3Jo/view?usp=share_link> 150 | -------------------------------------------------------------------------------- /Documentation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(Sphinx REQUIRED) 2 | 3 | set(documentation_dir "${CMAKE_BINARY_DIR}/Documentation") 4 | add_custom_command( 5 | OUTPUT "${tutorial_dir}" 6 | COMMAND "${CMAKE_COMMAND}" -E make_directory "${documentation_dir}" 7 | ) 8 | 9 | add_custom_target(documentation ALL 10 | COMMAND ${SPHINX_EXECUTABLE} 11 | -b html 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | ${documentation_dir} 14 | DEPENDS ${documentation_dir} 15 | ) 16 | 17 | set_property( 18 | TARGET documentation 19 | PROPERTY ADDITIONAL_CLEAN_FILES ${documentation_dir} 20 | ) 21 | -------------------------------------------------------------------------------- /Documentation/StreamPCAPFile.rst: -------------------------------------------------------------------------------- 1 | .. _chapter:StreamPCAPFile: 2 | 3 | Stream PCAP File 4 | ################ 5 | 6 | **LidarView** comes with a commond line utility that allows you to stream a 7 | PCAP file with a saved sensor stream as if it were a live stream. This can be 8 | usefully for a variety of reasons. If you have a very large PCAP file it can 9 | be a challenge to open the whole file at once depending on the system resources. 10 | It can be useful when exploring or demoing **LidarView**'s capabilities when 11 | you do not have access to a live sensor stream. 12 | 13 | PacketFileSender tool 14 | ===================== 15 | 16 | On Linux and Windows installations of **LidarView** the command line tool to 17 | steam files can be found in the ``bin`` directory of you installation. It is 18 | called ``PacketFileSender`` on Linux and ``PacketFileSender.exe`` on Windows. 19 | Basic usage for this tool is as follows along with options: 20 | 21 | .. code-block:: bash 22 | 23 | Usage: PacketFileSender [options] 24 | Allowed options: 25 | --help produce help message 26 | --ip arg (=127.0.0.1) destination ip adress 27 | --loop run the capture in loop 28 | --lidarPort arg (=2368) destination port for lidar packets 29 | --GPSPort arg (=8308) destination port for GPS packets 30 | --speed arg (=1) playback speed 31 | --display-frequency arg (=1000) print information after every interval of X 32 | sent packets 33 | 34 | .. exercise:: Stream a PCAP File 35 | :label: StreamAPCAPFile 36 | :class: note 37 | 38 | Let's stream a saved sensor stream file. If you don't have access 39 | to PCAP file with a saved sensor stream you can download an example: 40 | CarLoop_VLP16_. Run the following command from a Windows command prompt (or 41 | a terminal if on Linux). 42 | 43 | ``C:\Program Files\LidarView 4.3.0\bin\PacketFileSender.exe CarLoop_VLP16.pcap`` 44 | 45 | You should now be able to connect **LidarView** to a sensor stream running 46 | on port 2368 as is done in :numref:`OpenSaveSensorStream`. 47 | 48 | .. _CarLoop_VLP16: https://drive.google.com/file/d/1eARfsQWMcAa34GBHfDOs1JQ7nazQM3Jo/view?usp=share_link> -------------------------------------------------------------------------------- /Documentation/Tutorial.rst: -------------------------------------------------------------------------------- 1 | LidarView Tutorial 2 | ====================== 3 | 4 | **LidarView Tutorial** provides an introduction to the **LidarView** software 5 | and exercises on how to use **LidarView**. 6 | 7 | .. toctree:: 8 | :numbered: 9 | :maxdepth: 2 10 | 11 | BasicUsage 12 | StreamPCAPFile 13 | -------------------------------------------------------------------------------- /Documentation/UsersGuide.rst: -------------------------------------------------------------------------------- 1 | LidarView User's Guide 2 | ====================== 3 | 4 | .. toctree:: 5 | :numbered: 6 | :maxdepth: 2 7 | -------------------------------------------------------------------------------- /Documentation/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # For the full list of built-in configuration values, see the documentation: 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 5 | 6 | # -- Project information ----------------------------------------------------- 7 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information 8 | 9 | project = 'LidarView' 10 | copyright = '2023, Kitware, Inc.' 11 | author = 'Kitware, Inc.' 12 | 13 | # -- General configuration --------------------------------------------------- 14 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration 15 | 16 | extensions = ["sphinx_exercise"] 17 | 18 | templates_path = ['_templates'] 19 | exclude_patterns = ['Thumbs.db', '.DS_Store'] 20 | 21 | 22 | 23 | # -- Options for HTML output ------------------------------------------------- 24 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output 25 | 26 | html_theme = 'sphinx_rtd_theme' 27 | html_static_path = [] 28 | -------------------------------------------------------------------------------- /Documentation/images/AdvancedFeatures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Documentation/images/AdvancedFeatures.png -------------------------------------------------------------------------------- /Documentation/images/MenuAndToolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Documentation/images/MenuAndToolbar.png -------------------------------------------------------------------------------- /Documentation/images/UserInterface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/LidarView/7dbf43ed363ba522889031f3e675f07d88d70a68/Documentation/images/UserInterface.png -------------------------------------------------------------------------------- /Documentation/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Welcome to LidarView's documentation! 3 | ===================================== 4 | 5 | LidarView_ is an open-source, multi-platform tool for the analysis and 6 | visualization of Lidar data. With **LidarView**, you can quickly process point 7 | cloud data from one or multiple sensors and turn it into powerful visualizations. 8 | **LidarView** is built on top of ParaView_, the world’s leading open source 9 | post-processing visualization engine, which gives **LidarView** access to all 10 | the tools available in **ParaView**. These features are described in the 11 | `ParaView Documentation`_. 12 | 13 | This guide is split into two volumes: 14 | 15 | - **User's Guide** 16 | 17 | - **Tutorial** 18 | 19 | .. toctree:: 20 | :maxdepth: 2 21 | :caption: LidarView User's Guide 22 | 23 | UsersGuide.rst 24 | 25 | .. toctree:: 26 | :maxdepth: 2 27 | :caption: LidarView Tutorials 28 | 29 | Tutorial.rst 30 | 31 | Indices and tables 32 | ================== 33 | 34 | * :ref:`genindex` 35 | * :ref:`modindex` 36 | * :ref:`search` 37 | 38 | .. _LidarView: https://lidarview.kitware.com/ 39 | .. _ParaView: https://www.paraview.org/ 40 | .. _ParaView Documentation: https://docs.paraview.org/ 41 | -------------------------------------------------------------------------------- /Documentation/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx-exercise 2 | sphinx-rtd-theme 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![LidarView](Application/Client/Resources/Images/About.png) 2 | 3 | # Introduction 4 | 5 | LidarView performs real-time reception, recording, visualization and processing of 3D LiDAR data. 6 | 7 | LidarView currently supports a variety of LiDAR models from multiple manufacturers, including: 8 | - `Velodyne`: VLP-16, VLP-32, HDL-32, HDL-64, Puck LITE, Puck Hi-Res and Alpha Prime (VLS-128). 9 | - `Hesai`: Pandar40P, Pandar40M, Pandar64, Pandar20A, Pandar20B, PandarQT, PandarXT-16, PandarXT-32, PandarXTM and Pandar128. 10 | - `Robosense`: RS16, RS32, BPerl, Helios (16 & 32), Ruby (48, 80 & 128), Ruby Plus (48, 80 & 128), M1, M2 and E1. 11 | - `Livox`: Mid-40, Tele-15, Horizon, Mid-70, Avia, Mid-360 and HAP. 12 | - `Leishen`: C16, C32 and MS_C16. 13 | 14 | Additional sensor models may be supported upon request, provided that the drivers or specifications are publicly available. 15 | 16 | This open-source codebase, developed by Kitware, is widely adopted by many LiDAR vendors, often rebranded under different names, to display their live LiDAR data. 17 | 18 | Many of these LiDAR sensors sweep an array of lasers (often 8 to 128) 360° 19 | with a vertical field of view of tens of degrees at a 5-20Hz spinning frequency, 20 | capturing about a million points per second. 21 | 22 | LidarView can display live sensors' streams or playback pre-recorded data stored in `.pcap` files. 23 | 24 | LidarView displays the distance measurements from the LiDAR as point cloud 25 | data and custom color maps for multiple variables such as 26 | intensity-of-return, time, distance, azimuth, and laser id. 27 | 28 | The processed data can be exported in multiple file formats (CSV, PLY, LAS, ...), 29 | and screenshots of the currently displayed point cloud can be easily exported with the help of a button. 30 | 31 | As a [Paraview](https://www.paraview.org/) based application, LidarView can effortlessly offer Paraview's features and plugins. 32 | 33 | ![LidarView](Application/Client/Resources/Images/LidarViewExample.png) 34 | Lidar data processed by [Kitware's SLAM](#slam) within LidarView 35 | 36 | # Features 37 | 38 | - Input from live sensor stream or recorded `.pcap` file 39 | - Visualization of timestamped LiDAR returns in 3D 40 | - Spreadsheet inspector for LiDAR attributes (timestamp, azimuth, laser id, etc) 41 | - Record to `.pcap` from sensor 42 | - Export to CSV, PLY, PCD, LAS or VTK formats 43 | - Grid and Ruler tools 44 | - Show or hide lasers subsets 45 | - Show multiple frames of data simultaneously and aggregate them 46 | - Apply 3D transforms to pointclouds 47 | - Run SLAM to estimate the trajectory of the LiDAR in the scene and build a 3D map of the environment 48 | 49 | Many other features can be added using Plugins, some can be found on [this page](https://gitlab.kitware.com/LidarView/plugins). 50 | 51 | Feel free to reach out at kitware@kitware.com for support or new features development. 52 | 53 | # How to install 54 | 55 | See associated download links in the [Release](https://gitlab.kitware.com/LidarView/lidarview/-/releases) page of this repository. 56 | 57 | Nightly (master) packages are available [here](https://gitlab.kitware.com/LidarView/lidarview-superbuild/-/pipelines?scope=all&source=schedule&ref=master). (click on `Download artifacts`) 58 | 59 | More detailed installation instructions are available on the [`LVCore/Documentation/INSTALLATION.md`](https://gitlab.kitware.com/LidarView/lidarview-core/-/blob/master/Documentation/INSTALLATION.md) page. 60 | 61 | ## Build from source 62 | 63 | Detailed Instructions to build and package LidarView are available under [LidarView-superbuild README](https://gitlab.kitware.com/LidarView/lidarview-superbuild/-/blob/master/README.md). 64 | 65 | Most of the LidarView common codebase lies within: 66 | 67 | * [LVCore](https://gitlab.kitware.com/LidarView/lidarview-core) repository. 68 | * [LidarView-superbuild](https://gitlab.kitware.com/LidarView/lidarview-superbuild) repository. 69 | 70 | # How to use 71 | 72 | ## Sensor streaming 73 | 74 | Specific network configuration is required for sensor livestream. 75 | The ethernet adapter connected to the sensor has to be switched from dynamic IP address assignment to static IP address selection and correct IP adress and gateway must be specified. 76 | 77 | For example: 78 | 79 | * Velodyne HDL-32E 80 | * IP address: 192.168.1.70 (70 as example, any number except 201 works) 81 | * Gateway: 255.255.255.0 82 | * Velodyne HDL-64E 83 | * IP address: 192.168.3.70 (70 as example, any number except 43 works) 84 | * Gateway: 192.168.3.255 85 | 86 | In order for sensor streaming to work properly, it is important to 87 | disable firewall restrictions for the chosen ethernet port and allow inbound traffic. 88 | Alternatively, completely disable the firewall for the ethernet device connected to the sensor (including both public and private networks). 89 | 90 | When opening pre-recorded data or live sensor streaming data, 91 | one is prompted to choose a calibration file. 92 | This calibration can either be directly embedded in LidarView, 93 | or may be loaded from a custom location. 94 | 95 | ## SLAM documentation 96 | 97 | More [instructions](https://gitlab.kitware.com/keu-computervision/slam/-/blob/master/paraview_wrapping/doc/How_to_SLAM_with_LidarView.md) can be found on the [LidarSlam repository](https://gitlab.kitware.com/keu-computervision/slam). 98 | 99 | Have a look also at the [How to SLAM with LidarView](https://vimeo.com/524848891) webinar. 100 | 101 | # Sample data 102 | 103 | LiDAR data samples for LidarView can be obtained from: 104 | 105 | * [MIDAS](http://www.midasplatform.org/) in the [Velodyne LiDAR collection](http://midas3.kitware.com/midas/community/29) 106 | * Kitware's demos shared [drive](https://drive.google.com/drive/folders/1yrNUelUsjKcXdC8FH8DpXeOPTyiB_pLS?usp=sharing) 107 | 108 | # For Github users 109 | [Github](https://github.com/Kitware/LidarView) is a mirror of the 110 | [official repository](https://gitlab.kitware.com/LidarView/LidarView). 111 | We do not actively monitor issues or pull request on Github. Please use the 112 | [official repository](https://gitlab.kitware.com/LidarView/LidarView) to report issues or contributes fixes. 113 | 114 | # License 115 | 116 | The source code for LidarView is made available under the Apache 2.0 license. 117 | 118 | See [LICENSE](LICENSE). 119 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 5.1.0 2 | --------------------------------------------------------------------------------