From a62b5eb4984601395f2e1296045bacd693ef860d Mon Sep 17 00:00:00 2001 From: davila Date: Thu, 21 Jun 2007 14:59:05 +0000 Subject: [PATCH] GDCM_NAME_SPACE --- Testing/TestAllReadCompareDicom.cxx | 24 +++++----- Testing/TestAllVM.cxx | 18 +++---- Testing/TestBuildUpDicomDir.cxx | 52 ++++++++++----------- Testing/TestDicomDir.cxx | 52 ++++++++++----------- Testing/TestDirList.cxx | 6 +-- Testing/TestFileAccessors.cxx | 8 ++-- Testing/TestLoadAllDocumentsNoPrivNoSeq.cxx | 8 ++-- Testing/TestMakeDicomDir.cxx | 28 +++++------ Testing/TestMakeIcon.cxx | 16 +++---- Testing/TestPrintAllDocument.cxx | 12 ++--- Testing/TestReadWriteReadCompare.cxx | 14 +++--- Testing/TestSerieHelper.cxx | 14 +++--- Testing/TestValidate.cxx | 8 ++-- Testing/VTKTestWriteSeq.cxx | 6 +-- 14 files changed, 133 insertions(+), 133 deletions(-) diff --git a/Testing/TestAllReadCompareDicom.cxx b/Testing/TestAllReadCompareDicom.cxx index 56aecc31..6819123c 100644 --- a/Testing/TestAllReadCompareDicom.cxx +++ b/Testing/TestAllReadCompareDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllReadCompareDicom.cxx,v $ Language: C++ - Date: $Date: 2007/06/04 08:51:24 $ - Version: $Revision: 1.59 $ + Date: $Date: 2007/06/21 14:59:05 $ + Version: $Revision: 1.60 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -291,11 +291,11 @@ bool TestFile::ReadFileData(std::ifstream *fp) // Track BigEndian troubles std::cout << " ScalarSize : " << GetScalarSize() << " IsCurrentProcessorBigEndian:" - << gdcm::Util::IsCurrentProcessorBigEndian() + << GDCM_NAME_SPACE::Util::IsCurrentProcessorBigEndian() << std::endl; //if (GetScalarSize() == 1 || GetSwapCode() == 1234) - if (GetScalarSize() == 1 || !gdcm::Util::IsCurrentProcessorBigEndian() ) + if (GetScalarSize() == 1 || !GDCM_NAME_SPACE::Util::IsCurrentProcessorBigEndian() ) { return true; } @@ -446,8 +446,8 @@ int InternalTest(std::string const &filename, std::cout << "1..."; // new style - gdcm::File *f = gdcm::File::New(); - f->SetLoadMode ( gdcm::LD_ALL ); // Load everything + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); + f->SetLoadMode ( GDCM_NAME_SPACE::LD_ALL ); // Load everything f->SetFileName( filename ); f->Load(); @@ -459,7 +459,7 @@ int InternalTest(std::string const &filename, f->Delete(); return 1; } - gdcm::FileHelper *tested = gdcm::FileHelper::New( f ); + GDCM_NAME_SPACE::FileHelper *tested = GDCM_NAME_SPACE::FileHelper::New( f ); ////// Step 2: ////// Check for existence of reference baseline dicom file: @@ -573,7 +573,7 @@ int InternalTest(std::string const &filename, << ") differ (as expanded in memory)." << std::endl << " compression : " - << gdcm::Global::GetTS()->GetValue(ts) << std::endl; + << GDCM_NAME_SPACE::Global::GetTS()->GetValue(ts) << std::endl; std::cout << " list of the first " << MAX_NUMBER_OF_DIFFERENCE << " pixels differing (pos : test - ref) :" @@ -612,10 +612,10 @@ int InternalTest(std::string const &filename, int TestAllReadCompareDicom(int argc, char *argv[]) { // Temporarily added, to track BigEndian troubles -gdcm::Debug::WarningOn(); +GDCM_NAME_SPACE::Debug::WarningOn(); if (argc == 4) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if ( argc >= 3 ) { @@ -668,7 +668,7 @@ gdcm::Debug::WarningOn(); std::string baseLineDir = GDCM_DATA_ROOT; baseLineDir += "/BaselineDicom"; - if( !gdcm::DirList::IsDirectory(baseLineDir) ) + if( !GDCM_NAME_SPACE::DirList::IsDirectory(baseLineDir) ) { std::cerr << " The reference baseline directory " << std::endl << " " @@ -681,7 +681,7 @@ gdcm::Debug::WarningOn(); //if (gdcmDataImages[i] == "D_CLUNIE_CT2_RLE.dcm") // gdcm::Debug::DebugOn(); // track pb on BigEndian Proc //else - gdcm::Debug::DebugOff(); + GDCM_NAME_SPACE::Debug::DebugOff(); ////// Step 1 (see above description): std::string filename = GDCM_DATA_ROOT; diff --git a/Testing/TestAllVM.cxx b/Testing/TestAllVM.cxx index fadab175..0abb8070 100644 --- a/Testing/TestAllVM.cxx +++ b/Testing/TestAllVM.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllVM.cxx,v $ Language: C++ - Date: $Date: 2006/07/05 13:08:32 $ - Version: $Revision: 1.14 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,22 +24,22 @@ int DoTheVMTest(std::string const &filename) { - gdcm::File *file = gdcm::File::New(); + GDCM_NAME_SPACE::File *file = GDCM_NAME_SPACE::File::New(); // - Do not test unknow VM in shadow groups (if element 0x0000 is present) // - Skip Sequences (if they are 'True Length'); loading will be quicker // (anyway, Sequences are skipped at processing time ...) - file->SetLoadMode( gdcm::LD_NOSHADOW | gdcm::LD_NOSEQ ); + file->SetLoadMode( GDCM_NAME_SPACE::LD_NOSHADOW | GDCM_NAME_SPACE::LD_NOSEQ ); file->SetFileName( filename ); if( !file->Load() ) //would be really bad... return 1; - gdcm::DocEntry *d = file->GetFirstEntry(); + GDCM_NAME_SPACE::DocEntry *d = file->GetFirstEntry(); std::cerr << "Testing file : " << filename << std::endl; - gdcm::DataEntry *de; + GDCM_NAME_SPACE::DataEntry *de; while(d) { - if ( (de = dynamic_cast(d)) ) + if ( (de = dynamic_cast(d)) ) { if ( !(de->GetGroup() % 2) ) // Don't check shadow elements. Righ now, // Private Dictionnary are not dealt with @@ -87,9 +87,9 @@ int TestAllVM(int argc, char *argv[]) filename += gdcmDataImages[i]; if (!strcmp(gdcmDataImages[i],"00191113.dcm")) // Track bug on Darwin - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); else - gdcm::Debug::DebugOff(); + GDCM_NAME_SPACE::Debug::DebugOff(); if( DoTheVMTest( filename ) ) return 1; diff --git a/Testing/TestBuildUpDicomDir.cxx b/Testing/TestBuildUpDicomDir.cxx index 5eafdbe8..de16a5f0 100644 --- a/Testing/TestBuildUpDicomDir.cxx +++ b/Testing/TestBuildUpDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestBuildUpDicomDir.cxx,v $ Language: C++ - Date: $Date: 2007/04/12 13:06:02 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/06/21 14:59:06 $ + 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 @@ -43,12 +43,12 @@ int TestBuildUpDicomDir(int argc, char *argv[]) // gdcm::Debug::DebugOn(); bool errorFound = false; - gdcm::DicomDir *dcmdir; + GDCM_NAME_SPACE::DicomDir *dcmdir; std::string dirName; - dcmdir = gdcm::DicomDir::New(); + dcmdir = GDCM_NAME_SPACE::DicomDir::New(); - gdcm::DicomDirPatient *p1; + GDCM_NAME_SPACE::DicomDirPatient *p1; // --- Forget these 4 lines : // just to improve test coverage. @@ -64,7 +64,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) p1->SetEntryString("patientONE",0x0010, 0x0010); // fill here other patient characteristics - gdcm::DicomDirStudy *s11; + GDCM_NAME_SPACE::DicomDirStudy *s11; // --- Forget these 4 lines : // just to improve test coverage. s11=p1->GetFirstStudy(); @@ -80,17 +80,17 @@ int TestBuildUpDicomDir(int argc, char *argv[]) s11->InsertEntryString("Dr^Mabuse", 0x0008, 0x1060, "PN"); // fill here other Study characteristics - gdcm::DicomDirStudy *s12 = p1->NewStudy(); + GDCM_NAME_SPACE::DicomDirStudy *s12 = p1->NewStudy(); s12->SetEntryString("StudyDescrOne.Two",0x0008, 0x1030); s12->InsertEntryString("Dr^Zorglub", 0x0008, 0x1060, "PN"); // fill here other Study characteristics - gdcm::DicomDirStudy *s13 = p1->NewStudy(); + GDCM_NAME_SPACE::DicomDirStudy *s13 = p1->NewStudy(); s13->SetEntryString("StudyDescrOne.Tree",0x0008, 0x1030); s13->InsertEntryString("Dr^Follamour", 0x0008, 0x1060, "PN"); // fill here other Study characteristics - gdcm::DicomDirSerie *s111; + GDCM_NAME_SPACE::DicomDirSerie *s111; // --- Forget these 4 lines : // just to improve test coverage. s111=s11->GetFirstSerie(); @@ -104,7 +104,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) s111->SetEntryString("01-01-111", 0x0008, 0x0021); // fill here other Serie characteristics - gdcm::DicomDirImage *s1111; + GDCM_NAME_SPACE::DicomDirImage *s1111; // --- Forget these 4 lines : // just to improve test coverage. @@ -117,44 +117,44 @@ int TestBuildUpDicomDir(int argc, char *argv[]) // Let's create and add a Image for this Serie s1111 = s111->NewImage(); s1111->SetEntryString("imageFileName1111",0x0004,0x1500); - gdcm::DicomDirImage *s1112 = s111->NewImage(); + GDCM_NAME_SPACE::DicomDirImage *s1112 = s111->NewImage(); s1112->SetEntryString("imageFileName1112",0x0004,0x1500); // Create patient TWO // ------------------ - gdcm::DicomDirPatient *p2 = dcmdir->NewPatient(); + GDCM_NAME_SPACE::DicomDirPatient *p2 = dcmdir->NewPatient(); p2->SetEntryString("patientTWO",0x0010, 0x0010); // fill here other patient characteristics - gdcm::DicomDirStudy *s21 = p2->NewStudy(); + GDCM_NAME_SPACE::DicomDirStudy *s21 = p2->NewStudy(); s21->SetEntryString("StudyDescrTwo.One",0x0008, 0x1030); // fill here other Study characteristics - gdcm::DicomDirSerie *s211 = s21->NewSerie(); + GDCM_NAME_SPACE::DicomDirSerie *s211 = s21->NewSerie(); s111->SetEntryString("01-01-211", 0x0008, 0x0021); // fill here other Serie characteristics - gdcm::DicomDirImage *s2111 = s211->NewImage(); + GDCM_NAME_SPACE::DicomDirImage *s2111 = s211->NewImage(); s2111->SetEntryString("imageFileName2111",0x0004,0x1500); // fill here other Image characteristics - gdcm::DicomDirImage *s2112 = s211->NewImage(); + GDCM_NAME_SPACE::DicomDirImage *s2112 = s211->NewImage(); s2112->SetEntryString("imageFileName1122",0x0004,0x1500); // fill here other Image characteristics // Create patient TREE // ------------------- - gdcm::DicomDirPatient *p3 = dcmdir->NewPatient(); + GDCM_NAME_SPACE::DicomDirPatient *p3 = dcmdir->NewPatient(); p3->SetEntryString("patientTHREE",0x0010, 0x0010); // fill here other Patient characteristics // Add a new Serie/Image for a Patient's Study created a long time ago // ------------------------------------------------------------------- - gdcm::DicomDirSerie *s131 = s13->NewSerie(); + GDCM_NAME_SPACE::DicomDirSerie *s131 = s13->NewSerie(); s111->SetEntryString("01-01-131", 0x0008, 0x0021); // fill here other Serie characteristics - gdcm::DicomDirImage *s1311 = s131->NewImage(); + GDCM_NAME_SPACE::DicomDirImage *s1311 = s131->NewImage(); s1311->SetEntryString("imageFileName1311",0x0004,0x1500); // fill here other Image characteristics @@ -170,7 +170,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) // Let's loop on Patients. - gdcm::DicomDirPatient *p; + GDCM_NAME_SPACE::DicomDirPatient *p; p=dcmdir->GetFirstPatient(); while (p) { std::cout << "one more patient\n"; @@ -201,7 +201,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) dcmdir->Delete(); // Read the newly written DicomDir - gdcm::DicomDir *newDicomDir = gdcm::DicomDir::New(); + GDCM_NAME_SPACE::DicomDir *newDicomDir = GDCM_NAME_SPACE::DicomDir::New(); newDicomDir->SetFileName("NewDICOMDIR"); newDicomDir->Load( ); if( !newDicomDir->IsReadable() ) @@ -267,7 +267,7 @@ int TestBuildUpDicomDir(int argc, char *argv[]) valueStuff = s11->GetEntryString(0x0008, 0x1060); std::cout << "----------------length-----------------" << valueStuff.length() << std::endl; - if (!gdcm::Util::DicomStringEqual(valueStuff, "Dr^Mabuse") ) + if (!GDCM_NAME_SPACE::Util::DicomStringEqual(valueStuff, "Dr^Mabuse") ) { std::cout << "2 : 0x0008,0x1060 [" << s11->GetEntryString(0x0008,0x1060) @@ -283,7 +283,7 @@ std::endl; errorFound = true; break; } - if ( gdcm::Util::DicomStringEqual(s12->GetEntryString(0x0008, + if ( GDCM_NAME_SPACE::Util::DicomStringEqual(s12->GetEntryString(0x0008, 0x1030),"StudyDescrOne.Two " )) { std::cout << "3 0x0008,0x1030 [" @@ -296,7 +296,7 @@ std::endl; << s12->GetEntryString(0x0008,0x1030) << "]" << std::endl; - if ( gdcm::Util::DicomStringEqual(s12->GetEntryString(0x0008, + if ( GDCM_NAME_SPACE::Util::DicomStringEqual(s12->GetEntryString(0x0008, 0x1060),"Dr^Zorglub " )) { std::cout << "4 0x0008,0x1060 [" @@ -325,7 +325,7 @@ std::endl; << "]" << std::endl; valueStuff = s13->GetEntryString(0x0008, 0x1060); - if (!gdcm::Util::DicomStringEqual(valueStuff, "Dr^Follamour") ) + if (!GDCM_NAME_SPACE::Util::DicomStringEqual(valueStuff, "Dr^Follamour") ) { std::cout << "5 0x0008,0x1060 [" << valueStuff @@ -345,7 +345,7 @@ std::endl; } valueStuff = s111->GetEntryString(0x0008, 0x0021); - if (!gdcm::Util::DicomStringEqual(valueStuff, "01-01-131") ) + if (!GDCM_NAME_SPACE::Util::DicomStringEqual(valueStuff, "01-01-131") ) { std::cout << "6 0x0008,0x0021 [" << valueStuff diff --git a/Testing/TestDicomDir.cxx b/Testing/TestDicomDir.cxx index 5690f519..b30e4535 100644 --- a/Testing/TestDicomDir.cxx +++ b/Testing/TestDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDicomDir.cxx,v $ Language: C++ - Date: $Date: 2007/04/12 13:06:02 $ - Version: $Revision: 1.45 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.46 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -31,10 +31,10 @@ // check *all* the dicom elements (gdcm::DocEntry) // of this gdcm::DicomDirObject -int CompareSQItem(gdcm::SQItem *pa1, gdcm::SQItem *pa2 ) +int CompareSQItem(GDCM_NAME_SPACE::SQItem *pa1, GDCM_NAME_SPACE::SQItem *pa2 ) { - gdcm::DocEntry *e1; - gdcm::DocEntry *e2; + GDCM_NAME_SPACE::DocEntry *e1; + GDCM_NAME_SPACE::DocEntry *e2; e2 = pa2->GetFirstEntry(); while (!e2) @@ -50,23 +50,23 @@ int CompareSQItem(gdcm::SQItem *pa1, gdcm::SQItem *pa2 ) return 1; } // skip SeqEntries (I don't want to deal with 'recursion pbs' here) - if ( !dynamic_cast(e1) || - !dynamic_cast(e2) ) + if ( !dynamic_cast(e1) || + !dynamic_cast(e2) ) continue; // a value is read as GDCM_UNFOUND - if ( ((gdcm::DataEntry *)e1)->GetString() == gdcm::GDCM_UNFOUND ) + if ( ((GDCM_NAME_SPACE::DataEntry *)e1)->GetString() == GDCM_NAME_SPACE::GDCM_UNFOUND ) { std::cout << "for gdcm source DicomDir : element (" << std::hex << e1->GetGroup() << "," <GetElement() - << ") has values [" << gdcm::GDCM_UNFOUND << "]" + << ") has values [" << GDCM_NAME_SPACE::GDCM_UNFOUND << "]" << std::endl; return 1; } // values differ in source file and destination file - if ( ((gdcm::DataEntry *)e1)->GetString() != - ((gdcm::DataEntry *)e2)->GetString() ) + if ( ((GDCM_NAME_SPACE::DataEntry *)e1)->GetString() != + ((GDCM_NAME_SPACE::DataEntry *)e2)->GetString() ) { /// \todo : check the value *written on disc*, not the value converted as a std::string @@ -76,8 +76,8 @@ int CompareSQItem(gdcm::SQItem *pa1, gdcm::SQItem *pa2 ) std::cout << "for gdcm DicomDir element (" << std::hex << e2->GetGroup() << "," <GetElement() << ") values differ [" - << ((gdcm::DataEntry *)e1)->GetString() << "] != [" - << ((gdcm::DataEntry *)e2)->GetString() << "]" + << ((GDCM_NAME_SPACE::DataEntry *)e1)->GetString() << "] != [" + << ((GDCM_NAME_SPACE::DataEntry *)e2)->GetString() << "]" << std::endl; return 1; } @@ -87,14 +87,14 @@ int CompareSQItem(gdcm::SQItem *pa1, gdcm::SQItem *pa2 ) int TestDicomDir(int argc, char *argv[]) { - gdcm::DicomDir *dicomdir; + GDCM_NAME_SPACE::DicomDir *dicomdir; - gdcm::DicomDirPatient *pa1; - gdcm::DicomDirStudy *st1; - gdcm::DicomDirSerie *se1; - gdcm::DicomDirImage *im1; + GDCM_NAME_SPACE::DicomDirPatient *pa1; + GDCM_NAME_SPACE::DicomDirStudy *st1; + GDCM_NAME_SPACE::DicomDirSerie *se1; + GDCM_NAME_SPACE::DicomDirImage *im1; - gdcm::TSKey v; + GDCM_NAME_SPACE::TSKey v; std::string file; if (argc > 1) @@ -108,7 +108,7 @@ int TestDicomDir(int argc, char *argv[]) std::cout << "DicomDir we're going to deal with : ["<< file << "]" << std::endl; - dicomdir = gdcm::DicomDir::New(); + dicomdir = GDCM_NAME_SPACE::DicomDir::New(); dicomdir->SetFileName(file); dicomdir->Load(); if (argc > 2) @@ -195,7 +195,7 @@ int TestDicomDir(int argc, char *argv[]) // ------------------------- second stage --------------------------- - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); // Write on disc what we read @@ -205,7 +205,7 @@ int TestDicomDir(int argc, char *argv[]) << "NewDICOMDIR written on disc =================================" << std::endl<< std::endl; // Read what we wrote - gdcm::DicomDir *d2 = gdcm::DicomDir::New(); + GDCM_NAME_SPACE::DicomDir *d2 = GDCM_NAME_SPACE::DicomDir::New(); d2->SetFileName("NewDICOMDIR"); d2->Load(); if (!d2->IsReadable()) @@ -219,10 +219,10 @@ int TestDicomDir(int argc, char *argv[]) << "NewDICOMDIR successfully read from disc =================================" << std::endl<< std::endl; - gdcm::DicomDirPatient *pa2; - gdcm::DicomDirStudy *st2; - gdcm::DicomDirSerie *se2; - gdcm::DicomDirImage *im2; + GDCM_NAME_SPACE::DicomDirPatient *pa2; + GDCM_NAME_SPACE::DicomDirStudy *st2; + GDCM_NAME_SPACE::DicomDirSerie *se2; + GDCM_NAME_SPACE::DicomDirImage *im2; pa1 = dicomdir->GetFirstPatient(); pa2 = d2->GetFirstPatient(); diff --git a/Testing/TestDirList.cxx b/Testing/TestDirList.cxx index cd34df8f..8cb3b808 100644 --- a/Testing/TestDirList.cxx +++ b/Testing/TestDirList.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDirList.cxx,v $ Language: C++ - Date: $Date: 2005/02/02 10:05:26 $ - Version: $Revision: 1.3 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.4 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -22,7 +22,7 @@ int TestDirList(int , char *[]) std::string path = GDCM_DATA_ROOT; std::cerr << path << std::endl; - gdcm::DirList list(path, true); + GDCM_NAME_SPACE::DirList list(path, true); list.Print(); return 0; diff --git a/Testing/TestFileAccessors.cxx b/Testing/TestFileAccessors.cxx index 6da538a2..b242ccbb 100644 --- a/Testing/TestFileAccessors.cxx +++ b/Testing/TestFileAccessors.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestFileAccessors.cxx,v $ Language: C++ - Date: $Date: 2006/11/15 16:00:34 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/06/21 14:59:06 $ + 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 @@ -88,7 +88,7 @@ int TestFileAccessors(int argc, char *argv[]) std::cout << " ----------------------------------------------" << "Begin with " << filename << std::endl; - gdcm::File *f= gdcm::File::New( ); + GDCM_NAME_SPACE::File *f= GDCM_NAME_SPACE::File::New( ); f->SetFileName( filename ); f->Load( ); @@ -149,7 +149,7 @@ int TestFileAccessors(int argc, char *argv[]) { std::cout << " " << filename << " is Readable" << std::endl; - gdcm::FileHelper *fh= gdcm::FileHelper::New( f ); + GDCM_NAME_SPACE::FileHelper *fh= GDCM_NAME_SPACE::FileHelper::New( f ); TestMethodMacro(std::dec,fh,GetImageDataSize) TestMethodMacro(std::dec,fh,GetImageDataRawSize) diff --git a/Testing/TestLoadAllDocumentsNoPrivNoSeq.cxx b/Testing/TestLoadAllDocumentsNoPrivNoSeq.cxx index b6491ca0..8fa5711b 100644 --- a/Testing/TestLoadAllDocumentsNoPrivNoSeq.cxx +++ b/Testing/TestLoadAllDocumentsNoPrivNoSeq.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestLoadAllDocumentsNoPrivNoSeq.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:31 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.5 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -54,10 +54,10 @@ int TestLoadAllDocumentsNoPrivNoSeq(int, char *[]) filename += "/"; //doh! filename += gdcmDataImages[i]; - gdcm::File *f= gdcm::File::New( ); + GDCM_NAME_SPACE::File *f= GDCM_NAME_SPACE::File::New( ); f->SetFileName( filename ); // just to improve coverage - f->SetLoadMode (gdcm::LD_NOSEQ|gdcm::LD_NOSHADOW); + f->SetLoadMode (GDCM_NAME_SPACE::LD_NOSEQ|GDCM_NAME_SPACE::LD_NOSHADOW); f->Load(); /* diff --git a/Testing/TestMakeDicomDir.cxx b/Testing/TestMakeDicomDir.cxx index 50148523..edfecb66 100644 --- a/Testing/TestMakeDicomDir.cxx +++ b/Testing/TestMakeDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestMakeDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/11/28 16:31:19 $ - Version: $Revision: 1.12 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.13 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -23,7 +23,7 @@ #include "gdcmDebug.h" // --- -class CommandStart : public gdcm::Command +class CommandStart : public GDCM_NAME_SPACE::Command { gdcmTypeMacro(CommandStart); gdcmNewMacro(CommandStart); @@ -38,7 +38,7 @@ protected : CommandStart() {} }; -class CommandEnd : public gdcm::Command +class CommandEnd : public GDCM_NAME_SPACE::Command { gdcmTypeMacro(CommandEnd); gdcmNewMacro(CommandEnd); @@ -53,7 +53,7 @@ protected : CommandEnd() {} }; -class CommandProgress : public gdcm::Command +class CommandProgress : public GDCM_NAME_SPACE::Command { gdcmTypeMacro(CommandProgress); gdcmNewMacro(CommandProgress); @@ -61,7 +61,7 @@ class CommandProgress : public gdcm::Command public : virtual void Execute() { - gdcm::DicomDir *dd=dynamic_cast(GetObject()); + GDCM_NAME_SPACE::DicomDir *dd=dynamic_cast(GetObject()); if(dd) std::cerr << "Progress parsing (" << dd->GetProgress() << ")" << std::endl; @@ -104,25 +104,25 @@ int TestMakeDicomDir(int argc, char *argv[]) dirName = GDCM_DATA_ROOT; } - gdcm::DicomDir *dcmdir; + GDCM_NAME_SPACE::DicomDir *dcmdir; // new style (user is allowed no to load Sequences an/or Shadow Groups) - dcmdir = gdcm::DicomDir::New( ); + dcmdir = GDCM_NAME_SPACE::DicomDir::New( ); - gdcm::Command *cmd; + GDCM_NAME_SPACE::Command *cmd; cmd = CommandStart::New(); - gdcm::CommandManager::SetCommand(dcmdir,gdcm::CMD_STARTPROGRESS,cmd); + GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_STARTPROGRESS,cmd); cmd->Delete(); cmd = CommandProgress::New(); - gdcm::CommandManager::SetCommand(dcmdir,gdcm::CMD_PROGRESS,cmd); + GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_PROGRESS,cmd); cmd->Delete(); cmd = CommandEnd::New(); - gdcm::CommandManager::SetCommand(dcmdir,gdcm::CMD_ENDPROGRESS,cmd); + GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_ENDPROGRESS,cmd); cmd->Delete(); // dcmdir->SetLoadMode(gdcm::LD_NOSEQ | gdcm::LD_NOSHADOW); // some images have a wrong length for element 0x0000 of private groups - dcmdir->SetLoadMode(gdcm::LD_NOSEQ); + dcmdir->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ); dcmdir->SetDirectoryName(dirName); dcmdir->Load(); @@ -140,7 +140,7 @@ int TestMakeDicomDir(int argc, char *argv[]) dcmdir->Delete(); // Read from disc the just written DicomDir - gdcm::DicomDir *newDicomDir = gdcm::DicomDir::New(); + GDCM_NAME_SPACE::DicomDir *newDicomDir = GDCM_NAME_SPACE::DicomDir::New(); newDicomDir->SetFileName("NewDICOMDIR"); newDicomDir->Load(); diff --git a/Testing/TestMakeIcon.cxx b/Testing/TestMakeIcon.cxx index 2da82ce3..225d528e 100644 --- a/Testing/TestMakeIcon.cxx +++ b/Testing/TestMakeIcon.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestMakeIcon.cxx,v $ Language: C++ - Date: $Date: 2006/04/11 16:05:03 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.12 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -35,7 +35,7 @@ int TestMakeIcon (int argc, char *argv[]) std::string output = "testIcon.dcm"; - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if ( argc == 3 ) { @@ -48,7 +48,7 @@ int TestMakeIcon (int argc, char *argv[]) << " input filename.dcm output Filename.dcm" << std::endl; } - gdcm::File *f = gdcm::File::New( ); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New( ); f->SetFileName( input ); f->Load( ); @@ -58,12 +58,12 @@ int TestMakeIcon (int argc, char *argv[]) f->Delete(); return 1; } - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); uint8_t *pixels = fh->GetImageData(); uint32_t lgth = fh->GetImageDataSize(); - gdcm::SeqEntry *icon = f->InsertSeqEntry(0x0088, 0x0200); - gdcm::SQItem *sqi = gdcm::SQItem::New(1); + GDCM_NAME_SPACE::SeqEntry *icon = f->InsertSeqEntry(0x0088, 0x0200); + GDCM_NAME_SPACE::SQItem *sqi = GDCM_NAME_SPACE::SQItem::New(1); icon->AddSQItem(sqi, 1); sqi->Delete(); @@ -89,7 +89,7 @@ int TestMakeIcon (int argc, char *argv[]) f->Delete(); fh->Delete(); - f = gdcm::File::New(); + f = GDCM_NAME_SPACE::File::New(); f->SetFileName(output); f->Load(); f->Print(); diff --git a/Testing/TestPrintAllDocument.cxx b/Testing/TestPrintAllDocument.cxx index 1b19d794..9d8efd81 100644 --- a/Testing/TestPrintAllDocument.cxx +++ b/Testing/TestPrintAllDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestPrintAllDocument.cxx,v $ Language: C++ - Date: $Date: 2006/04/07 10:58:51 $ - Version: $Revision: 1.13 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.14 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -67,7 +67,7 @@ int TestPrintAllDocument(int argc, char *argv[]) std::cout << " ----------------------------------------------" << "Begin with " << filename << std::endl; - gdcm::File *f= gdcm::File::New( ); + GDCM_NAME_SPACE::File *f= GDCM_NAME_SPACE::File::New( ); f->SetFileName( filename ); f->Load(); @@ -112,11 +112,11 @@ int TestPrintAllDocument(int argc, char *argv[]) std::string strImageOrientationPatient = f->GetEntryString(0x0020,0x0037); - if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND ) + if ( strImageOrientationPatient != GDCM_NAME_SPACE::GDCM_UNFOUND ) { - gdcm::Orientation *o = gdcm::Orientation::New(); + GDCM_NAME_SPACE::Orientation *o = GDCM_NAME_SPACE::Orientation::New(); - gdcm::OrientationType orient = o->GetOrientationType( f ); + GDCM_NAME_SPACE::OrientationType orient = o->GetOrientationType( f ); std::cout << " ---------------------- Orientation " << orient << std::endl; o->Delete(); diff --git a/Testing/TestReadWriteReadCompare.cxx b/Testing/TestReadWriteReadCompare.cxx index 0499ab6e..655e1282 100644 --- a/Testing/TestReadWriteReadCompare.cxx +++ b/Testing/TestReadWriteReadCompare.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestReadWriteReadCompare.cxx,v $ Language: C++ - Date: $Date: 2006/05/05 22:13:55 $ - Version: $Revision: 1.28 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.29 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,7 +28,7 @@ int CompareInternal(std::string const &filename, std::string const &output) //////////////// Step 1 (see above description): - gdcm::File *file = gdcm::File::New( ); + GDCM_NAME_SPACE::File *file = GDCM_NAME_SPACE::File::New( ); file->SetFileName( filename ); file->Load (); if( !file->IsReadable() ) @@ -42,7 +42,7 @@ int CompareInternal(std::string const &filename, std::string const &output) std::cout << " step 1..."; //////////////// Step 2: - gdcm::FileHelper *filehelper = gdcm::FileHelper::New( file ); + GDCM_NAME_SPACE::FileHelper *filehelper = GDCM_NAME_SPACE::FileHelper::New( file ); int dataSize = filehelper->GetImageDataSize(); uint8_t *imageData = filehelper->GetImageData(); //EXTREMELY IMPORTANT // Sure, it is : It's up to the user to decide if he wants to @@ -56,7 +56,7 @@ int CompareInternal(std::string const &filename, std::string const &output) std::cout << "2..."; //////////////// Step 3: - gdcm::File *fileout = gdcm::File::New(); + GDCM_NAME_SPACE::File *fileout = GDCM_NAME_SPACE::File::New(); fileout->SetFileName( output ); fileout->Load(); // gdcm::FileHelper *reread = new gdcm::FileHelper( output ); // deprecated @@ -72,7 +72,7 @@ int CompareInternal(std::string const &filename, std::string const &output) return 1; } - gdcm::FileHelper *reread = gdcm::FileHelper::New( fileout ); + GDCM_NAME_SPACE::FileHelper *reread = GDCM_NAME_SPACE::FileHelper::New( fileout ); std::cout << "3..."; // For the next step: @@ -140,7 +140,7 @@ int TestReadWriteReadCompare(int argc, char *argv[]) int result = 0; if (argc == 4) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if (argc >= 3) { diff --git a/Testing/TestSerieHelper.cxx b/Testing/TestSerieHelper.cxx index 77bd81d4..cfa52140 100644 --- a/Testing/TestSerieHelper.cxx +++ b/Testing/TestSerieHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestSerieHelper.cxx,v $ Language: C++ - Date: $Date: 2005/11/14 15:56:55 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/06/21 14:59:06 $ + 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 @@ -22,7 +22,7 @@ int TestSerieHelper(int argc, char *argv[]) { - gdcm::SerieHelper *s; + GDCM_NAME_SPACE::SerieHelper *s; std::string dirName; if (argc > 1) @@ -38,8 +38,8 @@ int TestSerieHelper(int argc, char *argv[]) std::cout << "Dir Name :[" << dirName << "]" << std::endl; - s = gdcm::SerieHelper::New(); - s->SetLoadMode(gdcm::LD_ALL); // Load everything for each File + s = GDCM_NAME_SPACE::SerieHelper::New(); + s->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); // Load everything for each File //s->AddRestriction(tagKey, valueToCheck); // Keep only files where // restriction is true s->SetDirectory(dirName, true); // true : recursive exploration @@ -52,7 +52,7 @@ int TestSerieHelper(int argc, char *argv[]) int nbFiles; // For all the SingleSerieUID filesets of the gdcm::Serie - gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet(); + GDCM_NAME_SPACE::FileList *l = s->GetFirstSingleSerieUIDFileSet(); while (l) { nbFiles = l->size() ; @@ -76,7 +76,7 @@ int TestSerieHelper(int argc, char *argv[]) std::string fileName; l = s->GetFirstSingleSerieUIDFileSet(); - for (std::vector::iterator it = l->begin(); + for (std::vector::iterator it = l->begin(); it != l->end(); ++it) { diff --git a/Testing/TestValidate.cxx b/Testing/TestValidate.cxx index d9153ee2..ebe4a32e 100644 --- a/Testing/TestValidate.cxx +++ b/Testing/TestValidate.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestValidate.cxx,v $ Language: C++ - Date: $Date: 2005/11/21 10:02:57 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/06/21 14:59:06 $ + 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 @@ -28,10 +28,10 @@ int Validate(std::string const &filename); int Validate(std::string const &filename) { - gdcm::File *input = gdcm::File::New( ); + GDCM_NAME_SPACE::File *input = GDCM_NAME_SPACE::File::New( ); input->SetFileName(filename); input->Load(); - gdcm::Validator *v = gdcm::Validator::New(); + GDCM_NAME_SPACE::Validator *v = GDCM_NAME_SPACE::Validator::New(); v->SetInput( input ); input->Delete(); v->Delete(); diff --git a/Testing/VTKTestWriteSeq.cxx b/Testing/VTKTestWriteSeq.cxx index efd7a73c..f33012ee 100644 --- a/Testing/VTKTestWriteSeq.cxx +++ b/Testing/VTKTestWriteSeq.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: VTKTestWriteSeq.cxx,v $ Language: C++ - Date: $Date: 2005/09/08 14:40:15 $ - Version: $Revision: 1.5 $ + Date: $Date: 2007/06/21 14:59:06 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -219,7 +219,7 @@ int VTKTestWriteSeq(int argc, char *argv[]) } } - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); int ret = 0; vtkTesting *t = vtkTesting::New(); -- 2.45.1