Main Page | File List | Related Pages

gdcmUtil.h

00001 // gdcmUtil.h
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  * gdcmDebug is an object for debugging in program.
00018  * It has 2 debugging modes :
00019  *  - error : for bad library use
00020  *  - debug : for debugging messages
00021  * 
00022  * A debugging message has a level of priority and is 
00023  * Shown only when the debug level is higher than the 
00024  * message level.
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  * This class contains all globals elements that might be
00046  * instanciated only one time
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 

Generated on Mon Feb 14 16:13:44 2005 for gdcm by doxygen 1.3.6