]> Creatis software - gdcm.git/blobdiff - src/gdcmSeqEntry.cxx
ENH: Remove old build process for libijg8, basically libijg8 can now be found in...
[gdcm.git] / src / gdcmSeqEntry.cxx
index d31c2b10b38e93632fb8ae9f0a75043113bcd2e4..0fd0b47d3bbe5d46a67758b93705b1c9ec821b3f 100644 (file)
@@ -3,12 +3,12 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/09/13 12:10:53 $
-  Version:   $Revision: 1.27 $
+  Date:      $Date: 2004/09/27 08:39:07 $
+  Version:   $Revision: 1.30 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
-  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
+  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
                                                                                 
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * \ingroup gdcmSeqEntry
  * \brief   Constructor from a given gdcmSeqEntry
  */
-gdcmSeqEntry::gdcmSeqEntry(gdcmDictEntry* e, int depth
+gdcmSeqEntry::gdcmSeqEntry( gdcmDictEntry* e 
              : gdcmDocEntry(e)
 {
    UsableLength = 0;
    ReadLength = 0xffffffff;
-   SQDepthLevel = depth;
+   SQDepthLevel = -1;
 
    delimitor_mode = false;
    seq_term  = NULL;
@@ -72,7 +72,7 @@ gdcmSeqEntry::~gdcmSeqEntry() {
 /**
  * \brief   canonical Printer
  */
-void gdcmSeqEntry::Print(std::ostream &os)
+void gdcmSeqEntry::Print( std::ostream &os )
 {
    // First, Print the Dicom Element itself.
    SetPrintLevel(2);   
@@ -90,22 +90,27 @@ void gdcmSeqEntry::Print(std::ostream &os)
 
    // at end, print the sequence terminator item, if any
    if (delimitor_mode) {
-      for (int i=0;i<SQDepthLevel+1;i++)
+      for ( int i = 0; i < SQDepthLevel; i++ )
+      {
          os << "   | " ;
-      if (seq_term != NULL) {
+      }
+      if (seq_term != NULL)
+      {
          seq_term->Print(os);
          os << std::endl;
       } 
       else 
-         // fusible
+      {
+         // fuse
          os << "      -------------- should have a sequence terminator item";
+      }
    }                    
 }
 
 /*
  * \brief   canonical Writer
  */
-void gdcmSeqEntry::Write(FILE *fp, FileType filetype)
+void gdcmSeqEntry::Write(FILEfp, FileType filetype)
 {
    uint16_t seq_term_gr = 0xfffe;
    uint16_t seq_term_el = 0xe0dd;
@@ -145,7 +150,7 @@ void gdcmSeqEntry::AddEntry(gdcmSQItem *sqItem, int itemNumber)
  *        Returns the last item when argument is bigget than the total
  *        item number.
  */
-gdcmSQItem *gdcmSeqEntry::GetSQItemByOrdinalNumber(int nb)
+gdcmSQItemgdcmSeqEntry::GetSQItemByOrdinalNumber(int nb)
 {
    if (nb<0)
       return (*(items.begin()));