]> Creatis software - gdcm.git/commitdiff
gdcm::File::IsReadable() is no usable here, because we deal with
authorjpr <jpr>
Tue, 3 May 2005 10:57:27 +0000 (10:57 +0000)
committerjpr <jpr>
Tue, 3 May 2005 10:57:27 +0000 (10:57 +0000)
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?

Example/PrintFile.cxx
Example/exAnonymizeNoLoad.cxx

index 7fb53f008fb111d0c1794af753f7e66b0301c2b3..fd42fd8a3c2b1417dc5e9094e3f93081adc0ee58 100644 (file)
@@ -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;
index a5d3de75cef24fa173bff234f13b83f3d9ea8a6b..e80cd80118944c376c89e7e5c8014f852d1a4198 100644 (file)
@@ -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 <<std::endl
            << "Sorry, " << fileName <<"  not a gdcm-readable "