2 //-----------------------------------------------------------------------------
6 #ifdef GDCM_NO_ANSI_STRING_STREAM
8 # define ostringstream ostrstream
14 #include "gdcmDebug.h"
16 #include "gdcmDictSet.h"
19 # define PUB_DICT_PATH "../Dicts/"
21 #define DICT_TS "dicomTS.dic"
24 //-----------------------------------------------------------------------------
25 // Constructor / Destructor
28 std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_TS);
29 std::ifstream from(filename.c_str());
30 dbg.Error(!from, "gdcmTS::gdcmTS: can't open dictionary",filename.c_str());
38 from.getline(buff, 1024, ' ');
42 from.getline(buff, 1024, '\n');
58 //-----------------------------------------------------------------------------
63 * @param os The output stream to be written to.
65 void gdcmTS::Print(std::ostream &os)
69 for (TSHT::iterator it = ts.begin(); it != ts.end(); ++it)
71 s << "TS : "<<it->first<<" = "<<it->second<<std::endl;
76 //-----------------------------------------------------------------------------
78 int gdcmTS::Count(TSKey key)
83 std::string gdcmTS::GetValue(TSKey key)
85 if (ts.count(key) == 0)
86 return (GDCM_UNFOUND);
90 //-----------------------------------------------------------------------------
93 //-----------------------------------------------------------------------------
96 //-----------------------------------------------------------------------------