]> Creatis software - gdcm.git/commitdiff
* DicomDir : clean code, add methods, set variables in protected or private
authorregrain <regrain>
Thu, 22 Jan 2004 18:13:42 +0000 (18:13 +0000)
committerregrain <regrain>
Thu, 22 Jan 2004 18:13:42 +0000 (18:13 +0000)
     * gdcmUtil : bug fix for the clean string method
     -- BeNours

22 files changed:
ChangeLog
Testing/TestDicomDir.cxx
gdcm.dsw
gdcmPython/win32/_vtkGdcm.dsp
gdcmPython/win32/gdcmpyembedded.dsp
src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmHeaderEntry.cxx
src/gdcmImage.cxx
src/gdcmImage.h
src/gdcmObject.cxx
src/gdcmObject.h
src/gdcmParser.h
src/gdcmPatient.cxx
src/gdcmPatient.h
src/gdcmSerie.cxx
src/gdcmSerie.h
src/gdcmStudy.cxx
src/gdcmStudy.h
src/gdcmTS.cxx
src/gdcmUtil.cxx
src/win32/gdcmdll.dsp

index 59d8f9c488a1500f4794fac70043ad2f0752a0ef..6aa75ddf8ad3ce513e7ef4eff272ec0ff593cfd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-01-22 Benoit Regrain
+     * DicomDir : clean code, add methods, set variables in protected or private
+     * gdcmUtil : bug fix for the clean string method
+
 2004-01-19 Benoit Regrain
      * Add the use of shadow dictionaries
      * bug fix and coding style
index 16f0e63b29772bda8289732478ab09f87bd9df3d..10180b5db2adf5929bfb57c0e316a9901bf37255 100644 (file)
 # else
 #  include <sstream>
 #endif
+#include <string>
+#include <iostream>
 
 #define  ostringstream ostrstream
 //extern "C"
 
+using namespace std;
 
-void aff (ListTag::iterator deb, ListTag::iterator fin);
-
-// ===============================================================================
 
-void aff (ListTag::iterator deb, ListTag::iterator fin, int nbFFFE) {
+void aff(ListTag::iterator deb, ListTag::iterator fin, int nbFFFE) 
+{
    int count =0;
-   for (ListTag::iterator i= deb; i!= fin; i++) {  
-         if( (*i)->GetGroup() == 0xfffe) {
-           count ++;
-           if (count == nbFFFE) break;
-        }
-       (*i)->SetPrintLevel(0);
-       (*i)->Print();
+   for (ListTag::iterator i= deb; i!= fin; i++) 
+   {  
+      if( (*i)->GetGroup() == 0xfffe) 
+      {
+         count ++;
+         if (count == nbFFFE) break;
+      }
+      (*i)->SetPrintLevel(0);
+      (*i)->Print();
    } 
 }
 
 
 int main(int argc, char* argv[])
 {  
-   gdcmDICOMDIR* e1;
-   unsigned short int g, e;
-   int o;
+   gdcmDicomDir *e1;
+   ListTag::iterator deb , fin;
+   ListPatient::iterator  itPatient;
+   ListStudy::iterator itStudy;
+   ListSerie::iterator itSerie;
+   ListImage::iterator itImage;
    TSKey v;
     
-   string a
+   std::string file
    if (argc > 1) 
-      a = argv[1];    
+      file = argv[1];    
    else        
-      a = "DICOMDIR";
+      file = "../gdcmData/DICOMDIR";
       
- e1 = new gdcmDICOMDIR(a);
-
-  if(e1->GetPatients().begin() == e1->GetPatients().end() )
-        std::cout << "Liste Vide" << std::endl;
+   e1 = new gdcmDicomDir(file);
+       if (argc > 2) {
+          int level = atoi(argv[2]);   
+          e1->SetPrintLevel(level);
+       }
+
+   if(e1->GetPatients().begin() == e1->GetPatients().end() )
+   {
+      std::cout<<"Empty list"<<std::endl;
+      return(1);
+   }
 
 // Exemples exploitation de la structure
-
-ListTag::iterator deb , fin;
-lPatient::iterator  itPatient;
-
-   cout << std::endl << std::endl  
-       << " = Liste des PATIENT ==========================================" 
-       << std::endl<< std::endl;       
+// PATIENT
+/*   cout << std::endl << std::endl  
+            << " = Liste des PATIENT ==========================================" 
+            << std::endl<< std::endl;  
 
 
-    itPatient = e1->GetPatients().begin();     
-    while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
-       //cout << " = PATIENT ==========================================" << std::endl; 
-        //deb = (*itPatient)->beginObj;        
-       //fin =  (*((*itPatient)->GetStudies()).begin())->beginObj;
-       //e1->SetPrintLevel(2);
-       //aff(deb,fin,1); 
-       std::cout << (*itPatient)->GetEntryByNumber(0x0010, 0x0010) << std::endl; // Patient's Name   
-       itPatient ++;    
-    }    
+   itPatient = e1->GetPatients().begin();      
+   while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
+      std::cout << (*itPatient)->GetEntryByNumber(0x0010, 0x0010) << std::endl; // Patient's Name   
+      itPatient ++;    
+   }    
 
+// STUDY
    cout << std::endl << std::endl  
         << " = Liste des PATIENT/STUDY ==========================================" 
-       << std::endl<< std::endl;       
+        << std::endl<< std::endl;      
+
+   itPatient = e1->GetPatients().begin();      
+   while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
+      std::cout << (*itPatient)->GetEntryByNumber(0x0010, 0x0010) << std::endl; // Patient's Name 
+      itStudy = ((*itPatient)->GetStudies()).begin();  
+      while (itStudy != (*itPatient)->GetStudies().end() ) { // on degouline les STUDY de ce patient   
+         std::cout << "--- "<< (*itStudy)->GetEntryByNumber(0x0008, 0x1030) << std::endl; // Stdy Description
+         ++itStudy;            
+      }
+      itPatient ++;    
+   }
+
+// SERIE
+   cout << std::endl << std::endl  
+            << " = Liste des PATIENT/STUDY/SERIE ==========================================" 
+            << std::endl<< std::endl;  
  
-    itPatient = e1->GetPatients().begin();     
-    while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
-       std::cout << (*itPatient)->GetEntryByNumber(0x0010, 0x0010) << std::endl; // Patient's Name 
-       lStudy::iterator itStudy = ((*itPatient)->GetStudies()).begin();        
-       while (itStudy != (*itPatient)->GetStudies().end() ) { // on degouline les STUDY de ce patient  
-          std::cout << "--- "<< (*itStudy)->GetEntryByNumber(0x0008, 0x1030) << std::endl; // Stdy Description 
-               
-          
-          ++itStudy;           
-       }  
-       itPatient ++;    
-    }    
-
+   itPatient = e1->GetPatients().begin();      
+   while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
+      std::cout << (*itPatient)->GetEntryByNumber(0x0010, 0x0010) << std::endl; // Patient's Name 
+      itStudy = ((*itPatient)->GetStudies()).begin();  
+      while (itStudy != (*itPatient)->GetStudies().end() ) { // on degouline les STUDY de ce patient   
+         std::cout << "--- "<< (*itStudy)->GetEntryByNumber(0x0008, 0x1030) << std::endl; // Study Description 
+         itSerie = ((*itStudy)->GetSeries()).begin();
+         while (itSerie != (*itStudy)->GetSeries().end() ) { // on degouline les SERIES de cette study    
+            std::cout << "--- ---  "<< (*itSerie)->GetEntryByNumber(0x0008, 0x103e) << std::endl; // Serie Description
+            ++itSerie;   
+         }
+         ++itStudy;            
+      }
+      itPatient ++;    
+   }
+// IMAGE
    cout << std::endl << std::endl  
-       << " = Liste des PATIENT/STUDY/SERIE ==========================================" 
-       << std::endl<< std::endl;       
+            << " = Liste des PATIENT/STUDY/SERIE/IMAGE ===================================" 
+            << std::endl<< std::endl;
  
-    itPatient = e1->GetPatients().begin();     
-    while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
-       std::cout << (*itPatient)->GetEntryByNumber(0x0010, 0x0010) << std::endl; // Patient's Name 
-       lStudy::iterator itStudy = ((*itPatient)->GetStudies()).begin();        
-       while (itStudy != (*itPatient)->GetStudies().end() ) { // on degouline les STUDY de ce patient  
-          std::cout << "--- "<< (*itStudy)->GetEntryByNumber(0x0008, 0x1030) << std::endl; // Study Description 
-          lSerie::iterator itSerie = ((*itStudy)->GetSeries()).begin();
-          while (itSerie != (*itStudy)->GetSeries().end() ) { // on degouline les SERIES de cette study           
-          std::cout << "--- ---  "<< (*itSerie)->GetEntryByNumber(0x0008, 0x103e) << std::endl; // Serie Description           
-          ++itSerie;   
-          }                       
-          ++itStudy;           
-       }  
-       itPatient ++;    
-    }    
+   itPatient = e1->GetPatients().begin();      
+   while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
+      std::cout << (*itPatient)->GetEntryByNumber(0x0010, 0x0010) << std::endl; // Patient's Name
+      itStudy = ((*itPatient)->GetStudies()).begin();  
+      while (itStudy != (*itPatient)->GetStudies().end() ) { // on degouline les STUDY de ce patient   
+         std::cout << "--- "<< (*itStudy)->GetEntryByNumber(0x0008, 0x1030) << std::endl; // Study Description
+         itSerie = ((*itStudy)->GetSeries()).begin();
+         while (itSerie != (*itStudy)->GetSeries().end() ) { // on degouline les SERIES de cette study    
+            std::cout << "--- --- "<< (*itSerie)->GetEntryByNumber(0x0008, 0x103e) << std::endl; // Serie Description
+            itImage = ((*itSerie)->GetImages()).begin();
+            while (itImage != (*itSerie)->GetImages().end() ) { // on degouline les SERIES de cette study         
+               std::cout << "--- --- --- "<< (*itImage)->GetEntryByNumber(0x0004, 0x1500) << std::endl; // File name
+               ++itImage;   
+            }
+            ++itSerie;   
+         }
+         ++itStudy;            
+      }  
+      itPatient ++;    
+   }*/
  
+// DICOM DIR
    cout << std::endl << std::endl  
-       << " = Contenu Complet du DICOMDIR ==========================================" 
-       << std::endl<< std::endl;       
+        << " = Contenu Complet du DICOMDIR ==========================================" 
+        << std::endl<< std::endl;      
+   e1->Print();
    
        
-    itPatient = e1->GetPatients().begin();     
-    while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
-       cout << " = PATIENT ==========================================" << std::endl;   
-        deb = (*itPatient)->beginObj;  
-       fin =  (*((*itPatient)->GetStudies()).begin())->beginObj;
-       e1->SetPrintLevel(2);
-       aff(deb,fin,1);
-       
-       lStudy::iterator itStudy = ((*itPatient)->GetStudies()).begin();        
-       while (itStudy != (*itPatient)->GetStudies().end() ) { // on degouline les STUDY de ce patient  
-           std::cout << " ==== STUDY ==========================================" <<std::endl;             
-           deb = (*itStudy)->beginObj; 
-          fin = (*((*itStudy)->GetSeries()).begin())->beginObj;
-          //e1->SetPrintLevel(2);
-          aff(deb,fin,1);                                      
-       
-          lSerie::iterator itSerie = ((*itStudy)->GetSeries()).begin();
-          while (itSerie != (*itStudy)->GetSeries().end() ) { // on degouline les SERIES de cette study           
-             cout << " ======= SERIES ==========================================" << std::endl;              
-              deb = (*itSerie)->beginObj;      
-             fin = (*((*itSerie)->GetImages()).begin())->beginObj;
-             //e1->SetPrintLevel(2);
-             aff(deb,fin,1);         
-                             
-             lImage::iterator itImage = ((*itSerie)->GetImages()).begin();
-             while (itImage != (*itSerie)->GetImages().end() ) {  // on degouline les IMAGE de cette serie 
-             
-                cout << " ========== IMAGE ==========================================" << std::endl;   
-                std::cout << "--- --- --- File Name: "<< (*itImage)->GetEntryByNumber(0x0004, 0x1500) << std::endl; // Referenced File 
-                         
-             ++itImage;
-             }                       
-             ++itSerie;   
-          }    
-          ++itStudy;   
-        }                         
-       itPatient ++;    
-    }
-    
-    delete e1;
+/*   itPatient = e1->GetPatients().begin();    
+   while ( itPatient != e1->GetPatients().end() ) {  // on degouline la liste de PATIENT
+      cout << " = PATIENT ==========================================" << std::endl;    
+      deb = (*itPatient)->beginObj;    
+      fin =  (*((*itPatient)->GetStudies()).begin())->beginObj;
+      e1->SetPrintLevel(2);
+      aff(deb,fin,1);
+
+      itStudy = ((*itPatient)->GetStudies()).begin();  
+      while (itStudy != (*itPatient)->GetStudies().end() ) { // on degouline les STUDY de ce patient   
+         std::cout << " ==== STUDY ==========================================" <<std::endl;               
+         deb = (*itStudy)->beginObj;   
+         fin = (*((*itStudy)->GetSeries()).begin())->beginObj;
+         //e1->SetPrintLevel(2);
+         aff(deb,fin,1);                                       
+
+         itSerie = ((*itStudy)->GetSeries()).begin();
+         while (itSerie != (*itStudy)->GetSeries().end() ) { // on degouline les SERIES de cette study    
+            cout << " ======= SERIES ==========================================" << std::endl;       
+            deb = (*itSerie)->beginObj;        
+            fin = (*((*itSerie)->GetImages()).begin())->beginObj;
+            //e1->SetPrintLevel(2);
+            aff(deb,fin,1);          
+
+            itImage = ((*itSerie)->GetImages()).begin();
+            while (itImage != (*itSerie)->GetImages().end() ) {  // on degouline les IMAGE de cette serie 
+               cout << " ========== IMAGE ==========================================" << std::endl;    
+               std::cout << "--- --- --- File Name: "<< (*itImage)->GetEntryByNumber(0x0004, 0x1500) << std::endl; // Referenced File 
+
+               ++itImage;
+            }                        
+            ++itSerie;   
+         }     
+         ++itStudy;    
+      }                           
+      itPatient ++;    
+   }*/
+
+   delete e1;
+
+   return(0);
 }
index fa57c94efc89a8099da3bfce50d8b193d47655c7..dfeb8b92c8c9913e12ec55ccf62f4d2d5f7dd84d 100644 (file)
--- a/gdcm.dsw
+++ b/gdcm.dsw
@@ -39,6 +39,21 @@ Package=<4>
 
 ###############################################################################
 
+Project: "gdcmTestDicomDir"=.\TEST\WIN32\gdcmTestDicomDir.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name gdcmdll
+    End Project Dependency
+}}}
+
+###############################################################################
+
 Project: "gdcmdll"=.\src\win32\gdcmdll.dsp - Package Owner=<4>
 
 Package=<5>
index be158e8391e4236be70982eedccf3ed0b1754024..596f6a4aa2980b7da88d67172fdeb67fcd1ffc79 100644 (file)
@@ -58,6 +58,10 @@ LINK32=link.exe
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmDicomDir.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmDict.cxx\r
 # End Source File\r
 # Begin Source File\r
@@ -90,6 +94,10 @@ SOURCE=..\..\src\gdcmHeaderHelper.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmImage.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmJpeg.cxx\r
 # End Source File\r
 # Begin Source File\r
@@ -102,6 +110,10 @@ SOURCE=..\..\src\gdcmJpeg2000.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmObject.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmParsePixels.cxx\r
 # End Source File\r
 # Begin Source File\r
@@ -110,10 +122,22 @@ SOURCE=..\..\src\gdcmParser.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmPatient.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmRLE.cxx\r
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmSerie.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\gdcmStudy.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmTS.cxx\r
 # End Source File\r
 # Begin Source File\r
index ea230953373b9f80a5348cb174c5dc08186c1246..de390fe5445f73466db33cdc6b59448afb21248f 100644 (file)
@@ -53,7 +53,7 @@ LINK32=link.exe
 # Begin Special Build Tool\r
 ProjDir=.\r
 SOURCE="$(InputPath)"\r
-PostBuild_Cmds=move                   $(ProjDir)\gdcm.py                   $(ProjDir)\..\ \r
+PostBuild_Cmds=move                    $(ProjDir)\gdcm.py                    $(ProjDir)\..\ \r
 # End Special Build Tool\r
 # Begin Target\r
 \r
@@ -80,6 +80,10 @@ SOURCE=.\gdcm_wrap.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmDicomDir.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmDict.cxx\r
 # End Source File\r
 # Begin Source File\r
@@ -112,6 +116,10 @@ SOURCE=..\..\src\gdcmHeaderHelper.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmImage.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmJpeg.cxx\r
 # End Source File\r
 # Begin Source File\r
@@ -124,6 +132,10 @@ SOURCE=..\..\src\gdcmJpeg2000.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmObject.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmParsePixels.cxx\r
 # End Source File\r
 # Begin Source File\r
@@ -132,10 +144,22 @@ SOURCE=..\..\src\gdcmParser.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmPatient.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmRLE.cxx\r
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\gdcmSerie.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\gdcmStudy.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\gdcmTS.cxx\r
 # End Source File\r
 # Begin Source File\r
index eaf7e82fbe42cdc724282e3a1b39db84bb092069..edd6e84e527588956432f60843097609f78e89b5 100644 (file)
 // gdcmDicomDir.cxx
 //-----------------------------------------------------------------------------
 #include "gdcmDicomDir.h"
-#include "gdcmPatient.h"
 #include "gdcmStudy.h"
 #include "gdcmSerie.h"
 #include "gdcmImage.h"
+#include "gdcmUtil.h"
 
 #include <string>
 
+//-----------------------------------------------------------------------------
+// Constructor / Destructor
 gdcmDicomDir::gdcmDicomDir(std::string & FileName,
                            bool exception_on_error):
-   gdcmParser(FileName.c_str(),exception_on_error, true )  {
-
-
-   gdcmPatient *patCur;
-   gdcmStudy   *studCur;
-   gdcmSerie   *serCur;
-   gdcmImage   *imaCur; 
-     
-   ListTag::iterator i, j;
-   
-   
-     if ( GetListEntry().begin() ==   GetListEntry().end() ) {
-        cout << "ListEntry vide " << endl;
-     }     
-     i = GetListEntry().begin();              
-     while ( i != GetListEntry().end() ) {
-
-       // std::cout << std::hex << (*i)->GetGroup() << 
-       //                  " " << (*i)->GetElement() << endl;
-
-       std::string v = (*i)->GetValue();               
-        if (v == "PATIENT ") {
-          patCur=new gdcmPatient();
-          //cout << "PATIENT" << endl,
-          patCur->beginObj =i; 
-          GetPatients().push_back(patCur);          
-       }       
-
-        if (v == "STUDY ") {
-           //cout << "STUDY" << endl,
-           studCur=new gdcmStudy();
-          studCur->beginObj = patCur->endObj = i;                 
-           lPatient::iterator aa = GetPatients().end();
-           --aa;
-          (*aa)->GetStudies().push_back(studCur);
-       }
-           studCur=new gdcmStudy();
-        
-        if (v == "SERIES") {
-          //cout << "SERIES" << endl,
-           serCur=new gdcmSerie();
-
-          serCur->beginObj  = studCur->endObj= i;              
-          lPatient::iterator aa = GetPatients().end();
-           --aa;
-          lStudy::iterator bb = (*aa)->GetStudies().end();
-          --bb;
-          (*bb)->GetSeries().push_back(serCur);
-       }
-               
-        if (v == "IMAGE ") {
-           //cout << "IMAGE" << endl;
-           imaCur=new gdcmImage();
-          imaCur->beginObj  = serCur->endObj= i;               
-
-          lPatient::iterator aa = GetPatients().end();
-           --aa;
-          lStudy::iterator bb = (*aa)->GetStudies().end();
-          --bb;
-          lSerie::iterator cc = (*bb)->GetSeries().end();
-          --cc; 
-          (*cc)->GetImages().push_back(imaCur);
-          
-          
-          /* ---
-          // ce n'est pas sur une nouvelle IMAGE, qu'il faut intervenir
-          // mais lorsqu'on rencontre un 'non IMAGE' apres des 'IMAGE'
-          lImage::iterator dd = (*cc)->GetImages().end();
-
-          if ( (*cc)->GetImages().begin() != dd ) {
-             --dd;
-             (*dd)->endObj = i;           
-          }
-        --- */                    
-       }                                 
-       ++i; 
-      }      
+   gdcmParser(FileName.c_str(),exception_on_error, true )  
+{
+   if ( GetListEntry().begin() == GetListEntry().end() ) 
+   {
+      dbg.Verbose(0, "gdcmDicomDir::gdcmDicomDir entry list empty");
+   }     
+
+   CreateDicomDir();
 }
 
 
-gdcmDicomDir::~gdcmDicomDir() {
-   lPatient::iterator cc = GetPatients().begin();
-   while  (cc != GetPatients().end() ) {
-      //cout << "delete PATIENT" << endl;
+gdcmDicomDir::~gdcmDicomDir() 
+{
+   for(ListPatient::iterator cc = patients.begin();cc!=patients.end();++cc)
+   {
       delete *cc;
-      ++cc;
    }
 }
+
+//-----------------------------------------------------------------------------
+// Print
+void gdcmDicomDir::Print(std::ostream &os)
+{
+   for(ListPatient::iterator cc = patients.begin();cc!=patients.end();++cc)
+   {
+      (*cc)->SetPrintLevel(printLevel);
+      (*cc)->Print(os);
+   }
+}
+
+//-----------------------------------------------------------------------------
+// Public
+
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+void gdcmDicomDir::CreateDicomDir(void)
+{
+   // The list is parsed. When a tag is found :
+   //  1 - we save the beginning iterator
+   //  2 - we continue to parse
+   //  3 - we find an other tag
+   //       + we create the object for the precedent tag
+   //       + loop to 1 -
+
+   gdcmDicomDirType type=gdcmDicomDir::GDCM_NONE;
+   ListTag::iterator begin;
+   ListTag::iterator end;
+
+   begin=GetListEntry().begin();
+   end=begin;
+   for(ListTag::iterator i=GetListEntry().begin();i != GetListEntry().end();++i) 
+   {
+      // std::cout << std::hex << (*i)->GetGroup() << 
+      //                  " " << (*i)->GetElement() << endl;
+
+      std::string v = (*i)->GetValue();
+      if (v == "PATIENT ") 
+      {
+//         std::cout<<"PATIENT"<<std::endl;
+         end=i;
+         AddObjectToEnd(type,begin,end);
+
+         type=gdcmDicomDir::GDCM_PATIENT;
+         begin=end;
+      }        
+
+      if (v == "STUDY ")
+      {
+//         std::cout<<"STUDY"<<std::endl;
+         end=i;
+         AddObjectToEnd(type,begin,end);
+
+         type=gdcmDicomDir::GDCM_STUDY;
+         begin=end;
+      }
+
+      if (v == "SERIES") 
+      {
+//         std::cout<<"SERIES"<<std::endl;
+         end=i;
+         AddObjectToEnd(type,begin,end);
+
+         type=gdcmDicomDir::GDCM_SERIE;
+         begin=end;
+      }
+
+      if (v == "IMAGE ") 
+      {
+//         std::cout<<"IMAGE"<<std::endl;
+         end=i;
+         AddObjectToEnd(type,begin,end);
+
+         type=gdcmDicomDir::GDCM_IMAGE;
+         begin=end;
+      }
+   }
+
+   end=i;
+   AddObjectToEnd(type,begin,end);
+}
+
+void gdcmDicomDir::AddObjectToEnd(gdcmDicomDirType type,ListTag::iterator begin,ListTag::iterator end)
+{
+   if(begin==end)
+      return;
+
+   switch(type)
+   {
+      case gdcmDicomDir::GDCM_PATIENT:
+         AddPatientToEnd(begin,end);
+         break;
+      case gdcmDicomDir::GDCM_STUDY:
+         AddStudyToEnd(begin,end);
+         break;
+      case gdcmDicomDir::GDCM_SERIE:
+         AddSerieToEnd(begin,end);
+         break;
+      case gdcmDicomDir::GDCM_IMAGE:
+         AddImageToEnd(begin,end);
+         break;
+   }
+}
+
+void gdcmDicomDir::AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end)
+{
+   patients.push_back(new gdcmPatient(begin,end));
+}
+
+void gdcmDicomDir::AddStudyToEnd(ListTag::iterator begin,ListTag::iterator end)
+{
+   if(patients.size()>0)
+   {
+      ListPatient::iterator itp=patients.end();
+      itp--;
+      (*itp)->AddStudy(new gdcmStudy(begin,end));
+   }
+}
+
+void gdcmDicomDir::AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end)
+{
+   if(patients.size()>0)
+   {
+      ListPatient::iterator itp=patients.end();
+      itp--;
+
+      if((*itp)->GetStudies().size()>0)
+      {
+         ListStudy::iterator itst=(*itp)->GetStudies().end();
+         itst--;
+         (*itst)->AddSerie(new gdcmSerie(begin,end));
+      }
+   }
+}
+
+void gdcmDicomDir::AddImageToEnd(ListTag::iterator begin,ListTag::iterator end)
+{
+   if(patients.size()>0)
+   {
+      ListPatient::iterator itp=patients.end();
+      itp--;
+
+      if((*itp)->GetStudies().size()>0)
+      {
+         ListStudy::iterator itst=(*itp)->GetStudies().end();
+         itst--;
+
+         if((*itst)->GetSeries().size()>0)
+         {
+            ListSerie::iterator its=(*itst)->GetSeries().end();
+            its--;
+            (*its)->AddImage(new gdcmImage(begin,end));
+         }
+      }
+   }
+}
+
+//-----------------------------------------------------------------------------
index 1426b6317bdb915469b32e4652275dfc4f0be409..d3fbc023ffc82c3a91fc8adddce77ef3ea3339f6 100644 (file)
@@ -8,8 +8,7 @@
 #include "gdcmPatient.h"
 
 //-----------------------------------------------------------------------------
-
-typedef std::list<gdcmPatient *> lPatient;
+typedef std::list<gdcmPatient *> ListPatient;
 
 //-----------------------------------------------------------------------------
 /*
@@ -17,18 +16,35 @@ typedef std::list<gdcmPatient *> lPatient;
  * \brief    gdcmDicomDir defines an object representing a DICOMDIR in memory.
  *
  */
-class GDCM_EXPORT gdcmDicomDir: public gdcmParser {
+class GDCM_EXPORT gdcmDicomDir: public gdcmParser 
+{
 public:
-
    gdcmDicomDir(std::string &FileName,bool exception_on_error = false );
-   ~gdcmDicomDir();
+   ~gdcmDicomDir(void);
+
+   void SetPrintLevel(int level) { printLevel = level; };
+   virtual void Print(std::ostream &os = std::cout);
 
-   inline lPatient &GetPatients() {return patients;};
-   inline void AddPatient(gdcmPatient *patient) {patients.push_back(patient);};
+   inline ListPatient &GetPatients() {return patients;};
+
+   typedef enum
+   {
+      GDCM_NONE,
+      GDCM_PATIENT,
+      GDCM_STUDY,
+      GDCM_SERIE,
+      GDCM_IMAGE,
+   } gdcmDicomDirType;
    
 private:
-   lPatient patients;
-
+   void CreateDicomDir(void);
+   void AddObjectToEnd(gdcmDicomDirType type,ListTag::iterator begin,ListTag::iterator end);
+   void AddPatientToEnd(ListTag::iterator begin,ListTag::iterator end);
+   void AddStudyToEnd(ListTag::iterator begin,ListTag::iterator end);
+   void AddSerieToEnd(ListTag::iterator begin,ListTag::iterator end);
+   void AddImageToEnd(ListTag::iterator begin,ListTag::iterator end);
+
+   ListPatient patients;
 };
 
 //-----------------------------------------------------------------------------
index d11b342f2c3fb3853fdd4cb1a45cdd97bb8beee2..56ff8978c2fd8f5a2397eb73403f3e9ff1f71fd8 100644 (file)
@@ -44,9 +44,9 @@ void gdcmHeaderEntry::Print(std::ostream & os) {
    v = GetValue();
    o = GetOffset();
    sprintf(greltag,"%04x|%04x ",g,e);           
-   d2 = _CreateCleanString(v);  // replace non printable characters by '.'
    s << greltag ;
        
+   d2 = _CreateCleanString(v);  // replace non printable characters by '.'
    if (printLevel>=2) { 
       s << "lg : ";
       lgth = GetReadLength();
@@ -97,7 +97,7 @@ void gdcmHeaderEntry::Print(std::ostream & os) {
       else     
          sprintf(st," x(%08x)",atoi(v.c_str()));
       s << st;
-   }                     
+   }
    s << std::endl;
    os << s.str();
 }
index 382a74706bc220ed31464bfb286af2b06fce4b82..30588f46eb055b8c940d13058969e4fd77f58c07 100644 (file)
@@ -2,12 +2,32 @@
 //-----------------------------------------------------------------------------
 #include "gdcmImage.h"
 
-gdcmImage::gdcmImage() {
+//-----------------------------------------------------------------------------
+// Constructor / Destructor
+gdcmImage::gdcmImage(ListTag::iterator begin,ListTag::iterator end):
+   gdcmObject(begin,end)
+{
+}
 
+gdcmImage::~gdcmImage() 
+{
+}
+
+//-----------------------------------------------------------------------------
+// Print
+void gdcmImage::Print(std::ostream &os)
+{
+   os<<"IMAGE"<<std::endl;
+   gdcmObject::Print(os);
 }
 
+//-----------------------------------------------------------------------------
+// Public
 
-gdcmImage::~gdcmImage() {
+//-----------------------------------------------------------------------------
+// Protected
 
-}
+//-----------------------------------------------------------------------------
+// Private
 
+//-----------------------------------------------------------------------------
index 0c138ffa3179b649b16efd603c64f226af412868..8c7906fc587ee92972ccf16c55fde0decc33a9b2 100644 (file)
@@ -6,16 +6,13 @@
 #include "gdcmObject.h"
 
 //-----------------------------------------------------------------------------
-
-
-//-----------------------------------------------------------------------------
-
-class GDCM_EXPORT gdcmImage : public gdcmObject {
+class GDCM_EXPORT gdcmImage : public gdcmObject 
+{
 public:
+   gdcmImage(ListTag::iterator begin,ListTag::iterator end);
+   ~gdcmImage(void);
 
-   gdcmImage();
-   ~gdcmImage();
-
+   virtual void Print(std::ostream &os = std::cout);
 };
 
 //-----------------------------------------------------------------------------
index 54c56ca179572a4a4a4f4327903127e7a5a91098..188a98385ee51205ee70ac7e3e3087e2b974ecd5 100644 (file)
@@ -3,43 +3,60 @@
 #include "gdcmObject.h"
 #include "gdcmUtil.h"
 
-
-/*
-gdcmObject::gdcmObject() {
-
+//-----------------------------------------------------------------------------
+// Constructor / Destructor
+gdcmObject::gdcmObject(ListTag::iterator begin,ListTag::iterator end) 
+{
+   beginObj=begin;
+   endObj=end;
+
+   if(beginObj==endObj)
+      dbg.Verbose(0, "gdcmObject::gdcmObject empty list");
 }
 
+gdcmObject::~gdcmObject(void) 
+{
+}
 
-gdcmObject::~gdcmObject() {
-
+//-----------------------------------------------------------------------------
+// Print
+void gdcmObject::Print(std::ostream &os)
+{
+   for(ListTag::iterator i=beginObj;i!=endObj;++i)
+   {
+      (*i)->SetPrintLevel(printLevel);
+      (*i)->Print(os);
+   }
 }
-*/
-
-std::string gdcmObject::GetEntryByNumber(guint16 group, guint16 element) {
-  guint16 gr, el;
-  ListTag::iterator deb , fin;  
-  deb = beginObj;      
-  fin = endObj; 
-  
-  ListTag::iterator i=deb; 
-  
-  if (deb == fin) cout << "Big Trouble : Empty List!" <<endl;
-  while ( i!= fin) {
-     gr = (*(*i)).GetGroup();   
-     el = (*(*i)).GetElement();
-     if ( gr==group && el==element) 
-        return (*(*i)).GetValue();;
-     ++i;        
-  }        
+
+//-----------------------------------------------------------------------------
+// Public
+std::string gdcmObject::GetEntryByNumber(guint16 group, guint16 element) 
+{
+   for(ListTag::iterator i=beginObj;i!=endObj;++i)
+   {
+      if ( (*i)->GetGroup()==group && (*i)->GetElement()==element)
+         return (*i)->GetValue();
+   }
+   
    return GDCM_UNFOUND;
 }
 
 
-std::string gdcmObject::GetEntryByName(TagName name) {
+std::string gdcmObject::GetEntryByName(TagName name) 
+{
    gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
    gdcmDictEntry *dictEntry = (*PubDict).GetDictEntryByName(name); 
+
    if( dictEntry == NULL)
       return GDCM_UNFOUND;
    return GetEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement()); 
 }
 
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+
+//-----------------------------------------------------------------------------
index 77c2aab19db24f81dc3f3c33d2ed84aa49a59499..ff560f5584d8063eede55cf7cc91d5bda9b4ca40 100644 (file)
@@ -14,15 +14,25 @@ class gdcmObject;
 typedef std::list<gdcmObject *> ListContent;
 
 //-----------------------------------------------------------------------------
-class gdcmObject {
+class GDCM_EXPORT gdcmObject 
+{
 public:
+   gdcmObject(ListTag::iterator begin,ListTag::iterator end);
+   ~gdcmObject(void);
+
+   void SetPrintLevel(int level) { printLevel = level; };
+   virtual void Print(std::ostream &os = std::cout);
+
    std::string GetEntryByNumber(guint16 group, guint16 element);
    std::string GetEntryByName(TagName name);
 
+protected:
    ListTag::iterator beginObj;
    ListTag::iterator endObj;
-   
-protected:
+
+   int printLevel;
+
+private:
 };
 
 //-----------------------------------------------------------------------------
index 8e9e5af6bb704c8dd2baca1b44e262c272ed87be..34311b8e1b45f0dba116e41f9e1cfbff0b8a20d1 100644 (file)
@@ -136,8 +136,11 @@ protected:
 
    static const unsigned int HEADER_LENGTH_TO_READ; 
    static const unsigned int MAX_SIZE_LOAD_ELEMENT_VALUE;
+
 protected:
    int enableSequences;
+   int printLevel;
+
 private:
    // Read
    void Parse(bool exception_on_error = false) throw(gdcmFormatError);
@@ -210,9 +213,6 @@ private:
    // this upper bound is fixed to 1024 bytes (which might look reasonable
    // when one considers the definition of the various VR contents).
    guint32 MaxSizeLoadEntry;
-
-   // for PrintHeader
-   int printLevel;
 };
 
 //-----------------------------------------------------------------------------
index 45781881b3fe81ea9e2e5cf681c3b3c77fed3c32..11ec6ac809806eaaef31294e7719b922a17ca89a 100644 (file)
@@ -2,16 +2,42 @@
 //-----------------------------------------------------------------------------
 #include "gdcmPatient.h"
 
-gdcmPatient::gdcmPatient() {
+//-----------------------------------------------------------------------------
+// Constructor / Destructor
+gdcmPatient::gdcmPatient(ListTag::iterator begin,ListTag::iterator end):
+   gdcmObject(begin,end)
+{
+}
 
+gdcmPatient::~gdcmPatient() 
+{
+   for(ListStudy::iterator cc = studies.begin();cc != studies.end();++cc)
+   {
+      delete *cc;
+   }
 }
 
+//-----------------------------------------------------------------------------
+// Print
+void gdcmPatient::Print(std::ostream &os)
+{
+   os<<"PATIENT"<<std::endl;
+   gdcmObject::Print(os);
 
-gdcmPatient::~gdcmPatient() {
-   lStudy::iterator cc = GetStudies().begin();
-   while  (cc != GetStudies().end() ) {
-      delete *cc;
-      ++cc;
+   for(ListStudy::iterator cc = studies.begin();cc!=studies.end();++cc)
+   {
+      (*cc)->SetPrintLevel(printLevel);
+      (*cc)->Print(os);
    }
 }
 
+//-----------------------------------------------------------------------------
+// Public
+
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+
+//-----------------------------------------------------------------------------
index 662bca15a3a0bc40df85be8c8dab24dfa11b480f..2d4d1e2690c2442c8b0224703fbc8a940baa8c45 100644 (file)
@@ -7,23 +7,22 @@
 #include "gdcmStudy.h"
 
 //-----------------------------------------------------------------------------
-
-typedef std::list<gdcmStudy *> lStudy;
+typedef std::list<gdcmStudy *> ListStudy;
 
 //-----------------------------------------------------------------------------
-
-class GDCM_EXPORT gdcmPatient : public gdcmObject {    //
+class GDCM_EXPORT gdcmPatient : public gdcmObject 
+{
 public:
+   gdcmPatient(ListTag::iterator begin,ListTag::iterator end);
+   ~gdcmPatient(void);
 
-   gdcmPatient();
-   ~gdcmPatient();
+   virtual void Print(std::ostream &os = std::cout);
 
-   inline lStudy &GetStudies() {return studies;};
+   inline ListStudy &GetStudies() {return studies;};
+   inline void AddStudy(gdcmStudy *obj) {studies.push_back(obj);};
        
-   lStudy studies;
 private:
-
-
+   ListStudy studies;
 };
 
 //-----------------------------------------------------------------------------
index 9e4a275b759267ff222c6917d19c52cbfc945df2..b21c241745f304608e2f869508afab819d928a46 100644 (file)
@@ -2,16 +2,42 @@
 //-----------------------------------------------------------------------------
 #include "gdcmSerie.h"
 
-gdcmSerie::gdcmSerie() {
+//-----------------------------------------------------------------------------
+// Constructor / Destructor
+gdcmSerie::gdcmSerie(ListTag::iterator begin,ListTag::iterator end):
+   gdcmObject(begin,end)
+{
+}
 
+gdcmSerie::~gdcmSerie() 
+{
+   for(ListImage::iterator cc = images.begin();cc != images.end();++cc)
+   {
+      delete *cc;
+   }
 }
 
+//-----------------------------------------------------------------------------
+// Print
+void gdcmSerie::Print(std::ostream &os)
+{
+   os<<"SERIE"<<std::endl;
+   gdcmObject::Print(os);
 
-gdcmSerie::~gdcmSerie() {
-   lImage::iterator cc = GetImages().begin();
-   while  (cc != GetImages().end() ) {
-      delete *cc;
-      ++cc;
+   for(ListImage::iterator cc = images.begin();cc != images.end();++cc)
+   {
+      (*cc)->SetPrintLevel(printLevel);
+      (*cc)->Print(os);
    }
 }
 
+//-----------------------------------------------------------------------------
+// Public
+
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+
+//-----------------------------------------------------------------------------
index 02fe496d13ccbf7b2965ef21ee18da3284666cc5..996203b882c790b2a82a057f0a91c38843f51690 100644 (file)
@@ -7,24 +7,22 @@
 #include "gdcmImage.h"
 
 //-----------------------------------------------------------------------------
-
-typedef std::list<gdcmImage *> lImage;
+typedef std::list<gdcmImage *> ListImage;
 
 //-----------------------------------------------------------------------------
-
-class GDCM_EXPORT gdcmSerie : public gdcmObject {
+class GDCM_EXPORT gdcmSerie : public gdcmObject 
+{
 public:
+   gdcmSerie(ListTag::iterator begin,ListTag::iterator end);
+   ~gdcmSerie(void);
 
-   gdcmSerie();
-   ~gdcmSerie();
-
-   inline lImage &GetImages() {return images;};
-   
-   lImage images;
-   
-private:
+   virtual void Print(std::ostream &os = std::cout);
 
+   inline ListImage &GetImages() {return images;};
+   inline void AddImage(gdcmImage *obj) {images.push_back(obj);};
 
+private:
+   ListImage images;
 };
 
 //-----------------------------------------------------------------------------
index 9380f51935b9a8537acb6bf1b60da5d6456adb99..29af9518b1007a961dbb06cb1d123e55a17dd5f3 100644 (file)
@@ -2,15 +2,42 @@
 //-----------------------------------------------------------------------------
 #include "gdcmStudy.h"
 
-gdcmStudy::gdcmStudy() {
+//-----------------------------------------------------------------------------
+// Constructor / Destructor
+gdcmStudy::gdcmStudy(ListTag::iterator begin,ListTag::iterator end):
+   gdcmObject(begin,end)
+{
+}
 
+gdcmStudy::~gdcmStudy() 
+{
+   for(ListSerie::iterator cc = series.begin();cc != series.end();++cc)
+   {
+      delete *cc;
+   }
 }
 
+//-----------------------------------------------------------------------------
+// Print
+void gdcmStudy::Print(std::ostream &os)
+{
+   os<<"STUDY"<<std::endl;
+   gdcmObject::Print(os);
 
-gdcmStudy::~gdcmStudy() {
-   lSerie::iterator cc = GetSeries().begin();
-   while  (cc != GetSeries().end() ) {
-      delete *cc;
-      ++cc;
+   for(ListSerie::iterator cc = series.begin();cc != series.end();++cc)
+   {
+      (*cc)->SetPrintLevel(printLevel);
+      (*cc)->Print(os);
    }
 }
+
+//-----------------------------------------------------------------------------
+// Public
+
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+
+//-----------------------------------------------------------------------------
index f08f709fddbc4faebcc43792991199dedd93d225..ebf31c1f09c2a831e0d806780a53ff968fb06a47 100644 (file)
@@ -7,24 +7,22 @@
 #include "gdcmSerie.h"
 
 //-----------------------------------------------------------------------------
-
-typedef std::list<gdcmSerie *> lSerie;
+typedef std::list<gdcmSerie *> ListSerie;
 
 //-----------------------------------------------------------------------------
-
-class GDCM_EXPORT gdcmStudy : public gdcmObject {
+class GDCM_EXPORT gdcmStudy : public gdcmObject 
+{
 public:
+   gdcmStudy(ListTag::iterator begin,ListTag::iterator end);
+   ~gdcmStudy(void);
 
-   gdcmStudy();
-   ~gdcmStudy();
-
-   inline lSerie &GetSeries() {return series;};
-   
-   lSerie series;
-   
-private:
+   virtual void Print(std::ostream &os = std::cout);
 
+   inline ListSerie &GetSeries() {return series;};
+   inline void AddSerie(gdcmSerie *obj) {series.push_back(obj);};
 
+private:
+   ListSerie series;
 };
 
 //-----------------------------------------------------------------------------
index 7445b59c4787afe02cdccb6b3b5f742b66e93d6a..469247c6e7c209c292a84614905fb78e25e04596 100644 (file)
@@ -34,8 +34,12 @@ gdcmTS::gdcmTS(void)
       eatwhite(from);
       from.getline(buff, 1024, ' ');
       key = buff;
+
       if(key.size()%2==1)
-       key.push_back(0);
+      {
+       key.resize(key.size()+1);
+         key[key.size()-1]=0;
+      }
        
       eatwhite(from);
       from.getline(buff, 1024, '\n');
index 475d71c2ece3d5e43b7cca71b430bd84714e680c..fb1f87fb248565e7647eb571759083d65cd66a4e 100644 (file)
@@ -118,11 +118,11 @@ char *_cleanString(char *v) {
    int i, l;
    l = strlen(v);
    for (i=0,d=v; 
-        i<l ; 
-        i++,d++) {
-      if (!isprint(*d))
+      i<l ; 
+      i++,d++) {
+         if (!isprint(*d))
          *d = '.';
-      }        
+   }   
    return v;
 }
 
@@ -130,21 +130,19 @@ char *_cleanString(char *v) {
 ///////////////////////////////////////////////////////////////////////////
 // to prevent a flashing screen when non-printable character
 std::string _CreateCleanString(std::string s) {
-  std::string str=s;
-  int n = str.size();
-  for(int i=0;i<n-1;i++)
-  {
-    if(!isprint(str[i]))
-      str[i]='.';
-  }
-  if(!isprint(str[n])) { // to avoid trouble with odd length fields
-                        // padded with zeo to become even
-  
-     if (str[n] == '\0') 
-        str[n] = ' ';
-     else
-        str[n] = '.';
-  }
-  return(str);
-}
+   std::string str=s;
+
+   for(int i=0;i<str.size();i++)
+   {
+      if(!isprint(str[i]))
+         str[i]='.';
+   }
 
+
+   if(str.size()>0)
+      if(!isprint(s[str.size()-1]))
+         if(s[str.size()-1]==0)
+            str[str.size()-1]=' ';
+
+   return(str);
+}
index dcb110811f23668268c0d1baa3e2cef828940c01..afb88cf2a50a425721656367517f7b308a45cd6d 100644 (file)
@@ -58,7 +58,7 @@ LINK32=link.exe
 # Begin Special Build Tool\r
 SOURCE="$(InputPath)"\r
 PostBuild_Desc=Copy for test\r
-PostBuild_Cmds=copy                  ..\..\lib\gdcmdll.dll                  ..\..\gdcmPython\                  copy                  ..\..\lib\gdcmdll.dll                  ..\..\test\                copy               Release\gdcmdll.lib               ..\..\lib\ \r
+PostBuild_Cmds=copy                   ..\..\lib\gdcmdll.dll                   ..\..\gdcmPython\                copy                   ..\..\lib\gdcmdll.dll                   ..\..\test\                      copy                Release\gdcmdll.lib                ..\..\lib\ \r
 # End Special Build Tool\r
 \r
 !ELSEIF  "$(CFG)" == "gdcmdll - Win32 Debug"\r
@@ -90,7 +90,7 @@ LINK32=link.exe
 # Begin Special Build Tool\r
 SOURCE="$(InputPath)"\r
 PostBuild_Desc=Copy for test\r
-PostBuild_Cmds=copy                  ..\..\lib\gdcmdll.dll                  ..\..\gdcmPython\                  copy                  ..\..\lib\gdcmdll.dll                  ..\..\test\                copy               Debug\gdcmdll.lib               ..\..\lib\ \r
+PostBuild_Cmds=copy                   ..\..\lib\gdcmdll.dll                   ..\..\gdcmPython\                copy                   ..\..\lib\gdcmdll.dll                   ..\..\test\                      copy                Debug\gdcmdll.lib                ..\..\lib\ \r
 # End Special Build Tool\r
 \r
 !ENDIF \r
@@ -156,6 +156,10 @@ SOURCE=..\gdcmJpeg2000.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\gdcmObject.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\gdcmParsePixels.cxx\r
 # End Source File\r
 # Begin Source File\r
@@ -164,6 +168,10 @@ SOURCE=..\gdcmParser.cxx
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\gdcmPatient.cxx\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\gdcmRLE.cxx\r
 # End Source File\r
 # Begin Source File\r
@@ -248,6 +256,10 @@ SOURCE=..\gdcmParser.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\gdcmPatient.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\gdcmSerie.h\r
 # End Source File\r
 # Begin Source File\r