-gdcmDicomDirImage * gdcmDicomDirSerie::NewImage(void) {
- std::list<gdcmElement> elemList;
- elemList=gdcmGlobal::GetDicomDirElements()->GetDicomDirImageElements();
-
- FillObject(elemList);
- gdcmDicomDirImage *st = new gdcmDicomDirImage(i, j, ptagHT, plistEntries);
- images.push_front(st);
- return st;
-
-
-}
+DicomDirImage *DicomDirSerie::NewImage()
+{
+ DicomDirImage *st = new DicomDirImage();
+ Images.push_back(st);
+ return st;
+}
+
+/**
+ * \brief Get the first entry while visiting the DicomDirImage
+ * \return The first DicomDirImage if found, otherwhise NULL
+ */
+DicomDirImage *DicomDirSerie::GetFirstImage()
+{
+ ItImage = Images.begin();
+ if (ItImage != Images.end())
+ return *ItImage;
+ return NULL;
+}
+
+/**
+ * \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::GetNextImage()
+{
+ gdcmAssertMacro (ItImage != Images.end());
+ {
+ ++ItImage;
+ if (ItImage != Images.end())
+ return *ItImage;
+ }
+ return NULL;
+}
+
+/**
+ * \brief Get the first entry while visiting the DicomDirImage
+ * \return The first DicomDirImage if found, otherwhise NULL
+ */
+DicomDirImage *DicomDirSerie::GetLastImage()
+{
+ ItImage = Images.end();
+ if (ItImage != Images.begin())
+ {
+ --ItImage;
+ return *ItImage;
+ }
+ return NULL;
+}
+