X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDefaultDicts.cxx.in;h=62fdb4e3514f406ca137a63e3c24104a2749bc77;hb=fc4f7706c78baf3f60474c06d871b82db221f37b;hp=f7657fa9809f5ce0c54a5ba014535832d2e90303;hpb=2e8b7aefc1ceb791fe9c4db9a87b0f2866b316a8;p=gdcm.git diff --git a/src/gdcmDefaultDicts.cxx.in b/src/gdcmDefaultDicts.cxx.in index f7657fa9..62fdb4e3 100644 --- a/src/gdcmDefaultDicts.cxx.in +++ b/src/gdcmDefaultDicts.cxx.in @@ -1,19 +1,19 @@ /*========================================================================= - + Program: gdcm Module: $RCSfile: gdcmDefaultDicts.cxx.in,v $ Language: C++ - Date: $Date: 2005/02/09 21:37:11 $ - Version: $Revision: 1.8 $ - + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.13 $ + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. - + This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. - + =========================================================================*/ #ifndef GDCMDEFAULTDICTS_H @@ -23,9 +23,10 @@ #include "gdcmDictEntry.h" #include "gdcmTS.h" #include "gdcmVR.h" +#include "gdcmDictGroupName.h" #include "gdcmDicomDirElement.h" -namespace gdcm +namespace GDCM_NAME_SPACE { typedef struct @@ -43,31 +44,40 @@ static DICT_ENTRY datadir[] = { void FillDefaultDataDict(Dict *d) { + DictEntry *e; unsigned int i = 0; DICT_ENTRY n = datadir[i]; while( n.name != 0 ) { - const DictEntry e( n.group, n.element, n.vr, n.vm, n.name); + e = DictEntry::New( n.group, n.element, n.vr, n.vm, n.name); d->AddEntry( e ); + e->Delete(); n = datadir[++i]; } } -void FillDefaultTSDict(TSHT & ts) +void FillDefaultTSDict(TSHT &ts) { @DICOM_TS_DICTIONARY@ } -void FillDefaultVRDict(VRHT & vr) +void FillDefaultVRDict(VRHT &vr) { @DICOM_VR_DICTIONARY@ } +void FillDefaultDictGroupName(DictGroupNameHT &groupName) +{ +@DICT_GROUP_NAME_DICTIONARY@ +} + typedef struct { const char *type; unsigned short group; unsigned short element; + //VRKey vr; + const char *vr; const char *value; } ELEMENT; @@ -79,13 +89,13 @@ void FillDefaultDIRDict(DicomDirElement *dde) { unsigned int i = 0; ELEMENT e = dataElement[i]; - Element elem; + DicomElement elem; DicomDirType type; std::string strType; while( e.type != 0 ) { - // Force to use the string comparision operator == + // Force to use the string comparison operator == strType = e.type; if( strType == "metaElem" ) type = DD_META; @@ -102,6 +112,7 @@ void FillDefaultDIRDict(DicomDirElement *dde) elem.Group = e.group; elem.Elem = e.element; + elem.VR = e.vr; elem.Value = e.value; dde->AddEntry( type, elem); e = dataElement[++i];