]> Creatis software - gdcm.git/blobdiff - src/gdcmObject.cxx
reintroduce testing
[gdcm.git] / src / gdcmObject.cxx
index 72b41f234af01fe6104e633e663fe1f39f567c19..e747b3b39afe68b55b562af49d8f91214d59270a 100644 (file)
@@ -92,19 +92,22 @@ std::string gdcmObject::GetEntryByName(TagName name)  {
  * @param  flag = 0 when META to be dealt with
  */ 
 void gdcmObject::ResetBoundaries(int flag) {
-
+   
    if (flag) { // it's NOT a META
      // upwards to fffe,e000   
-       for( i=j=debut();
-            ((*i)->GetGroup() != 0xfffe)  && ((*i)->GetElement() != 0x0000);
-           --i,j--) {      
-       }
+      for( i=j=debut();
+          ((*i)->GetGroup() != 0xfffe)  && ((*i)->GetElement() != 0xe000);
+         --i,j--) {   
+      }
       beginObj=j;
    }
          
-  // downwards to fffe,e000       
+  // upwards again to fffe,e000   
+   if (fin()== (--(plistEntries->end())) )  // Don't try anything more when end 
+       return;                              // of Chained List is reached   
+                                           
    for( i=j=fin();
-        ((*i)->GetGroup() != 0xfffe)  && ((*i)->GetElement() != 0x0000);
+        ((*i)->GetGroup() != 0xfffe)  && ((*i)->GetElement() != 0xe000);
        --i,j--) {          
    }
    j--;
@@ -112,7 +115,6 @@ void gdcmObject::ResetBoundaries(int flag) {
 }
 
 /**
- * \ingroup gdcmParser
  * \brief   Sets Entry (Dicom Element) value of an element,
  *          specified by it's tag (Group, Number) 
  *          and the length, too ...
@@ -147,12 +149,11 @@ void gdcmObject::ResetBoundaries(int flag) {
           } 
            // we assume the constructor didn't fail
            Entry = new gdcmHeaderEntry(DictEntry);
-          // ----
-          // TODO
-          // ----
-          // better we don't assume too much !
-          // in the next release, gdcmObject will be used 
-          // to describe any Header Entry ...
+          /// \todo
+          /// ----
+          /// better we don't assume too much !
+          /// in the next release, gdcmObject will be used 
+          /// to describe any Header Entry ...
          } else {
             Entry = ptagHT->find(key)->second;
          }