00001
00002
00003 #ifndef GDCMUTIL_H
00004 #define GDCMUTIL_H
00005
00006 #include "gdcmCommon.h"
00007 #include "gdcmVR.h"
00008 #include "gdcmTS.h"
00009 #include "gdcmDictSet.h"
00010 #include "gdcmDicomDirElement.h"
00011 #include <iostream>
00012 #include <vector>
00013 #include <string>
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 class gdcmDebug {
00027 public:
00028 gdcmDebug(int level = GDCM_DEBUG);
00029
00030 void SetDebug (int i) {DebugLevel = i;}
00031
00032 void Verbose(int, const char*, const char* ="");
00033 void Error(bool, const char*, const char* ="");
00034 void Error(const char*, const char* ="", const char* ="");
00035
00036 void Assert(int, bool, const char*, const char*);
00037 void Exit(int);
00038
00039 private:
00040 int DebugLevel;
00041 };
00042
00043
00044
00045
00046
00047
00048 class GDCM_EXPORT gdcmGlobal {
00049 public:
00050 gdcmGlobal(void);
00051 ~gdcmGlobal();
00052
00053 static gdcmDictSet *GetDicts(void);
00054 static gdcmVR *GetVR(void);
00055 static gdcmTS *GetTS(void);
00056 static gdcmDicomDirElement *GetDicomDirElements(void);
00057
00058 private:
00059 static gdcmDictSet *Dicts;
00060 static gdcmVR *VR;
00061 static gdcmTS *TS;
00062 static gdcmDicomDirElement *ddElem;
00063 };
00064
00065
00066 std::istream & eatwhite(std::istream & is);
00067
00068 void Tokenize (const std::string& str,
00069 std::vector<std::string>& tokens,
00070 const std::string& delimiters = " ");
00071
00072 extern gdcmDebug dbg;
00073
00074 char *_cleanString(char *v);
00075 std::string _CreateCleanString(std::string s);
00076
00077
00078 #endif
00079