X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestAllReadCompareDicom.cxx;h=d2fb988f5087435919ae0942aed0b78e8483141d;hb=3d6f883e5e6149f34c22f931d199251dd2889a0b;hp=a4bffdea563de79836891017f946125be95e2f79;hpb=ebc807df21ba9e4e7ecae409d875ed46b47cd79c;p=gdcm.git diff --git a/Testing/TestAllReadCompareDicom.cxx b/Testing/TestAllReadCompareDicom.cxx index a4bffdea..d2fb988f 100644 --- a/Testing/TestAllReadCompareDicom.cxx +++ b/Testing/TestAllReadCompareDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllReadCompareDicom.cxx,v $ Language: C++ - Date: $Date: 2005/02/01 09:46:15 $ - Version: $Revision: 1.27 $ + Date: $Date: 2005/02/03 10:00:06 $ + Version: $Revision: 1.30 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -22,21 +22,17 @@ #include #include -#ifdef _MSC_VER - #include -#endif - //Generated file: #include "gdcmDataImages.h" -int InternalTest(std::string const & filename, - std::string const & referenceFileName ) +int InternalTest(std::string const &filename, + std::string const &referenceFileName ) { std::cout << " Testing: " << filename << std::endl; ////// Step 1: std::cout << " 1..."; - gdcm::FileHelper* tested = new gdcm::FileHelper( filename ); + gdcm::FileHelper *tested = new gdcm::FileHelper( filename ); if( !tested->GetFile()->IsReadable() ) { std::cout << " Failed" << std::endl @@ -53,7 +49,7 @@ int InternalTest(std::string const & filename, std::ifstream testFILE( referenceFileName.c_str() ); if (! testFILE ) { - uint8_t* testedImageData = tested->GetImageData(); // Kludge + uint8_t *testedImageData = tested->GetImageData(); // Kludge (void)testedImageData; tested->SetWriteModeToRGB(); @@ -65,7 +61,7 @@ int InternalTest(std::string const & filename, ////// When reference file is not gdcm readable test is failed: std::cout << "3a..."; - gdcm::FileHelper* reference = new gdcm::FileHelper( referenceFileName ); + gdcm::FileHelper *reference = new gdcm::FileHelper( referenceFileName ); if( !reference->GetFile()->IsReadable() ) { std::cout << " Failed" << std::endl @@ -82,10 +78,10 @@ int InternalTest(std::string const & filename, ////// Step 3b: std::cout << "3b..."; int testedDataSize = tested->GetImageDataSize(); - uint8_t* testedImageData = tested->GetImageData(); + uint8_t *testedImageData = tested->GetImageData(); int referenceDataSize = reference->GetImageDataSize(); - uint8_t* referenceImageData = reference->GetImageData(); + uint8_t *referenceImageData = reference->GetImageData(); // Test the image size if (tested->GetFile()->GetXSize() != reference->GetFile()->GetXSize() || @@ -143,7 +139,7 @@ int InternalTest(std::string const & filename, return 0; } -int TestAllReadCompareDicom(int argc, char* argv[]) +int TestAllReadCompareDicom(int argc, char *argv[]) { if ( argc == 3 ) { @@ -199,7 +195,7 @@ int TestAllReadCompareDicom(int argc, char* argv[]) ////// Check for existence of reference baseline directory std::string baseLineDir = GDCM_DATA_ROOT; - baseLineDir += "/BaselineDicom"; + baseLineDir += "/BaselineDicom/"; if( !gdcm::DirList::IsDirectory(baseLineDir) ) { @@ -210,9 +206,6 @@ int TestAllReadCompareDicom(int argc, char* argv[]) << std::endl; return 1; } -#ifndef _MSC_VER - testDir.close(); -#endif ////// Step 1 (see above description): std::string filename = GDCM_DATA_ROOT;