X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestBuildUpDicomDir.cxx;h=64efd4b0e89217b6f6856c06d88911ab061cd81e;hb=427dd083a10d001c2162b9cb462be49cd4f22fac;hp=0c4813c30efdf67f77bfb41e94580128704bccf0;hpb=bf254f32ff1391a5da3ccc13b0aaba4446ee60a6;p=gdcm.git diff --git a/Testing/TestBuildUpDicomDir.cxx b/Testing/TestBuildUpDicomDir.cxx index 0c4813c3..64efd4b0 100644 --- a/Testing/TestBuildUpDicomDir.cxx +++ b/Testing/TestBuildUpDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestBuildUpDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 09:22:13 $ - Version: $Revision: 1.7 $ + Date: $Date: 2005/10/25 14:52:30 $ + Version: $Revision: 1.8 $ 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 @@ int TestBuildUpDicomDir(int argc, char *argv[]) gdcm::DicomDir *dcmdir; std::string dirName; - dcmdir = new gdcm::DicomDir(); + dcmdir = gdcm::DicomDir::New(); gdcm::DicomDirPatient *p1; // --- Forget these 4 lines : @@ -171,7 +171,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) <<" is not readable"<Delete(); return 1; } @@ -184,10 +184,10 @@ int TestBuildUpDicomDir(int argc, char *argv[]) // Write it on disc dcmdir->Write("NewDICOMDIR"); - delete dcmdir; + dcmdir->Delete(); // Read the newly written DicomDir - gdcm::DicomDir *newDicomDir = new gdcm::DicomDir(); + gdcm::DicomDir *newDicomDir = gdcm::DicomDir::New(); newDicomDir->SetFileName("NewDICOMDIR"); newDicomDir->Load( ); if( !newDicomDir->IsReadable() ) @@ -196,7 +196,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) <<" is not readable"<Delete(); return 1; } // Check some value we are sure @@ -208,7 +208,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) { std::cout << "A patient is missing in written DicomDir" << std::endl; - delete newDicomDir; + newDicomDir->Delete(); return 1; } @@ -363,7 +363,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) } std::cout<Delete(); return errorFound; }