]> Creatis software - gdcm.git/commitdiff
2005-01-13 Jean-Pierre Roux <jpr@creatis.univ-lyon1.fr>
authorjpr <jpr>
Thu, 13 Jan 2005 14:56:39 +0000 (14:56 +0000)
committerjpr <jpr>
Thu, 13 Jan 2005 14:56:39 +0000 (14:56 +0000)
   * merging of Test/PrintDicomDir and Test/TestDimoDir
* removal of now redundant Test/PrintDicomDir
* enhancement of Example/PrintDicomDir

ChangeLog
Example/PrintDicomDir.cxx

index 96b10e1250645a7e941879890ee3effdbf19c716..437e7122561b0ea4d3be52308c59e443e7e80811 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-13 Jean-Pierre Roux <jpr@creatis.univ-lyon1.fr>
+   * merging of Test/PrintDicomDir and Test/TestDimoDir
+       * removal of now redundant Test/PrintDicomDir
+       * enhancement of Example/PrintDicomDir
+
 2005-01-13 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
    * Now, python test might work on systems
    * Add the PrintDicomDir test
index 0fd1386623117d9ff91b35f626c8bd0a4d1b0e61..f4bbd4474f5845648b95d820b4b8b57a5f0955e1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/13 14:20:18 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/01/13 14:56:39 $
+  Version:   $Revision: 1.13 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -59,11 +59,24 @@ int main(int argc, char* argv[])
    else
       detailLevel = 3;
 
+   if( !e1->IsReadable() )
+   {
+      std::cout<<"          DicomDir '"<<fileName
+               <<"' is not readable"<<std::endl
+               <<"          ...Failed"<<std::endl;
+
+      delete e1;
+      return 1;
+   }
 
    if(e1->GetDicomDirPatients().begin() == e1->GetDicomDirPatients().end() )
    {
-      std::cout<<"Empty list"<<std::endl;
-      return(1);
+      std::cout<<"          DicomDir '"<<fileName
+               <<" has no patients"<<std::endl
+               <<"          ...Failed"<<std::endl;
+
+      delete e1;
+      return 1;
    }
 
 // Structure use Examples