]> Creatis software - gdcm.git/blobdiff - src/gdcmSerieHeader.h
STYLE: Better approach to work around the timeval definition. Use type directly inste...
[gdcm.git] / src / gdcmSerieHeader.h
index 6b062296e03a618eab948f545fac3593f652c75f..99b325cd20c60f5c168ffeafc3e2437f966ddaff 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHeader.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/26 10:55:04 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2005/01/21 11:40:56 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #ifndef GDCMSERIEHEADER_H
 #define GDCMSERIEHEADER_H
 
-#include "gdcmHeader.h"
+#include "gdcmCommon.h"
+#include <list>
 
 namespace gdcm 
 {
-
+class File;
 //-----------------------------------------------------------------------------
-/*
- * \defgroup SerieHeader
+/**
  * \brief  
- *
  * - This class should be used for a stack of 2D dicom images.
- * - For a multiframe dicom image better use directly SerieHeader
-*/
+ */
 class GDCM_EXPORT SerieHeader 
 {
 public:
+   typedef std::list<File* > GdcmFileList;
+
     SerieHeader();
     ~SerieHeader();
 
    /// \todo should return bool or throw error ?
-   void AddFileName(std::string const & filename);
-   void AddGdcmFile(Header *file);
-   void SetDirectory(std::string const & dir);
+   void AddFileName(std::string const &filename);
+   void SetDirectory(std::string const &dir);
    void OrderGdcmFileList();
    
-   /// \warning Assumes all elements in the list have the same global infos.
-   ///          Assumes the list is not empty.
-   Header* GetGdcmHeader() { return CoherentGdcmFileList.front(); }
-
-   typedef std::list<Header* > GdcmHeaderList;
-
    /// \brief Gets the *coherent* File List
    /// @return the *coherent* File List
-   const GdcmHeaderList& GetGdcmFileList() { return CoherentGdcmFileList; }
+   /// Caller must call OrderGdcmFileList first
+   const GdcmFileList &GetGdcmFileList() { return CoherentGdcmFileList; }
 
 private:
    bool ImagePositionPatientOrdering();
    bool ImageNumberOrdering();
    bool FileNameOrdering();
    
-   GdcmHeaderList CoherentGdcmFileList;
+   GdcmFileList CoherentGdcmFileList;
+   /// Ref to the current Serie Instance UID to avoid mixing two series
+   /// within the same directory
+   std::string    CurrentSerieUID;
 };
 
 } // end namespace gdcm