Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkINodeSelectionService.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkINodeSelectionService_h
14 #define mitkINodeSelectionService_h
15 
16 #include <mitkDataNode.h>
18 #include <mitkServiceInterface.h>
19 
20 namespace mitk
21 {
32  {
33  public:
36 
52  virtual bool AddListener(const std::string& context, INodeSelectionListener* listener) = 0;
53 
66  virtual bool RemoveListener(const std::string& context, const INodeSelectionListener* listener) = 0;
67 
78  virtual bool RemoveListener(const INodeSelectionListener* listener) = 0;
79 
90  virtual bool SendSelection(const std::string& context, const std::vector<mitk::DataNode::Pointer>& selection) const = 0;
91  };
92 }
93 
94 MITK_DECLARE_SERVICE_INTERFACE(mitk::INodeSelectionService, "org.mitk.INodeSelectionService")
95 
96 #endif
#define MITKCORE_EXPORT
Interface for listening to node selections sent via the INodeSelectionService.
A simple messaging service for sending and receiving data node selections for certain contexts.
virtual bool RemoveListener(const std::string &context, const INodeSelectionListener *listener)=0
Remove a listener from selections of a certain selection context.
virtual bool AddListener(const std::string &context, INodeSelectionListener *listener)=0
Add a listener for selections in a certain selection context.
virtual bool RemoveListener(const INodeSelectionListener *listener)=0
Remove a listener from selections of all selection contexts.
virtual bool SendSelection(const std::string &context, const std::vector< mitk::DataNode::Pointer > &selection) const =0
Send a selection to all listeners of a certain selection context.
virtual ~INodeSelectionService()
Virtual destructor.
Provides the MITK_DECLARE_SERVICE_INTERFACE macro for registering C++ interfaces with both the CppMic...
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Declare a C++ interface for use with CppMicroServices (Qt not available).
Find image slices visible on a given plane.