X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDir.cxx;h=f52529f5ec55046447fa78204dee1c14566a8ba2;hb=a98b52385287bd4c6855758bdaa1d1ce2b7333be;hp=08be083ff00dcba018619cc0f06969b8cdd29fa4;hpb=fa58db03afe3f478ac949e176a273a5de4345496;p=gdcm.git diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 08be083f..f52529f5 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -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 ! {