]> Creatis software - gdcm.git/blobdiff - Testing/TestBuildUpDicomDir.cxx
According to Mathieu's suggestion, Print now display FL BinEntries in a human
[gdcm.git] / Testing / TestBuildUpDicomDir.cxx
index f191a9c8d08bb84f46532a26ddfac286aab005ba..4037663d7d537d6890c18a69a4eddee92ed80a67 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestBuildUpDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 10:41:10 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2005/07/08 13:39:57 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -185,7 +185,9 @@ int TestBuildUpDicomDir(int argc, char *argv[])
    delete dcmdir;
 
    // Read the newly written DicomDir
-   gdcm::DicomDir *newDicomDir = new gdcm::DicomDir("NewDICOMDIR");
+   gdcm::DicomDir *newDicomDir = new gdcm::DicomDir();
+   newDicomDir->SetFileName("NewDICOMDIR");
+   newDicomDir->Load( );
    if( !newDicomDir->IsReadable() )
    {
       std::cout<<"          Written DicomDir 'NewDICOMDIR'"
@@ -259,7 +261,7 @@ int TestBuildUpDicomDir(int argc, char *argv[])
       std::cout << "Pysician : [" 
                 << valueStuff
                 << "]" << std::endl;
-      if ( !(s12 = p1->GetNextStudy()) )
+      if ( (s12 = p1->GetNextStudy()) == 0 )
       {
          errorFound = true;
          break;
@@ -290,7 +292,7 @@ int TestBuildUpDicomDir(int argc, char *argv[])
                 << s12->GetEntryValue(0x0008,0x1060)
                 << "]" << std::endl;
 
-      if ( !(s13 = p1->GetNextStudy()) )
+      if ( (s13 = p1->GetNextStudy()) == 0 )
       {
          std::cout << "Study StudyDescrOne.Tree missing" << std::endl;
          break;
@@ -317,7 +319,7 @@ int TestBuildUpDicomDir(int argc, char *argv[])
                 << valueStuff
                 << "]" << std::endl;
 
-      if (!(s111 = s11->GetFirstSerie()) )
+      if ((s111 = s11->GetFirstSerie()) == 0 )
       {
          std::cout << "Serie 01-01-111 missing" << std::endl;
          errorFound = true;
@@ -337,7 +339,7 @@ int TestBuildUpDicomDir(int argc, char *argv[])
                 << valueStuff
                 << "]" << std::endl;
 
-      if ( !(s1111 = s111->GetFirstImage()) )
+      if ( (s1111 = s111->GetFirstImage()) == 0 )
       {
          std::cout << "missing image S1111" << std::endl;
          errorFound = true;
@@ -350,7 +352,7 @@ int TestBuildUpDicomDir(int argc, char *argv[])
          break;
       }
 */
-      if ( !(s1112 = s111->GetNextImage()) )
+      if ( (s1112 = s111->GetNextImage()) == 0 )
       {
          std::cout << "missing image S1112" << std::endl;
          errorFound = true;