|
EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
|
Provides an IPanel to display and interact with previews of Signal frequency spectra (i.e., Signal DFTs). More...
#include <SignalDFTPanel.hpp>
Classes | |
| struct | CallbackData |
| struct | CacheKey |
| A three-way key into the FrequencySpectrum cache. More... | |
| struct | CacheValue |
| A keyed value within the FrequencySpectrum cache, either denoting a pending, failed, or present DFT. More... | |
| struct | CacheKeyHash |
| The hash functor for CacheKey. More... | |
Public Member Functions | |
| SignalDFTPanel (Worker *parent_worker, WorkerResultDespatcher &despatcher, EchoMap *app, const Project *initial_project=nullptr) | |
| Create a new SignalDFTPanel to display DFTs of Signal waveforms in the frequency domain. | |
| SignalDFTPanel (const SignalDFTPanel &)=delete | |
| SignalDFTPanel & | operator= (const SignalDFTPanel &)=delete |
| SignalDFTPanel (SignalDFTPanel &&) noexcept | |
| SignalDFTPanel & | operator= (SignalDFTPanel &&) noexcept=delete |
| void | draw () noexcept override |
| Draw the panel to the active rendering context. | |
| const char * | get_imgui_name () const noexcept override |
| Retrieves the name of the IPanel for Dear ImGui API functions. | |
| void | change_active_project (const Project *new_project) override |
| Updates the active Project being described by the IPanel. | |
| Public Member Functions inherited from echomap::IPanel | |
| virtual void | update_gpu (const wgpu::CommandEncoder &command_encoder) |
| Delegate work to the GPU via the WebGPU platform. | |
Static Public Member Functions | |
| static const char * | get_imgui_stable_name () noexcept |
Private Member Functions | |
| void | handle_completed_dft (DFTResult &&result) |
| void | draw_configuration_section () noexcept |
| void | draw_configuration_window_function () noexcept |
| void | draw_configuration_transform_size () noexcept |
| void | draw_configuration_scale_type () noexcept |
| void | draw_configuration_preview_actions () noexcept |
| void | draw_preview_section () noexcept |
| void | draw_preview_of_signal (std::shared_ptr< Signal > signal) noexcept |
| void | reset_available_transform_sizes () |
| void | update_spectrum_bounds (const FrequencySpectrum &spectrum) noexcept |
| void | update_spectrum_bounds () noexcept |
| void | update_available_sizes (std::uint64_t maximum_sample_count) |
| void | reset_viewport_bounds () noexcept |
| const FrequencySpectrum * | get_spectra (std::shared_ptr< Signal > signal, WindowFunctions::AllFunctions window_function, std::size_t transform_size) |
Static Private Member Functions | |
| static ImPlotPoint | get_indexed_frequency_bin (int index, void *user_data) noexcept |
Private Attributes | |
| ImPlotRect | spectrum_bounds |
| The minimal bounding box required to fully contain the DFT spectrum plot. | |
| ImPlotRect | viewport_bounds |
| The user-controlled bounding box of the DFT plots. | |
| std::string | panel_name |
| ImPlotSpec | plotting_spec_2d |
| Worker * | parent_worker |
| const Project * | active_project = nullptr |
| EchoMap * | app |
| std::unordered_map< CacheKey, CacheValue, CacheKeyHash > | spectra_cache |
| Cached DFT spectra. | |
| bool | use_log_scale = false |
| Should the DFT be plotted with a linear or base-10 logarithmic freq. | |
| std::vector< std::string > | available_sizes |
| Strings of all available transform sizes. | |
| unsigned int | selected_size_log = default_size_log |
| Base-2 log of selected transform size. | |
| WindowFunctions::AllFunctions | selected_window = WindowFunctions::Constant{} |
| std::vector< sigc::scoped_connection > | connections |
Static Private Attributes | |
| static constexpr unsigned int | default_size_log = 7 |
| Base-2 log of the minimum transform size. | |
Additional Inherited Members | |
| Static Protected Attributes inherited from echomap::IPanel | |
| static constexpr ImVec2 | button_size {80.0f, 20.0f} |
| static constexpr auto | table_flags |
Provides an IPanel to display and interact with previews of Signal frequency spectra (i.e., Signal DFTs).
Definition at line 34 of file SignalDFTPanel.hpp.
|
explicit |
Create a new SignalDFTPanel to display DFTs of Signal waveforms in the frequency domain.
The SignalDFTPanel consumes the DFTResult message.
| parent_worker | The Worker to receive ITask commands over the command bus. |
| despatcher | The despatcher to expose the result buses. |
| app | The parent application instance. |
| initial_project | An optional initial Project for the IPanel to display. |
Definition at line 37 of file SignalDFTPanel.cpp.
|
overridevirtual |
Updates the active Project being described by the IPanel.
| new_project | An observing pointer to the new active Project. |
Implements echomap::IProjectPanel.
Definition at line 90 of file SignalDFTPanel.cpp.
|
overridevirtualnoexcept |
Draw the panel to the active rendering context.
Implements echomap::IPanel.
Definition at line 59 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 268 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 257 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 158 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 229 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 186 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 302 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 284 of file SignalDFTPanel.cpp.
|
nodiscardoverridevirtualnoexcept |
Retrieves the name of the IPanel for Dear ImGui API functions.
Implements echomap::IPanel.
Definition at line 85 of file SignalDFTPanel.cpp.
|
staticnoexcept |
Definition at line 101 of file SignalDFTPanel.cpp.
|
staticprivatenoexcept |
Definition at line 148 of file SignalDFTPanel.cpp.
|
private |
Definition at line 448 of file SignalDFTPanel.cpp.
|
private |
Definition at line 106 of file SignalDFTPanel.cpp.
|
private |
Definition at line 349 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 430 of file SignalDFTPanel.cpp.
|
private |
Definition at line 399 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 384 of file SignalDFTPanel.cpp.
|
privatenoexcept |
Definition at line 358 of file SignalDFTPanel.cpp.
|
private |
Definition at line 120 of file SignalDFTPanel.hpp.
|
private |
Definition at line 121 of file SignalDFTPanel.hpp.
|
private |
Strings of all available transform sizes.
Definition at line 168 of file SignalDFTPanel.hpp.
|
private |
Definition at line 174 of file SignalDFTPanel.hpp.
|
staticconstexprprivate |
Base-2 log of the minimum transform size.
Definition at line 167 of file SignalDFTPanel.hpp.
|
private |
Definition at line 117 of file SignalDFTPanel.hpp.
|
private |
Definition at line 119 of file SignalDFTPanel.hpp.
|
private |
Definition at line 118 of file SignalDFTPanel.hpp.
|
private |
Base-2 log of selected transform size.
Definition at line 169 of file SignalDFTPanel.hpp.
|
private |
Definition at line 172 of file SignalDFTPanel.hpp.
|
private |
Cached DFT spectra.
Definition at line 165 of file SignalDFTPanel.hpp.
|
private |
The minimal bounding box required to fully contain the DFT spectrum plot.
Definition at line 108 of file SignalDFTPanel.hpp.
|
private |
Should the DFT be plotted with a linear or base-10 logarithmic freq.
axis?
Definition at line 166 of file SignalDFTPanel.hpp.
|
private |
The user-controlled bounding box of the DFT plots.
Definition at line 115 of file SignalDFTPanel.hpp.