Skip to content

Commit

Permalink
Merge topic 'add-dsp-plugin'
Browse files Browse the repository at this point in the history
b871a51 DSPPlugin: improve README with images
5502d42 Improve default data to not plot
871c072 WarnOnCreate: update usage of deprecated syntax
49db2f9 AudioPlayer: prefer default output device for audio
b6c7e92 New plugin : Digital Signal Processing plugin

Acked-by: Kitware Robot <[email protected]>
Merge-request: !6065
  • Loading branch information
Timothee Chabat authored and kwrobot committed Jan 13, 2023
2 parents 323a68a + b871a51 commit 79a6058
Show file tree
Hide file tree
Showing 40 changed files with 3,811 additions and 17 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ set(paraview_default_plugins
CFSReader
Datamine
DigitalRockPhysics
DigitalSignalProcessing
EULATestPlugin
EmbossingRepresentations
EyeDomeLighting
Expand Down
57 changes: 57 additions & 0 deletions Plugins/DSP/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
set(sources)
set(interfaces)
set(uifiles)

option(PARAVIEW_PLUGIN_dsp_enable_audio_player "Enable building the Audio Player Dock. Requires Qt Multimedia." OFF)
mark_as_advanced(PARAVIEW_PLUGIN_dsp_enable_audio_player)

if (PARAVIEW_USE_QT AND PARAVIEW_PLUGIN_dsp_enable_audio_player)
find_package(Qt5 REQUIRED Widgets OPTIONAL_COMPONENTS Multimedia)

if (NOT TARGET Qt5::Multimedia)
message(FATAL_ERROR
"Component 'Qt5::Multimedia' required for the DSP plugin not found. Use "
"PARAVIEW_PLUGIN_dsp_enable_audio_player to disable the audio player if necessary, or install 'Qt5::Multimedia'")
endif()

list(APPEND sources
pqAudioPlayer.cxx
pqAudioPlayer.h)

paraview_plugin_add_dock_window(
CLASS_NAME pqAudioPlayer
DOCK_AREA Right
INTERFACES dock_interfaces
SOURCES dock_sources)

list(APPEND interfaces
${dock_interfaces})
list(APPEND sources
${dock_sources})
list(APPEND uifiles pqAudioPlayer.ui)
endif()

paraview_add_plugin(DigitalSignalProcessing
VERSION "1.0"
UI_FILES ${uifiles}
UI_INTERFACES ${interfaces}
SOURCES ${sources}
REQUIRED_ON_CLIENT
REQUIRED_ON_SERVER
MODULES
DigitalSignalProcessing::DSPFiltersPlugin
MODULE_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/Filters/vtk.module")

if (PARAVIEW_USE_QT AND PARAVIEW_PLUGIN_dsp_enable_audio_player)
target_link_libraries(DigitalSignalProcessing
PRIVATE
Qt5::Widgets
Qt5::Multimedia)

target_compile_definitions(DigitalSignalProcessing PRIVATE QT_NO_KEYWORDS)
endif()

if (BUILD_TESTING AND BUILD_SHARED_LIBS)
add_subdirectory(Testing)
endif()
Binary file added Plugins/DSP/Documentation/acknowledgement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Plugins/DSP/Documentation/example_pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Plugins/DSP/Documentation/pipeline_results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions Plugins/DSP/Filters/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
set(MODULE_CLASSES
vtkMeanPowerSpectralDensity
vtkMergeReduceTableBlocks
vtkProjectSpectrumMagnitude
vtkSoundQuantitiesCalculator
vtkSpectrogramFilter
)

set(MODULE_HEADERS
vtkAccousticUtilities.h
)

vtk_module_add_module(DigitalSignalProcessing::DSPFiltersPlugin
FORCE_STATIC # build static library, to avoid confusion when loading
CLASSES ${MODULE_CLASSES}
HEADERS ${MODULE_HEADERS}
)

paraview_add_server_manager_xmls(
XMLS DSPFilters.xml)
Loading

0 comments on commit 79a6058

Please sign in to comment.