Medical Imaging Interaction Toolkit  2025.12.02
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:
35 
51  virtual bool AddListener(const std::string& context, INodeSelectionListener* listener) = 0;
52 
65  virtual bool RemoveListener(const std::string& context, const INodeSelectionListener* listener) = 0;
66 
77  virtual bool RemoveListener(const INodeSelectionListener* listener) = 0;
78 
89  virtual bool SendSelection(const std::string& context, const std::vector<mitk::DataNode::Pointer>& selection) const = 0;
90  };
91 }
92 
93 MITK_DECLARE_SERVICE_INTERFACE(mitk::INodeSelectionService, "org.mitk.INodeSelectionService")
94 
95 #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.
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Find image slices visible on a given plane.