From: jpr Date: Fri, 8 Jul 2005 10:13:38 +0000 (+0000) Subject: New features for DicomDir X-Git-Tag: Version1.2.bp~346 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a770affb0ae95b1a1c0647ce7ee84f179e6714da;hp=1e79eb643b485fef0bf0c3e0d4b113364e9ec411;p=gdcm.git New features for DicomDir --- diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 1226e495..60d53366 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/07/07 16:37:40 $ - Version: $Revision: 1.144 $ + Date: $Date: 2005/07/08 10:13:38 $ + Version: $Revision: 1.145 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -117,6 +117,7 @@ DicomDir::DicomDir() :Document( ) { Initialize(); // sets all private fields to NULL + ParseDir = false; NewMeta(); } diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index ea066735..64b61a3a 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/07/07 16:37:41 $ - Version: $Revision: 1.61 $ + Date: $Date: 2005/07/08 10:13:38 $ + Version: $Revision: 1.62 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -59,8 +59,19 @@ public: 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(); diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index 852bdcb5..1562eb4d 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.h,v $ Language: C++ - Date: $Date: 2005/07/07 16:37:41 $ - Version: $Revision: 1.114 $ + Date: $Date: 2005/07/08 10:13:38 $ + Version: $Revision: 1.115 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -85,8 +85,9 @@ typedef std::list ListElements; /// Accessor to \ref Filename const std::string &GetFileName() const { return Filename; } /// Accessor to \ref Filename - void SetFileName(std::string const &fileName) { if (Filename != fileName) - Filename = fileName, IsDocumentModified = true; } + virtual void SetFileName(std::string const &fileName) + { if (Filename != fileName) + Filename = fileName, IsDocumentModified = true; } std::ifstream *OpenFile(); bool CloseFile(); @@ -111,7 +112,7 @@ typedef std::list ListElements; * @param mode Load mode to be used */ void SetLoadMode (int mode) { if (LoadMode != mode) - LoadMode = mode, IsDocumentModified = true; } + LoadMode = mode, IsDocumentModified = true; } protected: // Methods