Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 07:53:42 $
- Version: $Revision: 1.25 $
+ Date: $Date: 2005/01/18 14:28:32 $
+ 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
#include "gdcmDicomDirElement.h"
#include "gdcmGlobal.h"
#include "gdcmDicomDirSerie.h"
+#include "gdcmDebug.h"
namespace gdcm
{
/**
* \brief Prints the Object
* @param os ostream to write to
+ * @param indent indent
* @return
*/
void DicomDirStudy::Print(std::ostream &os, std::string const & )
DicomDirSerie *DicomDirStudy::GetFirstEntry()
{
ItDicomDirSerie = Series.begin();
- return *ItDicomDirSerie;
+ if (ItDicomDirSerie != Series.end())
+ return *ItDicomDirSerie;
+ return NULL;
}
/**
*/
DicomDirSerie *DicomDirStudy::GetNextEntry()
{
- if (ItDicomDirSerie != Series.end())
+ gdcmAssertMacro (ItDicomDirSerie != Series.end());
{
- DicomDirSerie *tmp = *ItDicomDirSerie;
++ItDicomDirSerie;
- return tmp;
- }
- else
- {
- return NULL;
+ if (ItDicomDirSerie != Series.end())
+ return *ItDicomDirSerie;
}
+ return NULL;
}
//-----------------------------------------------------------------------------
// Protected