]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDir.cxx
- now Write drops LUT Descriptors and LUTs (if any) when SamplesPerPixel =3
[gdcm.git] / src / gdcmDicomDir.cxx
index eaa705e4aebe1f3040cacf4e19aee2b119afa816..7a18df16f7d28230eda48d4c2e06238e89678b5a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/06/22 13:47:33 $
-  Version:   $Revision: 1.49 $
+  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 : " <<it->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) {
-      cout << "it " << 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;