|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Implementation of the INodeSelectionService interface. More...
#include <mitkNodeSelectionService.h>


Public Member Functions | |
| NodeSelectionService () | |
| ~NodeSelectionService () override | |
| bool | AddListener (const std::string &context, INodeSelectionListener *listener) override |
| Register a listener for selection events in the given context. More... | |
| bool | RemoveListener (const std::string &context, const INodeSelectionListener *listener) override |
| Remove a listener from a specific context. More... | |
| bool | RemoveListener (const INodeSelectionListener *listener) override |
| Remove a listener from all contexts. More... | |
| bool | SendSelection (const std::string &context, const std::vector< mitk::DataNode::Pointer > &selection) const override |
| Send a selection to all listeners registered for the given context. More... | |
Public Member Functions inherited from mitk::INodeSelectionService | |
| virtual | ~INodeSelectionService () |
| Virtual destructor. More... | |
Implementation of the INodeSelectionService interface.
Provides a thread-safe mechanism for broadcasting DataNode selections to registered listeners within a given context string. Multiple listeners can be registered for the same context. All operations are guarded by a mutex.
Definition at line 33 of file mitkNodeSelectionService.h.
| mitk::NodeSelectionService::NodeSelectionService | ( | ) |
|
override |
|
overridevirtual |
Register a listener for selection events in the given context.
If the listener is already registered for the given context, it is not added again.
| [in] | context | The selection context identifier. Must not be empty. |
| [in] | listener | The listener to register. Must not be nullptr. |
true if the arguments are valid, false otherwise. Implements mitk::INodeSelectionService.
|
overridevirtual |
Remove a listener from all contexts.
| [in] | listener | The listener to remove. Must not be nullptr. |
true if at least one registration was removed, false otherwise. Implements mitk::INodeSelectionService.
|
overridevirtual |
Remove a listener from a specific context.
| [in] | context | The selection context identifier. Must not be empty. |
| [in] | listener | The listener to remove. Must not be nullptr. |
true if the listener was found and removed, false otherwise. Implements mitk::INodeSelectionService.
|
overridevirtual |
Send a selection to all listeners registered for the given context.
Calls INodeSelectionListener::OnSelectionReceived on each listener registered for the given context.
| [in] | context | The selection context identifier. Must not be empty. |
| [in] | selection | The DataNode pointers representing the selection. |
true if the context is non-empty, false otherwise. Implements mitk::INodeSelectionService.