Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkDICOMTagsOfInterestAddHelper.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 mitkDICOMTagsOfInterestAddHelper_h
14 #define mitkDICOMTagsOfInterestAddHelper_h
15 
16 #include <unordered_map>
17 
18 #include <mitkDICOMTagPath.h>
19 
20 #include <usServiceEvent.h>
21 
22 #include <memory>
23 #include <mutex>
24 
25 #include <MitkDICOMExports.h>
26 
27 namespace us
28 {
29  class ModuleContext;
30 }
31 
32 namespace mitk
33 {
34  class IDICOMTagsOfInterest;
35 
55  {
56  public:
58  using TagsOfInterestVector = std::vector<mitk::DICOMTagPath>;
59 
61 
73 
79  void Deactivate();
80 
81  private:
82  void RegisterTagsOfInterest(IDICOMTagsOfInterest* toiService) const;
83  void DICOMTagsOfInterestServiceChanged(const us::ServiceEvent event);
84 
85  TagsOfInterestVector m_TagsOfInterest;
86 
87  bool m_Active = false;
88  us::ModuleContext* m_Context = nullptr;
89 
91  std::mutex m_Mutex;
92  };
93 }
94 
95 #endif
#define MITKDICOM_EXPORT
Helper class to ensure DICOM tags of interest are registered at IDICOMTagsOfInterest services.
void Deactivate()
Deactivate the helper and stop listening for new services.
std::vector< mitk::DICOMTagPath > TagsOfInterestVector
Vector of DICOMTagPath instances representing tags to register.
void Activate(us::ModuleContext *context, TagsOfInterestVector tags)
Activate the helper to start registering tags of interest.
Interface of DICOM tags of interest service.
Find image slices visible on a given plane.