X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmVR.cxx;h=4cc07ea90e32e005e658d7ec3aff2bee6a5d2778;hb=3370a8090c600a3d4dbe5573a62d1dddb59819f2;hp=596ac9ee37a958771c2c8958ca9983ae55755f46;hpb=fd37aa842b5d31ca266b6bda8a77f3201d02338d;p=gdcm.git diff --git a/src/gdcmVR.cxx b/src/gdcmVR.cxx index 596ac9ee..4cc07ea9 100644 --- a/src/gdcmVR.cxx +++ b/src/gdcmVR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmVR.cxx,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:08 $ - Version: $Revision: 1.17 $ + Date: $Date: 2004/10/08 04:43:38 $ + Version: $Revision: 1.18 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -16,20 +16,19 @@ =========================================================================*/ -#include - -#include - #include "gdcmVR.h" #include "gdcmUtil.h" #include "gdcmDictSet.h" #include "gdcmDebug.h" +#include +#include + //----------------------------------------------------------------------------- /** * \brief Constructor */ -gdcmVR::gdcmVR(void) +gdcmVR::gdcmVR() { std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_VR); std::ifstream from(filename.c_str()); @@ -41,14 +40,14 @@ gdcmVR::gdcmVR(void) while (!from.eof()) { - eatwhite(from); + from >> std::ws; // used to be eatwhite(from); from.getline(buff, 1024, ' '); key = buff; - eatwhite(from); + from >> std::ws; // used to be eatwhite(from); from.getline(buff, 1024, ';'); name = buff; - eatwhite(from); + from >> std::ws; // used to be eatwhite(from); from.getline(buff, 1024, '\n'); if(key!="") @@ -59,10 +58,12 @@ gdcmVR::gdcmVR(void) from.close(); } +//----------------------------------------------------------------------------- /** * \brief Destructor */ -gdcmVR::~gdcmVR() { +gdcmVR::~gdcmVR() +{ vr.clear(); } @@ -94,6 +95,7 @@ int gdcmVR::Count(gdcmVRKey key) return vr.count(key); } +//----------------------------------------------------------------------------- /** * \brief Simple predicate that checks wether the given argument * corresponds to the Value Representation of a \ref gdcmBinEntry . @@ -124,6 +126,7 @@ bool gdcmVR::IsVROfGdcmBinaryRepresentable(gdcmVRKey tested) return true; } +//----------------------------------------------------------------------------- /** * \brief Simple predicate that checks wether the given argument * corresponds to the Value Representation of a \ref gdcmValEntry