]> Creatis software - gdcm.git/commitdiff
* Example/Volume2Dicom.cxx : comment unused variables
authorregrain <regrain>
Mon, 6 Dec 2004 11:37:36 +0000 (11:37 +0000)
committerregrain <regrain>
Mon, 6 Dec 2004 11:37:36 +0000 (11:37 +0000)
   * 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
   -- BeNours

ChangeLog
Example/Volume2Dicom.cxx
src/gdcmDicomDir.cxx
src/gdcmDicomDirMeta.cxx
src/gdcmDicomDirObject.cxx
src/gdcmDocEntrySet.h
src/gdcmDocument.cxx
src/gdcmSQItem.cxx
src/gdcmSQItem.h

index fd48dd6dcbc2cc0c1601d5128206c7b2073e605d..85b2c664543c33704cbb36d9c1c332e41dedc6b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index 05eeeb84f8b5a075f0523744f0474ad723eccdc5..96010e817e36c53c3fdd3b8fe5e0e1e6f0750121 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -87,8 +87,8 @@ int main( int argc, char * argv[] )
        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                                 //
index 6716aec7c5c0eb2fe94afa88e52cb9f962d2d0d9..1f668e974b5c7da53165b71702cc2b01eac343dc 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -482,7 +482,7 @@ DicomDirMeta * DicomDir::NewMeta()
                                     cc != lastOneButSequence;
                                    ++cc)
       {
-         m->AddDocEntry( cc->second );
+         m->AddEntry( cc->second );
       }
    }
    else  // after root directory parsing
@@ -541,7 +541,7 @@ DicomDirPatient * DicomDir::NewPatient()
       {
          entry->SetLength( entry->GetValue().length() );
       }
-      p->AddDocEntry( entry );
+      p->AddEntry( entry );
    }
 
    Patients.push_front( p );
index cadbc21646d6fd60c81a23735f7f996961cd15dc..3942ee83b06c4041ca1d9506fd761057545cb1f4 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -33,7 +33,6 @@ namespace gdcm
 DicomDirMeta::DicomDirMeta():
    DicomDirObject()
 {
-
 }
 
 /**
@@ -42,7 +41,6 @@ DicomDirMeta::DicomDirMeta():
  */
 DicomDirMeta::~DicomDirMeta() 
 {
-   
 }
 
 //-----------------------------------------------------------------------------
@@ -54,10 +52,13 @@ void DicomDirMeta::Print(std::ostream& os)
 {
    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;
+   }
 }
 
 
index 245f99019b95b1102954a405456725f31ef234d5..11dfd84c78ce3bccdffc9d89847597793f436674 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -121,7 +121,7 @@ void DicomDirObject::FillObject(ListDicomDirMetaElem const & elemList)
       {
          entry->SetLength(entry->GetValue().length()); 
       }                                
-      AddDocEntry(entry);
+      AddEntry(entry);
    }   
 }   
 } // end namespace gdcm
index b1465abbe5a14cfceba179a1103a68626083179b..cdca610cf655620da2bab9daceac16c65d2dbed8 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -63,7 +63,9 @@ public:
 
    /// \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
 
index 0570d4547990c68686f43c755993866e8a3b8250..2a91d1c2134570f346508425820150313c0256ed 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -925,7 +925,6 @@ bool Document::SetEntryByNumber(std::string const& content,
    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
    {   
index a9c1ed5efcc8fb523f3ab91c2a16ffeb9b8ac918..13af23674f3f1abb09a18b1c306a65f51cf81d86 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -60,9 +60,8 @@ SQItem::~SQItem()
 /*
  * \brief   canonical Printer
  */
- void SQItem::Print(std::ostream& os)
- {
-   os << "S ";
+void SQItem::Print(std::ostream& os)
+{
    std::ostringstream s;
 
    if (SQDepthLevel > 0)
@@ -180,7 +179,7 @@ bool SQItem::SetEntryByNumber(std::string const & val, uint16_t group,
          continue;
       }
 
-      if (  ( group   < (*i)->GetGroup() )
+      if (  ( group  < (*i)->GetGroup() )
           ||( group == (*i)->GetGroup() && element < (*i)->GetElement()) )
       {
          // instead of ReplaceOrCreateByNumber 
@@ -188,36 +187,20 @@ bool SQItem::SetEntryByNumber(std::string const & val, uint16_t group,
          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); 
index e1ba7a5244b57103688b8b5ebf3b12ff1f3f81af..ea771ed2cedcb61b4ade2d463227c8ca79fe82b5 100644 (file)
@@ -3,8 +3,8 @@
   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
@@ -45,8 +45,6 @@ public:
    
    /// \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);
@@ -91,7 +89,7 @@ protected:
    
    ///\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:
 
@@ -106,10 +104,8 @@ private:
    ///        with this BaseTagKey.
    BaseTagKey BaseTagKeyNested;
 
    /// \brief SQ Item ordinal number 
    int SQItemNumber;
-
 };
 } // end namespace gdcm
 //-----------------------------------------------------------------------------