├── .clang-format ├── .gitattributes ├── .gitignore ├── .gitlab-ci.yml ├── .gitmodules ├── Application ├── About.svg ├── CMakeLists.txt ├── Icons │ ├── Measurements.png │ ├── ViewOrtho.png │ ├── ViewPerspective.png │ ├── absolute.png │ ├── camera_logo.png │ ├── errorConsole.png │ ├── icon_motion.png │ ├── location.png │ ├── logo.png │ ├── map.png │ ├── media-loop.png │ ├── media-playback-pause.png │ ├── media-playback-start.png │ ├── media-playback-stop.png │ ├── media-seek-backward-0.25x.png │ ├── media-seek-backward-0.5x.png │ ├── media-seek-backward-2x.png │ ├── media-seek-backward-3x.png │ ├── media-seek-backward.png │ ├── media-seek-forward-0.25x.png │ ├── media-seek-forward-0.5x.png │ ├── media-seek-forward-2x.png │ ├── media-seek-forward-3x.png │ ├── media-seek-forward.png │ ├── media-skip-backward.png │ ├── media-skip-forward.png │ ├── open.png │ ├── planefit.png │ ├── pqFrustumSelectionPoint24.png │ ├── pqResetCamera32.png │ ├── pqResetCameraLidar.png │ ├── pqResetCenterLidar.png │ ├── pqSpreadsheet16.png │ ├── pqSurfaceSelectionPoint24.png │ ├── pqXMinus32.png │ ├── pqXPlus32.png │ ├── pqYMinus32.png │ ├── pqYPlus32.png │ ├── pqZMinus32.png │ ├── pqZPlus32.png │ └── python_logo_124.png ├── SoftwareInformation │ ├── About.png │ ├── LidarView-splash.svg │ ├── LidarView.svg │ ├── ParaviewLidar.svg │ ├── Splash.jpg │ ├── bottom_logo.png │ └── logo.ico ├── Ui │ ├── CMakeLists.txt │ ├── SupportSwitchInterpreter │ │ ├── lqSwitchInterpreterBehavior.cxx │ │ └── lqSwitchInterpreterBehavior.h │ ├── Widgets │ │ ├── images │ │ │ ├── WiresharkDoc-128.png │ │ │ ├── calibrate.png │ │ │ ├── calibrate.svg │ │ │ ├── connect.png │ │ │ ├── connect.svg │ │ │ ├── connect_icon.png │ │ │ ├── crop.png │ │ │ ├── crop.svg │ │ │ ├── csv.png │ │ │ ├── gps.png │ │ │ ├── gps.svg │ │ │ ├── kiwi_200.png │ │ │ ├── las.png │ │ │ ├── las.svg │ │ │ ├── lidar.png │ │ │ ├── media-eject.png │ │ │ ├── media-record.png │ │ │ ├── preferences-system-64.png │ │ │ ├── resources.qrc │ │ │ ├── trailingframes.png │ │ │ └── vvGridAdjustmentDialog.ui │ │ ├── vvCalibrationDialog.cxx │ │ ├── vvCalibrationDialog.h │ │ ├── vvCalibrationDialog.ui │ │ ├── vvCropReturnsDialog.cxx │ │ ├── vvCropReturnsDialog.h │ │ ├── vvCropReturnsDialog.ui │ │ ├── vvLaserSelectionDialog.cxx │ │ ├── vvLaserSelectionDialog.h │ │ ├── vvLaserSelectionDialog.ui │ │ ├── vvSelectFramesDialog.cxx │ │ ├── vvSelectFramesDialog.h │ │ └── vvSelectFramesDialog.ui │ ├── lqLidarStreamColorByInitBehavior.cxx │ ├── lqLidarStreamColorByInitBehavior.h │ ├── lqOpenPcapReaction.cxx │ ├── lqOpenPcapReaction.h │ ├── lqOpenRecentFilesReaction.cxx │ ├── lqOpenRecentFilesReaction.h │ ├── lqOpenSensorReaction.cxx │ ├── lqOpenSensorReaction.h │ ├── lqUpdateCalibrationReaction.cxx │ ├── lqUpdateCalibrationReaction.h │ ├── pqLidarViewManager.cxx │ ├── pqLidarViewManager.h │ ├── python │ │ ├── CMakeLists.txt │ │ └── lidarview │ │ │ ├── __init__.py │ │ │ ├── aboutDialog.py │ │ │ ├── applogic.py │ │ │ ├── gridAdjustmentDialog.py │ │ │ └── planefit.py │ └── vvPythonQtDecorators.h ├── VeloView.svg ├── branding.cmake ├── logo.icns ├── vvAboutDialog.ui ├── vvFilters.xml ├── vvMainWindow.cxx ├── vvMainWindow.h ├── vvMainWindow.ui ├── vvResources.qrc └── vvSources.xml ├── CMakeLists.txt ├── Documentation ├── README.txt └── VeloView_User_Guide.pdf ├── LICENSE ├── README.md ├── Superbuild ├── CMakeLists.txt ├── Projects │ ├── apple │ │ └── lidarview.bundle.cmake │ ├── lidarview.bundle.common.cmake │ ├── lidarview.cmake │ ├── unix │ │ └── lidarview.bundle.cmake │ └── win32 │ │ └── lidarview.bundle.cmake └── versions.cmake └── version.txt /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # This configuration requires clang-format 3.8 or higher. 3 | BasedOnStyle: Mozilla 4 | AlignAfterOpenBracket: DontAlign 5 | AlignOperands: false 6 | AlwaysBreakAfterReturnType: None 7 | AlwaysBreakAfterDefinitionReturnType: None 8 | BreakBeforeBraces: Allman 9 | ColumnLimit: 100 10 | Standard: Cpp03 11 | BinPackArguments: true 12 | BinPackParameters: true -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.patch -text 2 | *.pdf binary 3 | *.h format.clang-format 4 | *.cxx format.clang-format 5 | .docx filter=lfs diff=lfs merge=lfs -text 6 | .pdf filter=lfs diff=lfs merge=lfs -text 7 | -------------------------------------------------------------------------------- /.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 | - project: 'LidarView/lidarview-core' 3 | file: 'CI/.gitlab-ci-for-lidarview.yml' 4 | ref: master -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Superbuild/lidarview-superbuild"] 2 | path = Superbuild/lidarview-superbuild 3 | url = https://gitlab.kitware.com/LidarView/lidarview-superbuild.git 4 | [submodule "LVCore"] 5 | path = LVCore 6 | url = https://gitlab.kitware.com/LidarView/lidarview-core.git 7 | [submodule "Plugins/VelodynePlugin"] 8 | path = Plugins/VelodynePlugin 9 | url = https://gitlab.kitware.com/LidarView/velodyneplugin.git 10 | -------------------------------------------------------------------------------- /Application/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Sanitize checks 2 | if(NOT LV_INSTALL_LIBRARY_DIR ) 3 | message(FATAL_ERROR "LV_INSTALL_LIBRARY_DIR not set") 4 | endif() 5 | if(NOT SOFTWARE_NAME OR NOT SOFTWARE_VENDOR) 6 | message(FATAL_ERROR "SOFTWARE_NAME or SOFTWARE_VENDOR branding not set") 7 | endif() 8 | if(NOT LV_VERSION_FULL) 9 | message(FATAL_ERROR "LV_VERSION_ variables not set") 10 | endif() 11 | if(NOT LV_BUILD_PLATFORM) 12 | message(FATAL_ERROR "LV_BUILD_PLATFORM not set") 13 | endif() 14 | 15 | add_subdirectory("Ui/") 16 | 17 | set(CMAKE_AUTOMOC ON) 18 | set(CMAKE_AUTORCC ON) 19 | set(CMAKE_AUTOUIC ON) 20 | 21 | set (source_files 22 | vvMainWindow.h 23 | vvMainWindow.ui 24 | vvResources.qrc 25 | vvMainWindow.cxx 26 | vvMainWindow.h 27 | ) 28 | 29 | # Please make sure to adapt the AboutDialog text in the followin file 30 | # Lidar\python\lidarview\aboutDialog.py 31 | # You also need to change: 32 | # - bottom_logo.png (bottom logo) 33 | 34 | paraview_client_add( 35 | NAME ${SOFTWARE_NAME} 36 | NAMESPACE "LidarView" 37 | VERSION ${LV_VERSION_FULL} 38 | APPLICATION_NAME "${SOFTWARE_NAME}" 39 | ORGANIZATION "${SOFTWARE_VENDOR}" 40 | TITLE "${SOFTWARE_NAME} ${LV_VERSION_FULL} ${LV_BUILD_PLATFORM}" 41 | SPLASH_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/SoftwareInformation/Splash.jpg" 42 | BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/logo.icns" 43 | APPLICATION_ICON "${CMAKE_CURRENT_SOURCE_DIR}/SoftwareInformation/logo.ico" 44 | 45 | REQUIRED_PLUGINS LidarPlugin VelodynePlugin 46 | 47 | MAIN_WINDOW_CLASS vvMainWindow 48 | MAIN_WINDOW_INCLUDE vvMainWindow.h 49 | SOURCES ${source_files} 50 | APPLICATION_XMLS 51 | ${CMAKE_CURRENT_SOURCE_DIR}/vvSources.xml 52 | ${CMAKE_CURRENT_SOURCE_DIR}/vvFilters.xml 53 | 54 | RUNTIME_DESTINATION ${LV_INSTALL_RUNTIME_DIR} 55 | LIBRARY_DESTINATION ${LV_INSTALL_LIBRARY_DIR} 56 | ) 57 | 58 | target_include_directories(${SOFTWARE_NAME} PUBLIC 59 | ${CMAKE_CURRENT_SOURCE_DIR} 60 | ${CMAKE_CURRENT_BINARY_DIR}) 61 | 62 | # We directly link against the plugin and import them statically. 63 | target_link_libraries(${SOFTWARE_NAME} PUBLIC 64 | Qt5::Core 65 | Qt5::Widgets 66 | Qt5::UiTools 67 | Qt5::Gui 68 | Qt5::Help 69 | Qt5::Network 70 | Qt5::Sql 71 | Qt5::Svg 72 | ParaView::pqCore 73 | ParaView::pqWidgets 74 | ParaView::pqComponents 75 | ParaView::pqApplicationComponents 76 | ParaView::pqPython 77 | ParaView::pvpythonmodules 78 | ParaView::PythonInitializer 79 | PythonQtPlugin # The plugin is needed to be loaded statically 80 | lqApplicationComponents #actually LVCore/ApplicationComponents 81 | ApplicationUi 82 | ) 83 | 84 | set(USER_GUIDE_SRC "${LidarView_SOURCE_DIR}/Documentation/VeloView_User_Guide.pdf") 85 | 86 | if (APPLE) 87 | install(FILES ${USER_GUIDE_SRC} DESTINATION "${LV_INSTALL_LIBRARY_DIR}/../Resources") # to install tree 88 | file(COPY ${USER_GUIDE_SRC} DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SOFTWARE_NAME}.app/Contents/Resources") # to build tree 89 | else () 90 | install(FILES ${USER_GUIDE_SRC} DESTINATION "doc") # to install tree 91 | file(COPY ${USER_GUIDE_SRC} DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../doc") # to build tree 92 | endif () 93 | -------------------------------------------------------------------------------- /Application/Icons/Measurements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/Measurements.png -------------------------------------------------------------------------------- /Application/Icons/ViewOrtho.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/ViewOrtho.png -------------------------------------------------------------------------------- /Application/Icons/ViewPerspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/ViewPerspective.png -------------------------------------------------------------------------------- /Application/Icons/absolute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/absolute.png -------------------------------------------------------------------------------- /Application/Icons/camera_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/camera_logo.png -------------------------------------------------------------------------------- /Application/Icons/errorConsole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/errorConsole.png -------------------------------------------------------------------------------- /Application/Icons/icon_motion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/icon_motion.png -------------------------------------------------------------------------------- /Application/Icons/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/location.png -------------------------------------------------------------------------------- /Application/Icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/logo.png -------------------------------------------------------------------------------- /Application/Icons/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/map.png -------------------------------------------------------------------------------- /Application/Icons/media-loop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-loop.png -------------------------------------------------------------------------------- /Application/Icons/media-playback-pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-playback-pause.png -------------------------------------------------------------------------------- /Application/Icons/media-playback-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-playback-start.png -------------------------------------------------------------------------------- /Application/Icons/media-playback-stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-playback-stop.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-backward-0.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-backward-0.25x.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-backward-0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-backward-0.5x.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-backward-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-backward-2x.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-backward-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-backward-3x.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-backward.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-forward-0.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-forward-0.25x.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-forward-0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-forward-0.5x.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-forward-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-forward-2x.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-forward-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-forward-3x.png -------------------------------------------------------------------------------- /Application/Icons/media-seek-forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-seek-forward.png -------------------------------------------------------------------------------- /Application/Icons/media-skip-backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-skip-backward.png -------------------------------------------------------------------------------- /Application/Icons/media-skip-forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/media-skip-forward.png -------------------------------------------------------------------------------- /Application/Icons/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/open.png -------------------------------------------------------------------------------- /Application/Icons/planefit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/planefit.png -------------------------------------------------------------------------------- /Application/Icons/pqFrustumSelectionPoint24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqFrustumSelectionPoint24.png -------------------------------------------------------------------------------- /Application/Icons/pqResetCamera32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqResetCamera32.png -------------------------------------------------------------------------------- /Application/Icons/pqResetCameraLidar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqResetCameraLidar.png -------------------------------------------------------------------------------- /Application/Icons/pqResetCenterLidar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqResetCenterLidar.png -------------------------------------------------------------------------------- /Application/Icons/pqSpreadsheet16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqSpreadsheet16.png -------------------------------------------------------------------------------- /Application/Icons/pqSurfaceSelectionPoint24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqSurfaceSelectionPoint24.png -------------------------------------------------------------------------------- /Application/Icons/pqXMinus32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqXMinus32.png -------------------------------------------------------------------------------- /Application/Icons/pqXPlus32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqXPlus32.png -------------------------------------------------------------------------------- /Application/Icons/pqYMinus32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqYMinus32.png -------------------------------------------------------------------------------- /Application/Icons/pqYPlus32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqYPlus32.png -------------------------------------------------------------------------------- /Application/Icons/pqZMinus32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqZMinus32.png -------------------------------------------------------------------------------- /Application/Icons/pqZPlus32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/pqZPlus32.png -------------------------------------------------------------------------------- /Application/Icons/python_logo_124.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Icons/python_logo_124.png -------------------------------------------------------------------------------- /Application/SoftwareInformation/About.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/SoftwareInformation/About.png -------------------------------------------------------------------------------- /Application/SoftwareInformation/LidarView.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 24 | 47 | 49 | 50 | 52 | image/svg+xml 53 | 55 | 56 | 57 | 58 | 59 | 64 | 70 | LiDAR 84 | 85 | 86 | -------------------------------------------------------------------------------- /Application/SoftwareInformation/ParaviewLidar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 24 | 47 | 49 | 50 | 52 | image/svg+xml 53 | 55 | 56 | 57 | 58 | 59 | 64 | 67 | 70 | 72 | 78 | 80 | 86 | 92 | 98 | 99 | LiDAR 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /Application/SoftwareInformation/Splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/SoftwareInformation/Splash.jpg -------------------------------------------------------------------------------- /Application/SoftwareInformation/bottom_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/SoftwareInformation/bottom_logo.png -------------------------------------------------------------------------------- /Application/SoftwareInformation/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/SoftwareInformation/logo.ico -------------------------------------------------------------------------------- /Application/Ui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Sanitize checks 2 | if(NOT LV_INSTALL_LIBRARY_DIR ) 3 | message(FATAL_ERROR "LV_INSTALL_LIBRARY_DIR not set") 4 | endif() 5 | 6 | set(CMAKE_AUTOMOC ON) 7 | set(CMAKE_AUTORCC ON) 8 | set(CMAKE_AUTOUIC ON) 9 | 10 | add_library(ApplicationUi 11 | Widgets/vvCalibrationDialog.cxx 12 | Widgets/vvCalibrationDialog.h 13 | Widgets/vvCalibrationDialog.ui 14 | Widgets/vvCropReturnsDialog.cxx 15 | Widgets/vvCropReturnsDialog.h 16 | Widgets/vvCropReturnsDialog.ui 17 | Widgets/vvLaserSelectionDialog.cxx 18 | Widgets/vvLaserSelectionDialog.h 19 | Widgets/vvLaserSelectionDialog.ui 20 | Widgets/vvSelectFramesDialog.cxx 21 | Widgets/vvSelectFramesDialog.h 22 | Widgets/vvSelectFramesDialog.ui 23 | Widgets/images/resources.qrc 24 | 25 | pqLidarViewManager.cxx 26 | pqLidarViewManager.h 27 | lqOpenPcapReaction.cxx 28 | lqOpenPcapReaction.h 29 | lqOpenRecentFilesReaction.cxx 30 | lqOpenRecentFilesReaction.h 31 | lqOpenSensorReaction.cxx 32 | lqOpenSensorReaction.h 33 | lqUpdateCalibrationReaction.cxx 34 | lqUpdateCalibrationReaction.h 35 | vvPythonQtDecorators.h 36 | lqLidarStreamColorByInitBehavior.cxx 37 | lqLidarStreamColorByInitBehavior.h 38 | SupportSwitchInterpreter/lqSwitchInterpreterBehavior.cxx 39 | SupportSwitchInterpreter/lqSwitchInterpreterBehavior.h 40 | ) 41 | 42 | target_link_libraries(ApplicationUi PUBLIC 43 | ParaView::pqCore 44 | ParaView::pqWidgets 45 | ParaView::pqComponents 46 | ParaView::pqApplicationComponents 47 | ParaView::pqPython 48 | ParaView::pvpythonmodules 49 | ParaView::PythonInitializer 50 | ParaView::RemotingAnimation 51 | ParaView::RemotingApplication 52 | ParaView::RemotingClientServerStream 53 | ParaView::RemotingCore 54 | ParaView::RemotingLive 55 | ParaView::RemotingMisc 56 | ParaView::RemotingServerManager 57 | ParaView::RemotingServerManagerPython 58 | ParaView::RemotingSettings 59 | ParaView::RemotingViews 60 | ParaView::RemotingViewsPython 61 | lqApplicationComponents #actually LVCore/ApplicationComponents 62 | PythonQt::PythonQt # Required to Wrap additional functions 63 | VelodyneLidar #Required since Legacy-APF switch feature 64 | ) 65 | 66 | target_include_directories(ApplicationUi PUBLIC 67 | ${CMAKE_CURRENT_SOURCE_DIR} 68 | ${CMAKE_CURRENT_SOURCE_DIR}/Widgets 69 | ${CMAKE_CURRENT_SOURCE_DIR}/SupportSwitchInterpreter/ 70 | ${CMAKE_CURRENT_BINARY_DIR} 71 | ) 72 | 73 | include(GenerateExportHeader) 74 | generate_export_header(ApplicationUi) 75 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/applicationui_export.h DESTINATION ${LV_INSTALL_LIBRARY_DIR}) 76 | 77 | # Install Library needed 78 | install(TARGETS ApplicationUi 79 | RUNTIME DESTINATION ${LV_INSTALL_RUNTIME_DIR} 80 | LIBRARY DESTINATION ${LV_INSTALL_LIBRARY_DIR} 81 | ) 82 | 83 | 84 | 85 | #----------------------------------------------------------------------------- 86 | # Add python source 87 | #----------------------------------------------------------------------------- 88 | 89 | add_subdirectory(python) 90 | -------------------------------------------------------------------------------- /Application/Ui/SupportSwitchInterpreter/lqSwitchInterpreterBehavior.cxx: -------------------------------------------------------------------------------- 1 | #include "lqSwitchInterpreterBehavior.h" 2 | 3 | #include "lqHelper.h" 4 | #include "pqLidarViewManager.h" 5 | #include "vvCalibrationDialog.h" 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include "vtkVelodyneMetaPacketInterpreter.h" 18 | 19 | //----------------------------------------------------------------------------- 20 | lqSwitchInterpreterBehavior::lqSwitchInterpreterBehavior(QObject *parent) : 21 | Superclass(parent) 22 | { 23 | //Monitor added sources 24 | pqServerManagerModel* smmodel = pqApplicationCore::instance()->getServerManagerModel(); 25 | this->connect(smmodel, SIGNAL(sourceAdded(pqPipelineSource*)), 26 | SLOT(sourceAdded(pqPipelineSource*))); 27 | 28 | this->connect(this, SIGNAL(interpChange(vtkSMProxy*)), 29 | SLOT(uiSelectNewCalibrationFile(vtkSMProxy*))); 30 | } 31 | 32 | //----------------------------------------------------------------------------- 33 | void lqSwitchInterpreterBehavior::sourceAdded(pqPipelineSource* src) 34 | { 35 | if(IsLidarProxy(src->getProxy())) 36 | { 37 | this->ConnectionInterpreter = vtkSmartPointer::New(); 38 | 39 | this->ConnectionInterpreter->Connect(src->getProxy()->GetProperty("PacketInterpreter"), 40 | vtkCommand::ModifiedEvent, this, 41 | SLOT(onInterpreterUpdated( 42 | vtkObject*, unsigned long, void*))) ; 43 | } 44 | } 45 | 46 | //----------------------------------------------------------------------------- 47 | void lqSwitchInterpreterBehavior::onInterpreterUpdated(vtkObject* caller, 48 | unsigned long, void*) 49 | { 50 | vtkSMProperty* interpreterProp = vtkSMProperty::SafeDownCast(caller); 51 | if(!interpreterProp) 52 | { 53 | return; 54 | } 55 | 56 | vtkSMProxy * interpreterProxy = vtkSMPropertyHelper(interpreterProp).GetAsProxy(); 57 | if(!interpreterProxy) 58 | { 59 | return; 60 | } 61 | 62 | vtkSmartPointer interp = 63 | vtkVelodyneMetaPacketInterpreter::SafeDownCast(interpreterProxy->GetClientSideObject()); 64 | if(interp) 65 | { 66 | interp->AddObserver(FirstSwitchOfInterpreterEvent, this, 67 | &lqSwitchInterpreterBehavior::onChangeFormatDetected); 68 | } 69 | } 70 | 71 | //----------------------------------------------------------------------------- 72 | void lqSwitchInterpreterBehavior::uiSelectNewCalibrationFile(vtkSMProxy * lidarProxy) 73 | { 74 | if(!lidarProxy) 75 | { 76 | std::cout << "Switch of interpreter was detected but calibration file not updated " << std::endl; 77 | return; 78 | } 79 | 80 | // In the OpenPcapReaction, a handler is created 81 | // This allows updating the progress bar so the user can see that LV is openning a pcap 82 | // Here if we let this handler waiting for event this will freeze the ui 83 | // And the user will not be able to select the new calibration file 84 | // Ths is why we clean the pending progress 85 | // This also means that the progress bar will not been updated 86 | // during the second part of the open pcap (after the switch) 87 | // For now we don't add it because it will complexe the code 88 | // for a feature that should not be used often 89 | vtkProcessModule* pm = vtkProcessModule::GetProcessModule(); 90 | vtkPVSession* session = vtkPVSession::SafeDownCast(pm->GetSession()); 91 | vtkSmartPointer handler = session->GetProgressHandler(); 92 | handler->LocalCleanupPendingProgress(); 93 | 94 | // We launch the calibration dialog 95 | vvCalibrationDialog dialog(pqLidarViewManager::instance()->getMainWindow(), false); 96 | if(!dialog.exec()) 97 | { 98 | return; 99 | } 100 | vtkSMPropertyHelper(lidarProxy, "CalibrationFileName").Set(dialog.selectedCalibrationFile().toStdString().c_str()); 101 | lidarProxy->UpdateProperty("CalibrationFileName"); 102 | 103 | // We need to call the start function of the stream to load the calibration file 104 | if(IsLidarStreamProxy(lidarProxy)) 105 | { 106 | lidarProxy->InvokeCommand("Start"); 107 | } 108 | 109 | } 110 | 111 | //----------------------------------------------------------------------------- 112 | void lqSwitchInterpreterBehavior::onChangeFormatDetected(vtkObject* object, 113 | unsigned long, void*) 114 | { 115 | vtkSmartPointer metaInterpreter = 116 | vtkVelodyneMetaPacketInterpreter::SafeDownCast(object); 117 | 118 | if(!metaInterpreter) 119 | { 120 | return; 121 | } 122 | 123 | // We can not set the calibration fileName to the interpreter directly 124 | // using (interp->SetCalibrationFileName) because 125 | // vtkLidarReader::RequestInformation will rewrite the calibration file 126 | // if it's not the same as its own. 127 | // So we need to search for the lidarReader that have the right interpreter 128 | // and set its calibration file to the new one. 129 | // We can not add the Observer to the lidarReader (or lidarStream) directly 130 | // because the event is sent by the interpreter 131 | vtkSMProxy * lidarProxy = 132 | GetLidarProxyOfInterpreter(metaInterpreter); 133 | 134 | if(!lidarProxy) 135 | { 136 | lidarProxy = GetLidarProxyOfInterpreter(metaInterpreter); 137 | } 138 | 139 | // There is 3 threads in LV when we are in stream mode : 140 | // - 1 receiver thread : that receive the packet on the network and put them in the queue 141 | // - 1 Consumer/interpreter thread : that get packet from the queue, 142 | // interpret them and convert them into vtkpolyData 143 | // - 1 UI thread : that ask for UpdatePipeline to update the UI Regularly 144 | // 145 | // This callback is the direct consequence of the event send by an interpreter 146 | // So this function is execute in the consumer/interpreter thread 147 | // We can not display a dialog in that thread (cause segFault) 148 | // So we need to go back to the UI thread to display the dialog 149 | // This is why we need to emit a signal back to the ui thread 150 | emit interpChange(lidarProxy); 151 | } 152 | -------------------------------------------------------------------------------- /Application/Ui/SupportSwitchInterpreter/lqSwitchInterpreterBehavior.h: -------------------------------------------------------------------------------- 1 | #ifndef LQSwitchInterpreterBehavior_H 2 | #define LQSwitchInterpreterBehavior_H 3 | 4 | #include "applicationui_export.h" 5 | 6 | #include 7 | 8 | #include 9 | 10 | class pqPipelineSource; 11 | class vtkEventQtSlotConnect; 12 | class vtkObject; 13 | class vtkSMProxy; 14 | 15 | 16 | /** 17 | * @ingroup Reactions 18 | */ 19 | class APPLICATIONUI_EXPORT lqSwitchInterpreterBehavior : public QObject 20 | { 21 | Q_OBJECT 22 | typedef QObject Superclass; 23 | 24 | public: 25 | lqSwitchInterpreterBehavior(QObject* parent = 0); 26 | 27 | protected slots: 28 | void sourceAdded(pqPipelineSource* src); 29 | void onInterpreterUpdated(vtkObject* caller, unsigned long, void*); 30 | void onChangeFormatDetected(vtkObject*, unsigned long, void*); 31 | 32 | void uiSelectNewCalibrationFile(vtkSMProxy *proxy); 33 | 34 | 35 | signals: 36 | void interpChange(vtkSMProxy *); 37 | 38 | private: 39 | vtkSmartPointer ConnectionInterpreter; 40 | Q_DISABLE_COPY(lqSwitchInterpreterBehavior) 41 | }; 42 | 43 | #endif // LQSwitchInterpreterBehavior_H 44 | 45 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/WiresharkDoc-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/WiresharkDoc-128.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/calibrate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/calibrate.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/calibrate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 20 | 39 | 42 | 43 | 45 | 46 | 48 | image/svg+xml 49 | 51 | 52 | 53 | 54 | 58 | 62 | 66 | 79 | 89 | 95 | 108 | 116 | 124 | 132 | 139 | 147 | 155 | 163 | 171 | 178 | 186 | 194 | 195 | 196 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/connect.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/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/Ui/Widgets/images/connect_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/connect_icon.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/crop.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/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/Ui/Widgets/images/csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/csv.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/gps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/gps.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/gps.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 24 | 26 | 30 | 34 | 35 | 38 | 42 | 46 | 47 | 49 | 53 | 57 | 58 | 60 | 64 | 68 | 69 | 80 | 91 | 102 | 113 | 124 | 135 | 136 | 159 | 162 | 163 | 165 | 166 | 168 | image/svg+xml 169 | 171 | 172 | 173 | 174 | 175 | 179 | 183 | 190 | 203 | 216 | 217 | 225 | 233 | 246 | 258 | 271 | 284 | 285 | 286 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/kiwi_200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/kiwi_200.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/las.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/las.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/lidar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/lidar.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/media-eject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/media-eject.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/media-record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/media-record.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/preferences-system-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/preferences-system-64.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | crop.png 4 | gps.png 5 | las.png 6 | trailingframes.png 7 | media-eject.png 8 | media-record.png 9 | WiresharkDoc-128.png 10 | lidar.png 11 | kiwi_200.png 12 | preferences-system-64.png 13 | calibrate.png 14 | csv.png 15 | vvGridAdjustmentDialog.ui 16 | 17 | 18 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/trailingframes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/Ui/Widgets/images/trailingframes.png -------------------------------------------------------------------------------- /Application/Ui/Widgets/images/vvGridAdjustmentDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 395 10 | 252 11 | 12 | 13 | 14 | Grid Properties 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Sensor origin: 23 | 24 | 25 | 26 | 27 | 28 | 29 | -999.000000000000000 30 | 31 | 32 | 999.000000000000000 33 | 34 | 35 | 36 | 37 | 38 | 39 | -999.000000000000000 40 | 41 | 42 | 999.000000000000000 43 | 44 | 45 | 46 | 47 | 48 | 49 | -999.000000000000000 50 | 51 | 52 | 999.000000000000000 53 | 54 | 55 | 56 | 57 | 58 | 59 | Qt::Horizontal 60 | 61 | 62 | 63 | 40 64 | 20 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 88 78 | 0 79 | 80 | 81 | 82 | Sensor up: 83 | 84 | 85 | 86 | 87 | 88 | 89 | -99.000000000000000 90 | 91 | 92 | 93 | 94 | 95 | 96 | -99.000000000000000 97 | 98 | 99 | 100 | 101 | 102 | 103 | -99.000000000000000 104 | 105 | 106 | 107 | 108 | 109 | 110 | Qt::Horizontal 111 | 112 | 113 | 114 | 40 115 | 20 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | Grid resolution (meters): 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | Qt::Horizontal 138 | 139 | 140 | 141 | 40 142 | 20 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | Grid radius (meters): 155 | 156 | 157 | 158 | 159 | 160 | 161 | 999.990000000000009 162 | 163 | 164 | 165 | 166 | 167 | 168 | Qt::Horizontal 169 | 170 | 171 | 172 | 40 173 | 20 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | Grid line width 186 | 187 | 188 | 189 | 190 | 191 | 192 | 1 193 | 194 | 195 | 196 | 197 | 198 | 199 | Qt::Horizontal 200 | 201 | 202 | 203 | 40 204 | 20 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | Grid color 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | Qt::Horizontal 231 | 232 | 233 | 234 | 40 235 | 20 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | Persisting properties 248 | 249 | 250 | 251 | 252 | 253 | 254 | Qt::Horizontal 255 | 256 | 257 | 258 | 40 259 | 20 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | Qt::Vertical 270 | 271 | 272 | 273 | 20 274 | 27 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | Qt::Horizontal 283 | 284 | 285 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | buttonBox 295 | accepted() 296 | Dialog 297 | accept() 298 | 299 | 300 | 248 301 | 254 302 | 303 | 304 | 157 305 | 274 306 | 307 | 308 | 309 | 310 | buttonBox 311 | rejected() 312 | Dialog 313 | reject() 314 | 315 | 316 | 316 317 | 260 318 | 319 | 320 | 286 321 | 274 322 | 323 | 324 | 325 | 326 | 327 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/vvCalibrationDialog.h: -------------------------------------------------------------------------------- 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 | #ifndef __vvCalibrationDialog_h 15 | #define __vvCalibrationDialog_h 16 | 17 | #include 18 | #include 19 | 20 | class vtkSMProxy; 21 | class vvCalibrationDialog : public QDialog 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | vvCalibrationDialog(QWidget* p = 0, bool AdvancedVisible = true); 27 | vvCalibrationDialog(vtkSMProxy * lidarProxy, vtkSMProxy * GPSProxy, QWidget* p = 0); 28 | 29 | virtual ~vvCalibrationDialog(); 30 | 31 | Q_INVOKABLE QString selectedCalibrationFile() const; 32 | 33 | Q_INVOKABLE QStringList calibrationFiles() const; 34 | 35 | Q_INVOKABLE QMatrix4x4 sensorTransform() const; 36 | Q_INVOKABLE QMatrix4x4 gpsTransform() const; 37 | 38 | Q_INVOKABLE double gpsYaw() const; 39 | Q_INVOKABLE double gpsRoll() const; 40 | Q_INVOKABLE double gpsPitch() const; 41 | 42 | Q_INVOKABLE double gpsX() const; 43 | Q_INVOKABLE double gpsY() const; 44 | Q_INVOKABLE double gpsZ() const; 45 | Q_INVOKABLE double gpsTimeOffset() const; 46 | 47 | Q_INVOKABLE double lidarYaw() const; 48 | Q_INVOKABLE double lidarRoll() const; 49 | Q_INVOKABLE double lidarPitch() const; 50 | Q_INVOKABLE double lidarX() const; 51 | Q_INVOKABLE double lidarY() const; 52 | Q_INVOKABLE double lidarZ() const; 53 | Q_INVOKABLE double lidarTimeOffset() const; 54 | 55 | Q_INVOKABLE int lidarPort() const; 56 | Q_INVOKABLE int gpsPort() const; 57 | Q_INVOKABLE int lidarForwardingPort() const; 58 | Q_INVOKABLE int gpsForwardingPort() const; 59 | Q_INVOKABLE bool isForwarding() const; 60 | Q_INVOKABLE bool isCrashAnalysing() const; 61 | Q_INVOKABLE bool isEnableMultiSensors() const; 62 | Q_INVOKABLE bool isEnableInterpretGPSPackets() const; 63 | Q_INVOKABLE QString ipAddressForwarding() const; 64 | 65 | protected: 66 | void setDefaultConfiguration(); 67 | 68 | public slots: 69 | virtual void accept() override; 70 | 71 | protected slots: 72 | void addFile(); 73 | void removeSelectedFile(); 74 | void onCurrentRowChanged(int row); 75 | void clearAdvancedSettings(); 76 | 77 | private: 78 | class pqInternal; 79 | QScopedPointer Internal; 80 | 81 | Q_DISABLE_COPY(vvCalibrationDialog) 82 | }; 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/vvCropReturnsDialog.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 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 | #ifndef __vvCropReturnsDialog_h 15 | #define __vvCropReturnsDialog_h 16 | 17 | #include 18 | #include 19 | 20 | class vvCropReturnsDialog : public QDialog 21 | { 22 | Q_OBJECT 23 | Q_PROPERTY(bool croppingEnabled READ croppingEnabled WRITE setCroppingEnabled) 24 | Q_PROPERTY(bool cropOutside READ cropOutside WRITE setCropOutside) 25 | Q_PROPERTY(QVector3D firstCorner READ firstCorner WRITE setFirstCorner) 26 | Q_PROPERTY(QVector3D secondCorner READ secondCorner WRITE setSecondCorner) 27 | 28 | public: 29 | vvCropReturnsDialog(QWidget* p = 0); 30 | virtual ~vvCropReturnsDialog(); 31 | 32 | bool croppingEnabled() const; 33 | bool cropOutside() const; 34 | 35 | void setCroppingEnabled(bool); 36 | void setCropOutside(bool); 37 | 38 | QVector3D firstCorner() const; 39 | QVector3D secondCorner() const; 40 | 41 | void setFirstCorner(QVector3D); 42 | void setSecondCorner(QVector3D); 43 | 44 | Q_INVOKABLE void UpdateDialogWithCurrentSetting(); 45 | 46 | Q_INVOKABLE int GetCropMode() const; 47 | 48 | public slots: 49 | virtual void apply(); 50 | virtual void applyAndSave(); 51 | void onCartesianToggled(); 52 | void onSphericalToggled(); 53 | void onSliderBoxToggled(); 54 | void onCropGroupBoxToggled(); 55 | void onSpinBoxChanged(double value); 56 | void onXSliderChanged(double vmin, double vmax); 57 | void onYSliderChanged(double vmin, double vmax); 58 | void onZSliderChanged(double vmin, double vmax); 59 | 60 | private: 61 | class pqInternal; 62 | QScopedPointer Internal; 63 | 64 | Q_DISABLE_COPY(vvCropReturnsDialog) 65 | }; 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/vvCropReturnsDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | vvCropReturnsDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 632 10 | 349 11 | 12 | 13 | 14 | Crop Returns 15 | 16 | 17 | 18 | 19 | 20 | Enable Cropping of Returns 21 | 22 | 23 | true 24 | 25 | 26 | false 27 | 28 | 29 | 30 | QFormLayout::AllNonFixedFieldsGrow 31 | 32 | 33 | 34 | 35 | slider mode 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | X 45 | 46 | 47 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 48 | 49 | 50 | 51 | 52 | 53 | 54 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 55 | 56 | 57 | -300.000000000000000 58 | 59 | 60 | 300.000000000000000 61 | 62 | 63 | 64 | 65 | 66 | 67 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 68 | 69 | 70 | -300.000000000000000 71 | 72 | 73 | 300.000000000000000 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | Y 85 | 86 | 87 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 88 | 89 | 90 | 91 | 92 | 93 | 94 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 95 | 96 | 97 | -300.000000000000000 98 | 99 | 100 | 300.000000000000000 101 | 102 | 103 | 104 | 105 | 106 | 107 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 108 | 109 | 110 | -300.000000000000000 111 | 112 | 113 | 300.000000000000000 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | Z 125 | 126 | 127 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 128 | 129 | 130 | 131 | 132 | 133 | 134 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 135 | 136 | 137 | -300.000000000000000 138 | 139 | 140 | 300.000000000000000 141 | 142 | 143 | 144 | 145 | 146 | 147 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 148 | 149 | 150 | -300.000000000000000 151 | 152 | 153 | 300.000000000000000 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | Inverse Cropping : Keep only the points that lay outside the volume defined above. 163 | 164 | 165 | 166 | 167 | 168 | 169 | Coordinates mode selection: 170 | 171 | 172 | 173 | 174 | 175 | spherical 176 | 177 | 178 | 179 | 180 | 181 | 182 | cartesian 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | Keep only the points that lay inside the volume defined below. 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | Qt::Horizontal 203 | 204 | 205 | QDialogButtonBox::NoButton 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | buttonBox 215 | accepted() 216 | vvCropReturnsDialog 217 | accept() 218 | 219 | 220 | 248 221 | 254 222 | 223 | 224 | 157 225 | 274 226 | 227 | 228 | 229 | 230 | buttonBox 231 | rejected() 232 | vvCropReturnsDialog 233 | reject() 234 | 235 | 236 | 316 237 | 260 238 | 239 | 240 | 286 241 | 274 242 | 243 | 244 | 245 | 246 | 247 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/vvLaserSelectionDialog.h: -------------------------------------------------------------------------------- 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 | #ifndef __vvLaserSelectionDialog_h 15 | #define __vvLaserSelectionDialog_h 16 | 17 | #include 18 | 19 | class QTableWidgetItem; 20 | template 21 | class QVector; 22 | 23 | class vvLaserSelectionDialog : public QDialog 24 | { 25 | Q_OBJECT 26 | Q_PROPERTY(int applyOrder READ applyOrder) 27 | public: 28 | vvLaserSelectionDialog(QWidget* p = 0); 29 | virtual ~vvLaserSelectionDialog(); 30 | 31 | QVector getLaserSelectionSelector(); 32 | void setLaserSelectionSelector(const QVector& mask); 33 | 34 | bool isDisplayMoreSelectionsChecked(); 35 | void setDisplayMoreSelectionsChecked(bool state); 36 | 37 | void setLasersCorrections(const QVector& verticalCorrection, 38 | const QVector& rotationalCorrection, const QVector& distanceCorrection, 39 | const QVector& distanceCorrectionX, const QVector& distanceCorrectionY, 40 | const QVector& verticalOffsetCorrection, 41 | const QVector& horizontalOffsetCorrection, const QVector& focalDistance, 42 | const QVector& focalSlope, const QVector& minIntensity, 43 | const QVector& maxIntensity, int nchannels); 44 | 45 | public slots: 46 | void onItemChanged(QTableWidgetItem*); 47 | void onToggleSelected(); 48 | void onEnableDisableAll(int); 49 | 50 | protected slots: 51 | void saveSettings(); 52 | void onCancel(); 53 | void onApply(); 54 | void onApplyAndSaveSession(); 55 | void onApplyAndSavePermanent(); 56 | 57 | public slots: 58 | void onDisplayMoreCorrectionsChanged(); 59 | 60 | private: 61 | class pqInternal; 62 | pqInternal* Internal; 63 | int applyOrder_; 64 | int applyOrder(); 65 | 66 | Q_DISABLE_COPY(vvLaserSelectionDialog) 67 | }; 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/vvLaserSelectionDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | vvLaserSelectionDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 685 10 | 467 11 | 12 | 13 | 14 | Laser Selection 15 | 16 | 17 | false 18 | 19 | 20 | 21 | 22 | 23 | &Toggle Selected 24 | 25 | 26 | 27 | 28 | 29 | 30 | QAbstractItemView::SelectRows 31 | 32 | 33 | false 34 | 35 | 36 | true 37 | 38 | 39 | true 40 | 41 | 42 | false 43 | 44 | 45 | false 46 | 47 | 48 | 49 | 50 | 51 | 52 | AlignCenter 53 | 54 | 55 | 56 | 57 | Channel (Firing Order) 58 | 59 | 60 | AlignCenter 61 | 62 | 63 | 64 | 65 | Vertical Corr. (deg) 66 | 67 | 68 | AlignCenter 69 | 70 | 71 | 72 | 73 | Rotational Corr. (deg) 74 | 75 | 76 | AlignCenter 77 | 78 | 79 | 80 | 81 | Distance Corr. (m) 82 | 83 | 84 | AlignCenter 85 | 86 | 87 | 88 | 89 | Distance Corr. X (m) 90 | 91 | 92 | AlignCenter 93 | 94 | 95 | 96 | 97 | Distance Corr. Y (m) 98 | 99 | 100 | AlignCenter 101 | 102 | 103 | 104 | 105 | Vertical Offset Corr. (m) 106 | 107 | 108 | AlignCenter 109 | 110 | 111 | 112 | 113 | Horizontal Offset Corr. (m) 114 | 115 | 116 | AlignCenter 117 | 118 | 119 | 120 | 121 | Focal Distance 122 | 123 | 124 | AlignCenter 125 | 126 | 127 | 128 | 129 | Focal Slope 130 | 131 | 132 | AlignCenter 133 | 134 | 135 | 136 | 137 | Min Intensity 138 | 139 | 140 | AlignCenter 141 | 142 | 143 | 144 | 145 | Max Intensity 146 | 147 | 148 | AlignCenter 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | Qt::Horizontal 157 | 158 | 159 | 160 | 161 | 162 | 163 | Enable/Disable all 164 | 165 | 166 | true 167 | 168 | 169 | false 170 | 171 | 172 | 173 | 174 | 175 | 176 | Display more corrections 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | buttonBox 186 | accepted() 187 | vvLaserSelectionDialog 188 | accept() 189 | 190 | 191 | 248 192 | 254 193 | 194 | 195 | 157 196 | 274 197 | 198 | 199 | 200 | 201 | buttonBox 202 | rejected() 203 | vvLaserSelectionDialog 204 | reject() 205 | 206 | 207 | 316 208 | 260 209 | 210 | 211 | 286 212 | 274 213 | 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/vvSelectFramesDialog.cxx: -------------------------------------------------------------------------------- 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 | #include "vvSelectFramesDialog.h" 15 | 16 | #include "ui_vvSelectFramesDialog.h" 17 | 18 | #include 19 | #include 20 | 21 | #include 22 | 23 | 24 | 25 | //----------------------------------------------------------------------------- 26 | class vvSelectFramesDialog::pqInternal : public Ui::vvSelectFramesDialog 27 | { 28 | }; 29 | 30 | //----------------------------------------------------------------------------- 31 | vvSelectFramesDialog::vvSelectFramesDialog(QWidget* p) 32 | : QDialog(p) 33 | { 34 | this->Internal = new pqInternal; 35 | this->Internal->setupUi(this); 36 | this->Internal->FrameStart->clearFocus(); 37 | 38 | // Delete "?" Button that appears on windows os 39 | Qt::WindowFlags flags = windowFlags(); 40 | Qt::WindowFlags helpFlag = Qt::WindowContextHelpButtonHint; 41 | flags = flags & (~helpFlag); 42 | setWindowFlags(flags); 43 | } 44 | 45 | //----------------------------------------------------------------------------- 46 | vvSelectFramesDialog::~vvSelectFramesDialog() 47 | { 48 | delete this->Internal; 49 | } 50 | 51 | //----------------------------------------------------------------------------- 52 | void vvSelectFramesDialog::accept() 53 | { 54 | if (this->Internal->FrameStop->value() < this->Internal->FrameStart->value()) 55 | { 56 | QMessageBox::critical(this, "Invalid frame range", 57 | "The requested frame range is not valid. " 58 | "The start frame must be less than or equal to the stop frame."); 59 | return; 60 | } 61 | 62 | this->saveState(); 63 | QDialog::accept(); 64 | } 65 | 66 | //----------------------------------------------------------------------------- 67 | int vvSelectFramesDialog::frameMode() const 68 | { 69 | if (this->Internal->CurrentFrameButton->isChecked()) 70 | { 71 | return CURRENT_FRAME; 72 | } 73 | else if (this->Internal->AllFramesButton->isChecked()) 74 | { 75 | return ALL_FRAMES; 76 | } 77 | else 78 | { 79 | return FRAME_RANGE; 80 | } 81 | } 82 | 83 | //----------------------------------------------------------------------------- 84 | void vvSelectFramesDialog::setFrameMode(int frameMode) 85 | { 86 | if (frameMode == CURRENT_FRAME) 87 | { 88 | this->Internal->CurrentFrameButton->setChecked(true); 89 | } 90 | else if (frameMode == ALL_FRAMES) 91 | { 92 | this->Internal->AllFramesButton->setChecked(true); 93 | } 94 | else if (frameMode == FRAME_RANGE) 95 | { 96 | this->Internal->FrameRangeButton->setChecked(true); 97 | } 98 | } 99 | 100 | //----------------------------------------------------------------------------- 101 | int vvSelectFramesDialog::frameStart() const 102 | { 103 | return this->Internal->FrameStart->value(); 104 | } 105 | 106 | //----------------------------------------------------------------------------- 107 | int vvSelectFramesDialog::frameStop() const 108 | { 109 | return this->Internal->FrameStop->value(); 110 | } 111 | 112 | //----------------------------------------------------------------------------- 113 | int vvSelectFramesDialog::frameStride() const 114 | { 115 | return this->Internal->FrameStride->value(); 116 | } 117 | 118 | //----------------------------------------------------------------------------- 119 | void vvSelectFramesDialog::setFrameStart(int frameStart) 120 | { 121 | this->Internal->FrameStart->setValue(frameStart); 122 | } 123 | 124 | //----------------------------------------------------------------------------- 125 | void vvSelectFramesDialog::setFrameStop(int frameStop) 126 | { 127 | this->Internal->FrameStop->setValue(frameStop); 128 | } 129 | 130 | //----------------------------------------------------------------------------- 131 | void vvSelectFramesDialog::setFrameStride(int frameStride) 132 | { 133 | this->Internal->FrameStride->setValue(frameStride); 134 | } 135 | 136 | //----------------------------------------------------------------------------- 137 | int vvSelectFramesDialog::framePack() const 138 | { 139 | if (this->Internal->FilePerFrameButton->isChecked()) 140 | { 141 | return FILE_PER_FRAME; 142 | } 143 | else 144 | { 145 | return SINGLE_FILE; 146 | } 147 | } 148 | 149 | //----------------------------------------------------------------------------- 150 | void vvSelectFramesDialog::setFramePack(int framePack) 151 | { 152 | if (framePack == SINGLE_FILE) 153 | { 154 | this->Internal->SingleFileButton->setChecked(true); 155 | } 156 | else if (framePack == FILE_PER_FRAME) 157 | { 158 | this->Internal->FilePerFrameButton->setChecked(true); 159 | } 160 | } 161 | 162 | //----------------------------------------------------------------------------- 163 | int vvSelectFramesDialog::frameTransform() const 164 | { 165 | if (this->Internal->RelativeButton->isChecked()) 166 | { 167 | return RELATIVE_GEOPOSITION; 168 | } 169 | else if (this->Internal->AbsoluteUtmButton->isChecked()) 170 | { 171 | return ABSOLUTE_GEOPOSITION_UTM; 172 | } 173 | else if (this->Internal->AbsoluteLatLonButton->isChecked()) 174 | { 175 | return ABSOLUTE_GEOPOSITION_LATLON; 176 | } 177 | else 178 | { 179 | return SENSOR; 180 | } 181 | } 182 | 183 | //----------------------------------------------------------------------------- 184 | int vvSelectFramesDialog::frameMaximun() const 185 | { 186 | return std::max( this->Internal->FrameStart->maximum(), this->Internal->FrameStop->maximum()); 187 | } 188 | 189 | //----------------------------------------------------------------------------- 190 | int vvSelectFramesDialog::frameMinimun() const 191 | { 192 | return std::max( this->Internal->FrameStart->minimum(), this->Internal->FrameStop->minimum());; 193 | } 194 | 195 | //----------------------------------------------------------------------------- 196 | bool vvSelectFramesDialog::frameStrideVisibility() const 197 | { 198 | return this->Internal->FrameStrideContainer->isVisible();; 199 | } 200 | 201 | //----------------------------------------------------------------------------- 202 | bool vvSelectFramesDialog::framePackVisibility() const 203 | { 204 | return this->Internal->FramePackContainer->isVisible();; 205 | } 206 | 207 | //----------------------------------------------------------------------------- 208 | bool vvSelectFramesDialog::frameTransformVisibility() const 209 | { 210 | return this->Internal->FrameTransformContainer->isVisible();; 211 | } 212 | 213 | //----------------------------------------------------------------------------- 214 | void vvSelectFramesDialog::setFrameTransform(int frameTransform) 215 | { 216 | if (frameTransform == SENSOR) 217 | { 218 | this->Internal->SensorButton->setChecked(true); 219 | } 220 | else if (frameTransform == RELATIVE_GEOPOSITION) 221 | { 222 | this->Internal->RelativeButton->setChecked(true); 223 | } 224 | else if (frameTransform == ABSOLUTE_GEOPOSITION_UTM) 225 | { 226 | this->Internal->AbsoluteUtmButton->setChecked(true); 227 | } 228 | else if (frameTransform == ABSOLUTE_GEOPOSITION_LATLON) 229 | { 230 | this->Internal->AbsoluteLatLonButton->setChecked(true); 231 | } 232 | } 233 | 234 | //----------------------------------------------------------------------------- 235 | void vvSelectFramesDialog::setFrameMinimum(int frameMin) 236 | { 237 | this->Internal->FrameStart->setMinimum(frameMin); 238 | this->Internal->FrameStop->setMinimum(frameMin); 239 | } 240 | 241 | //----------------------------------------------------------------------------- 242 | void vvSelectFramesDialog::setFrameMaximum(int frameMax) 243 | { 244 | this->Internal->FrameStart->setMaximum(frameMax); 245 | this->Internal->FrameStop->setMaximum(frameMax); 246 | } 247 | 248 | //----------------------------------------------------------------------------- 249 | void vvSelectFramesDialog::setFrameStrideVisibility(bool visible) 250 | { 251 | this->Internal->FrameStrideContainer->setVisible(visible); 252 | } 253 | 254 | //----------------------------------------------------------------------------- 255 | void vvSelectFramesDialog::setFramePackVisibility(bool visible) 256 | { 257 | this->Internal->FramePackContainer->setVisible(visible); 258 | } 259 | 260 | //----------------------------------------------------------------------------- 261 | void vvSelectFramesDialog::setFrameTransformVisibility(bool visible) 262 | { 263 | this->Internal->FrameTransformContainer->setVisible(visible); 264 | } 265 | 266 | //----------------------------------------------------------------------------- 267 | void vvSelectFramesDialog::showEvent(QShowEvent* e) 268 | { 269 | QDialog::showEvent(e); 270 | this->resize(this->width(), this->minimumSizeHint().height()); 271 | } 272 | 273 | //----------------------------------------------------------------------------- 274 | void vvSelectFramesDialog::saveState() 275 | { 276 | pqSettings* settings = pqApplicationCore::instance()->settings(); 277 | settings->setValue("LidarPlugin/SelectFramesDialog/Mode", this->frameMode()); 278 | settings->setValue("LidarPlugin/SelectFramesDialog/Start", this->frameStart()); 279 | settings->setValue("LidarPlugin/SelectFramesDialog/Stop", this->frameStop()); 280 | settings->setValue("LidarPlugin/SelectFramesDialog/Stride", this->frameStride()); 281 | settings->setValue("LidarPlugin/SelectFramesDialog/Pack", this->framePack()); 282 | settings->setValue("LidarPlugin/SelectFramesDialog/Transform", this->frameTransform()); 283 | settings->setValue("LidarPlugin/SelectFramesDialog/Geometry", this->saveGeometry()); 284 | } 285 | 286 | //----------------------------------------------------------------------------- 287 | void vvSelectFramesDialog::restoreState() 288 | { 289 | pqSettings* settings = pqApplicationCore::instance()->settings(); 290 | this->restoreGeometry( 291 | settings->value("LidarPlugin/SelectFramesDialog/Geometry").toByteArray()); 292 | this->setFrameMode( 293 | settings->value("LidarPlugin/SelectFramesDialog/Mode", CURRENT_FRAME).toInt()); 294 | this->setFrameStart(settings->value("LidarPlugin/SelectFramesDialog/Start", 0).toInt()); 295 | this->setFrameStop(settings->value("LidarPlugin/SelectFramesDialog/Stop", 10).toInt()); 296 | this->setFrameStride(settings->value("LidarPlugin/SelectFramesDialog/Stride", 1).toInt()); 297 | this->setFramePack( 298 | settings->value("LidarPlugin/SelectFramesDialog/Pack", SINGLE_FILE).toInt()); 299 | this->setFrameTransform( 300 | settings->value("LidarPlugin/SelectFramesDialog/Transform", SENSOR).toInt()); 301 | } 302 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/vvSelectFramesDialog.h: -------------------------------------------------------------------------------- 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 | #ifndef __vvSelectFramesDialog_h 15 | #define __vvSelectFramesDialog_h 16 | 17 | #include 18 | 19 | class vvSelectFramesDialog : public QDialog 20 | { 21 | Q_OBJECT 22 | Q_PROPERTY(int frameMode READ frameMode WRITE setFrameMode) 23 | Q_PROPERTY(int frameStart READ frameStart WRITE setFrameStart) 24 | Q_PROPERTY(int frameStop READ frameStop WRITE setFrameStop) 25 | Q_PROPERTY(int frameStride READ frameStride WRITE setFrameStride) 26 | Q_PROPERTY(int framePack READ framePack WRITE setFramePack) 27 | Q_PROPERTY(int frameMinimum READ frameMinimun WRITE setFrameMinimum) 28 | Q_PROPERTY(int frameMaximum READ frameMaximun WRITE setFrameMaximum) 29 | Q_PROPERTY(int frameTransform READ frameTransform WRITE setFrameTransform) 30 | Q_PROPERTY(bool frameStrideVisibility READ frameStrideVisibility WRITE setFrameStrideVisibility) 31 | Q_PROPERTY(bool framePackVisibility READ framePackVisibility WRITE setFramePackVisibility) 32 | Q_PROPERTY(bool frameTransformVisibility READ frameTransformVisibility WRITE setFrameTransformVisibility) 33 | Q_ENUMS(FrameMode FramePack FrameTransform) 34 | 35 | public: 36 | vvSelectFramesDialog(QWidget* p = 0); 37 | virtual ~vvSelectFramesDialog(); 38 | 39 | enum FrameMode 40 | { 41 | CURRENT_FRAME = 0, 42 | ALL_FRAMES, 43 | FRAME_RANGE 44 | }; 45 | enum FramePack 46 | { 47 | SINGLE_FILE = 0, 48 | FILE_PER_FRAME 49 | }; 50 | enum FrameTransform 51 | { 52 | SENSOR = 0, 53 | RELATIVE_GEOPOSITION, 54 | ABSOLUTE_GEOPOSITION_UTM, 55 | ABSOLUTE_GEOPOSITION_LATLON, 56 | }; 57 | 58 | int frameMode() const; 59 | int frameStart() const; 60 | int frameStop() const; 61 | int frameStride() const; 62 | int framePack() const; 63 | int frameTransform() const; 64 | 65 | int frameMaximun() const; 66 | int frameMinimun() const; 67 | 68 | bool frameStrideVisibility() const; 69 | bool framePackVisibility() const; 70 | bool frameTransformVisibility() const; 71 | 72 | public slots: 73 | virtual void accept() override; 74 | 75 | void setFrameMode(int frameMode); 76 | void setFrameStart(int frameStart); 77 | void setFrameStop(int frameStop); 78 | void setFrameStride(int frameStride); 79 | void setFramePack(int framePack); 80 | void setFrameTransform(int frameTransform); 81 | 82 | void setFrameMinimum(int frameMin); 83 | void setFrameMaximum(int frameMax); 84 | 85 | void setFrameStrideVisibility(bool visible); 86 | void setFramePackVisibility(bool visible); 87 | void setFrameTransformVisibility(bool visible); 88 | 89 | void saveState(); 90 | void restoreState(); 91 | 92 | protected: 93 | virtual void showEvent(QShowEvent*) override; 94 | 95 | private: 96 | class pqInternal; 97 | pqInternal* Internal; 98 | 99 | Q_DISABLE_COPY(vvSelectFramesDialog) 100 | }; 101 | 102 | #endif 103 | -------------------------------------------------------------------------------- /Application/Ui/Widgets/vvSelectFramesDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | vvSelectFramesDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 267 10 | 407 11 | 12 | 13 | 14 | Select Frames 15 | 16 | 17 | 18 | 19 | 20 | Frame Selection 21 | 22 | 23 | 24 | 25 | 26 | Current frame 27 | 28 | 29 | true 30 | 31 | 32 | 33 | 34 | 35 | 36 | All frames 37 | 38 | 39 | 40 | 41 | 42 | 43 | 0 44 | 45 | 46 | 0 47 | 48 | 49 | 50 | 51 | Frames from 52 | 53 | 54 | 55 | 56 | 57 | 58 | Qt::WheelFocus 59 | 60 | 61 | 100 62 | 63 | 64 | 0 65 | 66 | 67 | 68 | 69 | 70 | 71 | to 72 | 73 | 74 | 75 | 76 | 77 | 78 | Qt::WheelFocus 79 | 80 | 81 | 100 82 | 83 | 84 | 10 85 | 86 | 87 | 88 | 89 | 90 | 91 | Qt::Horizontal 92 | 93 | 94 | 95 | 40 96 | 20 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 0 108 | 109 | 110 | 111 | 112 | Qt::Horizontal 113 | 114 | 115 | 116 | 117 | 118 | 119 | Frame Stride: 120 | 121 | 122 | 123 | 124 | 125 | 126 | 1 127 | 128 | 129 | 999 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | Archive Mode 143 | 144 | 145 | 146 | 147 | 148 | Single file 149 | 150 | 151 | true 152 | 153 | 154 | 155 | 156 | 157 | 158 | File per frame 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | Coordinate System 169 | 170 | 171 | 172 | 173 | 174 | Write position information relative to the sensor 175 | 176 | 177 | Sensor 178 | 179 | 180 | 181 | 182 | 183 | 184 | Write position information transformed for platform orientation and relative position 185 | 186 | 187 | Relative geoposition 188 | 189 | 190 | 191 | 192 | 193 | 194 | Write position information as absolute geoposition in UTM coordinates 195 | 196 | 197 | Absolute geoposition (UTM) 198 | 199 | 200 | 201 | 202 | 203 | 204 | Write position information as absolute geoposition in Lat/Lon 205 | 206 | 207 | Absolute geoposition (Lat/Lon) 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | Qt::Horizontal 218 | 219 | 220 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | buttonBox 230 | accepted() 231 | vvSelectFramesDialog 232 | accept() 233 | 234 | 235 | 252 236 | 223 237 | 238 | 239 | 157 240 | 274 241 | 242 | 243 | 244 | 245 | buttonBox 246 | rejected() 247 | vvSelectFramesDialog 248 | reject() 249 | 250 | 251 | 319 252 | 223 253 | 254 | 255 | 286 256 | 274 257 | 258 | 259 | 260 | 261 | 262 | -------------------------------------------------------------------------------- /Application/Ui/lqLidarStreamColorByInitBehavior.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqLidarStreamColorByInitBehavior.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | 9 | LidarView is a free software; you can redistribute it and/or modify it 10 | under the terms of the LidarView license. 11 | 12 | See LICENSE for the full LidarView license. 13 | A copy of this license can be obtained by contacting 14 | Kitware Inc. 15 | 28 Corporate Drive 16 | Clifton Park, NY 12065 17 | USA 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR 23 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | ========================================================================*/ 32 | #include "lqLidarStreamColorByInitBehavior.h" 33 | 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | #include 40 | #include 41 | #include 42 | #include 43 | 44 | #include "vtkLidarStream.h" 45 | 46 | #include 47 | 48 | //----------------------------------------------------------------------------- 49 | lqLidarStreamColorByInitBehavior::lqLidarStreamColorByInitBehavior(QObject *parent) 50 | : Superclass(parent) 51 | { 52 | //Monitor added sources 53 | pqServerManagerModel* smmodel = pqApplicationCore::instance()->getServerManagerModel(); 54 | this->connect(smmodel, SIGNAL(sourceAdded(pqPipelineSource*)), SLOT(sourceAdded(pqPipelineSource*))); 55 | } 56 | 57 | //----------------------------------------------------------------------------- 58 | bool lqLidarStreamColorByInitBehavior::tryLidarStreamInitColorBy(vtkSMSourceProxy* proxy) 59 | { 60 | //Check OutputPort Name 61 | int framePort = -1; 62 | for(std::size_t i = 0; i < proxy->GetNumberOfOutputPorts(); ++i ) 63 | { 64 | if( proxy->GetOutputPortName(i) == std::string("Frame")) 65 | { 66 | framePort = i; 67 | break; 68 | } 69 | } 70 | if( framePort == -1 ) 71 | { 72 | std::cerr << __FUNCTION__ << " LidarStream has no \'Frame\' Port" << std::endl; 73 | return true; // Error, Do not try again 74 | } 75 | 76 | //Get Repr Proxy 77 | pqView* view = pqActiveObjects::instance().activeView(); //WIP finding RenderView1 is lucky here 78 | vtkSMViewProxy* viewProxy = vtkSMViewProxy::SafeDownCast(view->getProxy()); 79 | vtkSMPVRepresentationProxy* pvrp = vtkSMPVRepresentationProxy::SafeDownCast( 80 | viewProxy->FindRepresentation(proxy,0) 81 | ); 82 | 83 | //Note: It is safe to assume, that if 'framePort' has no Repr, stream has not arrived yet 84 | if( !pvrp ) 85 | { 86 | //No Data Received yet 87 | return false; //Try again later 88 | } 89 | 90 | // Get the sensor information of the stream to help us determine the colorize array 91 | std::string sensorInfo = ""; 92 | vtkLidarStream* lidarStream = vtkLidarStream::SafeDownCast(proxy->GetClientSideObject()); 93 | if(lidarStream) 94 | { 95 | sensorInfo = lidarStream->GetSensorInformation(); 96 | } 97 | else 98 | { 99 | return true; 100 | } 101 | 102 | if(sensorInfo.find("Could not determine") != std::string::npos) 103 | { 104 | // The sensor information could be "not determine" in two cases : 105 | // - No packet are received yet (should be handle by the pvrp test above 106 | // - Not enough packet are received to determine the sensor (case of live calibration) 107 | // We return false to try again at the next packet. 108 | return false; 109 | } 110 | 111 | // If the sensor is an APF one (apf or Special Velarray, we color by reflectivity 112 | // If the sensor is a "Legacy" one, we color by intensitys 113 | if(sensorInfo.find("advanced") != std::string::npos) 114 | { 115 | pvrp->SetScalarColoring("reflectivity", 0); 116 | } 117 | else 118 | { 119 | pvrp->SetScalarColoring("intensity", 0); 120 | } 121 | 122 | return true; 123 | 124 | } 125 | 126 | //----------------------------------------------------------------------------- 127 | void lqLidarStreamColorByInitBehavior::sourceAdded(pqPipelineSource* src) 128 | { 129 | if ( IsLidarStreamProxy(src->getProxy()) ) 130 | { 131 | //Ask lidarSource to report its updates 132 | this->connect(src, SIGNAL(dataUpdated(pqPipelineSource*)), SLOT(dataUpdated(pqPipelineSource*))); 133 | } 134 | } 135 | 136 | //----------------------------------------------------------------------------- 137 | void lqLidarStreamColorByInitBehavior::dataUpdated(pqPipelineSource* src) 138 | { 139 | if ( !IsLidarStreamProxy(src->getProxy()) ) 140 | { 141 | std::cerr << __FUNCTION__ << " Wrong source type has been connected to behavior" << std::endl; 142 | return; 143 | } 144 | 145 | //Try to color by the right array 146 | if( IsLidarStreamProxy(src->getProxy()) && 147 | this->tryLidarStreamInitColorBy( vtkSMSourceProxy::SafeDownCast(src->getProxy())) ) 148 | { 149 | //Disconnect dataUpdate Signal, if procedure comes to an end. 150 | this->disconnect(src, SIGNAL(dataUpdated(pqPipelineSource*)), this, SLOT(dataUpdated(pqPipelineSource*))); 151 | } 152 | 153 | } 154 | -------------------------------------------------------------------------------- /Application/Ui/lqLidarStreamColorByInitBehavior.h: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: LidarView 4 | Module: lqLidarStreamColorByInitBehavior.h 5 | 6 | Copyright (c) Kitware Inc. 7 | All rights reserved. 8 | 9 | LidarView is a free software; you can redistribute it and/or modify it 10 | under the terms of the LidarView license. 11 | 12 | See LICENSE for the full LidarView license. 13 | A copy of this license can be obtained by contacting 14 | Kitware Inc. 15 | 28 Corporate Drive 16 | Clifton Park, NY 12065 17 | USA 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR 23 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | ========================================================================*/ 32 | #ifndef lqLidarStreamColorByInitBehavior_H 33 | #define lqLidarStreamColorByInitBehavior_H 34 | 35 | #include 36 | 37 | #include "applicationui_export.h" 38 | 39 | class pqPipelineSource; 40 | class vtkSMSourceProxy; 41 | 42 | /** 43 | * @class lqLidarStreamColorByInitBehavior 44 | * @ingroup Behaviors 45 | * 46 | * lqLidarStreamColorByInitBehavior helps to set the colorize array, 47 | * once a LidarStream(LiveSource) has received data and generated an Output. 48 | * The colorize array depend on the sensor type, 49 | * that we can know only after receiving the first data. 50 | */ 51 | class APPLICATIONUI_EXPORT lqLidarStreamColorByInitBehavior : public QObject 52 | { 53 | Q_OBJECT 54 | typedef QObject Superclass; 55 | 56 | public: 57 | lqLidarStreamColorByInitBehavior(QObject* parent = 0); 58 | 59 | protected slots: 60 | void sourceAdded(pqPipelineSource* src); 61 | void dataUpdated(pqPipelineSource* src); 62 | 63 | private: 64 | /** 65 | * @brief Check if LidarStream has indeed Updated, and tries to color by the rigth array 66 | * ("reflectivity" if the detected sensor is an Advanced, "intensity" otherwise) 67 | * @param[in] proxy A pointer to the LidarStream proxy reporting an update. 68 | * Return true , if procedure has completed (successfully or not), requests a disconnect. 69 | * Return false, if information is missing (dataStream has not started) and further attempts are needed. 70 | * The procedure works in multiple attempts: 71 | * - Does nothing if LidarStream has not received any (or not enough) Data yet (aka Failed Attempt). 72 | * - Color by "reflectivity" or "intensity" according to the detected sensor. 73 | */ 74 | bool tryLidarStreamInitColorBy(vtkSMSourceProxy* proxy); 75 | 76 | Q_DISABLE_COPY(lqLidarStreamColorByInitBehavior) 77 | }; 78 | 79 | #endif // lqLidarStreamColorByInitBehavior_h 80 | -------------------------------------------------------------------------------- /Application/Ui/lqOpenPcapReaction.cxx: -------------------------------------------------------------------------------- 1 | #include "lqOpenPcapReaction.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "lqHelper.h" 17 | #include "lqUpdateCalibrationReaction.h" 18 | #include "pqLidarViewManager.h" 19 | #include "vvCalibrationDialog.h" 20 | #include "lqSensorListWidget.h" 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | //---------------------------------------------------------------------------- 35 | class lqOpenPcapReaction::vtkObserver : public vtkCommand 36 | { 37 | public: 38 | static vtkObserver* New() 39 | { 40 | vtkObserver* obs = new vtkObserver(); 41 | return obs; 42 | } 43 | 44 | void Execute(vtkObject* , unsigned long eventId, void*) override 45 | { 46 | 47 | if (eventId == vtkCommand::ProgressEvent) 48 | { 49 | QApplication::instance()->processEvents(); 50 | } 51 | } 52 | }; 53 | 54 | //----------------------------------------------------------------------------- 55 | lqOpenPcapReaction::lqOpenPcapReaction(QAction *action) : 56 | Superclass(action) 57 | { 58 | } 59 | 60 | //----------------------------------------------------------------------------- 61 | void lqOpenPcapReaction::onTriggered() 62 | { 63 | // Get the pcap filename 64 | pqSettings* settings = pqApplicationCore::instance()->settings(); 65 | QString defaultDir = settings->value("LidarPlugin/OpenData/DefaultDir", QDir::homePath()).toString(); 66 | QString filename = QFileDialog::getOpenFileName(nullptr, 67 | QString("Open LiDAR File"), 68 | defaultDir, QString("Wireshark Capture (*.pcap)")); 69 | 70 | if (!filename.isNull() && !filename.isEmpty()) 71 | { 72 | QFileInfo fileInfo(filename); 73 | settings->setValue("LidarPlugin/OpenData/DefaultDir", fileInfo.absolutePath()); 74 | 75 | lqOpenPcapReaction::createSourceFromFile(filename); 76 | } 77 | } 78 | 79 | //----------------------------------------------------------------------------- 80 | void lqOpenPcapReaction::createSourceFromFile(QString fileName) 81 | { 82 | pqServer* server = pqActiveObjects::instance().activeServer(); 83 | pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder(); 84 | vtkNew controller; 85 | pqView* view = pqActiveObjects::instance().activeView(); 86 | 87 | // Launch the calibration Dialog before creating the Source to allow to cancel the action 88 | // (with the "cancel" button in the dialog) 89 | vvCalibrationDialog dialog(pqLidarViewManager::instance()->getMainWindow()); 90 | //DisplayDialogOnActiveWindow(dialog); 91 | if (!dialog.exec()) 92 | { 93 | return; 94 | } 95 | 96 | // Create a progress bar so the user see that VeloView is running 97 | QProgressDialog progress("Reading pcap", "", 0, 0, pqLidarViewManager::getMainWindow()); 98 | progress.setCancelButton(nullptr); 99 | progress.setModal(true); 100 | progress.show(); 101 | 102 | vtkProcessModule* pm = vtkProcessModule::GetProcessModule(); 103 | vtkPVSession* session = vtkPVSession::SafeDownCast(pm->GetSession()); 104 | if(!session) 105 | { 106 | return; 107 | } 108 | vtkSmartPointer handler = session->GetProgressHandler(); 109 | handler->PrepareProgress(); 110 | double interval = handler->GetProgressInterval(); 111 | handler->SetProgressInterval(0.05); 112 | vtkNew obs; 113 | unsigned long tag = handler->AddObserver(vtkCommand::ProgressEvent, obs); 114 | 115 | // Remove all Streams (and every filter depending on them) from pipeline Browser 116 | // Thanks to the lqSensorListWidget, 117 | // if a LidarStream is delete, it will automatically delete its PositionOrientationStream. 118 | // So we just have to delete all lidarStream. 119 | RemoveAllProxyTypeFromPipelineBrowser(); 120 | 121 | if(!dialog.isEnableMultiSensors()) 122 | { 123 | // We remove all lidarReader (and every filter depending on them) in the pipeline 124 | // Thanks to the lqSensorListWidget, 125 | // if a LidarReader is delete, it will automatically delete its PositionOrientationReader. 126 | // So we just have to delete all lidarReader. 127 | RemoveAllProxyTypeFromPipelineBrowser(); 128 | } 129 | 130 | // Create the lidar Reader 131 | // We have to use pqObjectBuilder::createSource to add the created source to the pipeline 132 | // The source will be created immediately so the signal "sourceAdded" of the pqServerManagerModel 133 | // is send during "create source". 134 | // To get the pqPipelineSource modified with the new property, you have to connect to the signal 135 | // "dataUpdated" of the pqServerManagerModel 136 | pqPipelineSource* lidarSource = builder->createSource("sources", "LidarReader", server); 137 | lidarSource->setModifiedState(pqProxy::UNMODIFIED); 138 | vtkSMPropertyHelper(lidarSource->getProxy(), "FileName").Set(fileName.toStdString().c_str()); 139 | lidarSource->getProxy()->UpdateProperty("FileName"); 140 | QString lidarName = lidarSource->getSMName(); 141 | 142 | pqPipelineSource * posOrSource = nullptr; 143 | QString posOrName = ""; 144 | 145 | // Update lidarSource and posOrSource 146 | // If the GPs interpretation is asked, the posOrsource will be created in the lqUpdateCalibrationReaction 147 | // because it has to manage it if the user enable interpreting GPS packet after the first instantiation 148 | lqUpdateCalibrationReaction::UpdateCalibration(lidarSource, posOrSource, dialog); 149 | 150 | if (posOrSource) 151 | { 152 | posOrSource->updatePipeline(); 153 | posOrName = posOrSource->getSMName(); 154 | controller->Show(posOrSource->getSourceProxy(), 0, view->getViewProxy()); 155 | } 156 | 157 | 158 | // Create the trailing Frame filter on the output of the LidarReader 159 | QMap > namedInputs; 160 | QList inputs; 161 | inputs.push_back(lidarSource->getOutputPort(0)); 162 | namedInputs["Input"] = inputs; 163 | pqPipelineSource* trailingFrameFilter = builder->createFilter("filters", "TrailingFrame", namedInputs, server); 164 | QString trailingFrameName = trailingFrameFilter->getSMName(); 165 | 166 | // Set the trailing frame associated to the sensor Widget 167 | lqSensorListWidget * listSensor = lqSensorListWidget::instance(); 168 | listSensor->setSourceToDisplayToLidarSourceWidget(lidarSource, trailingFrameFilter); 169 | 170 | //Update applogic to be able to use function only define in applogic. 171 | pqLidarViewManager::instance()->runPython(QString("lv.UpdateApplogicReader('%1', '%2', '%3')\n").arg(lidarName, posOrName, trailingFrameName)); 172 | 173 | // Show the trailing frame 174 | controller->Show(trailingFrameFilter->getSourceProxy(), 0, view->getViewProxy()); 175 | pqActiveObjects::instance().setActiveSource(trailingFrameFilter); 176 | pqApplicationCore::instance()->render(); 177 | 178 | // Remove the handler so the user can interact with VeloView again (pushing any button) 179 | handler->RemoveObserver(tag); 180 | handler->LocalCleanupPendingProgress(); 181 | handler->SetProgressInterval(interval); 182 | progress.close(); 183 | } 184 | -------------------------------------------------------------------------------- /Application/Ui/lqOpenPcapReaction.h: -------------------------------------------------------------------------------- 1 | #ifndef LQOPENPCAPREACTION_H 2 | #define LQOPENPCAPREACTION_H 3 | 4 | #include "applicationui_export.h" 5 | 6 | #include "pqReaction.h" 7 | 8 | #include 9 | /** 10 | * @ingroup Reactions 11 | * Reaction to open a pcap 12 | */ 13 | class APPLICATIONUI_EXPORT lqOpenPcapReaction : public pqReaction 14 | { 15 | Q_OBJECT 16 | typedef pqReaction Superclass; 17 | 18 | public: 19 | lqOpenPcapReaction(QAction* action); 20 | static void createSourceFromFile(QString fileName); 21 | 22 | protected: 23 | /// Called when the action is triggered. 24 | void onTriggered() override; 25 | 26 | static void onProgressEvent(vtkObject* caller, unsigned long, void*); 27 | 28 | private: 29 | 30 | class vtkObserver; 31 | Q_DISABLE_COPY(lqOpenPcapReaction) 32 | }; 33 | 34 | #endif // LQOPENPCAPREACTION_H 35 | -------------------------------------------------------------------------------- /Application/Ui/lqOpenRecentFilesReaction.cxx: -------------------------------------------------------------------------------- 1 | #include "lqOpenRecentFilesReaction.h" 2 | 3 | #include "lqHelper.h" 4 | #include "lqOpenPcapReaction.h" 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | //----------------------------------------------------------------------------- 18 | lqOpenRecentFilesReaction::lqOpenRecentFilesReaction(QMenu* recentFilesMenu, 19 | QAction* clearRecentFiles, 20 | QObject *parent) : 21 | Superclass(parent) 22 | { 23 | this->RecentFilesMenu = recentFilesMenu; 24 | 25 | pqServerManagerModel* smmodel = pqApplicationCore::instance()->getServerManagerModel(); 26 | this->connect(smmodel, SIGNAL(sourceAdded(pqPipelineSource*)), SLOT(onSourceAdded(pqPipelineSource*))); 27 | 28 | connect(clearRecentFiles, SIGNAL(triggered()), this, SLOT(onClearMenu())); 29 | 30 | this->Connection = vtkSmartPointer::New(); 31 | 32 | this->RestoreRecentFilesFromSettings(); 33 | } 34 | 35 | //----------------------------------------------------------------------------- 36 | void lqOpenRecentFilesReaction::onSourceAdded(pqPipelineSource* src) 37 | { 38 | if (IsLidarReaderProxy(src->getProxy())) 39 | { 40 | // Get the pcap Name 41 | vtkSMProperty* pcapProp = src->getProxy()->GetProperty("FileName"); 42 | if (!pcapProp) 43 | { 44 | std::cout << "Lidar Reader Proxy has no property named \"FileName\" " << std::endl; 45 | return; 46 | } 47 | 48 | QString pcapName = QString(vtkSMPropertyHelper(pcapProp).GetAsString()); 49 | 50 | // We connect the property "Filename" of the reader 51 | // - If "FileName" is not already set (default behavior): 52 | // It will allow to create a new recent File entry as soon as it is set 53 | // - If "FileName" is already set (can happens if the user creates a reader in python): 54 | // It will allows to create a new recent File entry if the "FileName" is modified by the user 55 | 56 | // the code in inspired from 57 | // Paraview-Source/ParaViewCore/ServerManager/Core/vtkSMGlobalPropertiesProxy::TargetPropertyModified() 58 | // This allows in the receiver to have information on the property which is "listened" 59 | this->Connection->Connect(src->getProxy()->GetProperty("FileName"), 60 | vtkCommand::ModifiedEvent, 61 | this, SLOT(onPcapUpdate(vtkObject*, unsigned long, void*))) ; 62 | 63 | if(!pcapName.isNull() && !pcapName.isEmpty()) 64 | { 65 | createNewRecentFile(pcapName); 66 | this->SaveRecentFilesInSettings(); 67 | } 68 | } 69 | } 70 | 71 | //----------------------------------------------------------------------------- 72 | void lqOpenRecentFilesReaction::onPcapUpdate(vtkObject* caller, unsigned long, void*) 73 | { 74 | vtkSMProperty* pcapProp = vtkSMProperty::SafeDownCast(caller); 75 | if(!pcapProp) 76 | { 77 | return; 78 | } 79 | QString pcapName = QString(vtkSMPropertyHelper(pcapProp).GetAsString()); 80 | 81 | if(!pcapName.isNull() && !pcapName.isEmpty()) 82 | { 83 | createNewRecentFile(pcapName); 84 | this->SaveRecentFilesInSettings(); 85 | } 86 | } 87 | 88 | //----------------------------------------------------------------------------- 89 | void lqOpenRecentFilesReaction::createNewRecentFile(QString pcapName) 90 | { 91 | // If the current pcap Name is not already in the recent files list 92 | // we add a new entry (action) to the recentFilesMenu 93 | if(!IsAlreadyARecentFiles(pcapName)) 94 | { 95 | if(recentFilesActions.size() >= this->sizeOfTheQueue) 96 | { 97 | this->RemoveFirstRecentFilesAction(); 98 | } 99 | 100 | // This allows to passing the filename to the slot 101 | // Get from https://stackoverflow.com/questions/5153157/passing-an-argument-to-a-slot 102 | QAction* openAct = new QAction(pcapName, this); 103 | QSignalMapper* signalMapper = new QSignalMapper (this) ; 104 | connect (openAct, SIGNAL(triggered()), signalMapper, SLOT(map())); 105 | signalMapper->setMapping(openAct, pcapName) ; 106 | 107 | connect(signalMapper, SIGNAL(mapped(QString)), this, SLOT(onOpenRecentFile(QString))) ; 108 | 109 | RecentFilesMenu->addAction(openAct); 110 | recentFilesActions.push_back(openAct); 111 | } 112 | } 113 | 114 | //----------------------------------------------------------------------------- 115 | void lqOpenRecentFilesReaction::onOpenRecentFile(QString filename) 116 | { 117 | if (filename.endsWith(".pcap")) 118 | { 119 | lqOpenPcapReaction::createSourceFromFile(filename); 120 | } 121 | else 122 | { 123 | std::cout << "The file is not a pcap file, nothing is done" << std::endl; 124 | } 125 | } 126 | 127 | //----------------------------------------------------------------------------- 128 | void lqOpenRecentFilesReaction::RemoveFirstRecentFilesAction() 129 | { 130 | if(this->RecentFilesMenu->isEmpty()) 131 | { 132 | return; 133 | } 134 | QAction * action = recentFilesActions.front(); 135 | this->RecentFilesMenu->removeAction(action); 136 | recentFilesActions.pop_front(); 137 | } 138 | 139 | //----------------------------------------------------------------------------- 140 | void lqOpenRecentFilesReaction::onClearMenu() 141 | { 142 | while (!recentFilesActions.empty()) 143 | { 144 | RemoveFirstRecentFilesAction(); 145 | } 146 | this->SaveRecentFilesInSettings(); 147 | } 148 | 149 | //----------------------------------------------------------------------------- 150 | bool lqOpenRecentFilesReaction::IsAlreadyARecentFiles(QString filename) 151 | { 152 | for(QAction* action : recentFilesActions) 153 | { 154 | if(filename.compare(action->text(), Qt::CaseSensitive) == 0) 155 | { 156 | return true; 157 | } 158 | } 159 | return false; 160 | } 161 | 162 | //----------------------------------------------------------------------------- 163 | void lqOpenRecentFilesReaction::SaveRecentFilesInSettings() 164 | { 165 | pqSettings* settings = pqApplicationCore::instance()->settings(); 166 | for(int unsigned i = 0; i < sizeOfTheQueue; i++) 167 | { 168 | if(i < recentFilesActions.size()) 169 | { 170 | QAction * action = recentFilesActions[i]; 171 | settings->setValue("LidarPlugin/RecentFiles/" + QString(i), action->text()); 172 | } 173 | else 174 | { 175 | settings->setValue("LidarPlugin/RecentFiles/" + QString(i), ""); 176 | } 177 | } 178 | } 179 | 180 | //----------------------------------------------------------------------------- 181 | void lqOpenRecentFilesReaction::RestoreRecentFilesFromSettings() 182 | { 183 | pqSettings* settings = pqApplicationCore::instance()->settings(); 184 | for(int unsigned i = 0; i < sizeOfTheQueue; i++) 185 | { 186 | QString currentPcap = settings->value("LidarPlugin/RecentFiles/" + QString(i), "").toString(); 187 | if(!currentPcap.isNull() && !currentPcap.isEmpty()) 188 | { 189 | this->createNewRecentFile(currentPcap); 190 | } 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /Application/Ui/lqOpenRecentFilesReaction.h: -------------------------------------------------------------------------------- 1 | #ifndef lqOpenRecentFilesReaction_h 2 | #define lqOpenRecentFilesReaction_h 3 | 4 | #include "applicationui_export.h" 5 | 6 | #include 7 | #include 8 | 9 | class pqPipelineSource; 10 | class QAction; 11 | class QMenu; 12 | 13 | #include 14 | 15 | /** 16 | * @class lqOpenRecentFilesReaction 17 | * @brief manages recent files menu used in LidarView 18 | */ 19 | 20 | class APPLICATIONUI_EXPORT lqOpenRecentFilesReaction : public QObject 21 | { 22 | Q_OBJECT 23 | typedef QObject Superclass; 24 | 25 | public: 26 | lqOpenRecentFilesReaction(QMenu* recentFilesMenu, QAction* clearRecentFiles, QObject* parent = 0); 27 | 28 | protected slots: 29 | void onSourceAdded(pqPipelineSource* src); 30 | void onOpenRecentFile(QString filename); 31 | void onClearMenu(); 32 | void onPcapUpdate(vtkObject* caller, unsigned long, void*); 33 | 34 | private: 35 | Q_DISABLE_COPY(lqOpenRecentFilesReaction) 36 | 37 | std::deque recentFilesActions; 38 | 39 | unsigned int sizeOfTheQueue = 5; 40 | 41 | QMenu* RecentFilesMenu; 42 | 43 | vtkSmartPointer Connection; 44 | 45 | /** 46 | * @brief createNewRecentFile 47 | * Create a new entry (action) in the "Recent File Menu" for pcapName (if it's not already in it) 48 | * @param pcapName file name to add 49 | */ 50 | void createNewRecentFile(QString pcapName); 51 | 52 | /** 53 | * @brief RemoveFirstRecentFilesAction 54 | * Pop the front of this->recentFilesActions 55 | * And remove the associated action in the RecentFilesMenu 56 | */ 57 | void RemoveFirstRecentFilesAction(); 58 | 59 | /** 60 | * @brief HasAlreadyBeenAdded 61 | * @param filename 62 | * @return True if filename is already represented by an action in this->recentFilesActions 63 | */ 64 | bool IsAlreadyARecentFiles(QString filename); 65 | 66 | /** 67 | * @brief SaveRecentFilesInSettings 68 | * Save the RecentFilesMenu in the pqApplicationCore::instance()->settings() 69 | */ 70 | void SaveRecentFilesInSettings(); 71 | 72 | /** 73 | * @brief RestoreRecentFilesInSettings 74 | * Restore the RecentFilesMenu with data in the pqApplicationCore::instance()->settings() 75 | */ 76 | void RestoreRecentFilesFromSettings(); 77 | }; 78 | 79 | #endif // lqOpenRecentFilesReaction_h 80 | -------------------------------------------------------------------------------- /Application/Ui/lqOpenSensorReaction.cxx: -------------------------------------------------------------------------------- 1 | #include "lqOpenSensorReaction.h" 2 | 3 | //#include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "lqHelper.h" 19 | #include "lqUpdateCalibrationReaction.h" 20 | #include "pqLidarViewManager.h" 21 | #include "vvCalibrationDialog.h" 22 | #include "lqSensorListWidget.h" 23 | 24 | #include 25 | #include 26 | 27 | //----------------------------------------------------------------------------- 28 | lqOpenSensorReaction::lqOpenSensorReaction(QAction *action) : 29 | Superclass(action) 30 | { 31 | 32 | } 33 | 34 | //----------------------------------------------------------------------------- 35 | void lqOpenSensorReaction::onTriggered() 36 | { 37 | pqServer* server = pqActiveObjects::instance().activeServer(); 38 | pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder(); 39 | pqView* view = pqActiveObjects::instance().activeView(); 40 | vtkNew controller; 41 | 42 | // Launch the calibration Dialog before creating the Source to allow to cancel the action 43 | // (with the "cancel" button in the dialog) 44 | vvCalibrationDialog dialog(pqLidarViewManager::instance()->getMainWindow()); 45 | DisplayDialogOnActiveWindow(dialog); 46 | if (!dialog.exec()) 47 | { 48 | return; 49 | } 50 | 51 | // We remove all lidarReader and PositionOrientationReader (and every filter depending on them) in the pipeline 52 | // TODO : As soon as LidarReader is available in multi sensor mode, we have to remove only the vtkLidarReader sources 53 | RemoveAllProxyTypeFromPipelineBrowser(); 54 | RemoveAllProxyTypeFromPipelineBrowser(); 55 | 56 | // If the user don't enable multi sensors, we have to clean the pipeline by removing all stream 57 | // In the lqSensorListWidget, every PositionOrientationStream is linked to a LidarStream 58 | // If a LidarStream is delete, it will automatically delete its PositionOrientationStream. 59 | // So we just have to delete all lidarStream. 60 | if(!dialog.isEnableMultiSensors()) 61 | { 62 | RemoveAllProxyTypeFromPipelineBrowser(); 63 | } 64 | 65 | // Create the lidarSensor 66 | // We have to use pqObjectBuilder::createSource to add the created source to the pipeline 67 | // The source will be created immediately so the signal "sourceAdded" of the pqServerManagerModel 68 | // is send during "create source". 69 | // To get the pqPipelineSource modified with the new property, you have to connect to the signal 70 | // "dataUpdated" of the pqServerManagerModel 71 | pqPipelineSource* lidarSource = builder->createSource("sources", "LidarStream", server); 72 | lidarSource->setModifiedState(pqProxy::UNMODIFIED); 73 | QString lidarName = lidarSource->getSMName(); 74 | controller->Show(lidarSource->getSourceProxy(), 0, view->getViewProxy()); 75 | 76 | pqPipelineSource * posOrSource = nullptr; 77 | QString posOrName = ""; 78 | 79 | // Update lidarSource and posOrSource 80 | // If the GPs interpretation is asked, the posOrsource will be created in the lqUpdateCalibrationReaction 81 | // because it has to manage it if the user enable interpreting GPS packet after the first instantiation 82 | lqUpdateCalibrationReaction::UpdateCalibration(lidarSource, posOrSource, dialog); 83 | 84 | if (posOrSource) 85 | { 86 | posOrName = posOrSource->getSMName(); 87 | controller->Show(posOrSource->getSourceProxy(), 0, view->getViewProxy()); 88 | posOrSource->getProxy()->InvokeCommand("Start"); 89 | } 90 | 91 | // "Start" of the lidar Source have to be called 92 | lidarSource->getProxy()->InvokeCommand("Start"); 93 | 94 | //Update applogic to be able to use function only define in applogic. 95 | pqLidarViewManager::instance()->runPython(QString("lv.UpdateApplogicLidar('%1', '%2')\n").arg(lidarName, posOrName)); 96 | } 97 | -------------------------------------------------------------------------------- /Application/Ui/lqOpenSensorReaction.h: -------------------------------------------------------------------------------- 1 | #ifndef LQOPENSENSORREACTION_H 2 | #define LQOPENSENSORREACTION_H 3 | 4 | #include "applicationui_export.h" 5 | 6 | #include "pqReaction.h" 7 | 8 | /** 9 | * @ingroup Reactions 10 | * Reaction to open a sensor stream 11 | */ 12 | class APPLICATIONUI_EXPORT lqOpenSensorReaction : public pqReaction 13 | { 14 | Q_OBJECT 15 | typedef pqReaction Superclass; 16 | 17 | public: 18 | lqOpenSensorReaction(QAction* action); 19 | 20 | protected: 21 | /// Called when the action is triggered. 22 | virtual void onTriggered() override; 23 | 24 | private: 25 | Q_DISABLE_COPY(lqOpenSensorReaction) 26 | }; 27 | 28 | #endif // LQOPENSENSORREACTION_H 29 | -------------------------------------------------------------------------------- /Application/Ui/lqUpdateCalibrationReaction.h: -------------------------------------------------------------------------------- 1 | #ifndef LQUpdateCalibrationReaction_H 2 | #define LQUpdateCalibrationReaction_H 3 | 4 | #include "applicationui_export.h" 5 | 6 | #include "pqReaction.h" 7 | 8 | #include "vtkSmartPointer.h" 9 | 10 | class pqPipelineSource; 11 | class vtkSMProxy; 12 | class vvCalibrationDialog; 13 | 14 | /** 15 | * @ingroup Reactions 16 | * Reaction to update the calibration 17 | */ 18 | class APPLICATIONUI_EXPORT lqUpdateCalibrationReaction : public pqReaction 19 | { 20 | Q_OBJECT 21 | typedef pqReaction Superclass; 22 | 23 | public: 24 | lqUpdateCalibrationReaction(QAction* action); 25 | 26 | static void setTransform(vtkSMProxy * proxy, double x, double y, double z, double roll, double pitch, double yaw); 27 | 28 | static void setNetworkCalibration(vtkSMProxy * proxy, double listenningPort, double forwardingPort, 29 | bool isForwarding, QString ipAddressForwarding, 30 | bool isCrashAnalysing, bool multiSensors); 31 | 32 | static void setCalibrationFileAndDefaultInterpreter(vtkSMProxy * proxy, QString calibrationFile); 33 | 34 | 35 | static void UpdateCalibration(pqPipelineSource* & lidarSource, 36 | pqPipelineSource* & posOrSource, 37 | const vvCalibrationDialog& dialog); 38 | 39 | static void UpdateExistingSource(pqPipelineSource* & lidarSource, pqPipelineSource* & posOrSource); 40 | 41 | public slots: 42 | /** 43 | * Called when the action is triggered. 44 | */ 45 | void onTriggered() override; 46 | 47 | /** 48 | * Monitor the added/deleted source to enable/disable the QAction 49 | */ 50 | void onSourceAdded(pqPipelineSource* src); 51 | void onSourceRemoved(pqPipelineSource* src); 52 | 53 | private: 54 | Q_DISABLE_COPY(lqUpdateCalibrationReaction) 55 | 56 | }; 57 | 58 | #endif // LQUpdateCalibrationReaction_H 59 | -------------------------------------------------------------------------------- /Application/Ui/pqLidarViewManager.h: -------------------------------------------------------------------------------- 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 | #ifndef __pqLidarViewManager_h 16 | #define __pqLidarViewManager_h 17 | 18 | #include 19 | #include "applicationui_export.h" 20 | 21 | class vtkLidarReader; 22 | class vvAppLogic; 23 | 24 | class pqPipelineSource; 25 | class pqServer; 26 | class pqView; 27 | class pqPythonShell; 28 | 29 | class vtkSMSourceProxy; 30 | 31 | class vtkPolyData; 32 | 33 | class QAction; 34 | class QLabel; 35 | class QWidget; 36 | 37 | class APPLICATIONUI_EXPORT pqLidarViewManager : public QObject 38 | { 39 | 40 | Q_OBJECT 41 | 42 | public: 43 | static pqLidarViewManager* instance(); 44 | 45 | virtual ~pqLidarViewManager(); 46 | 47 | /// Convenience function for getting the current server. 48 | static pqServer* getActiveServer(); 49 | 50 | /// Convenience function for getting the main window. 51 | static QWidget* getMainWindow(); 52 | 53 | /// Convenience function for destroying a pipeline object and all of its 54 | /// consumers. 55 | // static void destroyPipelineSourceAndConsumers(pqPipelineSource *source); 56 | 57 | /// Finds a pipeline source with the given SM XML name. If there is more than 58 | /// one, the first is returned. 59 | // static pqPipelineSource *findPipelineSource(const char *SMName); 60 | 61 | void setSource(pqPipelineSource* source); 62 | pqPipelineSource* source(); 63 | 64 | void setup(); 65 | void setPythonShell(pqPythonShell* pythonShell); 66 | 67 | void openData(const QString& filename); 68 | 69 | void runPython(const QString& statements); 70 | 71 | static void saveFramesToPCAP( 72 | vtkSMSourceProxy* proxy, int startFrame, int endFrame, const QString& filename); 73 | 74 | static void saveFramesToLAS(vtkLidarReader* reader, vtkPolyData* position, int startFrame, 75 | int endFrame, const QString& filename, int positionMode); 76 | 77 | public slots: 78 | 79 | void pythonStartup(); 80 | 81 | void onMeasurementGrid(bool gridVisible); 82 | void onEnableCrashAnalysis(bool crashAnalysisEnabled); 83 | void onResetDefaultSettings(); 84 | void onResetCameraLidar(); 85 | void onResetCenterToLidarCenter(); 86 | 87 | signals: 88 | 89 | void sourceCreated(); 90 | 91 | private: 92 | pqLidarViewManager(QObject* p); 93 | 94 | class pqInternal; 95 | pqInternal* Internal; 96 | pqPythonShell* pythonShell; 97 | 98 | Q_DISABLE_COPY(pqLidarViewManager); 99 | }; 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /Application/Ui/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(PythonModuleInstaller) 2 | 3 | python_module_install( 4 | NAME lidarview 5 | PATH ${CMAKE_CURRENT_LIST_DIR}/lidarview) 6 | -------------------------------------------------------------------------------- /Application/Ui/python/lidarview/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- -------------------------------------------------------------------------------- /Application/Ui/python/lidarview/aboutDialog.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 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 | from __future__ import print_function 15 | from PythonQt import QtCore, QtGui, QtUiTools 16 | 17 | def showDialog(mainWindow): 18 | 19 | loader = QtUiTools.QUiLoader() 20 | uifile = QtCore.QFile(':/vvResources/vvAboutDialog.ui') 21 | if not uifile.open(uifile.ReadOnly): 22 | print("Canno't open the ui for the about dialog.") 23 | return 24 | 25 | dialog = loader.load(uifile, mainWindow) 26 | uifile.close() 27 | dialog.setModal(True) 28 | 29 | # Delete "?" Button that appears on windows os 30 | # Rewrite the flags without QtCore.Qt.WindowContextHelpButtonHint 31 | flags = QtCore.Qt.Dialog | QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint 32 | dialog.setWindowFlags(flags) 33 | 34 | def w(name): 35 | for widget in dialog.children(): 36 | if widget.objectName == name: 37 | return widget 38 | 39 | image = w('splashLabel') 40 | splash = image.pixmap.scaled(image.pixmap.width()/2.0, image.pixmap.height()/2.0) 41 | image.setPixmap(splash) 42 | image.adjustSize() 43 | 44 | appName = mainWindow.windowTitle.split(" ")[0] 45 | appVersionTag = mainWindow.windowTitle.split(" ")[1] 46 | appBitTag = mainWindow.windowTitle.split(" ")[2] 47 | dialog.windowTitle = "About " + appName + " ..." 48 | copyrightText = '''

{0} {1} {2}


49 | Copyright (c) 2013-2021, Velodyne Lidar, 50 | Copyright (c) 2016-2021, Kitware
51 | Provided by Velodyne Lidar, coded by Kitware.
52 |
53 | Sample Data Repository: http://midas3.kitware.com/midas/community/29 54 | '''.format(appName, appVersionTag, appBitTag) 55 | w('copyrightLabel').setText(copyrightText) 56 | 57 | textBoxContent = '''

Want more ? Ask Kitware !

58 | Kitware Inc. is a leading provider of open-source software systems for technical and scientific computing. 59 | We are the developers of VeloView, providing real-time interactive visualization of live captured 3D LiDAR 60 | data from Velodyne's sensors. We create customized solutions providing detection and tracking of people, 61 | street signs, lane markings, vehicles, industrial machinery, and building facades from within VeloView or using 62 | combinations of point cloud and video data. We also provide Lidar-based SLAM algorithms for other Velodyne's integrators. 63 | We work with customers to create tailored solutions using proven open-source 64 | technologies, avoiding vendor lock-in and leveraging our world-leading experience in visualization, computer vision, high-performance 65 | computing, and test-driven high-quality software process.
66 |
67 |
68 | Have a look at our expertise, and for more information, please contact us: 69 | kitware@kitware.fr 70 | ''' 71 | w('detailsLabel').setText(textBoxContent) 72 | 73 | 74 | button = w('closeButton') 75 | closeIcon = QtGui.QApplication.style().standardIcon(QtGui.QStyle.SP_DialogCloseButton) 76 | button.setIcon(closeIcon) 77 | button.connect(button, QtCore.SIGNAL('clicked()'), dialog, QtCore.SLOT('close()')) 78 | dialog.adjustSize() 79 | dialog.setFixedSize(dialog.size) 80 | 81 | dialog.exec_() 82 | -------------------------------------------------------------------------------- /Application/Ui/python/lidarview/gridAdjustmentDialog.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 | from __future__ import print_function 15 | from PythonQt import QtCore, QtGui, QtUiTools 16 | import math 17 | 18 | def showDialog(mainWindow, app): 19 | 20 | loader = QtUiTools.QUiLoader() 21 | uifile = QtCore.QFile(':/LidarViewPlugin/vvGridAdjustmentDialog.ui') 22 | if not uifile.open(uifile.ReadOnly): 23 | print("error opening file") 24 | return 25 | 26 | dialog = loader.load(uifile, mainWindow) 27 | uifile.close() 28 | 29 | # Delete "?" Button that appears on windows os 30 | # Rewrite the flags without QtCore.Qt.WindowContextHelpButtonHint 31 | flags = QtCore.Qt.Dialog | QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint 32 | dialog.setWindowFlags(flags) 33 | 34 | def w(name): 35 | for widget in dialog.children(): 36 | if widget.objectName == name: 37 | return widget 38 | 39 | w('SensorUpX').setValue(app.grid.Normal[0]) 40 | w('SensorUpY').setValue(app.grid.Normal[1]) 41 | w('SensorUpZ').setValue(app.grid.Normal[2]) 42 | 43 | w('SensorOriginX').setValue(-app.grid.Origin[0]) 44 | w('SensorOriginY').setValue(-app.grid.Origin[1]) 45 | w('SensorOriginZ').setValue(-app.grid.Origin[2]) 46 | 47 | w('GridResolution').setValue(app.grid.Scale) 48 | w('GridWidth').setValue(app.grid.Scale*app.grid.GridNbTicks) 49 | w('GridLineWidth').setValue(app.grid.LineWidth) 50 | 51 | r = app.grid.Color[0] * 255 52 | g = app.grid.Color[1] * 255 53 | b = app.grid.Color[2] * 255 54 | w('GridColorPicker').setStyleSheet("background-color: rgb(" + str(r) + "," + str(g) + "," + str(b) +");") 55 | 56 | w('ShouldPropertiesPersist').setChecked(app.gridPropertiesPersist) 57 | 58 | def pickColor(): 59 | colorPicker = QtGui.QColorDialog() 60 | colorPicker.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) 61 | 62 | if(colorPicker.exec()): 63 | qColor = colorPicker.selectedColor() 64 | 65 | if not qColor.isValid(): 66 | return False 67 | 68 | r = qColor.red() 69 | g = qColor.green() 70 | b = qColor.blue() 71 | w('GridColorPicker').setStyleSheet("background-color: rgb(" + str(r) + "," + str(g) + "," + str(b) +");") 72 | 73 | w('GridColorPicker').connect('clicked()', pickColor) 74 | 75 | accepted = dialog.exec_() 76 | if not accepted: 77 | return False 78 | 79 | app.grid.Normal = [w('SensorUpX').value, w('SensorUpY').value, w('SensorUpZ').value] 80 | app.grid.Origin = [-w('SensorOriginX').value, -w('SensorOriginY').value, -w('SensorOriginZ').value] 81 | app.grid.Scale = w('GridResolution').value 82 | app.grid.GridNbTicks = int(math.ceil(w('GridWidth').value / w('GridResolution').value)) 83 | app.grid.LineWidth = w('GridLineWidth').value 84 | color = w('GridColorPicker').palette.color(QtGui.QPalette.Background) 85 | app.grid.Color = [color.redF(), color.greenF(), color.blueF()] 86 | app.gridPropertiesPersist = w('ShouldPropertiesPersist').checked 87 | 88 | return True 89 | -------------------------------------------------------------------------------- /Application/Ui/python/lidarview/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 | from __future__ import print_function 15 | #import VelodynePlugin.VelodyneLidar as vpmod #wip unused ? 16 | import paraview.simple as smp 17 | from paraview import vtk 18 | 19 | # Clean last planefitting source and the spreadsheet view 20 | def cleanStats(): 21 | planeFitter1 = smp.FindSource('PlaneFitter1') 22 | if planeFitter1 is not None: 23 | smp.Delete(planeFitter1) 24 | del planeFitter1 25 | 26 | PVTrivialProducer1 = smp.FindSource('PVTrivialProducer1') 27 | if PVTrivialProducer1 is not None: 28 | smp.Delete(PVTrivialProducer1) 29 | del PVTrivialProducer1 30 | 31 | # Find or create a 'SpreadSheet View' to display plane fitting statistics 32 | def showStats(actionSpreadsheet=None): 33 | if actionSpreadsheet is None: 34 | print("Unable to display stats : SpreadSheet action is not defined") 35 | return 36 | 37 | planeFitter1 = smp.FindSource('PlaneFitter1') 38 | if planeFitter1 is None: 39 | print("Unable to create spreadsheet view : PlaneFitter1 source missing") 40 | return 41 | 42 | renderView1 = smp.FindView('RenderView1') 43 | if renderView1 is None: 44 | print("Unable to find main renderView") 45 | return 46 | 47 | # Check if main spreadsheet view exist or can be created 48 | spreadSheetView1 = smp.FindView('main spreadsheet view') 49 | if spreadSheetView1 is None: 50 | # try to trigger actionSpreadsheet to display main spreadsheet view 51 | actionSpreadsheet.trigger() 52 | spreadSheetView1 = smp.FindView('main spreadsheet view') 53 | if spreadSheetView1 is None: 54 | print("Unable to get main spreadsheet view") 55 | return 56 | 57 | # display stats in main spreadsheet view 58 | spreadSheetView1.ColumnToSort = '' 59 | spreadSheetView1.BlockSize = 1024 60 | spreadSheetView1.FieldAssociation = 'Row Data' 61 | smp.Show(planeFitter1, spreadSheetView1) 62 | 63 | def fitPlane(actionSpreadsheet=None): 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 | selection = src.GetSelectionInput(src.Port) 70 | 71 | if selection is None: 72 | print("A selection has to be defined to run plane fitting") 73 | return 74 | 75 | extracter = smp.ExtractSelection() 76 | extracter.Selection = selection 77 | extracter.Input = src 78 | smp.Show(extracter) 79 | 80 | # Clean last plane fitting stats before processing a new one 81 | cleanStats() 82 | 83 | try: 84 | pd = extracter.GetClientSideObject().GetOutput() 85 | if not pd.GetNumberOfPoints(): 86 | print("An empty selection is defined") 87 | return 88 | 89 | # Append data from each block 90 | if pd.IsTypeOf("vtkMultiBlockDataSet"): 91 | if not pd.GetNumberOfBlocks(): 92 | print("An empty selection is defined") 93 | return 94 | 95 | appendFilter = vtk.vtkAppendFilter() 96 | for i in range(pd.GetNumberOfBlocks()): 97 | appendFilter.AddInputData(pd.GetBlock(i)) 98 | appendFilter.Update() 99 | pd = appendFilter.GetOutput() 100 | 101 | # Create a data source from selected points 102 | PVTrivialProducer1 = smp.PVTrivialProducer() 103 | PVTrivialProducer1Client = PVTrivialProducer1.GetClientSideObject() 104 | PVTrivialProducer1Client.SetOutput(pd) 105 | 106 | # Create and apply plane fitter filter 107 | planeFitter1 = smp.PlaneFitter(Input=PVTrivialProducer1) 108 | 109 | # if laser_id is the name of the array in Legacy and Special Velarray mode 110 | # LCN is the name of the array in APF mode 111 | if pd.GetPointData().GetArray("laser_id") : 112 | planeFitter1.laserIDArray = "laser_id" 113 | elif pd.GetPointData().GetArray("LCN"): 114 | planeFitter1.laserIDArray = "LCN" 115 | planeFitter1.UpdatePipeline() 116 | 117 | # Display results on the main spreadsheet view 118 | showStats(actionSpreadsheet) 119 | 120 | finally: 121 | smp.Delete(extracter) 122 | smp.SetActiveSource(src) 123 | -------------------------------------------------------------------------------- /Application/Ui/vvPythonQtDecorators.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __vvPythonQtDecorators_h 3 | #define __vvPythonQtDecorators_h 4 | 5 | #include 6 | #include 7 | 8 | #include "pqLidarViewManager.h" 9 | #include "Widgets/vvCalibrationDialog.h" 10 | #include "Widgets/vvCropReturnsDialog.h" 11 | #include "Widgets/vvLaserSelectionDialog.h" 12 | #include "Widgets/vvSelectFramesDialog.h" 13 | 14 | class vvPythonQtDecorators : public QObject 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | vvPythonQtDecorators(QObject* parent = 0) 20 | : QObject(parent) 21 | { 22 | this->registerClassForPythonQt(&pqLidarViewManager::staticMetaObject); 23 | this->registerClassForPythonQt(&vvCalibrationDialog::staticMetaObject); 24 | this->registerClassForPythonQt(&vvCropReturnsDialog::staticMetaObject); 25 | this->registerClassForPythonQt(&vvLaserSelectionDialog::staticMetaObject); 26 | this->registerClassForPythonQt(&vvSelectFramesDialog::staticMetaObject); 27 | } 28 | 29 | inline void registerClassForPythonQt(const QMetaObject* metaobject) 30 | { 31 | PythonQt::self()->registerClass(metaobject, "paraview"); 32 | } 33 | 34 | public slots: 35 | 36 | vvCalibrationDialog* new_vvCalibrationDialog(QWidget* arg0) 37 | { 38 | return new vvCalibrationDialog(arg0); 39 | } 40 | 41 | vvCropReturnsDialog* new_vvCropReturnsDialog(QWidget* arg0) 42 | { 43 | return new vvCropReturnsDialog(arg0); 44 | } 45 | 46 | vvSelectFramesDialog* new_vvSelectFramesDialog(QWidget* arg0) 47 | { 48 | return new vvSelectFramesDialog(arg0); 49 | } 50 | 51 | vvLaserSelectionDialog* new_vvLaserSelectionDialog(QWidget* arg0) 52 | { 53 | return new vvLaserSelectionDialog(arg0); 54 | } 55 | 56 | QVector getLaserSelectionSelector(vvLaserSelectionDialog* inst) 57 | { 58 | return inst->getLaserSelectionSelector(); 59 | } 60 | 61 | void setLaserSelectionSelector(vvLaserSelectionDialog* inst, const QVector& arg0) 62 | { 63 | inst->setLaserSelectionSelector(arg0); 64 | } 65 | 66 | bool isDisplayMoreSelectionsChecked(vvLaserSelectionDialog* inst) 67 | { 68 | return inst->isDisplayMoreSelectionsChecked(); 69 | } 70 | 71 | void setDisplayMoreSelectionsChecked(vvLaserSelectionDialog* inst, bool arg0) 72 | { 73 | inst->setDisplayMoreSelectionsChecked(arg0); 74 | } 75 | 76 | void setLasersCorrections(vvLaserSelectionDialog* inst, const QVector& arg0, 77 | const QVector& arg1, const QVector& arg2, const QVector& arg3, 78 | const QVector& arg4, const QVector& arg5, const QVector& arg6, 79 | const QVector& arg7, const QVector& arg8, const QVector& arg9, 80 | const QVector& arg10, int arg11) 81 | { 82 | inst->setLasersCorrections( 83 | arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); 84 | } 85 | 86 | void static_pqLidarViewManager_saveFramesToPCAP( 87 | vtkSMSourceProxy* arg0, int arg1, int arg2, const QString& arg3) 88 | { 89 | pqLidarViewManager::saveFramesToPCAP(arg0, arg1, arg2, arg3); 90 | } 91 | 92 | void static_pqLidarViewManager_saveFramesToLAS(vtkLidarReader* arg0, vtkPolyData* arg1, 93 | int arg2, int arg3, const QString& arg4, int arg5) 94 | { 95 | pqLidarViewManager::saveFramesToLAS(arg0, arg1, arg2, arg3, arg4, arg5); 96 | } 97 | }; 98 | 99 | #endif 100 | -------------------------------------------------------------------------------- /Application/VeloView.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 43 | 45 | 46 | 48 | image/svg+xml 49 | 51 | 52 | 53 | 54 | 55 | 60 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Application/branding.cmake: -------------------------------------------------------------------------------- 1 | # Every Brand related names / resource paths should be declared here 2 | 3 | # Software Name / Vendor 4 | set(SOFTWARE_NAME "VeloView") 5 | set(SOFTWARE_VENDOR "Velodyne, Inc.") 6 | 7 | # Software LOGO / ICON # Must be absolute to be used by packaging 8 | set(SOFTWARE_ICON_PATH "${CMAKE_CURRENT_LIST_DIR}/SoftwareInformation/logo.ico") 9 | #set(SOFTWARE_LOGO_PATH "${CMAKE_CURRENT_LIST_DIR}/logo.icns") #WIP no wish to use those in paraview_client_add() yet 10 | -------------------------------------------------------------------------------- /Application/logo.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Application/logo.icns -------------------------------------------------------------------------------- /Application/vvAboutDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | vvAboutDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1470 10 | 619 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | About ... 21 | 22 | 23 | 24 | ../logo.ico../logo.ico 25 | 26 | 27 | false 28 | 29 | 30 | true 31 | 32 | 33 | 34 | 35 | 36 | 37 | 50 38 | 50 39 | 40 | 41 | 42 | 43 | 44 | 45 | QFrame::Box 46 | 47 | 48 | 2 49 | 50 | 51 | 52 | 53 | 54 | :/vvResources/SoftwareInformation/About.png 55 | 56 | 57 | true 58 | 59 | 60 | 61 | 62 | 63 | 64 | TextLabel 65 | 66 | 67 | true 68 | 69 | 70 | 71 | 72 | 73 | 74 | QFrame::Box 75 | 76 | 77 | 2 78 | 79 | 80 | 81 | 82 | 83 | Qt::RichText 84 | 85 | 86 | Qt::AlignJustify|Qt::AlignVCenter 87 | 88 | 89 | true 90 | 91 | 92 | 2 93 | 94 | 95 | true 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 0 106 | 0 107 | 108 | 109 | 110 | &Close 111 | 112 | 113 | true 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /Application/vvFilters.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 24 | 26 | 27 | 28 | 30 | 32 | 33 | 34 | 35 | 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 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /Application/vvMainWindow.h: -------------------------------------------------------------------------------- 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 | #ifndef __vvMainWindow_h 15 | #define __vvMainWindow_h 16 | 17 | #include 18 | 19 | class pqDataRepresentation; 20 | 21 | class vvMainWindow : public QMainWindow 22 | { 23 | Q_OBJECT 24 | typedef QMainWindow Superclass; 25 | 26 | public: 27 | vvMainWindow(); 28 | virtual ~vvMainWindow(); 29 | 30 | protected: 31 | void dragEnterEvent(QDragEnterEvent* evt) override; 32 | void dropEvent(QDropEvent* evt) override; 33 | 34 | protected slots: 35 | void showHelpForProxy(const QString& proxyname, const QString& groupname); 36 | void handleMessage(const QString &, int type); 37 | 38 | private: 39 | Q_DISABLE_COPY(vvMainWindow); 40 | 41 | class pqInternals; 42 | pqInternals* Internals; 43 | friend class pqInternals; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Application/vvResources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Icons/logo.png 4 | Icons/open.png 5 | Icons/map.png 6 | Icons/location.png 7 | Icons/planefit.png 8 | Icons/absolute.png 9 | Icons/pqFrustumSelectionPoint24.png 10 | Icons/pqSurfaceSelectionPoint24.png 11 | Icons/pqSpreadsheet16.png 12 | Icons/pqResetCamera32.png 13 | Icons/pqResetCenterLidar.png 14 | Icons/pqResetCameraLidar.png 15 | Icons/python_logo_124.png 16 | Icons/pqXMinus32.png 17 | Icons/pqXPlus32.png 18 | Icons/pqYMinus32.png 19 | Icons/pqYPlus32.png 20 | Icons/pqZMinus32.png 21 | Icons/pqZPlus32.png 22 | Icons/ViewOrtho.png 23 | Icons/ViewPerspective.png 24 | Icons/Measurements.png 25 | SoftwareInformation/About.png 26 | SoftwareInformation/bottom_logo.png 27 | vvAboutDialog.ui 28 | Icons/errorConsole.png 29 | Icons/camera_logo.png 30 | Icons/icon_motion.png 31 | Icons/media-skip-forward.png 32 | Icons/media-skip-backward.png 33 | Icons/media-seek-forward.png 34 | Icons/media-seek-forward-3x.png 35 | Icons/media-seek-forward-2x.png 36 | Icons/media-seek-forward-0.25x.png 37 | Icons/media-seek-forward-0.5x.png 38 | Icons/media-seek-backward.png 39 | Icons/media-seek-backward-3x.png 40 | Icons/media-seek-backward-2x.png 41 | Icons/media-seek-backward-0.25x.png 42 | Icons/media-seek-backward-0.5x.png 43 | Icons/media-playback-stop.png 44 | Icons/media-playback-start.png 45 | Icons/media-playback-pause.png 46 | Icons/media-loop.png 47 | 48 | 49 | -------------------------------------------------------------------------------- /Application/vvSources.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 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 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 | cmake_minimum_required(VERSION 3.20.3 FATAL_ERROR) 16 | project(LidarView) 17 | #Thanks to ExternalProject CMAKE_SOURCE_DIR will correctly be the same as this PROJECT_SOURCE_DIR 18 | 19 | # add path to get all the needed modules used to config Lidarview 20 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/LVCore/CMake") 21 | 22 | # Include branding.cmake 23 | include(Application/branding.cmake) 24 | 25 | # we include the module that allow us to configure the Lidarview project 26 | include(SetupLidarviewProject) 27 | 28 | # custom VeloView here 29 | # ... 30 | add_subdirectory(Plugins/VelodynePlugin) 31 | 32 | # Application 33 | add_subdirectory(Application) 34 | 35 | # Must be invoked Last 36 | include(FinalizeLidarViewProject) 37 | 38 | -------------------------------------------------------------------------------- /Documentation/README.txt: -------------------------------------------------------------------------------- 1 | The VeloView User Guide is stored on Google Drive at the address : 2 | https://docs.google.com/document/d/1_kYLZRGmyoywF24caaI-SzDtZBGYK888n9MqZHnZZqU/edit?usp=sharing 3 | 4 | This file can only be edited by authorized persons. -------------------------------------------------------------------------------- /Documentation/VeloView_User_Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/VeloView/ded5aaf18782eed0359514b994c07300d7bc78f8/Documentation/VeloView_User_Guide.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | LidarView performs real-time visualization of live captured 3D LiDAR data 4 | from Velodyne's HDL sensors (HDL-32E and HDL-64E). 5 | 6 | LidarView can playback pre-recorded data stored in .pcap files. The HDL 7 | sensor sweeps an array of lasers (32 or 64) 360° and a vertical field of 8 | view of 40°/26° with 5-20Hz and captures about a million points per 9 | second (HDL-32E: ~700,000pt/sec; HDL-64E: ~1.3Million pt/sec). 10 | LidarView displays the distance measurements from the HDL as point cloud 11 | data and supports custom color maps of multiple variables such as 12 | intensity-of-return, time, distance, azimuth, and laser id. The data can 13 | be exported as XYZ data in CSV format or screenshots of the currently 14 | displayed point cloud can be exported with the touch of a button. 15 | 16 | # Features 17 | 18 | - Input from live sensor stream or recorded .pcap file 19 | - Visualization of LiDAR returns in 3D + time including 3d position 20 | and attribute data such as timestamp, azimuth, laser id, etc 21 | - Spreadsheet inspector for LiDAR attributes 22 | - Record to .pcap from sensor 23 | - Export to CSV or VTK formats 24 | - Record and export GPS and IMU data (*New in 2.0*) 25 | - Ruler tool (*New in 2.0*) 26 | - Visualize path of GPS data (*New in 2.0*) 27 | - Show multiple frames of data simultaneously (*New in 2.0*) 28 | - Show or hide a subset of lasers (*New in 2.0*) 29 | 30 | # How to Get 31 | 32 | Binary installers for VeloView are available on this page: [https://gitlab.kitware.com/LidarView/VeloView-Velodyne/-/releases](https://gitlab.kitware.com/LidarView/VeloView-Velodyne/-/releases) 33 | 34 | VeloView has the same runtime requirements as LidarView, see [INSTALLATION.md](https://gitlab.kitware.com/LidarView/lidarview-core/-/blob/master/Documentation/INSTALLATION.md) 35 | 36 | # How to Build 37 | 38 | VeloView compilation follows the same steps as LidarView, see [Developper Guide](https://gitlab.kitware.com/LidarView/lidarview-core/-/blob/master/Documentation/LidarView_Developer_Guide.md) 39 | 40 | The source code for VeloView is made available under the Apache 2.0 41 | license. 42 | 43 | # How to Use 44 | 45 | Take a look at: [VeloView User Guide](https://gitlab.kitware.com/LidarView/VeloView-Velodyne/-/blob/master/Documentation/VeloView_User_Guide.pdf) 46 | 47 | Get started with SLAM using this Guide : [How to SLAM](https://gitlab.kitware.com/keu-computervision/slam/-/blob/master/paraview_wrapping/doc/How_to_SLAM_with_LidarView.md) 48 | 49 | See LidarView & SLAM in action in the [LidarView 2021 Webinar Video](https://vimeo.com/524848891) 50 | 51 | Sample data for VeloView can be obtained from 52 | [MIDAS](http://www.midasplatform.org/) in the 53 | [Velodyne LiDAR 54 | collection](http://midas3.kitware.com/midas/community/29). 55 | 56 | # Configuration Tips 57 | 58 | For "sensor streaming" (live display of sensor data) it 59 | is important to change the network settings of the Ethernet adapter 60 | connected to the sensor from automatic IP address to manual IP address 61 | selection and choose: 62 | 63 | * HDL-32E 64 | * IP address: 192.168.1.70 (70 as example, any number except 201 works) 65 | * Gateway: 255.255.255.0 66 | * HDL-64E 67 | * IP address: 192.168.3.70 (70 as example, any number except 43 works) 68 | * Gateway: 192.168.3.255 69 | 70 | In order for sensor streaming to work properly, it is important to 71 | disable firewall restrictions for the Ethernet port. Disable the 72 | firewall completely for the ethernet device connected to the sensor or 73 | explicitly allow data from that Ethernet port of (including both public 74 | and private networks). 75 | 76 | When opening pre-recorded data or live sensor streaming data one is 77 | prompted to choose a calibration file. 78 | 79 | * For HDL-32E data no calibration 80 | file is needed (the HDL-32E calibration values are already incorporated 81 | in LidarView) therefore select "NONE". 82 | * For HDL-64E data the correct 83 | calibration file for that sensor needs to be chosen. The calibration 84 | file can be found on the individual product CD that was sent with the 85 | HDL-64E sensor. 86 | 87 | # For Github users 88 | 89 | [Github](https://github.com/Kitware/VeloView) is a mirror of the 90 | [official repository](https://gitlab.kitware.com/LidarView/VeloView-Velodyne). 91 | We do not actively monitor issues or pull request on Github. Please use the 92 | [official repository](https://gitlab.kitware.com/LidarView/VeloView-Velodyne) to report issues or contributes fixes. 93 | 94 | -------------------------------------------------------------------------------- /Superbuild/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20.3) 2 | 3 | project(LidarViewSuperBuild) 4 | 5 | #----------------------------------------------------------------------------- 6 | # All the function and variable bellow are here because we rely on lidarview's 7 | # superbuild. 8 | # To see which function/variable cana/needs to be set, please take a look at 9 | # the CMakeLists.txt inside "lidarview-superbuild" 10 | #----------------------------------------------------------------------------- 11 | 12 | list(APPEND superbuild_project_roots 13 | "${CMAKE_CURRENT_SOURCE_DIR}/Projects") 14 | 15 | function (add_project_to_superbuild var) 16 | # list cannot append to parent's scope so we do it in two steps 17 | list(APPEND "${var}" lidarview) 18 | set("${var}" "${${var}}" PARENT_SCOPE) 19 | endfunction () 20 | 21 | list(APPEND superbuild_version_files 22 | "${CMAKE_CURRENT_LIST_DIR}/versions.cmake") 23 | 24 | add_subdirectory(lidarview-superbuild/) 25 | -------------------------------------------------------------------------------- /Superbuild/Projects/apple/lidarview.bundle.cmake: -------------------------------------------------------------------------------- 1 | # Bundling Scripts Stack Entry for $lidarview_appname - Apple Specific 2 | include(lidarview.bundle.common) 3 | 4 | # Trigger Apple-specific VeloView Bundling 5 | include(${LidarViewSuperBuild_CMAKE_DIR}/bundle/apple/LidarviewBundle.cmake) 6 | 7 | # VeloView-Apple Specifics 8 | 9 | # Install Sensor calibration files 10 | file(GLOB shared_files "${share_path}/*.xml") 11 | install(FILES ${shared_files} 12 | DESTINATION "${LV_INSTALL_RESOURCE_DIR}") 13 | unset(shared_files) 14 | 15 | 16 | #Install Veloview User Guide 17 | install(FILES "${superbuild_install_location}/bin/${lidarview_appname}/Contents/Resources/VeloView_User_Guide.pdf" 18 | DESTINATION "doc" 19 | COMPONENT superbuild 20 | ) 21 | -------------------------------------------------------------------------------- /Superbuild/Projects/lidarview.bundle.common.cmake: -------------------------------------------------------------------------------- 1 | # Crossplatform Bundling scripts for $lidarview_appname 2 | set(LidarViewSuperBuild_SOURCE_DIR "${superbuild_source_directory}") 3 | set(LidarViewSuperBuild_CMAKE_DIR "${LidarViewSuperBuild_SOURCE_DIR}/lidarview-superbuild/CMake") 4 | set(LidarViewSuperBuild_LVCORE_CMAKE_DIR "${LidarViewSuperBuild_SOURCE_DIR}/../LVCore/CMake") 5 | 6 | # Make sure Branding is set early 7 | include(${LidarViewSuperBuild_SOURCE_DIR}/../Application/branding.cmake) 8 | 9 | # Trigger Crossplatform VeloView Bundling 10 | include(${LidarViewSuperBuild_CMAKE_DIR}/bundle/LidarviewBundleCommon.cmake) 11 | 12 | # Add $lidarview_appname specific executables in common with all platforms 13 | list(APPEND lidarview_executables 14 | "PacketFileSender" 15 | ) 16 | 17 | # Add $lidarview_appname specific modules in common with all platforms 18 | #list(APPEND lidarview_modules ...) 19 | 20 | # Add $lidarview_appname specific python modules in common with all platforms 21 | list(APPEND lidarview_modules_python 22 | VelodynePlugin 23 | lidarviewpythonplugin 24 | 25 | camera_path 26 | colormap_tools 27 | temporal_animation_cue_helpers 28 | example_temporal_animation 29 | example_non_temporal_animation 30 | numpy 31 | ) 32 | 33 | # Set $lidarview_appname license file. 34 | set(CPACK_RESOURCE_FILE_LICENSE "${LidarViewSuperBuild_SOURCE_DIR}/lidarview-superbuild/LICENSE") 35 | -------------------------------------------------------------------------------- /Superbuild/Projects/lidarview.cmake: -------------------------------------------------------------------------------- 1 | cmake_dependent_option(Boost_NO_BOOST_CMAKE "Boost_NO_BOOST_CMAKE" ON "NOT USE_SYSTEM_boost" OFF) 2 | 3 | superbuild_add_project(lidarview 4 | DEPENDS paraview qt5 pcap boost eigen liblas yaml python3 pythonqt numpy 5 | DEPENDS_OPTIONAL pcl ceres opencv nanoflann g2o 6 | DEFAULT_ON 7 | CMAKE_ARGS 8 | #LidarView base configuration 9 | -DBUILD_SHARED_LIBS:BOOL=ON 10 | -DBUILD_TESTING:BOOL=OFF 11 | -DLV_BUILD_PLATFORM=${LV_BUILD_PLATFORM} 12 | -Dsuperbuild_python_version=${superbuild_python_version} 13 | -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/common-superbuild/paraview/build 14 | -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} 15 | -Dparaview_version=${paraview_version} 16 | -Dqt_version:STRING=${qt_version} 17 | -DBoost_NO_BOOST_CMAKE:BOOL=${Boost_NO_BOOST_CMAKE} 18 | #$lidarview_appname dependencies options 19 | -DENABLE_pcl=${ENABLE_pcl} 20 | -DENABLE_ceres=${ENABLE_ceres} 21 | -DENABLE_opencv=${ENABLE_opencv} 22 | -DENABLE_nanoflann=${ENABLE_nanoflann} 23 | -DENABLE_g2o=${ENABLE_g2o} 24 | #$lidarview_appname features options 25 | -DLIDARVIEW_BUILD_SLAM=${LIDARVIEW_BUILD_SLAM} 26 | #$lidarview_appname additional configuration 27 | ) 28 | 29 | # This Disable Boost autolinking feature and ease use of Boost as a dynamic library. 30 | # Boost_USE_STATIC_LIBS is off by default, but sometimes that is not sufficient 31 | # on windows (especially with MSVC ?) 32 | if (WIN32 OR APPLE) 33 | superbuild_append_flags(cxx_flags "-DBOOST_ALL_NO_LIB" PROJECT_ONLY) 34 | superbuild_append_flags(cxx_flags "-DBOOST_ALL_DYN_LINK" PROJECT_ONLY) 35 | endif() 36 | -------------------------------------------------------------------------------- /Superbuild/Projects/unix/lidarview.bundle.cmake: -------------------------------------------------------------------------------- 1 | # Bundling Scripts Stack Entry for $lidarview_appname - Unix Specific 2 | include(lidarview.bundle.common) 3 | 4 | # Trigger Unix-specific VeloView Bundling 5 | include(${LidarViewSuperBuild_CMAKE_DIR}/bundle/unix/LidarviewBundle.cmake) 6 | 7 | # VeloView-Unix Specifics 8 | 9 | # Install Sensor calibration files 10 | file(GLOB shared_files "${share_path}/*.xml") 11 | install(FILES ${shared_files} 12 | DESTINATION "${LV_INSTALL_RESOURCE_DIR}") 13 | unset(shared_files) 14 | 15 | #Install Veloview User Guide 16 | install(FILES "${superbuild_install_location}/doc/VeloView_User_Guide.pdf" 17 | DESTINATION "doc" 18 | COMPONENT superbuild 19 | ) 20 | -------------------------------------------------------------------------------- /Superbuild/Projects/win32/lidarview.bundle.cmake: -------------------------------------------------------------------------------- 1 | # Bundling Scripts Stack Entry for $lidarview_appname - Win32 Specific 2 | include(lidarview.bundle.common) 3 | 4 | # Trigger Win32-specific VeloView Bundling 5 | include(${LidarViewSuperBuild_CMAKE_DIR}/bundle/win32/LidarviewBundle.cmake) 6 | 7 | # VeloView-Win32 Specifics 8 | 9 | # Install Sensor calibration files 10 | file(GLOB shared_files "${share_path}/*.xml") 11 | install(FILES ${shared_files} 12 | DESTINATION "${LV_INSTALL_RESOURCE_DIR}") 13 | unset(shared_files) 14 | 15 | #Install Veloview User Guide 16 | install(FILES "${superbuild_install_location}/doc/VeloView_User_Guide.pdf" 17 | DESTINATION "doc" 18 | COMPONENT superbuild 19 | ) 20 | -------------------------------------------------------------------------------- /Superbuild/versions.cmake: -------------------------------------------------------------------------------- 1 | superbuild_set_revision(lidarview 2 | SOURCE_DIR ${CMAKE_SOURCE_DIR}/.. 3 | DOWNLOAD_COMMAND "") 4 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 4.0.0-nogit 2 | --------------------------------------------------------------------------------