]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDir.h
BUG: Trying to debug jasper...
[gdcm.git] / src / gdcmDicomDir.h
index ea93005a293eb66bd16c84b1738139ea9be69950..3fc3c11f5a3bacbd6457642db12bc98f235d5ae1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.h,v $
   Language:  C++
-  Date:      $Date: 2005/03/09 19:29:38 $
-  Version:   $Revision: 1.58 $
+  Date:      $Date: 2005/07/08 19:07:12 $
+  Version:   $Revision: 1.63 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -32,6 +32,7 @@ class DicomDirMeta;
 class DicomDirElement;
 class DicomDirStudy;
 class DicomDirSerie;
+class DicomDirVisit;
 class DicomDirImage;
 class SQItem;
 
@@ -56,8 +57,22 @@ public:
                    
    ~DicomDir();
 
+   bool Load( std::string const &filename );
+   bool Load( );
    void Print(std::ostream &os = std::cout, std::string const &indent = "" );
-
+   
+   /// Sets the root Directory name to parse, recursively
+   void SetDirectoryName(std::string const &dirName) 
+        { ParseDir = true; if (Filename != dirName)
+                               Filename = dirName, IsDocumentModified = true; };
+   /// Accessor to \ref Filename
+   virtual void SetFileName(std::string const &fileName) 
+                   { ParseDir = false; if (Filename != fileName)
+                               Filename = fileName, IsDocumentModified = true; }
+
+   /// DEPRECATED : use SetDirectoryName
+   void SetParseDir(bool parseDir)  { ParseDir = parseDir; };
+   
    // Informations contained in the parser
    virtual bool IsReadable();
 
@@ -112,6 +127,7 @@ public:
       GDCM_DICOMDIR_PATIENT,
       GDCM_DICOMDIR_STUDY,
       GDCM_DICOMDIR_SERIE,
+      GDCM_DICOMDIR_VISIT,
       GDCM_DICOMDIR_IMAGE
    } DicomDirType;
    
@@ -124,10 +140,11 @@ protected:
 private:
    void Initialize();
    void CreateDicomDir();
-
+   bool DoTheLoadingJob();
    bool AddPatientToEnd(DicomDirPatient *dd);
    bool AddStudyToEnd  (DicomDirStudy *dd);
    bool AddSerieToEnd  (DicomDirSerie *dd);
+   bool AddVisitToEnd  (DicomDirVisit *dd);
    bool AddImageToEnd  (DicomDirImage *dd);
 
    void SetElements(std::string const &path, VectDocument const &list);
@@ -168,6 +185,7 @@ private:
    float Progress;
    /// value of the ??? for any progress bar   
    bool Abort;
+   bool ParseDir;
 };
 } // end namespace gdcm
 //-----------------------------------------------------------------------------