X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDefaultDicts.cxx.in;h=f7657fa9809f5ce0c54a5ba014535832d2e90303;hb=3e43ec6a47d9de1276cf23e0dc9ef6d73640f451;hp=58649c6e7a7642a3a37ed721bdacd957d3d17ab0;hpb=93748f382dadb5c9240c4156ce7bbe9dcc8da44f;p=gdcm.git diff --git a/src/gdcmDefaultDicts.cxx.in b/src/gdcmDefaultDicts.cxx.in index 58649c6e..f7657fa9 100644 --- a/src/gdcmDefaultDicts.cxx.in +++ b/src/gdcmDefaultDicts.cxx.in @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDefaultDicts.cxx.in,v $ Language: C++ - Date: $Date: 2005/01/20 17:15:54 $ - Version: $Revision: 1.6 $ + Date: $Date: 2005/02/09 21:37:11 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -48,7 +48,7 @@ void FillDefaultDataDict(Dict *d) while( n.name != 0 ) { const DictEntry e( n.group, n.element, n.vr, n.vm, n.name); - d->AddNewEntry( e ); + d->AddEntry( e ); n = datadir[++i]; } } @@ -81,18 +81,21 @@ void FillDefaultDIRDict(DicomDirElement *dde) ELEMENT e = dataElement[i]; Element elem; DicomDirType type; + std::string strType; while( e.type != 0 ) { - if( e.type == "metaElem" ) + // Force to use the string comparision operator == + strType = e.type; + if( strType == "metaElem" ) type = DD_META; - else if( e.type == "patientElem" ) + else if( strType == "patientElem" ) type = DD_PATIENT; - else if( e.type == "studyElem" ) + else if( strType == "studyElem" ) type = DD_STUDY; - else if( e.type == "serieElem" ) + else if( strType == "serieElem" ) type = DD_SERIE; - else if( e.type == "imageElem" ) + else if( strType == "imageElem" ) type = DD_IMAGE; else type = DD_UNKNOWN; @@ -100,7 +103,7 @@ void FillDefaultDIRDict(DicomDirElement *dde) elem.Group = e.group; elem.Elem = e.element; elem.Value = e.value; - dde->AddNewEntry( type, elem); + dde->AddEntry( type, elem); e = dataElement[++i]; } }