+2004-12-06 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+   * Example/Volume2Dicom.cxx : comment unused variables
+   * Test/PrintDicomDir.cxx : comment unused variables
+   * Test/BuildUpDicomDir.cxx : remove dbg.Verbose. Remove the FIXME.
+   * src/SQItem.[h|cxx] : remove the PtagHT variable. Remove the AddDocEntry
+     method that is redondant with AddEntry.
+   * src/gdcmDocEntrySet.h : add pure virtual methods common to ElementSet and
+     SQItem
+
 2004-12-04 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
    * Bug fix due my last commit (compilation under Windows).
    * Example/Volume2Dicom : bug fix in the file and reformatting source code
 
   Program:   gdcm
   Module:    $RCSfile: Volume2Dicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/04 08:57:19 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2004/12/06 11:37:37 $
+  Version:   $Revision: 1.3 $
                                                                                  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
        if (val < min) 
           min = val;
     }
-    float wcenter = (max+min) / 2.;
-    float wwidth  = (max-min)>0 ? (max-min) : 1.;
+    //float wcenter = (max+min) / 2.;
+    //float wwidth  = (max-min)>0 ? (max-min) : 1.;
 
     ////////////////////////////////////////////////////////////
     // Get file date and time                                 //
 
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/04 08:57:20 $
-  Version:   $Revision: 1.86 $
+  Date:      $Date: 2004/12/06 11:37:38 $
+  Version:   $Revision: 1.87 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
                                     cc != lastOneButSequence;
                                    ++cc)
       {
-         m->AddDocEntry( cc->second );
+         m->AddEntry( cc->second );
       }
    }
    else  // after root directory parsing
       {
          entry->SetLength( entry->GetValue().length() );
       }
-      p->AddDocEntry( entry );
+      p->AddEntry( entry );
    }
 
    Patients.push_front( p );
 
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirMeta.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2004/12/06 11:37:38 $
+  Version:   $Revision: 1.18 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 DicomDirMeta::DicomDirMeta():
    DicomDirObject()
 {
-
 }
 
 /**
  */
 DicomDirMeta::~DicomDirMeta() 
 {
-   
 }
 
 //-----------------------------------------------------------------------------
 {
    os << "META" << std::endl;
    // warning : META doesn't behave exactly like a Objet 
-   for (ListDocEntry::iterator i = DocEntries.begin();  
+   for (ListDocEntry::iterator i = DocEntries.begin();
         i != DocEntries.end();
         ++i)
-      (*i)->Print();    
+   {
+      (*i)->Print();
+      os << std::endl;
+   }
 }
 
 
 
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirObject.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:57 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2004/12/06 11:37:38 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
       {
          entry->SetLength(entry->GetValue().length()); 
       }                                
-      AddDocEntry(entry);
+      AddEntry(entry);
    }   
 }   
 } // end namespace gdcm
 
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:43:37 $
-  Version:   $Revision: 1.26 $
+  Date:      $Date: 2004/12/06 11:37:38 $
+  Version:   $Revision: 1.27 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 
    /// \brief adds any type of entry to the entry set (pure vitual)
    virtual bool AddEntry(DocEntry *Entry) = 0; // pure virtual
- 
+   virtual bool RemoveEntry(DocEntry *EntryToRemove)=0; // pure virtual
+   virtual bool RemoveEntryNoDestroy(DocEntry *EntryToRemove)=0; // pure virtual
+
    /// \brief prints any type of entry to the entry set (pure vitual)
    virtual void Print (std::ostream & os = std::cout) = 0;// pure virtual
 
 
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.146 $
+  Date:      $Date: 2004/12/06 11:37:38 $
+  Version:   $Revision: 1.147 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
    valEntry->SetValue(finalContent);
 
    // Integers have a special treatement for their length:
-
    l = finalContent.length();
    if ( l != 0) // To avoid to be cheated by 'zero length' integers
    {   
 
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.40 $
+  Date:      $Date: 2004/12/06 11:37:38 $
+  Version:   $Revision: 1.41 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 /*
  * \brief   canonical Printer
  */
- void SQItem::Print(std::ostream& os)
- {
-   os << "S ";
+void SQItem::Print(std::ostream& os)
+{
    std::ostringstream s;
 
    if (SQDepthLevel > 0)
          continue;
       }
 
-      if (  ( group   < (*i)->GetGroup() )
+      if (  ( group  < (*i)->GetGroup() )
           ||( group == (*i)->GetGroup() && element < (*i)->GetElement()) )
       {
          // instead of ReplaceOrCreateByNumber 
          ValEntry* entry = 0;
          TagKey key = DictEntry::TranslateToKey(group, element);
 
-         if ( ! PtagHT->count(key))
-         {
-            // we assume a Public Dictionnary *is* loaded
-            Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
-            // if the invoked (group,elem) doesn't exist inside the Dictionary
-            // we create a VirtualDictEntry
-            DictEntry *dictEntry = pubDict->GetDictEntryByNumber(group, element);
-            if (dictEntry == NULL)
-            {
-               dictEntry = 
-                  Global::GetDicts()->NewVirtualDictEntry(group, element,
-                                                          "UN", "??", "??");
-            } 
-            // we assume the constructor didn't fail
-            entry = new ValEntry(dictEntry);
-            /// \todo
-            /// ----
-            /// better we don't assume too much !
-            /// SQItem is now used to describe any DICOMDIR related object
-         }
-         else
+         // we assume a Public Dictionnary *is* loaded
+         Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
+         // if the invoked (group,elem) doesn't exist inside the Dictionary
+         // we create a VirtualDictEntry
+         DictEntry *dictEntry = pubDict->GetDictEntryByNumber(group, element);
+         if (dictEntry == NULL)
          {
-            DocEntry* foundEntry = PtagHT->find(key)->second;
-            entry = dynamic_cast<ValEntry*>(foundEntry);
-            if (!entry)
-            {
-               dbg.Verbose(0, "SQItem::SetEntryByNumber: docEntries"
-                              " contains non ValEntry occurences");
-            }
-         }
+            dictEntry = 
+               Global::GetDicts()->NewVirtualDictEntry(group, element,
+                                                       "UN", "??", "??");
+         } 
+         // we assume the constructor didn't fail
+         entry = new ValEntry(dictEntry);
+
          if (entry)
          {
             entry->SetValue(val); 
 
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 17:13:18 $
-  Version:   $Revision: 1.25 $
+  Date:      $Date: 2004/12/06 11:37:38 $
+  Version:   $Revision: 1.26 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
    
    /// \brief   adds the passed DocEntry to the DocEntry chained List for
    /// this SQ Item.      
-   void AddDocEntry(DocEntry *e) { DocEntries.push_back(e); };
-
    bool AddEntry(DocEntry *Entry); // add to the List
    bool RemoveEntry(DocEntry *EntryToRemove);
    bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
    
    ///\brief pointer to the HTable of the Document,
    ///       (because we don't know it within any DicomDirObject nor any SQItem)
-   TagDocEntryHT *PtagHT;
+   // TagDocEntryHT *PtagHT;
 
 private:
 
    ///        with this BaseTagKey.
    BaseTagKey BaseTagKeyNested;
 
- 
    /// \brief SQ Item ordinal number 
    int SQItemNumber;
-
 };
 } // end namespace gdcm
 //-----------------------------------------------------------------------------