]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDir.h
*** empty log message ***
[gdcm.git] / src / gdcmDicomDir.h
index b0bc7453254c1756998f572c4b1f353277849d29..e54995e3445a1d927dfbfd382e7d40bd13853e2e 100644 (file)
@@ -6,11 +6,15 @@
 #include "gdcmHeader.h"
 #include "gdcmCommon.h"
 #include "gdcmPatient.h"
+#include "gdcmMeta.h"
 #include "gdcmDicomDirElement.h"
 
+#include <list>
+#include <vector>
+
 //-----------------------------------------------------------------------------
-typedef std::list<gdcmPatient *> ListPatient;
-typedef std::list<gdcmHeader *>  ListHeader;
+typedef std::list<gdcmPatient *>   ListPatient;
+typedef std::vector<gdcmHeader *>  ListHeader;
 
 //-----------------------------------------------------------------------------
 /*
@@ -21,8 +25,9 @@ typedef std::list<gdcmHeader *>  ListHeader;
 class GDCM_EXPORT gdcmDicomDir: public gdcmParser
 {
 public:
-//   gdcmDicomDir(ListTag *l,          bool exception_on_error = false);
-   gdcmDicomDir(const char *FileName, bool parseDir = false,
+//   gdcmDicomDir(ListTag *l,         bool exception_on_error = false);
+   gdcmDicomDir(const char *FileName, 
+                bool parseDir = false,
                 bool exception_on_error = false);
    
    ~gdcmDicomDir(void);
@@ -30,6 +35,7 @@ public:
    void SetPrintLevel(int level) { printLevel = level; };
    virtual void Print(std::ostream &os = std::cout);
 
+   inline gdcmMeta   *GetMeta()      {return metaElems;};
    inline ListPatient &GetPatients() {return patients;};
 
 // Write
@@ -40,6 +46,7 @@ public:
    typedef enum
    {
       GDCM_NONE,
+      GDCM_META,
       GDCM_PATIENT,
       GDCM_STUDY,
       GDCM_SERIE,
@@ -52,15 +59,20 @@ protected:
 
 private:
    void CreateDicomDir(void);
-   void AddObjectToEnd(gdcmDicomDirType type,ListTag::iterator begin,ListTag::iterator end);
+   void AddObjectToEnd(gdcmDicomDirType type,
+                        ListTag::iterator begin,ListTag::iterator end);
+   void AddMetaToEnd   (ListTag::iterator begin,ListTag::iterator end);
    void AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end);
-   void AddStudyToEnd(ListTag::iterator begin,ListTag::iterator end);
-   void AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end);
-   void AddImageToEnd(ListTag::iterator begin,ListTag::iterator end);
+   void AddStudyToEnd  (ListTag::iterator begin,ListTag::iterator end);
+   void AddSerieToEnd  (ListTag::iterator begin,ListTag::iterator end);
+   void AddImageToEnd  (ListTag::iterator begin,ListTag::iterator end);
 
    void SetElements(std::string &path,ListHeader &list);
-   void SetElement(std::string &path,gdcmDicomDirType type,gdcmHeader *header);
+   void SetElement (std::string &path,gdcmDicomDirType type,gdcmHeader *header);
+
+   static bool HeaderLessThan(gdcmHeader *header1,gdcmHeader *header2);
 
+   gdcmMeta *metaElems;
    ListPatient patients;
 };