From: jpr Date: Tue, 3 May 2005 10:57:27 +0000 (+0000) Subject: gdcm::File::IsReadable() is no usable here, because we deal with X-Git-Tag: Version1.2.bp~730 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=28c9df4692ff233549a2960fde90f6d47b945002;p=gdcm.git 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) BTH : how can you call a method belonging to parent class; when overloaded in the child class, with VS60? --- diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index 7fb53f00..fd42fd8a 100644 --- a/Example/PrintFile.cxx +++ b/Example/PrintFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintFile.cxx,v $ Language: C++ - Date: $Date: 2005/05/02 17:28:15 $ - Version: $Revision: 1.34 $ + Date: $Date: 2005/05/03 10:57:27 $ + Version: $Revision: 1.35 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -44,12 +44,16 @@ int main(int argc, char *argv[]) if (argc > 3) gdcm::Debug::DebugOn(); - + + bool res; if (argc > 4) - e1->SetLoadMode(NO_SEQ | NO_SHADOW); - e1->Load( fileName.c_str() ); + e1->SetLoadMode(NO_SEQ | NO_SHADOW); - if ( !e1->IsReadable() ) + // 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) + res = e1->Load( fileName.c_str() ); + if ( res ) { delete e1; return 0; diff --git a/Example/exAnonymizeNoLoad.cxx b/Example/exAnonymizeNoLoad.cxx index a5d3de75..e80cd801 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/03 10:40:28 $ - Version: $Revision: 1.6 $ + Date: $Date: 2005/05/03 10:57:27 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -52,8 +52,10 @@ int main(int argc, char *argv[]) f1 = new gdcm::File( ); f1->SetLoadMode(NO_SEQ - NO_SHADOW); res = f1->Load(fileName); - // IsReadable() is no usable here, because we deal with - // any kind of gdcm::Readable *document* (no only gdcm::File) + + // 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 <