]> Creatis software - gdcm.git/blobdiff - src/gdcmDocEntry.cxx
ENH: * Huge cleanup:
[gdcm.git] / src / gdcmDocEntry.cxx
index 0777f253782b470407d8f10d41fad627c03d9926..fcd2db28b0edb4480db26844cacab23a6f81effd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/03 20:52:13 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2004/12/03 20:16:57 $
+  Version:   $Revision: 1.34 $
                                                                                 
   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"
 
@@ -43,6 +44,11 @@ DocEntry::DocEntry(DictEntry* in)
    DicomDict  = in;
    SetKey( in->GetKey( ) );
    Offset     = 0 ; // To avoid further missprinting
+
+   // init some variables
+   ReadLength = 0;
+   UsableLength = 0;
+   PrintLevel = 0;
 }
 
 //-----------------------------------------------------------------------------
@@ -57,15 +63,12 @@ void DocEntry::Print(std::ostream& os)
    PrintLevel = 2; // FIXME
    
    size_t o;
-   unsigned short int g, e;
    std::string st;
    TSKey v;
    std::string d2, vr;
    std::ostringstream s;
    uint32_t lgth;
 
-   g  = GetGroup();
-   e  = GetElement();
    o  = GetOffset();
    vr = GetVR();
 
@@ -118,7 +121,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();
@@ -244,7 +247,7 @@ uint32_t DocEntry::GetFullLength()
  */
 void DocEntry::Copy (DocEntry* e)
 {
-   DicomDict    = e->DicomDict;
+//   DicomDict    = e->DicomDict;
    UsableLength = e->UsableLength;
    ReadLength   = e->ReadLength;
    ImplicitVR   = e->ImplicitVR;