]> Creatis software - gdcm.git/blobdiff - src/gdcmDocEntry.cxx
* src/gdcmCommon.h : add the GDCM_UNKNOWN constant. This constant is to
[gdcm.git] / src / gdcmDocEntry.cxx
index 9a1f41123adeb8caf68f83b6505fcc22357138d8..6ada3fad82bedaa863be4935606edd7ae17947ae 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/19 18:49:39 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2005/01/05 15:38:28 $
+  Version:   $Revision: 1.36 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -18,6 +18,7 @@
 
 #include "gdcmDocEntry.h"
 #include "gdcmTS.h"
+#include "gdcmVR.h"
 #include "gdcmGlobal.h"
 #include "gdcmUtil.h"
 
@@ -47,7 +48,6 @@ DocEntry::DocEntry(DictEntry* in)
    // init some variables
    ReadLength = 0;
    UsableLength = 0;
-   PrintLevel = 0;
 }
 
 //-----------------------------------------------------------------------------
@@ -59,8 +59,6 @@ DocEntry::DocEntry(DictEntry* in)
  */
 void DocEntry::Print(std::ostream& os)
 {
-   PrintLevel = 2; // FIXME
-   
    size_t o;
    std::string st;
    TSKey v;
@@ -120,7 +118,7 @@ void DocEntry::Print(std::ostream& os)
  * @param fp already open file pointer
  * @param filetype type of the file to be written
  */
-void DocEntry::Write(std::ofstream* fp, FileType filetype)
+void DocEntry::WriteContent(std::ofstream* fp, FileType filetype)
 {
    uint32_t ffff  = 0xffffffff;
    uint16_t group = GetGroup();
@@ -165,7 +163,7 @@ void DocEntry::Write(std::ofstream* fp, FileType filetype)
       uint16_t z = 0;
       uint16_t shortLgr = lgr;
 
-      if (vr == "unkn")
+      if (vr == GDCM_UNKNOWN)
       {
          // Unknown was 'written'
          // deal with Little Endian            
@@ -251,7 +249,6 @@ void DocEntry::Copy (DocEntry* e)
    ReadLength   = e->ReadLength;
    ImplicitVR   = e->ImplicitVR;
    Offset       = e->Offset;
-   PrintLevel   = e->PrintLevel;
    // TODO : remove DocEntry SQDepth
 }