]> Creatis software - gdcm.git/commitdiff
-add method GetFirstEntry to replace call to InitTraversal+GetNextEntry
authorjpr <jpr>
Tue, 18 Jan 2005 07:49:41 +0000 (07:49 +0000)
committerjpr <jpr>
Tue, 18 Jan 2005 07:49:41 +0000 (07:49 +0000)
   -remove InitTraversal method.

15 files changed:
src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmDicomDirElement.cxx
src/gdcmDicomDirImage.cxx
src/gdcmDicomDirMeta.cxx
src/gdcmDicomDirPatient.cxx
src/gdcmDicomDirPatient.h
src/gdcmDicomDirSerie.cxx
src/gdcmDicomDirSerie.h
src/gdcmDicomDirStudy.cxx
src/gdcmDicomDirStudy.h
src/gdcmDict.cxx
src/gdcmDict.h
src/gdcmDictSet.cxx
src/gdcmDictSet.h

index 1d5bed3a7f603d460b6a32cd922da8bf39421fe4..1bfa211d9112c0fd2d07dc7f0fc2d3c49cd96198 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:59:52 $
-  Version:   $Revision: 1.103 $
+  Date:      $Date: 2005/01/18 07:53:41 $
+  Version:   $Revision: 1.104 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -57,7 +57,6 @@ namespace gdcm
 // Constructor / Destructor
 
 /**
- * \ingroup DicomDir
  * \brief   Constructor : creates an empty DicomDir
  */
 DicomDir::DicomDir()
@@ -234,7 +233,6 @@ void DicomDir::Initialize()
 
 
 /**
- * \ingroup DicomDir
  * \brief  fills the whole structure, starting from a root Directory
  */
 void DicomDir::ParseDirectory()
@@ -244,7 +242,6 @@ void DicomDir::ParseDirectory()
 }
 
 /**
- * \ingroup DicomDir
  * \brief   Set the start method to call when the parsing of the
  *          directory starts.
  * @param   method Method to call
@@ -266,7 +263,6 @@ void DicomDir::SetStartMethod( DicomDir::Method *method, void *arg,
 }
 
 /**
- * \ingroup DicomDir
  * \brief   Set the method to delete the argument
  *          The argument is destroyed when the method is changed or when the
  *          class is destroyed
@@ -278,7 +274,6 @@ void DicomDir::SetStartMethodArgDelete( DicomDir::Method *method )
 }
 
 /**
- * \ingroup DicomDir
  * \brief   Set the progress method to call when the parsing of the
  *          directory progress
  * @param   method Method to call
@@ -300,7 +295,6 @@ void DicomDir::SetProgressMethod( DicomDir::Method *method, void *arg,
 }
 
 /**
- * \ingroup DicomDir
  * \brief   Set the method to delete the argument
  *          The argument is destroyed when the method is changed or when the 
  *          class is destroyed          
@@ -312,7 +306,6 @@ void DicomDir::SetProgressMethodArgDelete( DicomDir::Method *method )
 }
 
 /**
- * \ingroup DicomDir
  * \brief   Set the end method to call when the parsing of the directory ends
  * @param   method Method to call
  * @param   arg    Argument to pass to the method
@@ -333,7 +326,6 @@ void DicomDir::SetEndMethod( DicomDir::Method *method, void *arg,
 }
 
 /**
- * \ingroup DicomDir
  * \brief   Set the method to delete the argument
  *          The argument is destroyed when the method is changed or when
  *          the class is destroyed
@@ -345,7 +337,6 @@ void DicomDir::SetEndMethodArgDelete( DicomDir::Method *method )
 }
 
 /**
- * \ingroup DicomDir
  * \brief    writes on disc a DICOMDIR
  * \ warning does NOT add the missing elements in the header :
  *           it's up to the user doing it !
@@ -407,7 +398,6 @@ bool DicomDir::WriteDicomDir(std::string const &fileName)
 // Protected
 
 /**
- * \ingroup DicomDir
  * \brief create a Document-like chained list from a root Directory 
  * @param path entry point of the tree-like structure
  */
@@ -468,7 +458,6 @@ void DicomDir::CreateDicomDirChainedList(std::string const & path)
 }
 
 /**
- * \ingroup DicomDir
  * \brief   adds *the* Meta to a partially created DICOMDIR
  */
   
@@ -685,7 +674,6 @@ void DicomDir::CallStartMethod()
 
 //-----------------------------------------------------------------------------
 /**
- * \ingroup DicomDir
  * \brief   CallProgressMethod
  */
 void DicomDir::CallProgressMethod()
@@ -698,7 +686,6 @@ void DicomDir::CallProgressMethod()
 
 //-----------------------------------------------------------------------------
 /**
- * \ingroup DicomDir
  * \brief   CallEndMethod
  */
 void DicomDir::CallEndMethod()
@@ -713,7 +700,6 @@ void DicomDir::CallEndMethod()
 //-----------------------------------------------------------------------------
 // Private
 /**
- * \ingroup DicomDir
  * \brief create a 'DicomDir' from a DICOMDIR Header 
  */
 void DicomDir::CreateDicomDir()
@@ -796,7 +782,6 @@ void DicomDir::CreateDicomDir()
 }
 
 /**
- * \ingroup DicomDir
  * \brief Well ... there is only one occurence  
  */
 bool DicomDir::AddDicomDirMeta()
@@ -810,7 +795,6 @@ bool DicomDir::AddDicomDirMeta()
 }
 
 /**
- * \ingroup DicomDir
  * \brief  AddDicomDirPatientToEnd 
  * @param   dd SQ Item to enqueue to the DicomPatient chained List
  */
@@ -821,7 +805,6 @@ bool DicomDir::AddDicomDirPatientToEnd(DicomDirPatient *dd)
 }
 
 /**
- * \ingroup DicomDir
  * \brief  AddDicomDirStudyToEnd 
  * @param   dd SQ Item to enqueue to the DicomDirStudy chained List
  */
@@ -838,7 +821,6 @@ bool DicomDir::AddDicomDirStudyToEnd(DicomDirStudy *dd)
 }
 
 /**
- * \ingroup DicomDir
  * \brief  AddDicomDirSerieToEnd 
  * @param   dd SQ Item to enqueue to the DicomDirSerie chained List
  */
@@ -862,7 +844,6 @@ bool DicomDir::AddDicomDirSerieToEnd(DicomDirSerie *dd)
 }
 
 /**
- * \ingroup DicomDir
  * \brief   AddDicomDirImageToEnd
  * @param   dd SQ Item to enqueue to the DicomDirImage chained List
  */
@@ -892,7 +873,6 @@ bool DicomDir::AddDicomDirImageToEnd(DicomDirImage *dd)
 }
 
 /**
- * \ingroup DicomDir
  * \brief  for each Header of the chained list, add/update the Patient/Study/Serie/Image info 
  * @param   path path of the root directory
  * @param   list chained list of Headers
@@ -958,7 +938,6 @@ void DicomDir::SetElements(std::string const & path, VectDocument const &list)
 }
 
 /**
- * \ingroup DicomDir
  * \brief   Move the content of the src SQItem to the dst SQItem
  *          Only DocEntry's are moved
  * 
@@ -980,7 +959,6 @@ void DicomDir::MoveSQItem(SQItem *dst,SQItem *src)
 }
 
 /**
- * \ingroup DicomDir
  * \brief   compares two dgcmHeaders
  */
 bool DicomDir::HeaderLessThan(Document *header1, Document *header2)
@@ -988,16 +966,20 @@ bool DicomDir::HeaderLessThan(Document *header1, Document *header2)
    return *header1 < *header2;
 }
 
+
 /**
- * \brief   Initialise the visit of the DicomDirPatients of the DicomDir
- */
-void DicomDir::InitTraversal()
+ * \brief   Get the first entry while visiting the DicomDirPatients
+ * \return  The next DicomDirPatient if found, otherwhise NULL
+ */ 
+DicomDirPatient *DicomDir::GetFirstEntry()
 {
    ItDicomDirPatient = Patients.begin();
+   return *ItDicomDirPatient;
 }
 
 /**
  * \brief   Get the next entry while visiting the DicomDirPatients
+ * \note : meaningfull only if GetFirstEntry already called
  * \return  The next DicomDirPatient if found, otherwhise NULL
  */
 DicomDirPatient *DicomDir::GetNextEntry()
index 0391c5a2b85c21e76d78db73f3bcbf217589cb6a..eca86fbadc8c8eb30eb480c837df687fc1856ed7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:59:52 $
-  Version:   $Revision: 1.47 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  Version:   $Revision: 1.48 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -67,7 +67,7 @@ public:
    DicomDirMeta* GetDicomDirMeta() { return MetaElems; };
 
    // should avoid exposing internal mechanism
-   void InitTraversal();
+   DicomDirPatient *GetFirstEntry();
    DicomDirPatient *GetNextEntry();
 
    /// Parsing
index dab39844508ede02ba72b12cecef188815e6d289..b393d5dd00b93fe579af715a671b646f36e63b2b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/07 22:03:30 $
-  Version:   $Revision: 1.26 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  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
@@ -76,7 +76,6 @@ DicomDirElement::DicomDirElement()
 }
 
 /**
- * \ingroup DicomDirElement
  * \brief   canonical destructor 
  */
 DicomDirElement::~DicomDirElement()
@@ -91,7 +90,6 @@ DicomDirElement::~DicomDirElement()
 //-----------------------------------------------------------------------------
 // Print
 /**
- * \ingroup DicomDirElement
  * \brief   Print all
  * \todo add a 'Print Level' check 
  * @param   os The output stream to be written to.
@@ -144,6 +142,11 @@ void DicomDirElement::Print(std::ostream &os)
 //-----------------------------------------------------------------------------
 // Public
 
+/**
+ * \brief AddNewEntry 
+ * @param  type type
+ * @param elem elem
+ */
 bool DicomDirElement::AddNewEntry(std::string const &type, 
                                   Element const &elem)
 {
index e1f201ff4a3be39f96a5d105cf9ae8736ddf9d04..74632269db1fb4df35fd309dff0ee4ea5b0c4e18 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirImage.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:41 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  Version:   $Revision: 1.17 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -24,7 +24,6 @@ namespace gdcm
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
 /**
- * \ingroup DicomDirImage
  * \brief  Constructor 
  */
 DicomDirImage::DicomDirImage():
@@ -32,7 +31,6 @@ DicomDirImage::DicomDirImage():
 {
 }
 /**
- * \ingroup DicomDirImage
  * \brief   Canonical destructor.
  */
 DicomDirImage::~DicomDirImage() 
@@ -42,8 +40,8 @@ DicomDirImage::~DicomDirImage()
 //-----------------------------------------------------------------------------
 // Print
 /**
- * \ingroup DicomDirImage
  * \brief   Prints the Object
+ * @param os ostream to write to
  * @return
  */ 
 void DicomDirImage::Print(std::ostream &os, std::string const & )
index b1e40f543df216e2f677d1e95de7b775780d431d..b21b126ff5df2e9805a963fd0d4ed23a3164ba17 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirMeta.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:41 $
-  Version:   $Revision: 1.21 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  Version:   $Revision: 1.22 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -27,7 +27,6 @@ namespace gdcm
 // Constructor / Destructor
 
 /**
- * \ingroup DicomDirMeta
  * \brief  Constructor
  */ 
 DicomDirMeta::DicomDirMeta():
@@ -36,7 +35,6 @@ DicomDirMeta::DicomDirMeta():
 }
 
 /**
- * \ingroup DicomDirMeta
  * \brief   Canonical destructor.
  */
 DicomDirMeta::~DicomDirMeta() 
@@ -47,6 +45,7 @@ DicomDirMeta::~DicomDirMeta()
 // Print
 /**
  * \brief   Prints the Meta Elements
+ * @param os ostream to write to 
  */ 
 void DicomDirMeta::Print(std::ostream &os, std::string const & )
 {
@@ -69,6 +68,8 @@ void DicomDirMeta::Print(std::ostream &os, std::string const & )
 
 /**
  * \brief   Writes the Meta Elements
+ * @param fp ofstream to write to
+ * @param t File Type 
  * @return
  */ 
 void DicomDirMeta::WriteContent(std::ofstream *fp, FileType t)
index e3235ec8e4aa45933c421e3af20c68d8b61c2cb2..690799e29245723ecd5c84592471fedae7cd4bcf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:59:52 $
-  Version:   $Revision: 1.25 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  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
@@ -103,15 +103,18 @@ DicomDirStudy* DicomDirPatient::NewStudy()
 }   
 
 /**
- * \brief   Initialise the visit of the DicomDirPatients
- */
-void DicomDirPatient::InitTraversal()
+ * \brief   Get the first entry while visiting the DicomDirStudy
+ * \return  The first DicomDirStudy if found, otherwhise NULL
+ */ 
+DicomDirStudy *DicomDirPatient::GetFirstEntry()
 {
    ItDicomDirStudy = Studies.begin();
+   return *ItDicomDirStudy;
 }
 
 /**
  * \brief   Get the next entry while visiting the DicomDirStudies
+ * \note : meaningfull only if GetFirstEntry already called
  * \return  The next DicomDirStudies if found, otherwhise NULL
  */
 DicomDirStudy *DicomDirPatient::GetNextEntry()
index e1cc299e7f70490e997cfa716f50dc3701ca1da6..97f78cf73ecf039b16dfec47a45e9b735f84943e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:59:52 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,15 +41,12 @@ public:
 
    void Print(std::ostream &os = std::cout, std::string const & indent = "" );
    void WriteContent(std::ofstream *fp, FileType t);
-
-    // TODO Remove GetDicomDirStudies
-    // use InitTraversal + GetNextEntry instead.
   
    /// Returns the STUDY chained List for this PATIENT.
    ListDicomDirStudy const &GetDicomDirStudies() const { return Studies; };
 
    // should avoid exposing internal mechanism
-   void InitTraversal();
+   DicomDirStudy *GetFirstEntry();
    DicomDirStudy *GetNextEntry();
 
    /// adds the passed STUDY to the STUDY chained List for this PATIENT.
index 24529ce3ea45f891cd54726ed2092e6dde4d8fbd..8632bfa21e99e2366632e79a11b623677bbd258b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:59:52 $
-  Version:   $Revision: 1.27 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  Version:   $Revision: 1.28 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -102,15 +102,18 @@ DicomDirImage *DicomDirSerie::NewImage()
 }
 
 /**
- * \brief   Initialise the visit of the Images
+ * \brief   Get the first entry while visiting the DicomDirImage
+ * \return  The first DicomDirImage if found, otherwhise NULL
  */
-void DicomDirSerie::InitTraversal()
+DicomDirImage *DicomDirSerie::GetFirstEntry()
 {
    ItDicomDirImage = Images.begin();
+   return *ItDicomDirImage;
 }
 
 /**
  * \brief   Get the next entry while visiting the DicomDirImages
+ * \note : meaningfull only if GetFirstEntry already called
  * \return  The next DicomDirImages if found, otherwhise NULL
  */
 DicomDirImage *DicomDirSerie::GetNextEntry()
index 992231747dea2e68f18acb63c13d3b26e475b35d..4449d20d0008d84de66b3476fa72611eeb5d0ae3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:59:52 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  Version:   $Revision: 1.21 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,15 +40,12 @@ public:
 
    void Print( std::ostream &os = std::cout, std::string const & indent = "" );
    void WriteContent( std::ofstream *fp, FileType t );
-
-    // TODO Remove GetDicomDirImages
-    // use InitTraversal + GetNextEntry instead.
  
    /// Returns the IMAGE chained List for this SERIE.
    ListDicomDirImage const &GetDicomDirImages() const { return Images; };
 
    // should avoid exposing internal mechanism
-   void InitTraversal();
+   DicomDirImage *GetFirstEntry();
    DicomDirImage *GetNextEntry();
         
    /// adds the passed IMAGE to the IMAGE chained List for this SERIE.    
index 849cc78cd874182dbd6bb1c7984c40207c07d87c..e1824d7f4296db337171c0a3a90ed0e24c49885c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:59:52 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  Version:   $Revision: 1.25 $
                                                                                 
   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 @@ DicomDirStudy::DicomDirStudy():
 {
 }
 /**
- * \ingroup DicomDirStudy
  * \brief   Canonical destructor.
  */
 DicomDirStudy::~DicomDirStudy() 
@@ -104,17 +103,20 @@ DicomDirSerie *DicomDirStudy::NewSerie()
    return st;  
 } 
 
-/**
- * \brief   Initialise the visit of the Series
+ /**
+ * \brief   Get the first entry while visiting the DicomDirSeries
+ * \return  The first DicomDirSerie if found, otherwhise NULL
  */
-void DicomDirStudy::InitTraversal()
+DicomDirSerie *DicomDirStudy::GetFirstEntry()
 {
    ItDicomDirSerie = Series.begin();
+   return *ItDicomDirSerie;
 }
 
 /**
  * \brief   Get the next entry while visiting the DicomDirSeries
- * \return  The next DicomDirSeries if found, otherwhise NULL
+ * \note : meaningfull only if GetFirstEntry already called
+ * \return  The next DicomDirSerie if found, otherwhise NULL
  */
 DicomDirSerie *DicomDirStudy::GetNextEntry()
 {
index 350fe6dc86e62c505577b824b7b6ed5f50fa4e72..1a33f86f0b9737091d52f99fb54b6fe1f7841b82 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:59:52 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2005/01/18 07:53:42 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,14 +41,11 @@ public:
    void Print(std::ostream &os = std::cout, std::string const & indent = "" );
    void WriteContent(std::ofstream *fp, FileType t);
 
-    // TODO Remove GetDicomDirSeries
-    // use InitTraversal + GetNextEntry instead.
-
     /// Returns the SERIE chained List for this STUDY.
    ListDicomDirSerie const &GetDicomDirSeries() const { return Series; };
 
    // should avoid exposing internal mechanism
-   void InitTraversal();
+   DicomDirSerie *GetFirstEntry();
    DicomDirSerie *GetNextEntry();
 
    /// adds the passed SERIE to the SERIE chained List for this STUDY.
index 5d1a7826505fd3c62a8bfbd6901207a8b6e25008..dc7e5c0c14f7be0ad3292fb974fe3469e2250d05 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 11:13:21 $
-  Version:   $Revision: 1.65 $
+  Date:      $Date: 2005/01/18 07:49:41 $
+  Version:   $Revision: 1.66 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -114,7 +114,6 @@ void Dict::Print(std::ostream &os, std::string const & )
 //-----------------------------------------------------------------------------
 // Public
 /**
- * \ingroup Dict
  * \brief   Remove all Dicom Dictionary Entries
  */
 void Dict::ClearEntry()
@@ -125,7 +124,6 @@ void Dict::ClearEntry()
 }
 
 /**
- * \ingroup Dict
  * \brief  adds a new Dicom Dictionary Entry 
  * @param   newEntry entry to add 
  * @return  false if Dicom Element already exists
@@ -147,7 +145,6 @@ bool Dict::AddNewEntry(DictEntry const &newEntry)
 }
 
 /**
- * \ingroup Dict
  * \brief  replaces an already existing Dicom Element by a new one
  * @param   newEntry new entry (overwrites any previous one with same tag)
  * @return  false if Dicom Element doesn't exist
@@ -163,7 +160,6 @@ bool Dict::ReplaceEntry(DictEntry const &newEntry)
 }
 
 /**
- * \ingroup Dict
  * \brief  removes an already existing Dicom Dictionary Entry,
  *         identified by its Tag
  * @param   key (group|element)
@@ -236,7 +232,6 @@ DictEntry *Dict::GetDictEntry(uint16_t group, uint16_t elem)
 //}
 
 /** 
- * \ingroup Dict
  * \brief   Consider all the entries of the public dicom dictionary.
  *          Build an hashtable whose keys are the names of the groups
  *          (fourth field in each line of dictionary) and whose corresponding
@@ -275,15 +270,18 @@ DictEntry *Dict::GetDictEntry(uint16_t group, uint16_t elem)
 //}
 
 /**
- * \brief   Initialise the visit of the Hash table (KeyHt)
+ * \brief   Get the first entry while visiting the Dict entries
+ * \return  The first DicEntry if found, otherwhise NULL
  */
-void Dict::InitTraversal()
+DictEntry *Dict::GetFirstEntry()
 {
    ItKeyHt = KeyHt.begin();
+   return &(ItKeyHt->second);
 }
 
 /**
  * \brief   Get the next entry while visiting the Hash table (KeyHt)
+ * \note : meaningfull only if GetFirstEntry already called
  * \return  The next DictEntry if found, otherwhise NULL
  */
 DictEntry *Dict::GetNextEntry()
index ee039f56d966b378e8fb41906cc4e1415a90c1e2..ab03c709ebee821d3c23b1dd8d327aa829cc6a6b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:41 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2005/01/18 07:49:41 $
+  Version:   $Revision: 1.33 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -69,11 +69,7 @@ public:
   // EntryNamesList *GetDictEntryNames();
   // EntryNamesByCatMap *GetDictEntryNamesByCategory();
 
-   /// \brief  Returns a ref to the Dicom Dictionary H table (map)
-   /// @return the Dicom Dictionary H table
-   //const TagKeyHT & GetEntries() const { return KeyHt; }
-
-   void InitTraversal();
+   DictEntry *GetFirstEntry();
    DictEntry *GetNextEntry();
 
 private:
index fd2c0108272922df7e9888d999e15b24b897a1ff..f8bb4f35d036407c104bd480d9c91ad632ff521b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:56:50 $
-  Version:   $Revision: 1.51 $
+  Date:      $Date: 2005/01/18 07:50:58 $
+  Version:   $Revision: 1.52 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -27,7 +27,6 @@ namespace gdcm
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
 /** 
- * \ingroup DictSet
  * \brief   The Dictionary Set obtained with this constructor simply
  *          contains the Default Public dictionary.
  */
@@ -40,7 +39,6 @@ DictSet::DictSet()
 }
 
 /**
- * \ingroup DictSet
  * \brief  Destructor 
  */
 DictSet::~DictSet() 
@@ -64,7 +62,6 @@ DictSet::~DictSet()
 //-----------------------------------------------------------------------------
 // Print
 /**
- * \ingroup DictSet
  * \brief   Print, in an informal fashion, the list of all the dictionaries
  *          contained is this DictSet, along with their respective content.
  * @param   os Output stream used for printing.
@@ -81,7 +78,6 @@ void DictSet::Print(std::ostream &os, std::string const & )
 //-----------------------------------------------------------------------------
 // Public
 /** 
- * \ingroup DictSet
  * \brief   Consider all the entries of the public dicom dictionary. 
  *          Build all list of all the tag names of all those entries.
  * \sa DictSet::GetPubDictTagNamesByCategory
@@ -96,7 +92,6 @@ void DictSet::Print(std::ostream &os, std::string const & )
 //}
 
 /** 
- * \ingroup DictSet
  * \brief   
  *          - Consider all the entries of the public dicom dictionary.
  *          - Build an hashtable whose keys are the names of the groups
@@ -133,7 +128,6 @@ void DictSet::Print(std::ostream &os, std::string const & )
 //}
 
 /**
- * \ingroup DictSet
  * \brief   Loads a dictionary from a specified file, and add it
  *          to already the existing ones contained in this DictSet.
  * @param   filename Absolute or relative filename containing the
@@ -151,7 +145,6 @@ Dict *DictSet::LoadDictFromFile(std::string const & filename,
 }
 
 /**
- * \ingroup DictSet
  * \brief   Retrieve the specified dictionary (when existing) from this
  *          DictSet.
  * @param   dictName The symbolic name of the searched dictionary.
@@ -232,15 +225,18 @@ std::string DictSet::BuildDictPath()
 
 
 /**
- * \brief   Initialise the visit of the Hash table (DictSetHT)
+ * \brief   Get the first entry while visiting the DictSet
+ * \return  The first Dict if found, otherwhise NULL
  */
-void DictSet::InitTraversal()
+Dict *DictSet::GetFirstEntry()
 {
    ItDictHt = Dicts.begin();
+   return ItDictHt->second;
 }
 
 /**
  * \brief   Get the next entry while visiting the Hash table (DictSetHT)
+ * \note : meaningfull only if GetFirstEntry already called
  * \return  The next Dict if found, otherwhise NULL
  */
 Dict *DictSet::GetNextEntry()
@@ -260,6 +256,11 @@ Dict *DictSet::GetNextEntry()
 
 //-----------------------------------------------------------------------------
 // Protected
+
+/**
+ * \brief   Adds a Dictionary to a DictSet
+ * \return  always true
+ */
 bool DictSet::AppendDict(Dict *newDict, DictKey const &name)
 {
    Dicts[name] = newDict;
index cf1fc0b5c2e20f58bcf41e845e4f46ffcdea5e6e..c6daed3190ea0e9212ff340808ccc507059d385f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 10:56:50 $
-  Version:   $Revision: 1.37 $
+  Date:      $Date: 2005/01/18 07:50:58 $
+  Version:   $Revision: 1.38 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -69,7 +69,7 @@ public:
 
    static std::string BuildDictPath();
 
-   void InitTraversal();
+   Dict *GetFirstEntry();
    Dict *GetNextEntry();
 
 protected: