]> Creatis software - gdcm.git/blob - src/gdcmUtil.h
* src/gdcmUtil.[cxx|h] _cleanString C style function (replaced with
[gdcm.git] / src / gdcmUtil.h
1 // gdcmUtil.h
2 //-----------------------------------------------------------------------------
3 #ifndef GDCMUTIL_H
4 #define GDCMUTIL_H
5
6 #include "gdcmCommon.h"
7 #include "gdcmVR.h"
8 #include "gdcmTS.h"
9 #include "gdcmDictSet.h"
10 #include "gdcmDicomDirElement.h"
11 #include <vector>
12 #include <string>
13
14 //-----------------------------------------------------------------------------
15 /**
16  * \ingroup gdcmGlobal
17  * \brief   This class contains all globals elements that might be
18  *          instanciated only once (singletons).
19  */
20 class GDCM_EXPORT gdcmGlobal {
21 public:
22    gdcmGlobal(void);
23    ~gdcmGlobal();
24
25    static gdcmDictSet *GetDicts(void);
26    static gdcmVR *GetVR(void);
27    static gdcmTS *GetTS(void);
28    static gdcmDicomDirElement *GetDicomDirElements(void);
29
30 private:
31    static gdcmDictSet *Dicts; 
32    static gdcmVR *VR;
33    static gdcmTS *TS; 
34    static gdcmDicomDirElement *ddElem;
35 };
36
37 //-----------------------------------------------------------------------------
38 std::istream & eatwhite(std::istream & is);
39
40 void Tokenize (const std::string& str,
41                std::vector<std::string>& tokens,
42                const std::string& delimiters = " ");
43
44 std::string CreateCleanString(std::string s);
45 void        NormalizePath(std::string &name);
46 std::string GetPath(std::string &fullName);
47 std::string GetName(std::string &fullName);
48 #endif