MeVisLab Toolbox Reference
DCMTree_UIDGenerator.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef DCM_TREE_UIDGENERATOR_H
14#define DCM_TREE_UIDGENERATOR_H
15
16#include "DCMTree_Defines.h"
17
18#include <string>
19
20
21namespace DCMTree_Utils
22{
41 {
42 public:
53 static void initialize(const std::string& iso_root_uid = std::string(), const std::string& replacementMac = std::string());
54
56 static void initialize(std::string iso_root_uid, std::string systemtype, std::string softwaretype,
57 std::string replacementMac = std::string());
58
62 static std::string uid();
63
67 static bool isInitialized();
68
72 static void setMaxCounterPerSecond(int value);
73
76
89 static std::string hashUID(const std::string& uid);
90 };
91}
92
93#endif
94
95
#define DCMTREE_EXPORT
Class to generate unique ids, valid to be used in a DICOM environment.
static void setMaxCounterPerSecond(int value)
This method allows to overwrite how many uids can be created per second.
static std::string hashUID(const std::string &uid)
Get a uid that is basically a hash of the argument uid (with an appropriate prefix).
static int getMaxCounterPerSecond()
Get the used max counter per seconds.
static void initialize(std::string iso_root_uid, std::string systemtype, std::string softwaretype, std::string replacementMac=std::string())
Overload to keep old code working, systemtype and softwaretype are not used any more.
static void initialize(const std::string &iso_root_uid=std::string(), const std::string &replacementMac=std::string())
Function to be called exactly once before any other function is called.
static bool isInitialized()
return true if class is initialized
static std::string uid()
create a new uid
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
dictionary class to provide dicom-meta information