]> Creatis software - creaBruker.git/blobdiff - appli/testBruker2Dicom/testBruker2Dicom.cxx
Perform a desperate try when incomplete exam is supplied
[creaBruker.git] / appli / testBruker2Dicom / testBruker2Dicom.cxx
index a9a6c328abf6126873f73c53fc727cad4990f190..b81541029e6a5ffd421633b0ae322f73fca95c6f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: testBruker2Dicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/05/27 10:43:07 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2009/12/14 14:08:08 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -31,6 +31,7 @@
 #include "gdcmArgMgr.h"
 
 #include "bruker2dicom.h"
+#include "brukerexception.h"
 
 // ===================================================================================================
 /**
@@ -87,7 +88,7 @@ int main(int argc, char *argv[])
 {
    START_USAGE(usage)
    " \n testBruker2Dicom : \n                                                 ",
-   " - explores the given directory, at the 3 levels,                         ",
+   " - explores the given directory (holding a FULL Bruker exam), at the 3 levels,",
    " - fills an equivalent Directory with the MHD files or the DICOM files    ",
    " usage: testBruker2Dicom dirin=rootDirectoryName                          ",
    "                         dirout=outputDirectoryName                       ",
@@ -98,6 +99,11 @@ int main(int argc, char *argv[])
    "   D         : user wants to export as DICOM                              ",
    "   M         : user wants to export as MHD                                ",   
    "  debug      : developper wants to run the program in 'debug mode'        ",
+   "                                                                          ",   
+   "  REMARK :                                                                ",   
+   "         If you were supplied  an *incomplete* Bruker exam                ",
+   "        (e.g. only the '2' serie) put it a 'root' directory,              ",
+   "         and run this test using this 'root' directory as 'dirin'         ",   
    FINISH_USAGE
    
    // ------------ Initialize Arguments Manager ----------------  
@@ -152,7 +158,7 @@ int main(int argc, char *argv[])
 // b2d.day : unused  ...
    b2d.day          = am->ArgMgrGetString("day", "You_forget_the_Day");
       
-  
+ delete am;  // we don't need Argument Manager any longer  
 
    // ----------- End Arguments Manager ---------
    
@@ -178,9 +184,12 @@ int main(int argc, char *argv[])
    }
   */
 
+   catch (BrukerHopelessException &e)
+   {
+      std::cout << "And Hopless Exception was thrown  (" << e.what() << ") " << std::endl;
+   }
 
 
- delete am;  // we don't need Argument Manager any longer
 }