From: Denis Grenier Date: Tue, 26 Jan 2010 21:44:27 +0000 (+0000) Subject: Mon debugger n'interprete pas les lignes de commandes si les options ne commencent... X-Git-Tag: CREATOOLS.2-0-3~24 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=16d96d3df8dd539fd54738207df5f4f4180cd5e2;p=creaBruker.git Mon debugger n'interprete pas les lignes de commandes si les options ne commencent pas par - ou -- --- diff --git a/appli/testBruker2Dicom/testBruker2Dicom.cxx b/appli/testBruker2Dicom/testBruker2Dicom.cxx index b8d78ea..98b3552 100644 --- a/appli/testBruker2Dicom/testBruker2Dicom.cxx +++ b/appli/testBruker2Dicom/testBruker2Dicom.cxx @@ -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();