]> Creatis software - gdcm.git/blobdiff - src/gdcmValEntry.cxx
Update ChangeLog
[gdcm.git] / src / gdcmValEntry.cxx
index 270fdd3a047f92553a2f3d5681ed19b14691c87d..6c10af843efc49b02aa7abf87c35f407a9df0b8e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/07 13:39:33 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2004/12/16 13:46:38 $
+  Version:   $Revision: 1.41 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -51,7 +51,6 @@ ValEntry::ValEntry(DocEntry* e)
    ReadLength   = e->GetReadLength();
    ImplicitVR   = e->IsImplicitVR();
    Offset       = e->GetOffset();
-   PrintLevel   = e->GetPrintLevel();
 }
 
 
@@ -188,13 +187,22 @@ void ValEntry::SetValue(std::string const & val)
       {
          // for multivaluated items
          l = (Util::CountSubstring(val, "\\") + 1) * 2;
+         SetValueOnly(val);
       }
       else if( vr == "UL" || vr == "SL" )
       {
          // for multivaluated items
          l = (Util::CountSubstring(val, "\\") + 1) * 4;;
+         SetValueOnly(val);
+      }
+      else
+      {
+         std::string finalVal = Util::DicomString( val.c_str() );
+         assert( !(finalVal.size() % 2) );
+
+         l = finalVal.length();
+         SetValueOnly(finalVal);
       }
-      SetValueOnly(val);
    }
    else
    {