- ListDicomDirStudyElem const & elemList =
- Global::GetDicomDirElements()->GetDicomDirStudyElements();
-
- DicomDirStudy* st = new DicomDirStudy( PtagHT );
- st->FillObject(elemList);
-
- Studies.push_front(st);
- return st;
-}
+ gdcmAssertMacro (ItStudy != Studies.end())
+
+ ++ItStudy;
+ if (ItStudy != Studies.end())
+ return *ItStudy;
+ return NULL;
+}
+
+/**
+ * \brief Get the first entry while visiting the DicomDirStudy
+ * \return The first DicomDirStudy if found, otherwhise NULL
+ */
+DicomDirStudy *DicomDirPatient::GetLastStudy()
+{
+ ItStudy = Studies.end();
+ if (ItStudy != Studies.begin())
+ {
+ --ItStudy;
+ return *ItStudy;
+ }
+ return NULL;
+}