]> Creatis software - gdcm.git/commitdiff
passed some std::string as 'reference'
authorjpr <jpr>
Wed, 17 Mar 2004 14:45:13 +0000 (14:45 +0000)
committerjpr <jpr>
Wed, 17 Mar 2004 14:45:13 +0000 (14:45 +0000)
src/gdcmDicomDir.cxx
src/gdcmDicomDirImage.cxx
src/gdcmUtil.cxx
src/gdcmUtil.h

index f1c7e679db359efd404e77cc92e81e3909874821..d61e5c11a58efe4f2f8dcbc90e7b7f96e08c3dc4 100644 (file)
@@ -37,11 +37,7 @@ gdcmDicomDir::gdcmDicomDir(const char *Name, bool parseDir,
 {
  // que l'on ai passe un root directory ou un DICOMDIR
  // et quelle que soit la valeur de parseDir,
- // on a lance gdcmParser
- cout << "---------------------------------------------- " << Name <<endl;
-
+ // on a lance gdcmParser 
       
    startMethod=            NULL;
    progressMethod=         NULL;
@@ -59,16 +55,16 @@ gdcmDicomDir::gdcmDicomDir(const char *Name, bool parseDir,
    metaElems=NULL;
 
 // gdcmParser already  executed
-// Si on a passe un root directory, on est assurĂ© de n'avoir rien ramenĂ©
+// if user passed a root directory, sure we didn't get anything
 
    if( GetListEntry().begin()==GetListEntry().end() ) 
    {
-     // Si, en plus, parseDir == false, ca devrait etre une erreur
+     // if parseDir == false, it should be tagged as an error
       dbg.Verbose(0, "gdcmDicomDir::gdcmDicomDir : entry list empty");
 
       if(strlen(Name)==1 && Name[0]=='.') { // user passed '.' as Name
                                             // we get current directory name
-         char*dummy=(char*) malloc(1000); // TODO : check with Windoze
+         char*dummy=(char*) malloc(1000);   // TODO : check with Windoze
          getcwd(dummy,(size_t)1000);
          SetFileName(dummy); // will be converted into a string
          free(dummy);        // no longer needed   
index 1d08986925166d908e0fa1a54535d56206ecc44c..c9fd47b76a04ca6a6d827d0bf5a35fc372b81350 100644 (file)
@@ -7,7 +7,7 @@
 
 /**
  * \ingroup gdcmDicomDirImage
- * \brief   
+ * \brief  Constructor 
  * @param  begin  iterator (inside the gdcmParser chained list)
  *                on the first Header Entry (i.e Dicom Element)
  *                related to this "IMAGE" part
index cfef1bee4b38263a58f7277488a39418d0432489..42c176da5f9a6d8e47c12e07d967612d5e00c7fa 100644 (file)
@@ -175,7 +175,7 @@ const std::string SEPARATOR = "/";
 /*
  * \brief   Get the (directory) path from a full path file name
  */
-std::string GetPath(std::string fullName)
+std::string GetPath(std::string &fullName)
 {
    int pos1=fullName.rfind("/");
    int pos2=fullName.rfind("\\");
@@ -190,7 +190,7 @@ std::string GetPath(std::string fullName)
 /*
  * \brief   Get the (last) name of a full path file name
  */
-std::string GetName(std::string fullName)
+std::string GetName(std::string &fullName)
 {   
   int fin=fullName.length()-1;
   char a =fullName.c_str()[fin];
index 69cd609e56d6e9024e114c9f5e08d10c24e53d8f..af4a67688146c8b3b28b1637cbb184a6d0080f39 100644 (file)
@@ -74,9 +74,9 @@ extern gdcmDebug dbg;
 char *_cleanString(char *v);
 std::string _CreateCleanString(std::string s);
 
-void NormalizePath(std::string &name);
-std::string GetPath(std::string fullName);
-std::string GetName(std::string fullName);
+void NormalizePath (std::string &name);
+std::string GetPath(std::string &fullName);
+std::string GetName(std::string &fullName);
 //-----------------------------------------------------------------------------
 #endif