X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FexAnonymizeNoLoad.cxx;h=52968e0e967685580a5be34b301397298f86e19c;hb=ea8b3b174ef206bc2b6999f9945822778b71ff5d;hp=11db1401b78be9b548c2fc395198b887b245b865;hpb=1fe34ecf6db1977790024ac1a0a4ce5be010b9d8;p=gdcm.git diff --git a/Example/exAnonymizeNoLoad.cxx b/Example/exAnonymizeNoLoad.cxx index 11db1401..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/05/02 17:28:15 $ - Version: $Revision: 1.5 $ + 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->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 <