-// gdcmDicomDirSerie.h
-//-----------------------------------------------------------------------------
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: gdcmDicomDirSerie.h,v $
+ Language: C++
+ Date: $Date: 2005/01/28 17:01:29 $
+ Version: $Revision: 1.25 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+
#ifndef GDCMDICOMDIRSERIE_H
#define GDCMDICOMDIRSERIE_H
-#include "gdcmObject.h"
-#include "gdcmDicomDirImage.h"
+#include "gdcmDicomDirObject.h"
+namespace gdcm
+{
+class DicomDirImage;
//-----------------------------------------------------------------------------
-typedef std::list<gdcmDicomDirImage *> ListDicomDirImage;
+typedef std::list<DicomDirImage *> ListDicomDirImage;
//-----------------------------------------------------------------------------
-class GDCM_EXPORT gdcmDicomDirSerie : public gdcmObject
+/**
+ * \brief describes a SERIE within a within a STUDY
+ * (DicomDirStudy) of a given DICOMDIR (DicomDir)
+ */
+class GDCM_EXPORT DicomDirSerie : public DicomDirObject
{
public:
- gdcmDicomDirSerie(ListTag::iterator begin,ListTag::iterator end);
- ~gdcmDicomDirSerie(void);
+ DicomDirSerie(bool empty=false);
+ ~DicomDirSerie();
- virtual void Print(std::ostream &os = std::cout);
+ void Print( std::ostream &os = std::cout, std::string const & indent = "" );
+ void WriteContent( std::ofstream *fp, FileType t );
+
+ // should avoid exposing internal mechanism
+ DicomDirImage *GetFirstImage();
+ DicomDirImage *GetNextImage();
+
+ /// adds the passed IMAGE to the IMAGE chained List for this SERIE.
+ void AddImage(DicomDirImage *obj) { Images.push_back(obj); };
+ DicomDirImage *NewImage();
- inline ListDicomDirImage &GetDicomDirImages() {return images;};
- inline void AddDicomDirImage(gdcmDicomDirImage *obj) {images.push_back(obj);};
+ void ClearImage();
private:
- ListDicomDirImage images;
-};
+ ///chained list of DicomDirImages (to be exploited recursively)
+ ListDicomDirImage Images;
+ /// iterator on the DicomDirImages of the current DicomDirSerie
+ ListDicomDirImage::iterator ItImage;
+};
+} // end namespace gdcm
//-----------------------------------------------------------------------------
#endif