]> Creatis software - creaBruker.git/commitdiff
Mon debugger n'interprete pas les lignes de commandes si les options ne commencent...
authorDenis Grenier <Denis.Grenier@creatis.insa-lyon.fr>
Tue, 26 Jan 2010 21:44:27 +0000 (21:44 +0000)
committerDenis Grenier <Denis.Grenier@creatis.insa-lyon.fr>
Tue, 26 Jan 2010 21:44:27 +0000 (21:44 +0000)
appli/testBruker2Dicom/testBruker2Dicom.cxx

index b8d78eab5dfb131afa47ab7a156a5293bd584afe..98b35528ed050107323cb587ff4fe1b1d376844c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: testBruker2Dicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/01/11 18:00:17 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2010/01/26 21:44:27 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -90,11 +90,11 @@ int main(int argc, char *argv[])
    " \n testBruker2Dicom : \n                                                 ",
    " - explores the given directory (holding a FULL Bruker exam), at the 3 levels,",
    " - fills an equivalent Directory with the MHD files and/or the DICOM files",
-   " usage: testBruker2Dicom dirin=rootDirectoryName                          ",
-   "                         dirout=outputDirectoryName                       ",
-   "                   [D] [M]                                                ",
-   "                   [{b|l}] b:BigEndian,l:LittleEndian default : l         ",
-   "                   [debug] [verbose] [listonly]                           ",
+   " usage: testBruker2Dicom --dirin=rootDirectoryName                          ",
+   "                         --dirout=outputDirectoryName                       ",
+   "                   [-D] [-M]                                                ",
+   "                   [{-b|-l}] b:BigEndian,l:LittleEndian default : l         ",
+   "                   [--debug] [--verbose] [--listonly] [--usage]                          ",
    "                                                                          ",
    "   D         : user wants to export as DICOM                              ",
    "   M         : user wants to export as MHD                                ",   
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
    // ------------ Initialize Arguments Manager ----------------  
    GDCM_NAME_SPACE::ArgMgr *am= new GDCM_NAME_SPACE::ArgMgr(argc, argv);
   
-   if (argc == 1 || am->ArgMgrDefined("usage") )
+   if (argc == 1 || am->ArgMgrDefined("--usage") )
    {
       am->ArgMgrUsage(usage); // Display 'usage'
       delete am;
@@ -120,24 +120,24 @@ int main(int argc, char *argv[])
    Bruker2Dicom b2d;
       
    const char *dirNamein;   
-   dirNamein  = am->ArgMgrGetString("dirin",".");
+   dirNamein  = am->ArgMgrGetString("--dirin",".");
 
    const char *dirNameout;   
-   dirNameout  = am->ArgMgrGetString("dirout",".");
+   dirNameout  = am->ArgMgrGetString("--dirout",".");
 
 // note : Big Endian / Little Endian pb not yet dealt with.
 //        not a great issue, since everybody (?) works on Intell procs  
-   int b = am->ArgMgrDefined("b");
-   int l = am->ArgMgrDefined("l");
+   int b = am->ArgMgrDefined("-b");
+   int l = am->ArgMgrDefined("-l");
 
-   if (am->ArgMgrDefined("debug"))
+   if (am->ArgMgrDefined("--debug"))
       GDCM_NAME_SPACE::Debug::DebugOn();
 
-   b2d.verbose  = am->ArgMgrDefined("verbose");      
-   int listonly = am->ArgMgrDefined("listonly");
+   b2d.verbose  = am->ArgMgrDefined("--verbose");      
+   int listonly = am->ArgMgrDefined("--listonly");
    
-   int dicom    = am->ArgMgrDefined("D");
-   int mhd      = am->ArgMgrDefined("M");
+   int dicom    = am->ArgMgrDefined("-D");
+   int mhd      = am->ArgMgrDefined("-M");
    
    if (dicom)
       b2d.SetConvertModeToDicom();