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, ' ');
41 from.getline(buff, 1024, '\n');
57 //-----------------------------------------------------------------------------
62 * @param os The output stream to be written to.
64 void gdcmTS::Print(std::ostream &os)
68 for (TSHT::iterator it = ts.begin(); it != ts.end(); ++it)
70 s << "TS : "<<it->first<<" = "<<it->second<<std::endl;
75 //-----------------------------------------------------------------------------
77 int gdcmTS::Count(TSKey key)
82 std::string gdcmTS::GetValue(TSKey key)
84 if (ts.count(key) == 0)
85 return (GDCM_UNFOUND);
89 //-----------------------------------------------------------------------------
92 //-----------------------------------------------------------------------------
95 //-----------------------------------------------------------------------------