X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirElement.cxx;h=f719d3c89af6e928a3e8a2a07b8762d347ba1934;hb=03acf3c119c6657129b8aeae8cb2205e481a105b;hp=65c05e51bb310f54670e428f642a84bc30cd3b7f;hpb=616fe6757e5e27ce6ebb48e9e3bf3b42ab15be1c;p=gdcm.git diff --git a/src/gdcmDicomDirElement.cxx b/src/gdcmDicomDirElement.cxx index 65c05e51..f719d3c8 100644 --- a/src/gdcmDicomDirElement.cxx +++ b/src/gdcmDicomDirElement.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.cxx,v $ Language: C++ - Date: $Date: 2004/11/03 18:08:56 $ - Version: $Revision: 1.21 $ + Date: $Date: 2005/01/06 20:03:26 $ + Version: $Revision: 1.23 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -57,9 +57,9 @@ DicomDirElement::DicomDirElement() from.getline(buff, 1024, ' '); type = buff; - if( (type=="metaElem") || (type=="patientElem") || - (type=="studyElem") || (type=="serieElem") || - (type=="imageElem") ) + if( type == "metaElem" || type == "patientElem" || + type == "studyElem" || type == "serieElem" || + type == "imageElem" ) { from >> std::hex >> elem.Group >> elem.Elem; @@ -68,18 +68,12 @@ DicomDirElement::DicomDirElement() from >> std::ws; from.getline(buff, 1024, '"'); elem.Value = buff; - + AddNewEntry(type, elem); } - else - { - dbg.Error("DicomDirElement::DicomDirElement: Error parsing file", - filename.c_str()); - dbg.Error("Type", type.c_str(), " is not registered as valid" ); - } from.getline(buff, 1024, '\n'); } - from.close(); + from.close(); } } @@ -152,8 +146,8 @@ void DicomDirElement::Print(std::ostream &os) //----------------------------------------------------------------------------- // Public -bool DicomDirElement::AddNewEntry(std::string const & type, - Element const & elem) +bool DicomDirElement::AddNewEntry(std::string const &type, + Element const &elem) { if( type == "metaElem" ) {