]> Creatis software - gdcm.git/blobdiff - src/gdcmHeaderHelper.h
* DEVELOPPER spread out in Doc/Website/Developpers.html, CodingStyle.html,
[gdcm.git] / src / gdcmHeaderHelper.h
index 9aa136ccad3c35c78fa2655b4a4a2399ba7a6bbc..f2305d414c756d701242edea29135f90033beca4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeaderHelper.h,v $
   Language:  C++
-  Date:      $Date: 2004/06/21 04:18:26 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2004/07/02 13:55:28 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #include "gdcmHeader.h"
 
 //-----------------------------------------------------------------------------
-
-class GDCM_EXPORT gdcmHeaderHelper : public gdcmHeader
-{
-};
-
 /*
  * \defgroup gdcmSerieHeader
  * \brief  
@@ -34,30 +29,34 @@ class GDCM_EXPORT gdcmHeaderHelper : public gdcmHeader
  * - This class should be used for a stack of 2D dicom images.
  * - For a multiframe dicom image better use directly gdcmHeaderHelper
 */
-class GDCM_EXPORT gdcmSerieHeader {
+class GDCM_EXPORT gdcmSerieHeader 
+{
 public:
-    gdcmSerieHeader() {};
+    gdcmSerieHeader();
     ~gdcmSerieHeader();
 
-   void AddFileName(std::string filename); //should return bool or throw error ?
+   /// \todo should return bool or throw error ?
+   void AddFileName(std::string const & filename);
    void AddGdcmFile(gdcmHeader *file);
-   void SetDirectory(std::string dir);
+   void SetDirectory(std::string const & dir);
    void OrderGdcmFileList();
    
-   inline gdcmHeader *GetGdcmHeader()
-   {
-      //Assume all element in the list have the same global infos
-      return CoherentGdcmFileList.front();
-   }
-   
-   std::list<gdcmHeader*>& GetGdcmFileList();
+   /// \warning Assumes all elements in the list have the same global infos.
+   ///          Assumes the list is not empty.
+   gdcmHeader* GetGdcmHeader() { return CoherentGdcmFileList.front(); }
+
+   typedef std::list<gdcmHeader* > GdcmHeaderList;
+
+   /// \brief Gets the *coherent* File List
+   /// @return the *coherent* File List
+   const GdcmHeaderList& GetGdcmFileList() { return CoherentGdcmFileList; }
 
 private:
    bool ImagePositionPatientOrdering();
    bool ImageNumberOrdering();
    bool FileNameOrdering();
    
-   std::list<gdcmHeader*> CoherentGdcmFileList;
+   GdcmHeaderList CoherentGdcmFileList;
 };
 
 //-----------------------------------------------------------------------------