]> Creatis software - gdcm.git/blobdiff - src/gdcmDict.cxx
* src/gdcmDictSet.h : set the method BuildDictPath in public
[gdcm.git] / src / gdcmDict.cxx
index 2b8dff9e2b58fa2e9b86696cd694b6ecbcf99272..25de9bba0d7bd277b6c53caa0bc34d37a1c6893a 100644 (file)
@@ -1,9 +1,8 @@
 // gdcmDict.cxx
 
-#include <fstream>
 #include "gdcmDict.h"
 #include "gdcmUtil.h"
-using namespace std;
+#include <fstream>
 
 /**
  * \ingroup gdcmDict
@@ -21,6 +20,7 @@ gdcmDict::gdcmDict(std::string & FileName) {
    TagName vr;
    TagName fourth;
    TagName name;
+
    while (!from.eof()) {
       from >> std::hex >> group >> element;
       eatwhite(from);
@@ -32,7 +32,7 @@ gdcmDict::gdcmDict(std::string & FileName) {
       from.getline(buff, 256, '\n');
       name = buff;
       gdcmDictEntry * newEntry = new gdcmDictEntry(group, element,
-                                                        vr, fourth, name);
+                                                  vr, fourth, name);
       // FIXME: use AddNewEntry
       NameHt[name] = newEntry;
       KeyHt[gdcmDictEntry::TranslateToKey(group, element)] = newEntry;
@@ -75,11 +75,11 @@ void gdcmDict::Print(std::ostream& os) {
 void gdcmDict::PrintByKey(std::ostream& os) {
    for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag){
       os << "Tag : ";
-      os << "(" << hex << tag->second->GetGroup() << ',';
-      os << hex << tag->second->GetElement() << ") = " << dec;
+      os << "(" << std::hex << tag->second->GetGroup() << ',';
+      os << std::hex << tag->second->GetElement() << ") = " << std::dec;
       os << tag->second->GetVR() << ", ";
       os << tag->second->GetFourth() << ", ";
-      os << tag->second->GetName() << "."  << endl;
+      os << tag->second->GetName() << "."  << std::endl;
    }
 }
 
@@ -96,7 +96,7 @@ void gdcmDict::PrintByName(std::ostream& os) {
       os << tag->second->GetVR() << ", ";
       os << tag->second->GetFourth() << ", ";
       os << "(" << std::hex << tag->second->GetGroup() << ',';
-      os << std::hex << tag->second->GetElement() << ") = " << dec << std::endl;
+      os << std::hex << tag->second->GetElement() << ") = " << std::dec << std::endl;
    }
 }