1 /*=========================================================================
4 Module: $RCSfile: gdcmTS.cxx,v $
6 Date: $Date: 2004/07/19 15:16:19 $
7 Version: $Revision: 1.23 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
24 #include "gdcmDebug.h"
26 #include "gdcmDictSet.h"
30 //-----------------------------------------------------------------------------
31 // Constructor / Destructor
34 std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_TS);
35 std::ifstream from(filename.c_str());
36 dbg.Error(!from, "gdcmTS::gdcmTS: can't open dictionary",filename.c_str());
45 std::getline(from, name); /// MEMORY LEAK
60 //-----------------------------------------------------------------------------
65 * @param os The output stream to be written to.
67 void gdcmTS::Print(std::ostream &os)
71 for (TSHT::iterator it = ts.begin(); it != ts.end(); ++it)
73 s << "TS : "<<it->first<<" = "<<it->second<<std::endl;
78 //-----------------------------------------------------------------------------
80 int gdcmTS::Count(TSKey key)
85 std::string gdcmTS::GetValue(TSKey key)
87 if (ts.count(key) == 0)
92 //-----------------------------------------------------------------------------
95 //-----------------------------------------------------------------------------
98 //-----------------------------------------------------------------------------