MeVisLabToolboxReference
|
Class to generate unique ids, valid to be used in a DICOM environment. More...
#include <DCMTree_UIDGenerator.h>
Static Public Member Functions | |
static void | initialize (std::string iso_root_uid, std::string systemtype, std::string softwaretype, std::string replacementMac=std::string()) |
function to be called exactly once before any other function is called this function sets some predefined values, especially the _prefix part of the UIDs up to the 'process id' | |
static std::string | uid () |
create a new uid | |
static bool | isInitialized () |
return true if class is initialized |
Class to generate unique ids, valid to be used in a DICOM environment.
the created UIDs have the following form: 'iso_root_uid'.'systemtype'.'mac of the system'.'software type'.'process id'.'timestamp+counter' the form of the first part of the UIDs were decided together with Sebastian Meyer several years ago.
the uids are unique even in a multi-threaded environment the mac of the system has to be unique of course
Definition at line 34 of file DCMTree_UIDGenerator.h.
static void DCMTree_Utils::UIDGenerator::initialize | ( | std::string | iso_root_uid, |
std::string | systemtype, | ||
std::string | softwaretype, | ||
std::string | replacementMac = std::string() |
||
) | [static] |
function to be called exactly once before any other function is called this function sets some predefined values, especially the _prefix part of the UIDs up to the 'process id'
replacementMac | optional parameter. If a replacementMac is provided it will be used in the _prefix; otherwise the MAC adress is determined with the getMac() function. A replacementMac is especially useful if the getMac() cannot guarantee to return a unique MAC which could be the case if VMWare is installed (which installs its own virtual adapters) |
static bool DCMTree_Utils::UIDGenerator::isInitialized | ( | ) | [static] |
return true if class is initialized
static std::string DCMTree_Utils::UIDGenerator::uid | ( | ) | [static] |
create a new uid