- 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 ) {