X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDir.h;h=3fc3c11f5a3bacbd6457642db12bc98f235d5ae1;hb=2974fc9af7458cd3a94251a12d4af74fefe22275;hp=656d949a3e768f59e977ed938e9733c251653fd3;hpb=7ab2217ab6b3dbfc5c3347c6c9d8a7cbf1b53dcd;p=gdcm.git diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index 656d949a..3fc3c11f 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.h,v $ Language: C++ - Date: $Date: 2005/03/04 09:53:21 $ - Version: $Revision: 1.57 $ + 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(); @@ -102,6 +117,8 @@ public: // Write bool WriteDicomDir(std::string const &fileName); + bool AnonymizeDicomDir(); + /// Types of the DicomDirObject within the DicomDir typedef enum { @@ -110,6 +127,7 @@ public: GDCM_DICOMDIR_PATIENT, GDCM_DICOMDIR_STUDY, GDCM_DICOMDIR_SERIE, + GDCM_DICOMDIR_VISIT, GDCM_DICOMDIR_IMAGE } DicomDirType; @@ -122,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); @@ -166,6 +185,7 @@ private: float Progress; /// value of the ??? for any progress bar bool Abort; + bool ParseDir; }; } // end namespace gdcm //-----------------------------------------------------------------------------