]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDir.cxx
COMP: Make bcc55 happy
[gdcm.git] / src / gdcmDicomDir.cxx
index 08be083ff00dcba018619cc0f06969b8cdd29fa4..f52529f5ec55046447fa78204dee1c14566a8ba2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/12/21 14:50:59 $
-  Version:   $Revision: 1.182 $
+  Date:      $Date: 2006/01/18 10:17:40 $
+  Version:   $Revision: 1.184 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -588,7 +588,7 @@ void DicomDir::CreateDicomDir()
 
       // A decent DICOMDIR has much more images than series,
       // more series than studies, and so on.
-      // This is the right order to preform the tests
+      // This is the right order to perform the tests
 
       if ( v == "IMAGE " ) 
       {
@@ -942,8 +942,11 @@ void DicomDir::SetElement(std::string const &path, DicomDirType type,
                else
                { 
                  // avoid the first '/' in File name !
-                 //val = &(header->GetFileName().c_str()[path.length()]);
-                 val = &(header->GetFileName().c_str()[path.length()+1]);
+                 if ( header->GetFileName().c_str()[path.length()] 
+                                                      == GDCM_FILESEPARATOR )
+                    val = &(header->GetFileName().c_str()[path.length()+1]);
+                 else  
+                    val = &(header->GetFileName().c_str()[path.length()]);   
                }
                break;
     
@@ -1002,8 +1005,8 @@ void DicomDir::SetElement(std::string const &path, DicomDirType type,
          val += Util::GetVersion();
       }
 */ 
-      if (val == "") 
-        entry->SetString( val ); // troubles expected when vr=SQ ...
+
+      entry->SetString( val ); // troubles expected when vr=SQ ...
 
       if ( type == GDCM_DICOMDIR_META ) // fusible : should never print !
       {