X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDir.cxx;h=7a18df16f7d28230eda48d4c2e06238e89678b5a;hb=0d8ca63a1a2c1a61c2e2b92526ba81c9885702ba;hp=11550d2df0971a255151008a3258d3c7be0507e8;hpb=3b48ae81d6c358b352e726fa283296c496f35437;p=gdcm.git diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 11550d2d..7a18df16 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/06/22 14:03:30 $ - Version: $Revision: 1.50 $ + Date: $Date: 2004/06/28 09:30:58 $ + Version: $Revision: 1.53 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -343,7 +343,7 @@ bool gdcmDicomDir::Write(std::string fileName) * @param _fp already open file pointer */ -void gdcmDicomDir::WriteEntries(FILE *_fp) +void gdcmDicomDir::WriteEntries(FILE *) //_fp { /// \todo (?) tester les echecs en ecriture /// (apres chaque fwrite, dans le WriteEntry) @@ -405,7 +405,6 @@ void gdcmDicomDir::WriteEntries(FILE *_fp) void gdcmDicomDir::CreateDicomDirChainedList(std::string path) { CallStartMethod(); - gdcmDirList fileList(path,1); // gets recursively the file list unsigned int count=0; VectDocument list; @@ -418,18 +417,26 @@ void gdcmDicomDir::CreateDicomDirChainedList(std::string path) it!=fileList.end(); ++it) { + std::cout << "nom fichier " << it->c_str() << std::endl; //JPR + progress=(float)(count+1)/(float)fileList.size(); CallProgressMethod(); if(abort) - break; + break; header=new gdcmHeader(it->c_str()); - if(header->IsReadable()) + if(!header) { + std::cout << "echec new Header " << it->c_str() << std::endl; // JPR + } + if(header->IsReadable()) { list.push_back(header); // adds the file header to the chained list + std::cout << "readable : " <c_str() << std::endl; + } else delete header; count++; + } // sorts Patient/Study/Serie/ std::sort(list.begin(),list.end(),gdcmDicomDir::HeaderLessThan); @@ -556,7 +563,6 @@ void gdcmDicomDir::SetElement(std::string &path,gdcmDicomDirType type, } for(it=elemList.begin();it!=elemList.end();++it) { - std::cout << "it " << std::endl; tmpGr=it->group; tmpEl=it->elem; dictEntry=GetPubDict()->GetDictEntryByNumber(tmpGr,tmpEl); @@ -696,6 +702,7 @@ void gdcmDicomDir::CreateDicomDir() ListSQItem listItems = s->GetSQItems(); gdcmDicomDirMeta *m = new gdcmDicomDirMeta(&tagHT); + (void)m; //?? gdcmDocEntry * d; std::string v;