2 //-----------------------------------------------------------------------------
6 #ifdef GDCM_NO_ANSI_STRING_STREAM
8 # define ostringstream ostrstream
15 #include "gdcmDictSet.h"
16 #include "gdcmDebug.h"
19 # define PUB_DICT_PATH "../Dicts/"
21 #define DICT_VR "dicomVR.dic"
23 //-----------------------------------------------------------------------------
29 std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_VR);
30 std::ifstream from(filename.c_str());
31 dbg.Error(!from, "gdcmVR::gdcmVR: can't open dictionary",filename.c_str());
40 from.getline(buff, 1024, ' ');
43 from.getline(buff, 1024, ';');
47 from.getline(buff, 1024, '\n');
64 //-----------------------------------------------------------------------------
69 * @param os The output stream to be written to.
71 void gdcmVR::Print(std::ostream &os)
75 for (VRHT::iterator it = vr.begin(); it != vr.end(); ++it)
77 s << "VR : "<<it->first<<" = "<<it->second<<std::endl;
82 //-----------------------------------------------------------------------------
86 * \brief Get the count for an element
87 * @param key key to count
89 int gdcmVR::Count(VRKey key)
94 //-----------------------------------------------------------------------------
97 //-----------------------------------------------------------------------------
100 //-----------------------------------------------------------------------------