Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::DICOMTagsOfInterestAddHelper Class Reference

Helper class to ensure DICOM tags of interest are registered at IDICOMTagsOfInterest services. More...

#include <mitkDICOMTagsOfInterestAddHelper.h>

Public Types

using TagsOfInterestVector = std::vector< mitk::DICOMTagPath >
 Vector of DICOMTagPath instances representing tags to register. More...
 

Public Member Functions

 ~DICOMTagsOfInterestAddHelper ()
 
void Activate (us::ModuleContext *context, TagsOfInterestVector tags)
 Activate the helper to start registering tags of interest. More...
 
void Deactivate ()
 Deactivate the helper and stop listening for new services. More...
 

Detailed Description

Helper class to ensure DICOM tags of interest are registered at IDICOMTagsOfInterest services.

This helper class can be used to ensure that a given list of DICOM tags will be registered at existing IDICOMTagsOfInterest services. If the services are available the tags will be directly added. As long as the helper is active, it will add the given tags to all new IDICOMTagsOfInterest services as soon as they are registered.

This class is typically used in module activators where the IDICOMTagsOfInterest service might not be registered when a module is loaded, but the module wants to ensure that the tags are added as soon as possible.

Note
The helper must be deactivated before the module context used on activation gets invalid (e.g. in the Unload function of the module activator).
See also
IDICOMTagsOfInterest, DICOMTagPath

Definition at line 54 of file mitkDICOMTagsOfInterestAddHelper.h.

Member Typedef Documentation

◆ TagsOfInterestVector

Vector of DICOMTagPath instances representing tags to register.

Definition at line 58 of file mitkDICOMTagsOfInterestAddHelper.h.

Constructor & Destructor Documentation

◆ ~DICOMTagsOfInterestAddHelper()

mitk::DICOMTagsOfInterestAddHelper::~DICOMTagsOfInterestAddHelper ( )

Member Function Documentation

◆ Activate()

void mitk::DICOMTagsOfInterestAddHelper::Activate ( us::ModuleContext *  context,
TagsOfInterestVector  tags 
)

Activate the helper to start registering tags of interest.

Registers a service listener and immediately registers tags at any existing IDICOMTagsOfInterest services. Future services will also receive the tags.

Parameters
[in]contextThe CppMicroServices module context to use for service tracking.
[in]tagsThe list of DICOM tag paths to register.
Precondition
context must not be nullptr.

◆ Deactivate()

void mitk::DICOMTagsOfInterestAddHelper::Deactivate ( )

Deactivate the helper and stop listening for new services.

Must be called before the module context becomes invalid.


The documentation for this class was generated from the following file: