X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDir.cxx;h=2af9aaf2b5825d8b469ea27fb8c5420f4dbef67d;hb=dc9e22215d010c85822ee4cf6c89af586e1e5134;hp=27b840f24c2b20d3bcabb7935ba0f3812827fafb;hpb=7ab309d561964c2ab5f9cd5d51d2fb212cd5dfcb;p=gdcm.git diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 27b840f2..2af9aaf2 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/04/14 14:26:19 $ - Version: $Revision: 1.137 $ + Date: $Date: 2005/06/03 16:08:16 $ + Version: $Revision: 1.140 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -60,17 +60,18 @@ // Directory Record Type Directory Record Types which may be included // in the next lower-level directory Entity // -// (Root directory Entity) PATIENT +// (Root directory Entity) PATIENT, TOPIC, PRIVATE // -// PATIENT STUDY +// PATIENT STUDY, PRIVATE // -// STUDY SERIES, VISIT, RESULTS, STUDY COMPONENT +// STUDY SERIES, VISIT, RESULTS, STUDY COMPONENT, PRIVATE // // SERIES IMAGE, OVERLAYS, MODALITY LUT, VOI LUT, // CURVE, STORED PRINT, RT DOSE, RT STRUCTURE SET // RT PLAN, RT TREAT RECORD, PRESENTATION, WAVEFORM, // SR DOCUMENT, KEY OBJECT DOC, SPECTROSCOPY, -// RAW DATA, REGISTRATION, FIDUCIAL +// RAW DATA, REGISTRATION, FIDUCIAL, PRIVATE, +// ENCAP DOC // IMAGE // OVERLAY // MODALITY LUT @@ -89,6 +90,8 @@ // RAW DATA // REGISTRATION // FIDUCIAL +// PRIVATE +// ENCAP DOC // // ---------------------- // The current gdcm version only deals with : @@ -133,7 +136,7 @@ DicomDir::DicomDir(std::string const &fileName, bool parseDir ): Document( ) { // At this step, Document constructor is already executed, - // whatever user passed (a root directory or a DICOMDIR) + // whatever user passed (either a root directory or a DICOMDIR) // and whatever the value of parseDir was. // (nothing is cheked in Document constructor, to avoid overhead) @@ -161,7 +164,7 @@ DicomDir::~DicomDir() //----------------------------------------------------------------------------- // Public -void DicomDir::Load(std::string const &fileName ) +bool DicomDir::Load(std::string const &fileName ) { Filename = fileName; // We should clean out anything that already exists. @@ -175,13 +178,13 @@ void DicomDir::Load(std::string const &fileName ) Fp = 0; if ( !OpenFile() ) { - return; + return false; } Document::Load(fileName); if ( GetFirstEntry() == 0 ) // when user passed a Directory to parse { gdcmWarningMacro( "Entry HT empty for file: "<< fileName); - return; + return false; } // Directory record sequence DocEntry *e = GetDocEntry(0x0004, 0x1220); @@ -189,6 +192,7 @@ void DicomDir::Load(std::string const &fileName ) { gdcmWarningMacro( "NO 'Directory record sequence' (0x0004,0x1220)" << " in file " << fileName); + return false; } else CreateDicomDir(); @@ -207,8 +211,10 @@ void DicomDir::Load(std::string const &fileName ) } NewMeta(); gdcmWarningMacro( "Parse directory and create the DicomDir : " << Filename ); + ParseDirectory(); } + return true; } /** @@ -524,14 +530,6 @@ bool DicomDir::AnonymizeDicomDir() return true; } - - - - - - - - //----------------------------------------------------------------------------- // Protected /**