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
=========================================================================*/
-#include <fstream>
-
-#include <iostream>
-
#include "gdcmVR.h"
#include "gdcmUtil.h"
#include "gdcmDictSet.h"
#include "gdcmDebug.h"
+#include <fstream>
+#include <iostream>
+
//-----------------------------------------------------------------------------
/**
* \brief Constructor
*/
-gdcmVR::gdcmVR(void)
+gdcmVR::gdcmVR()
{
std::string filename=gdcmDictSet::BuildDictPath() + std::string(DICT_VR);
std::ifstream from(filename.c_str());
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!="")
from.close();
}
+//-----------------------------------------------------------------------------
/**
* \brief Destructor
*/
-gdcmVR::~gdcmVR() {
+gdcmVR::~gdcmVR()
+{
vr.clear();
}
return vr.count(key);
}
+//-----------------------------------------------------------------------------
/**
* \brief Simple predicate that checks wether the given argument
* corresponds to the Value Representation of a \ref gdcmBinEntry .
return true;
}
+//-----------------------------------------------------------------------------
/**
* \brief Simple predicate that checks wether the given argument
* corresponds to the Value Representation of a \ref gdcmValEntry