]> Creatis software - gdcm.git/commitdiff
Add comments
authorjpr <jpr>
Fri, 17 Jun 2005 12:36:07 +0000 (12:36 +0000)
committerjpr <jpr>
Fri, 17 Jun 2005 12:36:07 +0000 (12:36 +0000)
src/gdcmDicomDir.cxx
src/gdcmDocEntrySet.h
src/gdcmDocument.cxx

index 2af9aaf2b5825d8b469ea27fb8c5420f4dbef67d..467f639478011a104eb214f8a761a5ef4b0b76fa 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/06/03 16:08:16 $
-  Version:   $Revision: 1.140 $
+  Date:      $Date: 2005/06/17 12:36:07 $
+  Version:   $Revision: 1.141 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -257,7 +257,7 @@ DicomDirMeta *DicomDir::NewMeta()
    DocEntry *entry = GetFirstEntry();
    if( entry )
    { 
-      MetaElems = new DicomDirMeta(true);
+      MetaElems = new DicomDirMeta(true); // true = empty
 
       entry = GetFirstEntry();
       while( entry )
@@ -273,7 +273,7 @@ DicomDirMeta *DicomDir::NewMeta()
    }
    else  // after root directory parsing
    {
-      MetaElems = new DicomDirMeta(false);
+      MetaElems = new DicomDirMeta(false); // false = not empty
    }
    MetaElems->SetSQItemNumber(0); // To avoid further missprinting
    return MetaElems;  
index 348ed8e1922c95c8ec1e07d5394c6a5372d65348..1247e043b75b4cd8686bb7ad6a250fa26c2d24e9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/10 11:20:34 $
-  Version:   $Revision: 1.50 $
+  Date:      $Date: 2005/06/17 12:36:07 $
+  Version:   $Revision: 1.51 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -38,9 +38,9 @@ typedef std::string BaseTagKey;
  * \brief
  * \ref DocEntrySet is an abstract base class for \ref ElementSet
  * and \ref SQItem which are both containers for DocEntries.
- * \ref ElementSet is based on the STL map<> container
- * (see \ref ElementSet::TagHT), as opposed to \ref SQItem
- * which is based on an STL list container (see \ref ListDocEntry).
+ *  - \ref ElementSet is based on the STL map<> container
+ * (see \ref ElementSet::TagHT)
+ *  - \ref SQItem is based on an STL list container (see \ref ListDocEntry).
  * Since the syntax for adding a new element to a map<> or a list<>
  * differ, \ref DocEntrySet is designed as an adapter to unify the
  * interfaces of \ref DocEntrySet and \ref ElementSet.
index 17a7cdfee552a9fcaab071edc4a9cad1b1285169..508eb5d436b1e8ca34a312bcdd3cd40cd0bd4cdd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/06/10 14:05:38 $
-  Version:   $Revision: 1.245 $
+  Date:      $Date: 2005/06/17 12:36:07 $
+  Version:   $Revision: 1.246 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1247,7 +1247,7 @@ void Document::LoadDocEntry(DocEntry *entry)
    {
       newValue = Util::DicomString(str, length+1);
       gdcmWarningMacro("Warning: bad length: " << length <<
-                       " ,For string :" <<  newValue.c_str()); 
+                       " For string :" <<  newValue.c_str()); 
       // Since we change the length of string update it length
       //entry->SetReadLength(length+1);
    }
@@ -1261,7 +1261,12 @@ void Document::LoadDocEntry(DocEntry *entry)
    {
       if ( Fp->fail() || Fp->eof())
       {
-         gdcmWarningMacro("Unread element value");
+         if ( Fp->fail() )
+            gdcmWarningMacro("--> fail");
+
+         gdcmWarningMacro("Unread element value " << valEntry->GetKey() 
+                          << " lgt : " << valEntry->GetReadLength() 
+                          << " at " << std::hex << valEntry->GetOffset());
          valEntry->SetValue(GDCM_UNREAD);
          return;
       }