]> Creatis software - gdcm.git/commitdiff
* src/*.[h] all occurences of stl classes are now prefixed with
authorfrog <frog>
Wed, 21 May 2003 14:42:45 +0000 (14:42 +0000)
committerfrog <frog>
Wed, 21 May 2003 14:42:45 +0000 (14:42 +0000)
        std::, and all occurences of "using namespace std;" where removed.
        This is to avoid pollution of global namespace in included files.
        Apparently vtk does not avoid this pitfall: when using both
        gdcm and vtk (as in vtk/vtkGdcmReader.cxx) this ended up in a
        collision of various stl members (principally cout...).

16 files changed:
ChangeLog
Makefile.am
gdcmPython/gdcm.i
src/gdcmCommon.h
src/gdcmDict.h
src/gdcmDictEntry.h
src/gdcmDictSet.h
src/gdcmElValSet.h
src/gdcmElValue.h
src/gdcmException.h
src/gdcmFile.h
src/gdcmHeader.cxx
src/gdcmHeader.h
src/gdcmUtil.cxx
src/gdcmUtil.h
src/gdcmVR.h

index 1093ecc2d8787961e68087e5add7f8e526c6e873..1c75af2fbb2303221a791b7c0c478cb8cec9538b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
         - gdcmPython/demo/vtkGdcmReader.py added. This demo illustrates
           the usage of the python wrapper of vtkGdcmReader vtk class.
       * vtk/vtkGdcmReader.cxx: bug fixed (thanks to Benoit Regrain).  
+      * src/*.[h] all occurences of stl classes are now prefixed with
+        std::, and all occurences of "using namespace std;" where removed.
+        This is to avoid pollution of global namespace in included files.
+        Apparently vtk does not avoid this pitfall: when using both
+        gdcm and vtk (as in vtk/vtkGdcmReader.cxx) this ended up in a
+        collision of various stl members (principally cout...).
 
 2003-05-12  Eric Boix <Eric.Boix@creatis.insa-lyon.fr> with JPR
       * src/gdcmHeader>[h/cxx] added gdcmHeader::GetPixelSize()
index aa38126c3e82ff32f51faa7ac8bdeb1cd0f86d46..ca2a009eb1d01b7ba92333f488321c277c537348 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = src gdcmPython Test Dicts Doc vtk
+SUBDIRS = src vtk gdcmPython Test Dicts Doc
 
 
 EXTRA_DIST = \
index 41d5ee2080708e256e2da6137d9f51081a64ed03..02ddf0acb41059d252386ff90b085057356a7b88 100644 (file)
@@ -8,6 +8,7 @@
 #include "gdcmElValSet.h"
 #include "gdcmHeader.h"
 #include "gdcmFile.h"
+using namespace std;
 
 // Utility functions on strings for removing leading and trailing spaces
 void EatLeadingAndTrailingSpaces(string & s) {
index 5c2b38054f58a8d346de4fe28afcbb3464956e8a..131fceba3d18243b398c7c8a68dafabd2b92bc2b 100644 (file)
@@ -26,12 +26,9 @@ typedef  int                 gint32;
 #endif
 
 #include <string>
-#ifdef _MSC_VER
-using namespace std;  // string type lives in the std namespace on VC++
-#endif
 
-typedef string TagKey;
-typedef string TagName;
+typedef std::string TagKey;
+typedef std::string TagName;
 
 enum FileType {
       Unknown = 0,
index 77d837c9f0a3aa1cceb038b36f0fef1f8a251554..dfab30c3557c9423fcd9aabf2c45b3aa48628411 100644 (file)
@@ -7,8 +7,8 @@
 #include "gdcmCommon.h"
 #include "gdcmDictEntry.h"
 
-typedef map<TagKey,  gdcmDictEntry*> TagKeyHT;
-typedef map<TagName, gdcmDictEntry*> TagNameHT;
+typedef std::map<TagKey,  gdcmDictEntry*> TagKeyHT;
+typedef std::map<TagName, gdcmDictEntry*> TagNameHT;
 
 /*
  * \defgroup gdcmDict
@@ -21,14 +21,14 @@ typedef map<TagName, gdcmDictEntry*> TagNameHT;
  * \see gdcmDictSet
  */
 class GDCM_EXPORT gdcmDict {
-       string name;
-       string filename;
+   std::string name;
+   std::string filename;
    /// Access through TagKey (see alternate access with NameHt)
        TagKeyHT  KeyHt;
    /// Access through TagName (see alternate access with KeyHt)
        TagNameHT NameHt;
 public:
-       gdcmDict(string & FileName);
+       gdcmDict(std::string & FileName);
        ~gdcmDict();
        int AddNewEntry (gdcmDictEntry* NewEntry);
        int ReplaceEntry(gdcmDictEntry* NewEntry);
index 93cf8efc7c867cdab6ed138c8b8c02e5770b60dd..abb7aa0ebafe5e9e727a05dc575476d551bb7df6 100644 (file)
@@ -7,16 +7,20 @@
 
 class GDCM_EXPORT gdcmDictEntry {
 private:
-       guint16 group;    // e.g. 0x0010  // FIXME : s'en sert-on qq part
-       guint16 element;  // e.g. 0x0103  // si ce n'est pour fabriquer la TagKey ?
-       string  vr;       // Value Representation i.e. some clue about the nature
-                         // of the data represented e.g. "FD" short for
-                         // "Floating Point Double"
+   // FIXME : were are the group and element used except from building up
+   //         a TagKey. If the answer is nowhere then there is no need
+   //         to store the group and element independently.
+       guint16 group;       // e.g. 0x0010
+       guint16 element;     // e.g. 0x0103
+   std::string  vr;     // Value Representation i.e. some clue about the nature
+                            // of the data represented e.g. "FD" short for
+                            // "Floating Point Double"
        // CLEANME: find the official dicom name for this field !
-       string  fourth;   // Fourth field containing some semantics. (Group Name abbr.)
-       string  name;     // e.g. "Patient_Name"
-       TagKey  key;      // Redundant with (group, element) but we add it
-                         // on efficiency purposes.
+   std::string  fourth; // Fourth field containing some semantics.
+                        //(Group Name abbr.)
+   std::string  name;   // e.g. "Patient_Name"
+       TagKey  key;         // Redundant with (group, element) but we add it
+                            // on efficiency purposes.
        // DCMTK has many fields for handling a DictEntry (see below). What are the
        // relevant ones for gdcmlib ?
        //      struct DBI_SimpleEntry {
@@ -33,22 +37,22 @@ private:
 public:
        gdcmDictEntry(guint16 group, 
                      guint16 element,
-                     string vr     = "Unknown",
-                     string fourth = "Unknown",
-                     string name   = "Unknown");
+                 std::string vr     = "Unknown",
+                 std::string fourth = "Unknown",
+                 std::string name   = "Unknown");
                         
        // fabrique une 'clé' par concaténation du numGroupe et du numElement
        static TagKey TranslateToKey(guint16 group, guint16 element);
        
-       guint16 GetGroup(void)  { return group; };
-       guint16 GetElement(void){return element;};
-       string  GetVR(void)     {return vr;     };
-       void    SetVR(string);
-       void    SetKey(string k){ key = k;     }
-       bool    IsVrUnknown(void);
-       string  GetFourth(void) {return fourth;};
-       string  GetName(void)   {return name;  };
-       string  GetKey(void)    {return key;   };
+       guint16      GetGroup(void)  { return group; };
+       guint16      GetElement(void){return element;};
+   std::string  GetVR(void)     {return vr;     };
+       void         SetVR(std::string);
+       void         SetKey(std::string k){ key = k; };
+       bool         IsVrUnknown(void);
+   std::string  GetFourth(void) {return fourth;};
+   std::string  GetName(void)   {return name;  };
+   std::string  GetKey(void)    {return key;   };
 };
 
 #endif
index 751be5f83e208322cd4b9b57541dc182901ac51c..f2f50634ccf9764135c6eac538f90c85706e5895 100644 (file)
@@ -7,8 +7,8 @@
 #include <list>
 #include "gdcmDict.h"
 
-typedef string DictKey;
-typedef map<DictKey, gdcmDict*> DictSetHT;
+typedef std::string DictKey;
+typedef std::map<DictKey, gdcmDict*> DictSetHT;
 
 /*
  * \defgroup gdcmDictSet
@@ -23,21 +23,22 @@ private:
    /// Hash table of all dictionaries contained in this gdcmDictSet
        DictSetHT Dicts;
    /// Directory path to dictionaries
-       string DictPath;
+   std::string DictPath;
        int AppendDict(gdcmDict* NewDict);
-       void LoadDictFromFile(string filename, DictKey);
-       string BuildDictPath(void);
+       void LoadDictFromFile(std::string filename, DictKey);
+   std::string BuildDictPath(void);
 public:
-       list<string> * GetPubDictTagNames(void);
-       map<string, list<string> >* GetPubDictTagNamesByCategory(void);
+   std::list<std::string> * GetPubDictTagNames(void);
+   std::map<std::string, std::list<std::string> >*
+       GetPubDictTagNamesByCategory(void);
 
-       // TODO Swig int LoadDictFromFile(string filename);
+       // TODO Swig int LoadDictFromFile(std::string filename);
    // QUESTION: the following function might not be thread safe !? Maybe
    //           we need some mutex here, to avoid concurent creation of
    //           the same dictionary !?!?!
-       // TODO Swig int LoadDictFromName(string filename);
-       // TODO Swig int LoadAllDictFromDirectory(string DirectoryName);
-       // TODO Swig string* GetAllDictNames();
+       // TODO Swig int LoadDictFromName(std::string filename);
+       // TODO Swig int LoadAllDictFromDirectory(std::string DirectoryName);
+       // TODO Swig std::string* GetAllDictNames();
        gdcmDictSet(void);
        ~gdcmDictSet(void);
        void Print(ostream&);
index ae30bc55f16c45d24d19de16222780b57fa39596..5def2edc274fe29f42706071eb02466c6e492366 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.11 2003/04/16 08:03:27 frog Exp $
+// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.12 2003/05/21 14:42:46 frog Exp $
 
 #ifndef GDCMELVALSET_H
 #define GDCMELVALSET_H
 
 ////////////////////////////////////////////////////////////////////////////
 // Container for a set of successfully parsed ElValues.
-typedef map<TagKey, gdcmElValue*> TagElValueHT;
-typedef map<string, gdcmElValue*> TagElValueNameHT;
+typedef std::map<TagKey, gdcmElValue*> TagElValueHT;
+typedef std::map<std::string, gdcmElValue*> TagElValueNameHT;
 
 class GDCM_EXPORT gdcmElValSet {
    TagElValueHT tagHt;             // Both accesses with a TagKey or with a
    TagElValueNameHT NameHt;        // the DictEntry.Name are required.
    
-   typedef string GroupKey;
-   typedef map<GroupKey, int> GroupHT; 
+   typedef std::string GroupKey;
+   typedef std::map<GroupKey, int> GroupHT; 
    
 public:        
    ~gdcmElValSet();
@@ -29,17 +29,17 @@ public:
    int  Write(FILE *fp, FileType type);
 
    gdcmElValue* GetElementByNumber(guint16 group, guint16 element);
-   gdcmElValue* GetElementByName  (string);
-   string   GetElValueByNumber(guint16 group, guint16 element);
-   string   GetElValueByName  (string);
+   gdcmElValue* GetElementByName  (std::string);
+   std::string  GetElValueByNumber(guint16 group, guint16 element);
+   std::string  GetElValueByName  (std::string);
        
    TagElValueHT & GetTagHt(void);      
        
-   int SetElValueByNumber(string content, guint16 group, guint16 element);
-   int SetElValueByName  (string content, string TagName);
+   int SetElValueByNumber(std::string content, guint16 group, guint16 element);
+   int SetElValueByName  (std::string content, std::string TagName);
        
    int SetElValueLengthByNumber(guint32 l, guint16 group, guint16 element);
-   int SetElValueLengthByName  (guint32 l, string TagName);
+   int SetElValueLengthByName  (guint32 l, std::string TagName);
 
    guint32 GenerateFreeTagKeyInGroup(guint16 group);
        
index 1365d8bc9b2c879194a0166e63b058dac69e77c1..9dec12ca15419b8e93f75bb64f9b0c5f23bf4217 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmElValue.h,v 1.4 2003/04/09 14:04:53 jpr Exp $
+// $Header: /cvs/public/gdcm/src/Attic/gdcmElValue.h,v 1.5 2003/05/21 14:42:46 frog Exp $
 
 #ifndef GDCMELVALUE_H
 #define GDCMELVALUE_H
@@ -24,7 +24,7 @@ private:
    //friend gdcmElValue * gdcmHeader::ReadNextElement(void);
    friend class gdcmHeader;
 public:
-       string  value;
+   std::string  value;
        size_t Offset;     // Offset from the begining of file for direct user access
        
        gdcmElValue(gdcmDictEntry*);
@@ -34,17 +34,17 @@ public:
        bool  IsImplicitVr(void) { return ImplicitVr; };
        
        gdcmDictEntry * GetDictEntry(void) { return entry;    };
-       guint16 GetGroup(void)   { return entry->GetGroup();  };
-       guint16 GetElement(void) { return entry->GetElement();};
-       string  GetKey(void)     { return entry->GetKey();    };
-       string  GetName(void)    { return entry->GetName();   };
-       string  GetVR(void)      { return entry->GetVR();     };
-       void    SetVR(string v)  { entry->SetVR(v);           }; 
-       void SetLength(guint32 l){ LgrElem = l;               };
-       guint32 GetLength(void)  { return LgrElem;            };
+       guint16      GetGroup(void)   { return entry->GetGroup();  };
+       guint16      GetElement(void) { return entry->GetElement();};
+   std::string  GetKey(void)     { return entry->GetKey();    };
+   std::string  GetName(void)    { return entry->GetName();   };
+   std::string  GetVR(void)      { return entry->GetVR();     };
+       void         SetVR(std::string v)  { entry->SetVR(v);      }; 
+       void         SetLength(guint32 l){ LgrElem = l;            };
+       guint32      GetLength(void)  { return LgrElem;            };
        
-       void SetValue(string val){ value = val; };
-       string  GetValue(void)   { return value;};
+       void         SetValue(std::string val){ value = val; };
+   std::string  GetValue(void)    { return value;};
 
        size_t  GetOffset(void)  { return Offset;};
 };
index 1d0192c3cbe8b4288b6db399c139974ea7f511b1..f347b6aff78a23220c6a97d2ea8d59798bc09709 100644 (file)
 #define GDCM_EXCEPTION_H
 
 #include <string>
-#ifdef _MSC_VER
-using namespace std;  // string type lives in the std namespace on VC++
-#endif
-
 #include <iostream>
 #include <exception>
-using namespace std;
-
-#ifdef _MSC_VER
-#define GDCM_EXPORT __declspec( dllexport )
-#else
-#define GDCM_EXPORT
-#endif
+#include "gdcmCommon.h"
 
 /**
  * Any exception thrown in the gdcm library
@@ -36,9 +26,9 @@ using namespace std;
 class GDCM_EXPORT gdcmException : public exception {
  protected:
   /// error message
-  string from;
+  std::string from;
   /// error message
-  string error;
+  std::string error;
 
  public:
   /**
@@ -48,7 +38,7 @@ class GDCM_EXPORT gdcmException : public exception {
    * @param from name of the thrower
    * @param error error description string
    */
-  explicit gdcmException(const string &from, const string &error = "")
+  explicit gdcmException(const std::string &from, const std::string &error = "")
     throw();
   
 
@@ -59,7 +49,7 @@ class GDCM_EXPORT gdcmException : public exception {
   }
   
   /// returns error message
-  const string &getError(void) const throw() {
+  const std::string &getError(void) const throw() {
     return error;
   }
 
@@ -76,9 +66,9 @@ class GDCM_EXPORT gdcmException : public exception {
   static void fatal(const char *from) throw();
 
   /// try to discover this (dynamic) class name
-  virtual string getName() const throw();
+  virtual std::string getName() const throw();
 
-  friend ostream& operator<<(ostream &os, const gdcmException &e);
+  friend std::ostream& operator<<(std::ostream &os, const gdcmException &e);
   
 };
 
@@ -103,15 +93,13 @@ class GDCM_EXPORT gdcmFileError : public gdcmException {
    * @param from name of the thrower
    * @param error error description string
    */
-  explicit gdcmFileError(const string &from,
-                        const string &error = "File error")
+  explicit gdcmFileError(const std::string &from,
+                        const std::string &error = "File error")
     throw() : gdcmException(from, error) {
   }
 };
 
 
-
-
 /**
  * Invalid file format exception
  */
@@ -124,8 +112,8 @@ class GDCM_EXPORT gdcmFormatError : public gdcmException {
    * @param from name of the thrower
    * @param error error description string
    */
-  explicit gdcmFormatError(const string &from,
-                          const string &error = "Invalid file format error")
+  explicit gdcmFormatError(const std::string &from,
+                          const std::string &error = "Invalid file format error")
     throw() : gdcmException(from, error) {
   }
 };
index 89d038eecdacfc981381c74cb8be0cf86b5581f1..6bcd20673ec6a344c3f8969291b580efcb0e2091 100644 (file)
@@ -17,13 +17,13 @@ private:
        void* PixelData;
        size_t lgrTotale;
        int Parsed;          // weather allready parsed
-       string OrigFileName; // To avoid file overwrite
+   std::string OrigFileName; // To avoid file overwrite
    void SwapZone(void* im, int swap, int lgr, int nb);
    bool ReadPixelData(void * destination);
 protected:
-   int WriteBase(string FileName, FileType type);
+   int WriteBase(std::string FileName, FileType type);
 public:
-       gdcmFile(string & filename);
+       gdcmFile(std::string & filename);
        gdcmFile(const char * filename);
        
        // For promotion (performs a deepcopy of pointed header object)
@@ -31,9 +31,9 @@ public:
        // TODO Swig ~gdcmFile();
 
        // On writing purposes. When instance was created through
-       // gdcmFile(string filename) then the filename argument MUST be different
-       // from the constructor's one (no overwriting allowed).
-       // TODO Swig int SetFileName(string filename);
+       // gdcmFile(std::string filename) then the filename argument MUST be
+   // different from the constructor's one (no overwriting allowed).
+       // TODO Swig int SetFileName(std::string filename);
 
    void   SetPixelDataSizeFromHeader(void);
        size_t GetImageDataSize();
@@ -59,11 +59,11 @@ public:
        // Aucun test n'est fait sur l'"Endiannerie" du processeur.
        // Ca sera à l'utilisateur d'appeler son Reader correctement
                
-       int WriteRawData        (string nomFichier);
-       int WriteDcmImplVR(string nomFichier);
+       int WriteRawData        (std::string nomFichier);
+       int WriteDcmImplVR(std::string nomFichier);
        int WriteDcmImplVR(const char * nomFichier);
-       int WriteDcmExplVR(string nomFichier);
-       int WriteAcr            (string nomFichier);
+       int WriteDcmExplVR(std::string nomFichier);
+       int WriteAcr            (std::string nomFichier);
 };
 
 #endif
index 002aed724d6b6b5b27e84427cb6fc68248b9dc44..48ebc838cdc147dde91f50c9acb648e5ebe91f52 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.65 2003/05/12 14:32:43 frog Exp $
+// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.66 2003/05/21 14:42:46 frog Exp $
 
 #include <stdio.h>
 #include <cerrno>
@@ -12,6 +12,7 @@
 #include <sstream>
 #include "gdcmUtil.h"
 #include "gdcmHeader.h"
+using namespace std;
 
 // Refer to gdcmHeader::CheckSwap()
 #define HEADER_LENGTH_TO_READ       256
index ae885cf8bf676eeba087465e7a5e93c3bd782127..a634e1f56a425eeeb997548e4ed7264499e4698f 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.23 2003/05/12 14:32:43 frog Exp $
+// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.24 2003/05/21 14:42:46 frog Exp $
 
 #ifndef GDCMHEADER_H
 #define GDCMHEADER_H
@@ -11,9 +11,9 @@
 #include "gdcmElValue.h"
 #include "gdcmElValSet.h"
 
-typedef string VRKey;
-typedef string VRAtr;
-typedef map<VRKey, VRAtr> VRHT;    // Value Representation Hash Table
+typedef std::string VRKey;
+typedef std::string VRAtr;
+typedef std::map<VRKey, VRAtr> VRHT;    // Value Representation Hash Table
 
 /// The purpose of an instance of gdcmHeader is to act as a container of
 /// all the DICOM elements and their corresponding values (and
@@ -51,7 +51,7 @@ private:
    /// ELement VALueS parsed with the SHAdow dictionary.
    gdcmElValSet ShaElValSet;
    /// Refering underlying filename.
-   string filename; 
+   std::string filename; 
    
    // FIXME sw should be an enum e.g.
    //enum EndianType {
@@ -76,16 +76,17 @@ private:
    void CheckSwap(void);
    void SwitchSwapToBigEndian(void);
    // CLEAN ME: NewManualElValToPubDict is NOT called any more.
-   gdcmElValue*  NewManualElValToPubDict(string NewTagName, string VR);
+   gdcmElValue*  NewManualElValToPubDict(std::string NewTagName,
+                                         std::string VR);
    void SetMaxSizeLoadElementValue(long);
 
    gdcmDictEntry * GetDictEntryByNumber(guint16, guint16);
-   gdcmDictEntry * GetDictEntryByName(string name);
+   gdcmDictEntry * GetDictEntryByName(std::string name);
 
    // ElValue related utilities
    gdcmElValue * ReadNextElement(void);
    gdcmElValue * NewElValueByNumber(guint16 group, guint16 element);
-   gdcmElValue * NewElValueByName(string name);
+   gdcmElValue * NewElValueByName(std::string name);
 
    void FindLength(gdcmElValue *);
    void FindVR(gdcmElValue *);
@@ -130,43 +131,43 @@ public:
    size_t GetPixelOffset(void);
    int    GetSwapCode(void) { return sw; }
 
-   // TODO Swig int SetPubDict(string filename);
+   // TODO Swig int SetPubDict(std::string filename);
    // When some proprietary shadow groups are disclosed, we can set up
    // an additional specific dictionary to access extra information.
-   // TODO Swig int SetShaDict(string filename);
+   // TODO Swig int SetShaDict(std::string filename);
 
-   string GetPubElValByName(string TagName);
-   string GetPubElValByNumber(guint16 group, guint16 element);
-   string GetPubElValRepByName(string TagName);
-   string GetPubElValRepByNumber(guint16 group, guint16 element);
+   std::string GetPubElValByName(std::string TagName);
+   std::string GetPubElValByNumber(guint16 group, guint16 element);
+   std::string GetPubElValRepByName(std::string TagName);
+   std::string GetPubElValRepByNumber(guint16 group, guint16 element);
 
    TagElValueHT & GetPubElVal(void) { return PubElValSet.GetTagHt(); };
    void   PrintPubElVal(ostream & os = cout);
    void   PrintPubDict (ostream & os = cout);
      
-   // TODO Swig string* GetShaTagNames(); 
-   string GetShaElValByName(string TagName);
-   string GetShaElValByNumber(guint16 group, guint16 element);
-   string GetShaElValRepByName(string TagName);
-   string GetShaElValRepByNumber(guint16 group, guint16 element);
-
-   string GetElValByName(string TagName);
-   string GetElValByNumber(guint16 group, guint16 element);
-   string GetElValRepByName(string TagName);
-   string GetElValRepByNumber(guint16 group, guint16 element);
-
-   int SetPubElValByName(string content, string TagName);
-   int SetPubElValByNumber(string content, guint16 group, guint16 element);
-   int SetShaElValByName(string content, string ShadowTagName);
-   int SetShaElValByNumber(string content, guint16 group, guint16 element);
+   // TODO Swig std::string* GetShaTagNames(); 
+   std::string GetShaElValByName(std::string TagName);
+   std::string GetShaElValByNumber(guint16 group, guint16 element);
+   std::string GetShaElValRepByName(std::string TagName);
+   std::string GetShaElValRepByNumber(guint16 group, guint16 element);
+
+   std::string GetElValByName(std::string TagName);
+   std::string GetElValByNumber(guint16 group, guint16 element);
+   std::string GetElValRepByName(std::string TagName);
+   std::string GetElValRepByNumber(guint16 group, guint16 element);
+
+   int SetPubElValByName(std::string content, std::string TagName);
+   int SetPubElValByNumber(std::string content, guint16 group, guint16 element);
+   int SetShaElValByName(std::string content, std::string ShadowTagName);
+   int SetShaElValByNumber(std::string content, guint16 group, guint16 element);
    
    int SetPubElValLengthByNumber(guint32 lgr, guint16 group, guint16 element);                                   
-   int ReplaceOrCreateByNumber(string Value, guint16 Group, guint16 Elem);                                
+   int ReplaceOrCreateByNumber(std::string Value, guint16 Group, guint16 Elem);                                
    int GetXSize(void);  
    int GetYSize(void);
    int GetZSize(void);       
    int GetPixelSize(void);       
-   string GetPixelType(void);  
+   std::string GetPixelType(void);  
    int Write(FILE *, FileType);
    
 };
index 207b66f13351b1d435182b411c09947c9838565c..54c2a4766008b285921aededc05582bc66004de8 100644 (file)
@@ -1,4 +1,4 @@
-// gdcmUtil.cxx
+// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.10 2003/05/21 14:42:46 frog Exp $
 
 #include <ctype.h>   // For isspace
 #include "gdcmUtil.h"
index cb9dcbd389ea8a9407a4fad58bb2f4bd799c6b3b..e00e8934f71e24994abad4fb2ac3d6931d974c33 100644 (file)
@@ -1,4 +1,4 @@
-// gdcmUtil.h
+// $Header: /cvs/public/gdcm/src/gdcmUtil.h,v 1.9 2003/05/21 14:42:46 frog Exp $
 
 #ifndef GDCMUTIL_H
 #define GDCMUTIL_H
@@ -8,7 +8,6 @@
 #include <string>
 #include "gdcmVR.h"
 #include "gdcmDictSet.h"
-using namespace std;
 
 class gdcmDebug {
 private:
@@ -35,9 +34,9 @@ public:
 
 istream & eatwhite(istream & is);
 
-void Tokenize (const string& str,
-               vector<string>& tokens,
-               const string& delimiters = " ");
+void Tokenize (const std::string& str,
+               std::vector<std::string>& tokens,
+               const std::string& delimiters = " ");
 
 extern gdcmDebug dbg;
 
index db5869a0301f5ac335ab82652bae218a2c38a437..68d7fee3940e5c6fb979329bfba7011fb530db3a 100644 (file)
@@ -7,9 +7,9 @@
 #include <string>
 #include "gdcmCommon.h"
 
-typedef string VRKey;
-typedef string VRAtr;
-typedef map<VRKey, VRAtr> VRHT;    // Value Representation Hash Table
+typedef std::string VRKey;
+typedef std::string VRAtr;
+typedef std::map<VRKey, VRAtr> VRHT;    // Value Representation Hash Table
 
 /// Container for dicom Value Representation Hash Table
 /// \note   This is a singleton