-gdcmDicomDirSerie * gdcmDicomDirStudy::NewSerie(void) {
-
- std::list<gdcmElement> elemList;
- elemList=gdcmGlobal::GetDicomDirElements()->GetDicomDirSerieElements();
-
- FillObject(elemList);
- gdcmDicomDirSerie *st = new gdcmDicomDirSerie(i, j, ptagHT, plistEntries);
- series.push_front(st);
- return st;
-}
+DicomDirSerie *DicomDirStudy::NewSerie()
+{
+ DicomDirSerie *st = new DicomDirSerie();
+ Series.push_back(st);
+ return st;
+}
+
+/**
+ * \brief Remove all series in the study
+ */
+void DicomDirStudy::ClearSerie()
+{
+ for(ListDicomDirSerie::iterator cc = Series.begin();
+ cc != Series.end();
+ ++cc )
+ {
+ delete *cc;
+ }
+ Series.clear();
+}
+
+/**
+ * \brief Get the first entry while visiting the DicomDirSeries
+ * \return The first DicomDirSerie if found, otherwhise NULL
+ */
+DicomDirSerie *DicomDirStudy::GetFirstSerie()
+{
+ ItSerie = Series.begin();
+ if (ItSerie != Series.end())
+ return *ItSerie;
+ return NULL;
+}
+
+/**
+ * \brief Get the next entry while visiting the DicomDirSeries
+ * \note : meaningfull only if GetFirstEntry already called
+ * \return The next DicomDirSerie if found, otherwhise NULL
+ */
+DicomDirSerie *DicomDirStudy::GetNextSerie()
+{
+ gdcmAssertMacro (ItSerie != Series.end());
+
+ ++ItSerie;
+ if (ItSerie != Series.end())
+ return *ItSerie;
+ return NULL;
+}
+
+/**
+ * \brief Get the last entry while visiting the DicomDirSeries
+ * \return The first DicomDirSerie if found, otherwhise NULL
+ */
+DicomDirSerie *DicomDirStudy::GetLastSerie()
+{
+ ItSerie = Series.end();
+ if (ItSerie != Series.begin())
+ {
+ --ItSerie;
+ return *ItSerie;
+ }
+ return NULL;
+}
+