From: regrain Date: Thu, 20 Jan 2005 11:33:43 +0000 (+0000) Subject: * src/gdcmDicomDir.cxx : simplify the NewPatient method, like made in X-Git-Tag: Version1.0.bp~238 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4232b5a5f55d15830b02d9639ef6b6f9cc267a5d;p=gdcm.git * src/gdcmDicomDir.cxx : simplify the NewPatient method, like made in gdcm::DicomDirPatient, gdcm::DicomDirStudy, gdcm::DicomDirSerie -- BeNours --- diff --git a/ChangeLog b/ChangeLog index bd622b9b..7f283717 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-01-20 Benoit Regrain + * src/gdcmDicomDir.cxx : simplify the NewPatient method, like made in + gdcm::DicomDirPatient, gdcm::DicomDirStudy, gdcm::DicomDirSerie + 2005-01-20 Benoit Regrain * src/gdcmSQItem[h|cxx] : rename some methods to have coherent names diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 4d2973c9..7dd1f1f3 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/01/20 11:26:17 $ - Version: $Revision: 1.109 $ + Date: $Date: 2005/01/20 11:33:44 $ + Version: $Revision: 1.110 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -501,27 +501,10 @@ DicomDirMeta * DicomDir::NewMeta() */ DicomDirPatient *DicomDir::NewPatient() { - ListDicomDirPatientElem::const_iterator it; - uint16_t tmpGr,tmpEl; - DictEntry *dictEntry; - ValEntry *entry; - ListDicomDirPatientElem const & elemList = Global::GetDicomDirElements()->GetDicomDirPatientElements(); DicomDirPatient *p = new DicomDirPatient(); - - // for all the DicomDirPatient Elements - for( it = elemList.begin(); it != elemList.end(); ++it ) - { - tmpGr = it->Group; - tmpEl = it->Elem; - dictEntry = GetPubDict()->GetDictEntry(tmpGr, tmpEl); - entry = new ValEntry( dictEntry ); - entry->SetOffset(0); // just to avoid further missprinting - entry->SetValue( it->Value ); - - p->AddEntry( entry ); - } + p->FillObject(elemList); AddPatientToEnd( p ); return p;