Program: gdcm\r
Module: $RCSfile: Bmp2Dcm.cxx,v $\r
Language: C++\r
- Date: $Date: 2007/06/26 15:40:38 $\r
- Version: $Revision: 1.1 $\r
+ Date: $Date: 2007/06/27 08:43:25 $\r
+ Version: $Revision: 1.2 $\r
\r
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de\r
l'Image). All rights reserved. See Doc/License.txt or\r
std::string patName = am->ArgMgrGetString("patname", dirName);\r
\r
bool userDefinedStudy = am->ArgMgrDefined("studyUID");\r
- const char *studyUID = am->ArgMgrGetString("studyUID"); \r
+ const char *studyUID;\r
+ if (userDefinedStudy)\r
+ studyUID = am->ArgMgrGetString("studyUID"); \r
\r
-// not described *on purpose* in the Usage ! \r
+ // not described *on purpose* in the Usage ! \r
bool userDefinedSerie = am->ArgMgrDefined("serieUID"); \r
- const char *serieUID = am->ArgMgrGetString("serieUID");\r
+ const char *serieUID;\r
+ if(userDefinedSerie)\r
+ serieUID = am->ArgMgrGetString("serieUID");\r
\r
/* if unused Param we give up */\r
if ( am->ArgMgrPrintUnusedLabels() )\r
\r
delete am; // ------ we don't need Arguments Manager any longer ------\r
\r
+\r
+ // ----- Begin Processing -----\r
+ \r
int *dim;\r
std::string nomFich;\r
\r
\r
}\r
else // ====== Deal with a (single Patient) Directory ======\r
- { \r
+ { \r
+ \r
+ if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(dirName) )\r
+ {\r
+ std::cout << "KO : [" << dirName << "] is not a Directory." << std::endl;\r
+ return 0;\r
+ }\r
+ else\r
+ {\r
+ if (verbose)\r
+ std::cout << "OK : [" << dirName << "] is a Directory." << std::endl;\r
+ } \r
std::string strStudyUID;\r
std::string strSerieUID;\r
\r