]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDirObject.cxx
Update ChangeLog
[gdcm.git] / src / gdcmDicomDirObject.cxx
index 882b8a2f3c7efb176b9e869575f61d26903a4cc7..1d3d8ce28a85857c1cd81a72b6592ad23ad62b90 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirObject.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 17:13:18 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2004/12/07 13:39:33 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -20,6 +20,8 @@
 #include "gdcmGlobal.h"
 #include "gdcmDebug.h"
 #include "gdcmValEntry.h"
+#include "gdcmDictSet.h"
+
 namespace gdcm 
 {
 
@@ -97,29 +99,7 @@ void DicomDirObject::FillObject(ListDicomDirMetaElem const & elemList)
       entry->SetOffset(0); // just to avoid further missprinting
       entry->SetValue(it->Value);
 
-      // dealing with value length ...
-  
-      if(dictEntry->GetGroup()==0xfffe) 
-      {
-         entry->SetLength(entry->GetValue().length());
-      }
-      else if( dictEntry->GetVR() == "UL" || dictEntry->GetVR() == "SL" ) 
-      {
-         entry->SetLength(4);
-      } 
-      else if( dictEntry->GetVR() == "US" || dictEntry->GetVR() == "SS" ) 
-      {
-         entry->SetLength(2); 
-      } 
-      else if( dictEntry->GetVR() == "SQ" )
-      {
-         entry->SetLength(0xffffffff);
-      }
-      else
-      {
-         entry->SetLength(entry->GetValue().length()); 
-      }                                
-      AddDocEntry(entry);
+      AddEntry(entry);
    }   
 }   
 } // end namespace gdcm