From ef0c45b292557174c768c2cc7fc11fea4d57e218 Mon Sep 17 00:00:00 2001 From: jpr Date: Tue, 18 Jan 2005 07:49:41 +0000 Subject: [PATCH] -add method GetFirstEntry to replace call to InitTraversal+GetNextEntry -remove InitTraversal method. --- src/gdcmDicomDir.cxx | 36 +++++++++--------------------------- src/gdcmDicomDir.h | 6 +++--- src/gdcmDicomDirElement.cxx | 11 +++++++---- src/gdcmDicomDirImage.cxx | 8 +++----- src/gdcmDicomDirMeta.cxx | 9 +++++---- src/gdcmDicomDirPatient.cxx | 13 ++++++++----- src/gdcmDicomDirPatient.h | 9 +++------ src/gdcmDicomDirSerie.cxx | 11 +++++++---- src/gdcmDicomDirSerie.h | 9 +++------ src/gdcmDicomDirStudy.cxx | 16 +++++++++------- src/gdcmDicomDirStudy.h | 9 +++------ src/gdcmDict.cxx | 16 +++++++--------- src/gdcmDict.h | 10 +++------- src/gdcmDictSet.cxx | 23 ++++++++++++----------- src/gdcmDictSet.h | 6 +++--- 15 files changed, 85 insertions(+), 107 deletions(-) diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 1d5bed3a..1bfa211d 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -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() diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index 0391c5a2..eca86fba 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -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 diff --git a/src/gdcmDicomDirElement.cxx b/src/gdcmDicomDirElement.cxx index dab39844..b393d5dd 100644 --- a/src/gdcmDicomDirElement.cxx +++ b/src/gdcmDicomDirElement.cxx @@ -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) { diff --git a/src/gdcmDicomDirImage.cxx b/src/gdcmDicomDirImage.cxx index e1f201ff..74632269 100644 --- a/src/gdcmDicomDirImage.cxx +++ b/src/gdcmDicomDirImage.cxx @@ -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 & ) diff --git a/src/gdcmDicomDirMeta.cxx b/src/gdcmDicomDirMeta.cxx index b1e40f54..b21b126f 100644 --- a/src/gdcmDicomDirMeta.cxx +++ b/src/gdcmDicomDirMeta.cxx @@ -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) diff --git a/src/gdcmDicomDirPatient.cxx b/src/gdcmDicomDirPatient.cxx index e3235ec8..690799e2 100644 --- a/src/gdcmDicomDirPatient.cxx +++ b/src/gdcmDicomDirPatient.cxx @@ -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() diff --git a/src/gdcmDicomDirPatient.h b/src/gdcmDicomDirPatient.h index e1cc299e..97f78cf7 100644 --- a/src/gdcmDicomDirPatient.h +++ b/src/gdcmDicomDirPatient.h @@ -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. diff --git a/src/gdcmDicomDirSerie.cxx b/src/gdcmDicomDirSerie.cxx index 24529ce3..8632bfa2 100644 --- a/src/gdcmDicomDirSerie.cxx +++ b/src/gdcmDicomDirSerie.cxx @@ -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() diff --git a/src/gdcmDicomDirSerie.h b/src/gdcmDicomDirSerie.h index 99223174..4449d20d 100644 --- a/src/gdcmDicomDirSerie.h +++ b/src/gdcmDicomDirSerie.h @@ -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. diff --git a/src/gdcmDicomDirStudy.cxx b/src/gdcmDicomDirStudy.cxx index 849cc78c..e1824d7f 100644 --- a/src/gdcmDicomDirStudy.cxx +++ b/src/gdcmDicomDirStudy.cxx @@ -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() { diff --git a/src/gdcmDicomDirStudy.h b/src/gdcmDicomDirStudy.h index 350fe6dc..1a33f86f 100644 --- a/src/gdcmDicomDirStudy.h +++ b/src/gdcmDicomDirStudy.h @@ -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. diff --git a/src/gdcmDict.cxx b/src/gdcmDict.cxx index 5d1a7826..dc7e5c0c 100644 --- a/src/gdcmDict.cxx +++ b/src/gdcmDict.cxx @@ -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() diff --git a/src/gdcmDict.h b/src/gdcmDict.h index ee039f56..ab03c709 100644 --- a/src/gdcmDict.h +++ b/src/gdcmDict.h @@ -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: diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index fd2c0108..f8bb4f35 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -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; diff --git a/src/gdcmDictSet.h b/src/gdcmDictSet.h index cf1fc0b5..c6daed31 100644 --- a/src/gdcmDictSet.h +++ b/src/gdcmDictSet.h @@ -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: -- 2.48.1