X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=Example%2FexAnonymizeNoLoad.cxx;h=52968e0e967685580a5be34b301397298f86e19c;hb=ad620650da137b2efe17700b9595d62333940456;hp=0417a74e48e657b011457fdcd8a863196a75c5b5;hpb=f5f970ba3289a24a4f639dbe393ca06f71d7fe64;p=gdcm.git diff --git a/Example/exAnonymizeNoLoad.cxx b/Example/exAnonymizeNoLoad.cxx index 0417a74e..52968e0e 100644 --- a/Example/exAnonymizeNoLoad.cxx +++ b/Example/exAnonymizeNoLoad.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exAnonymizeNoLoad.cxx,v $ Language: C++ - Date: $Date: 2005/04/27 12:40:28 $ - Version: $Revision: 1.4 $ + Date: $Date: 2005/05/04 07:29:17 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -47,12 +47,16 @@ int main(int argc, char *argv[]) // ============================================================ // Read the input image. // ============================================================ + bool res; f1 = new gdcm::File( ); f1->SetLoadMode(NO_SEQ - NO_SHADOW); - f1->Load(fileName); - // We want to process any kind of gdcm::Readable document - if (!f1->gdcm::Document::IsReadable()) { + res = f1->Load(fileName); + + // gdcm::File::IsReadable() is no usable here, because we deal with + // any kind of gdcm::Readable *document* + // not only gdcm::File (as opposed to gdcm::DicomDir) + if ( !res ) { std::cout <