]> Creatis software - gdcm.git/blob - src/gdcmUtil.h
* src/gdcmUtil.[cxx|h] split in two. Additional file gdcmDebug.[cxx|h]
[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  * This class contains all globals elements that might be
17  * instanciated only one time
18  */
19 class GDCM_EXPORT gdcmGlobal {
20 public:
21    gdcmGlobal(void);
22    ~gdcmGlobal();
23
24    static gdcmDictSet *GetDicts(void);
25    static gdcmVR *GetVR(void);
26    static gdcmTS *GetTS(void);
27    static gdcmDicomDirElement *GetDicomDirElements(void);
28
29 private:
30    static gdcmDictSet *Dicts; 
31    static gdcmVR *VR;
32    static gdcmTS *TS; 
33    static gdcmDicomDirElement *ddElem;
34 };
35
36 //-----------------------------------------------------------------------------
37 std::istream & eatwhite(std::istream & is);
38
39 void Tokenize (const std::string& str,
40                std::vector<std::string>& tokens,
41                const std::string& delimiters = " ");
42
43 char *_cleanString(char *v);
44 std::string _CreateCleanString(std::string s);
45
46 void NormalizePath (std::string &name);
47 std::string GetPath(std::string &fullName);
48 std::string GetName(std::string &fullName);
49 #endif