2 //-----------------------------------------------------------------------------
9 # define PUB_DICT_PATH "../Dicts/"
11 #define DICT_TS "dicomTS.dic"
14 #ifdef GDCM_NO_ANSI_STRING_STREAM
16 # define ostringstream ostrstream
21 //-----------------------------------------------------------------------------
22 // Constructor / Destructor
25 std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_TS);
26 std::ifstream from(filename.c_str());
27 dbg.Error(!from, "gdcmTS::gdcmTS: can't open dictionary",filename.c_str());
35 from.getline(buff, 1024, ' ');
40 key.resize(key.size()+1);
45 from.getline(buff, 1024, '\n');
61 //-----------------------------------------------------------------------------
66 * @param os The output stream to be written to.
68 void gdcmTS::Print(std::ostream &os)
72 for (TSHT::iterator it = ts.begin(); it != ts.end(); ++it)
74 s << "TS : "<<it->first<<" = "<<it->second<<std::endl;
79 //-----------------------------------------------------------------------------
81 int gdcmTS::Count(TSKey key)
86 std::string gdcmTS::GetValue(TSKey key)
88 if (ts.count(key) == 0)
89 return (GDCM_UNFOUND);
93 //-----------------------------------------------------------------------------
96 //-----------------------------------------------------------------------------
99 //-----------------------------------------------------------------------------