]> Creatis software - gdcm.git/commitdiff
* src/gdcmDicomDir.cxx : simplify the NewPatient method, like made in
authorregrain <regrain>
Thu, 20 Jan 2005 11:33:43 +0000 (11:33 +0000)
committerregrain <regrain>
Thu, 20 Jan 2005 11:33:43 +0000 (11:33 +0000)
     gdcm::DicomDirPatient, gdcm::DicomDirStudy, gdcm::DicomDirSerie
   -- BeNours

ChangeLog
src/gdcmDicomDir.cxx

index bd622b9bdd1afaef1b9ad826d726c1adbcbcdfdc..7f28371734c1eb9a32840a9318c974ae8e6bfd11 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-01-20 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+   * src/gdcmDicomDir.cxx : simplify the NewPatient method, like made in
+     gdcm::DicomDirPatient, gdcm::DicomDirStudy, gdcm::DicomDirSerie
+
 2005-01-20 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
    * src/gdcmSQItem[h|cxx] : rename some methods to have coherent names
 
index 4d2973c9d95b9d61bd2a1ee8f128401ff57f6168..7dd1f1f3418aba02120419ccd0e5662528e4a5f4 100644 (file)
@@ -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;