]> Creatis software - gdcm.git/blobdiff - Example/makeDicomDir.cxx
* Test/TestDicomdir.cxx : remove memory leaks
[gdcm.git] / Example / makeDicomDir.cxx
index fbaf7f3530c0abcf308a549dcc23a49ca3d23e6b..948e24f7e38758ba7cb6d09f5b0f9b5aef3819df 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: makeDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:56 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/18 07:55:16 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -44,7 +44,7 @@ void EndMethod(void *toto) {
   */  
 
 int main(int argc, char* argv[]) {
-  gdcm::DicomDir *dcmdir;
+   gdcm::DicomDir *dcmdir;
    std::string dirName;   
 
    if (argc > 1)
@@ -57,8 +57,7 @@ int main(int argc, char* argv[]) {
    dcmdir->SetStartMethod(StartMethod, (void *) NULL);
    dcmdir->SetEndMethod(EndMethod);
    
-   gdcm::ListDicomDirPatient lp = dcmdir->GetDicomDirPatients();
-   if (! lp.size() ) 
+   if ( !dcmdir->GetFirstEntry() ) 
    {
       std::cout << "makeDicomDir: no patient list present. Exiting."
                 << std::endl;