X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=src%2FgdcmDicomDirPatient.cxx;h=690799e29245723ecd5c84592471fedae7cd4bcf;hb=aff4772d80d574a6e549d9dfab0d085850039794;hp=815cdc1a901c249aa9d0e5482e3e233edc14588c;hpb=327dfe7647e3720b0f3125f9b19397cb9afc0ed3;p=gdcm.git diff --git a/src/gdcmDicomDirPatient.cxx b/src/gdcmDicomDirPatient.cxx index 815cdc1a..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/06 20:03:27 $ - Version: $Revision: 1.23 $ + 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 @@ -53,7 +53,7 @@ DicomDirPatient::~DicomDirPatient() * \brief Prints the Object * @param os ostream to write to */ -void DicomDirPatient::Print(std::ostream &os) +void DicomDirPatient::Print(std::ostream &os, std::string const & ) { os << "PATIENT" << std::endl; DicomDirObject::Print(os); @@ -102,6 +102,34 @@ DicomDirStudy* DicomDirPatient::NewStudy() return st; } +/** + * \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() +{ + if (ItDicomDirStudy != Studies.end()) + { + DicomDirStudy *tmp = *ItDicomDirStudy; + ++ItDicomDirStudy; + return tmp; + } + else + { + return NULL; + } +} //----------------------------------------------------------------------------- // Protected