]> Creatis software - gdcm.git/blobdiff - src/gdcmBinEntry.cxx
English typo
[gdcm.git] / src / gdcmBinEntry.cxx
index 3f2325e39bdac0d58f0ce7759df9b88394b1c41b..3e150aaa6326f89ff05803af19ca2cd87f59c402 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/08/25 13:45:40 $
-  Version:   $Revision: 1.73 $
+  Date:      $Date: 2005/08/29 13:05:01 $
+  Version:   $Revision: 1.75 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -156,10 +156,32 @@ void BinEntry::Print(std::ostream &os, std::string const & )
             }
             s << "]";
       }
-      else
+      else if ( GetVR() == "FD" )
       {
-         s << " [" << GetValue()
-           << "; length = " << GetLength() << "]";
+         int l = GetReadLength()/8 - 1;
+         double *beg = (double *)GetBinArea();
+         s << " [" << *beg;
+         if ( l!= 0)
+            for (int i=0;i<l;i++)
+            {
+               beg++;
+               s << "\\" << *beg;
+            }
+            s << "]";
+      }
+      else
+      { 
+         if ( Util::IsCleanArea( GetBinArea(),GetLength()  ) )
+         {
+            std::string cleanString = 
+                   Util::CreateCleanString( GetBinArea(),GetLength()  );
+            s << " [" << cleanString << "]";
+         }
+         else
+         {
+            s << " [" << GetValue()
+              << "; length = " << GetLength() << "]";
+         } 
       }
    }
    else