X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FAnonymizeDicomDir.cxx;h=cfb909c62c0eddfaeeda45a3495f0df21009179d;hb=4d992954520d43c6f2fb555b7cd721574978c23a;hp=f4ab3fe3dba629b8805e1892851bdec3dba31df8;hpb=fbd2698cb0545343abc2d8aefe92bab1f5b3eaa3;p=gdcm.git diff --git a/Example/AnonymizeDicomDir.cxx b/Example/AnonymizeDicomDir.cxx index f4ab3fe3..cfb909c6 100644 --- a/Example/AnonymizeDicomDir.cxx +++ b/Example/AnonymizeDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: AnonymizeDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/06/07 14:41:47 $ - Version: $Revision: 1.3 $ + Date: $Date: 2005/07/07 17:31:53 $ + Version: $Revision: 1.4 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -100,19 +100,24 @@ int main(int argc, char *argv[]) // Read the input DICOMDIR // ============================================================ - gdcm::File *f1 = new gdcm::File( fileName ); - if (!f1->IsReadable()) { + gdcm::File *f; + f = new gdcm::File( ); + f->SetLoadMode(0); + f->SetFileName( fileName ); + bool res = f->Load(); + if ( !res ) + { std::cerr << "Sorry, " << fileName <<" not a gdcm-readable " << "file" <GetDocEntry(0x0004, 0x1220); + gdcm::DocEntry *e = f->GetDocEntry(0x0004, 0x1220); if ( !e ) { std::cout << "No Directory Record Sequence (0004,1220) found" <