From: jpr Date: Wed, 23 May 2007 14:18:02 +0000 (+0000) Subject: In order to allow to use current version (1.3) of gdcm *and* ITK (that includes X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8fd45dc6d321d1419854dc0e4fa6a37d6826b655;p=gdcm.git In order to allow to use current version (1.3) of gdcm *and* ITK (that includes gdcm1.2) developper may, at CMake time, choose his own 'namespace' name, e.g. gdcm13 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 454ff429..823940a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,9 @@ SET(GDCM_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES}) OPTION(GDCM_DEBUG "Turn verbosity of some statement ON." OFF) MARK_AS_ADVANCED(GDCM_DEBUG) +# -------------------------------------------------------------------------- +SET (GDCM_NAME_SPACE gdcm CACHE STRING "name space") + # -------------------------------------------------------------------------- # Install directories STRING(TOLOWER ${PROJECT_NAME} project_name) @@ -82,7 +85,7 @@ ENDIF(GDCM_BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- SET (EXECUTABLE_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.") -SET (LIBRARY_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") +SET (LIBRARY_OUTPUT_PATH ${GDCM_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) @@ -238,7 +241,7 @@ ENDIF( ${CMAKE_HAVE_SYS_SOCKET_H} ) #----------------------------------------------------------------------------- # Force Big Endian emulation on little endian: -OPTION(GDCM_FORCE_BIGENDIAN_EMULATION "Force Big Endian Emulation. Do use if you don't know what you are doing." OFF) +OPTION(GDCM_FORCE_BIGENDIAN_EMULATION "Force Big Endian Emulation. Don't use if you don't know what you are doing." OFF) CONFIGURE_FILE(${GDCM_SOURCE_DIR}/gdcmConfigure.h.in ${GDCM_BINARY_DIR}/gdcmConfigure.h @ONLY IMMEDIATE diff --git a/Dicts/DicomDir.dic b/Dicts/DicomDir.dic index 17c49731..f61ea05f 100644 --- a/Dicts/DicomDir.dic +++ b/Dicts/DicomDir.dic @@ -80,7 +80,7 @@ imageElem 0020 0052 "UI" "0" // Frame of Reference UID imageElem 0020 1041 "DS" "0.0" // Slice Location imageElem 0020 4000 "LT" "" // Image Comments imageElem 0028 0002 "US" "1" // Samples per Pixel -imageElem 0028 0004 "CS" "" // Photometric Interpretation +imageElem 0028 0004 "CS" "" // Photometric Interpretation imageElem 0028 0006 "US" "0" // Planar Configuration imageElem 0028 0008 "IS" "1" // Number of Frames imageElem 0028 0010 "US" "0" // Rows diff --git a/Example/Anonymize.cxx b/Example/Anonymize.cxx index 8a2cf32c..59671b23 100644 --- a/Example/Anonymize.cxx +++ b/Example/Anonymize.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: Anonymize.cxx,v $ Language: C++ - Date: $Date: 2006/03/17 14:36:37 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) FINISH_USAGE // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) return 0; } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); // if unused Param we give up if ( am->ArgMgrPrintUnusedLabels() ) @@ -79,10 +79,10 @@ int main(int argc, char *argv[]) // Read the input file. // ============================================================ - gdcm::File *f; + GDCM_NAME_SPACE::File *f; - f = gdcm::File::New( ); - f->SetLoadMode( gdcm::LD_ALL ); + f = GDCM_NAME_SPACE::File::New( ); + f->SetLoadMode( GDCM_NAME_SPACE::LD_ALL ); f->SetFileName( fileName ); int res = f->Load(); @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) // ============================================================ // We need a gdcm::FileHelper, since we want to load the pixels - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); // unit8_t DOESN'T mean it's mandatory for the image to be a 8 bits one ! // Feel free to cast if you know it's not. @@ -146,7 +146,7 @@ int main(int argc, char *argv[]) // The written image will not appear as a 'Secondary Captured image' // nor as a DERIVED one - fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE); + fh->SetContentType(GDCM_NAME_SPACE::UNMODIFIED_PIXELS_IMAGE); fh->WriteDcmExplVR(outputFileName); std::cout <<"End Anonymize" << std::cout; diff --git a/Example/AnonymizeDicomDir.cxx b/Example/AnonymizeDicomDir.cxx index 475f3a02..27aa9944 100644 --- a/Example/AnonymizeDicomDir.cxx +++ b/Example/AnonymizeDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: AnonymizeDicomDir.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 14:59:58 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -35,15 +35,15 @@ * \brief AnonymizeDicomDir */ -void AnoNoLoad(gdcm::SQItem *s, std::fstream *fp, +void AnoNoLoad(GDCM_NAME_SPACE::SQItem *s, std::fstream *fp, uint16_t group, uint16_t elem, std::string val); -void AnoNoLoad(gdcm::SQItem *s, std::fstream *fp, +void AnoNoLoad(GDCM_NAME_SPACE::SQItem *s, std::fstream *fp, uint16_t group, uint16_t elem, std::string val) { - gdcm::DocEntry *d; + GDCM_NAME_SPACE::DocEntry *d; uint32_t offset; uint32_t lgth; uint32_t valLgth = 0; @@ -55,7 +55,7 @@ void AnoNoLoad(gdcm::SQItem *s, std::fstream *fp, if ( d == NULL) return; - if ( ! dynamic_cast(d) ) + if ( ! dynamic_cast(d) ) return; offset = d->GetOffset(); @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) FINISH_USAGE // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -106,8 +106,8 @@ int main(int argc, char *argv[]) // Read the input DICOMDIR - gdcm::File *f; - f = gdcm::File::New( ); + GDCM_NAME_SPACE::File *f; + f = GDCM_NAME_SPACE::File::New( ); f->SetLoadMode(0); f->SetFileName( fileName ); bool res = f->Load(); @@ -119,7 +119,7 @@ int main(int argc, char *argv[]) std::cout << " ... is readable " << std::endl; // Look for Directory record sequence - gdcm::DocEntry *e = f->GetDocEntry(0x0004, 0x1220); + GDCM_NAME_SPACE::DocEntry *e = f->GetDocEntry(0x0004, 0x1220); if ( !e ) { std::cout << "No Directory Record Sequence (0004,1220) found" <(e); + GDCM_NAME_SPACE::SeqEntry *s = dynamic_cast(e); if ( !s ) { std::cout << "Element (0004,1220) is not a Sequence ?!?" <GetFirstSQItem(); // For all the SQItems + GDCM_NAME_SPACE::SQItem *tmpSI=s->GetFirstSQItem(); // For all the SQItems while(tmpSI) { d = tmpSI->GetDocEntry(0x0004, 0x1430); // Directory Record Type - if ( gdcm::DataEntry *dataEntry = dynamic_cast(d) ) + if ( GDCM_NAME_SPACE::DataEntry *dataEntry = + dynamic_cast(d) ) { v = dataEntry->GetString(); } diff --git a/Example/AnonymizeMultiPatient.cxx b/Example/AnonymizeMultiPatient.cxx index 39164b6d..933332a9 100755 --- a/Example/AnonymizeMultiPatient.cxx +++ b/Example/AnonymizeMultiPatient.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: AnonymizeMultiPatient.cxx,v $ Language: C++ - Date: $Date: 2006/06/07 12:22:50 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -79,18 +79,18 @@ int main(int argc, char *argv[]) int verbose = am->ArgMgrDefined("verbose"); if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } @@ -113,11 +113,11 @@ int main(int argc, char *argv[]) // ----- Begin Processing ----- - gdcm::DicomDir *dcmdir; + GDCM_NAME_SPACE::DicomDir *dcmdir; // we ask for Directory parsing - dcmdir = gdcm::DicomDir::New( ); + dcmdir = GDCM_NAME_SPACE::DicomDir::New( ); dcmdir->SetLoadMode(loadMode); dcmdir->SetDirectoryName(dirName); dcmdir->Load(); @@ -135,22 +135,22 @@ int main(int argc, char *argv[]) return 1; } - gdcm::DicomDirPatient *pa; - gdcm::DicomDirStudy *st; - gdcm::DicomDirSerie *se; - gdcm::DicomDirImage *im; + GDCM_NAME_SPACE::DicomDirPatient *pa; + GDCM_NAME_SPACE::DicomDirStudy *st; + GDCM_NAME_SPACE::DicomDirSerie *se; + GDCM_NAME_SPACE::DicomDirImage *im; std::string codedName; std::string fullFileName; std::string patName; - gdcm::File *f; + GDCM_NAME_SPACE::File *f; pa = dcmdir->GetFirstPatient(); while ( pa ) { // on degouline les PATIENT du DICOMDIR patName = pa->GetEntryString(0x0010, 0x0010); - codedName = "g^" + gdcm::Util::ConvertToMD5(patName); + codedName = "g^" + GDCM_NAME_SPACE::Util::ConvertToMD5(patName); if (verbose) std::cout << patName << " --> " << codedName << std::endl; st = pa->GetFirstStudy(); @@ -163,12 +163,12 @@ int main(int argc, char *argv[]) while ( im ) { // on degouline les Images de cette serie fullFileName = dirName; - fullFileName += gdcm::GDCM_FILESEPARATOR; + fullFileName += GDCM_NAME_SPACE::GDCM_FILESEPARATOR; fullFileName += im->GetEntryString(0x0004, 0x1500); if (verbose) std::cout << "FileName " << fullFileName << std::endl; - f = gdcm::File::New( ); + f = GDCM_NAME_SPACE::File::New( ); f->SetLoadMode(loadMode); f->SetFileName( fullFileName ); if ( !f->Load() ) @@ -214,7 +214,7 @@ int main(int argc, char *argv[]) // // Overwrite the file // - // The gdcm::File remains untouched in memory + // The GDCM_NAME_SPACE::File remains untouched in memory f->AnonymizeNoLoad(); diff --git a/Example/AnonymizeNoLoad.cxx b/Example/AnonymizeNoLoad.cxx index a3b44027..aff41e0e 100644 --- a/Example/AnonymizeNoLoad.cxx +++ b/Example/AnonymizeNoLoad.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: AnonymizeNoLoad.cxx,v $ Language: C++ - Date: $Date: 2006/11/15 15:57:49 $ - Version: $Revision: 1.19 $ + Date: $Date: 2007/05/23 14:18:04 $ + Version: $Revision: 1.20 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (am->ArgMgrDefined("usage") || argc == 1) { @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); const char *fileName = am->ArgMgrGetString("filein"); const char *dirName = am->ArgMgrGetString("dirin"); @@ -75,15 +75,15 @@ int main(int argc, char *argv[]) return 0; } - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } int rubOutNb; @@ -99,20 +99,20 @@ int main(int argc, char *argv[]) delete am; // ------ we don't need Arguments Manager any longer ------ - gdcm::File *f; + GDCM_NAME_SPACE::File *f; if ( fileName != 0 ) // ====== Deal with a single file ====== { // // Parse the input file. // - f = gdcm::File::New( ); + f = GDCM_NAME_SPACE::File::New( ); f->SetLoadMode(loadMode); f->SetFileName( fileName ); - // gdcm::File::IsReadable() is no usable here, because we deal with - // any kind of gdcm::Readable *document* - // not only gdcm::File (as opposed to gdcm::DicomDir) + // GDCM_NAME_SPACE::File::IsReadable() is no usable here, because we deal with + // any kind of GDCM_NAME_SPACE::Readable *document* + // not only GDCM_NAME_SPACE::File (as opposed to GDCM_NAME_SPACE::DicomDir) if ( !f->Load() ) { std::cout <AnonymizeNoLoad(); @@ -186,13 +186,13 @@ int main(int argc, char *argv[]) else // ====== Deal with a (single Patient) Directory ====== { std::cout << "dirName [" << dirName << "]" << std::endl; - gdcm::DirList dirList(dirName,1); // gets recursively the file list - gdcm::DirListType fileList = dirList.GetFilenames(); - for( gdcm::DirListType::iterator it = fileList.begin(); + GDCM_NAME_SPACE::DirList dirList(dirName,1); // gets recursively the file list + GDCM_NAME_SPACE::DirListType fileList = dirList.GetFilenames(); + for( GDCM_NAME_SPACE::DirListType::iterator it = fileList.begin(); it != fileList.end(); ++it ) { - f = gdcm::File::New( ); + f = GDCM_NAME_SPACE::File::New( ); f->SetLoadMode(loadMode); f->SetFileName( it->c_str() ); @@ -232,7 +232,7 @@ int main(int argc, char *argv[]) } std::cout <<"Let's AnonymizeNoLoad " << it->c_str() << std::endl; - // The gdcm::File remains untouched in memory + // The GDCM_NAME_SPACE::File remains untouched in memory // The Dicom file is overwritten on disc f->AnonymizeNoLoad(); diff --git a/Example/ExtractOverlays.cxx b/Example/ExtractOverlays.cxx index 87a90e8e..162939f4 100755 --- a/Example/ExtractOverlays.cxx +++ b/Example/ExtractOverlays.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: ExtractOverlays.cxx,v $ Language: C++ - Date: $Date: 2007/03/16 16:03:04 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -68,10 +68,10 @@ int main(int argc, char *argv[]) const char *dirIn = am->ArgMgrWantString("dirin", usage); if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if (am->ArgMgrDefined("warning")) - gdcm::Debug::WarningOn(); + GDCM_NAME_SPACE::Debug::WarningOn(); // if unused Param we give up if ( am->ArgMgrPrintUnusedLabels() ) @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) // ======================== more checking on the params ============== - if ( ! gdcm::DirList::IsDirectory(dirIn) ) + if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(dirIn) ) { std::cout << "KO : [" << dirIn << "] is not a Directory." << std::endl; return 0; @@ -98,11 +98,11 @@ int main(int argc, char *argv[]) char outputFileName[1024]; // Hope it's enough for a file name! - gdcm::File *f; + GDCM_NAME_SPACE::File *f; - gdcm::DirList dirList(dirIn,true); // gets (recursively) the file list - gdcm::DirListType fileList = dirList.GetFilenames(); - for( gdcm::DirListType::iterator it = fileList.begin(); + GDCM_NAME_SPACE::DirList dirList(dirIn,true); // gets (recursively) the file list + GDCM_NAME_SPACE::DirListType fileList = dirList.GetFilenames(); + for( GDCM_NAME_SPACE::DirListType::iterator it = fileList.begin(); it != fileList.end(); ++it ) { @@ -111,8 +111,8 @@ int main(int argc, char *argv[]) // Read the input file. - f = gdcm::File::New( ); - f->SetLoadMode( gdcm::LD_ALL ); + f = GDCM_NAME_SPACE::File::New( ); + f->SetLoadMode( GDCM_NAME_SPACE::LD_ALL ); f->SetFileName( it->c_str() ); f->AddForceLoadElement(0x6000,0x3000); // Overlay Data @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) uint16_t ovlyGroup = 0x6000; - gdcm::DataEntry *e = f->GetDataEntry(ovlyGroup, 0x3000); + GDCM_NAME_SPACE::DataEntry *e = f->GetDataEntry(ovlyGroup, 0x3000); if (e == 0) { std::cout << " Image doesn't contain any Overlay " << std::endl; @@ -183,8 +183,8 @@ int main(int argc, char *argv[]) // ============================================================ // Write a new file // ============================================================ - gdcm::File *f2; - f2 = gdcm::File::New( ); + GDCM_NAME_SPACE::File *f2; + f2 = GDCM_NAME_SPACE::File::New( ); char temp[256]; @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) // feel free to add any field (Dicom Data Entry) you like, here. // ... - gdcm::FileHelper *fh = gdcm::FileHelper::New(f2); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f2); fh->SetImageData(outputData,dimXY); fh->WriteDcmExplVR(outputFileName); diff --git a/Example/FindTags.cxx b/Example/FindTags.cxx index a56ddb4a..e808d85b 100644 --- a/Example/FindTags.cxx +++ b/Example/FindTags.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: FindTags.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:26 $ - Version: $Revision: 1.16 $ + Date: $Date: 2007/05/23 14:18:04 $ + Version: $Revision: 1.17 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -26,8 +26,8 @@ int main(int argc, char *argv[]) { std::string fileName; - gdcm::FileHelper *h; - gdcm::File *f = gdcm::File::New(); + GDCM_NAME_SPACE::FileHelper *h; + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); if(argc > 1 ) @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) f->Load(); // Should test if it worked ! - h = gdcm::FileHelper::New(f); + h = GDCM_NAME_SPACE::FileHelper::New(f); std::string ManufacturerName="SIEMENS "; std::string RecCode="ACR-NEMA 2.0"; @@ -76,8 +76,8 @@ int main(int argc, char *argv[]) // existerait-il qq chose qui marche à tout coup? // Location - std::string zizi = gdcm::Util::Format("%f",l); - Location = gdcm::Util::DicomString(zizi.c_str()); + std::string zizi = GDCM_NAME_SPACE::Util::Format("%f",l); + Location = GDCM_NAME_SPACE::Util::DicomString(zizi.c_str()); h->SetEntryString(Location, 0x0020,0x0050); // sinon, la longueur du champ est erronée (?!?) @@ -91,8 +91,8 @@ int main(int argc, char *argv[]) // Image Location - zizi = gdcm::Util::Format("%d",0x7FE0); - ImageLocation = gdcm::Util::DicomString(zizi.c_str()); + zizi = GDCM_NAME_SPACE::Util::Format("%d",0x7FE0); + ImageLocation = GDCM_NAME_SPACE::Util::DicomString(zizi.c_str()); //h->SetEntryString(Location, 0x0028,0x0200); //h->GetFile()->SetEntryLength(strlen(ImageLocation.c_str())-1, 0x0020,0x0050); // prudence ! diff --git a/Example/MakeDicomDir.cxx b/Example/MakeDicomDir.cxx index db9f3c8e..e2d4a68b 100644 --- a/Example/MakeDicomDir.cxx +++ b/Example/MakeDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: MakeDicomDir.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 14:59:58 $ - Version: $Revision: 1.23 $ + Date: $Date: 2007/05/23 14:18:04 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) FINISH_USAGE // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -69,19 +69,19 @@ int main(int argc, char *argv[]) const char *name; name = am->ArgMgrGetString("name","DICOMDIR"); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); int check = am->ArgMgrDefined("check"); @@ -97,11 +97,11 @@ int main(int argc, char *argv[]) // ----- Begin Processing ----- - gdcm::DicomDir *dcmdir; + GDCM_NAME_SPACE::DicomDir *dcmdir; // we ask for Directory parsing - dcmdir = gdcm::DicomDir::New( ); + dcmdir = GDCM_NAME_SPACE::DicomDir::New( ); dcmdir->SetLoadMode(loadMode); dcmdir->SetDirectoryName(dirName); @@ -110,14 +110,14 @@ int main(int argc, char *argv[]) // struct tms tms1, tms2; // Time measurements // times(&tms1); - dcmdir->Load(); // Reads all the files and creates the gdcm::DicomDir + dcmdir->Load(); // Reads all the files and creates the GDCM_NAME_SPACE::DicomDir //times(&tms2); //std::cout // << (long) ((tms2.tms_utime) - (tms1.tms_utime)) // << std::endl; - if ( gdcm::Debug::GetDebugFlag() ) + if ( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) std::cout << "======================= End Parsing Directory" << std::endl; // ----- Check the result @@ -130,23 +130,23 @@ int main(int argc, char *argv[]) return 1; } - // ----- Writes the corresponding DICOMDIR file (from the gdcm::DicomDir) + // ----- Writes the corresponding DICOMDIR file (from the GDCM_NAME_SPACE::DicomDir) dcmdir->Write(name); dcmdir->Delete(); if (check) { - if ( gdcm::Debug::GetDebugFlag() ) + if ( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) std::cout << "======================= End Writting DICOMDIR" << std::endl; // 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( name ); newDicomDir->Load(); - if ( gdcm::Debug::GetDebugFlag() ) + if ( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) std::cout << "======================= End Parsing DICOMDIR" << std::endl; if( !newDicomDir->IsReadable() ) diff --git a/Example/PatchHeader.cxx b/Example/PatchHeader.cxx index adc06698..56bd9526 100644 --- a/Example/PatchHeader.cxx +++ b/Example/PatchHeader.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PatchHeader.cxx,v $ Language: C++ - Date: $Date: 2006/03/01 09:51:56 $ - Version: $Revision: 1.7 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -36,7 +36,7 @@ // global variables will be seen inside any function. -gdcm::File *f; +GDCM_NAME_SPACE::File *f; std::fstream *fp; uint16_t samplesperpixel; @@ -64,7 +64,7 @@ int bpixelrepresentation; void update() { uint32_t offset; - gdcm::DocEntry *d; + GDCM_NAME_SPACE::DocEntry *d; // // Fields to replace. // @@ -183,7 +183,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (am->ArgMgrDefined("usage") || argc == 1) { @@ -262,17 +262,17 @@ int main(int argc, char *argv[]) pixelrepresentation = am->ArgMgrWantInt("pixelrepresentation",usage); if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } /* if unused Param we give up */ @@ -291,14 +291,14 @@ int main(int argc, char *argv[]) // // Parse the input file. // - f = gdcm::File::New( ); + f = GDCM_NAME_SPACE::File::New( ); f->SetLoadMode(loadMode); f->SetFileName( fileName ); bool res = f->Load(); - // gdcm::File::IsReadable() is no usable here, because we deal with - // any kind of gdcm::Readable *document* - // not only gdcm::File (as opposed to gdcm::DicomDir) + // GDCM_NAME_SPACE::File::IsReadable() is no usable here, because we deal with + // any kind of GDCM_NAME_SPACE::Readable *document* + // not only GDCM_NAME_SPACE::File (as opposed to GDCM_NAME_SPACE::DicomDir) if ( !res ) { std::cout <SetLoadMode(loadMode); f->SetFileName( it->c_str() ); bool res = f->Load(); diff --git a/Example/PrintDicomDir.cxx b/Example/PrintDicomDir.cxx index d8b5f341..145d33dd 100644 --- a/Example/PrintDicomDir.cxx +++ b/Example/PrintDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintDicomDir.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 16:03:31 $ - Version: $Revision: 1.35 $ + Date: $Date: 2007/05/23 14:18:04 $ + Version: $Revision: 1.36 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -45,7 +45,7 @@ int main(int argc, char* argv[]) FINISH_USAGE // Initialize Arguments Manager - gdcm::ArgMgr *am= new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am= new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage") ) { @@ -54,15 +54,15 @@ int main(int argc, char* argv[]) return 0; } - gdcm::DicomDir *f; - gdcm::TSKey v; - - gdcm::DicomDirPatient *pa; - gdcm::DicomDirStudy *st; - gdcm::DicomDirSerie *se; - gdcm::DicomDirVisit *vs; - gdcm::DicomDirImage *im; - gdcm::DicomDirPrivate *pr; + GDCM_NAME_SPACE::DicomDir *f; + GDCM_NAME_SPACE::TSKey v; + + GDCM_NAME_SPACE::DicomDirPatient *pa; + GDCM_NAME_SPACE::DicomDirStudy *st; + GDCM_NAME_SPACE::DicomDirSerie *se; + GDCM_NAME_SPACE::DicomDirVisit *vs; + GDCM_NAME_SPACE::DicomDirImage *im; + GDCM_NAME_SPACE::DicomDirPrivate *pr; char *fileName; fileName = am->ArgMgrWantString("filein",usage); @@ -71,10 +71,10 @@ int main(int argc, char* argv[]) int detailLevel = am->ArgMgrGetInt("detail", 2); if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if (am->ArgMgrDefined("warning")) - gdcm::Debug::WarningOn(); + GDCM_NAME_SPACE::Debug::WarningOn(); /* if unused Param we give up */ if ( am->ArgMgrPrintUnusedLabels() ) @@ -86,7 +86,7 @@ int main(int argc, char* argv[]) // new gdcm2 style - f = gdcm::DicomDir::New(); + f = GDCM_NAME_SPACE::DicomDir::New(); f->SetFileName ( fileName ); f->Load( ); @@ -288,10 +288,10 @@ int main(int argc, char* argv[]) // Previous code. // Kept as an example. Please don't remove - gdcm::ListDicomDirPatient::const_iterator itPatient; - gdcm::ListDicomDirStudy::const_iterator itStudy; - gdcm::ListDicomDirSerie::const_iterator itSerie; - gdcm::ListDicomDirImage::const_iterator itImage; + GDCM_NAME_SPACE::ListDicomDirPatient::const_iterator itPatient; + GDCM_NAME_SPACE::ListDicomDirStudy::const_iterator itStudy; + GDCM_NAME_SPACE::ListDicomDirSerie::const_iterator itSerie; + GDCM_NAME_SPACE::ListDicomDirImage::const_iterator itImage; cout << std::endl << std::endl << " = Liste des PATIENT/STUDY/SERIE/IMAGE ===================================" << std::endl<< std::endl; diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index 725dca83..4225dc90 100644 --- a/Example/PrintFile.cxx +++ b/Example/PrintFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintFile.cxx,v $ Language: C++ - Date: $Date: 2006/11/15 15:57:49 $ - Version: $Revision: 1.83 $ + Date: $Date: 2007/05/23 14:18:04 $ + Version: $Revision: 1.84 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -32,18 +32,18 @@ // TODO : code factorization, for 'single file' an 'whole directory' processing -void ShowLutData(gdcm::File *f); +void ShowLutData(GDCM_NAME_SPACE::File *f); // Nothing is written yet to get LUT Data user friendly // The following is to be moved into a PixelReadConvert method // Let here, waiting for a clever idea on the way to do it. -void ShowLutData(gdcm::File *f) +void ShowLutData(GDCM_NAME_SPACE::File *f) { - gdcm::SeqEntry *modLutSeq = f->GetSeqEntry(0x0028,0x3000); + GDCM_NAME_SPACE::SeqEntry *modLutSeq = f->GetSeqEntry(0x0028,0x3000); if ( modLutSeq !=0 ) { - gdcm::SQItem *sqi= modLutSeq->GetFirstSQItem(); + GDCM_NAME_SPACE::SQItem *sqi= modLutSeq->GetFirstSQItem(); if ( sqi != 0 ) { std::string lutDescriptor = sqi->GetEntryString(0x0028,0x3002); @@ -70,7 +70,7 @@ void ShowLutData(gdcm::File *f) std::cout << "Wrong LUT descriptor" << std::endl; } //LUT Data (CTX dependent) - gdcm::DataEntry *b = sqi->GetDataEntry(0x0028,0x3006); + GDCM_NAME_SPACE::DataEntry *b = sqi->GetDataEntry(0x0028,0x3006); if ( b != 0 ) { int BitsAllocated = f->GetBitsAllocated(); @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) FINISH_USAGE // Initialize Arguments Manager - gdcm::ArgMgr *am= new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am= new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage") ) { @@ -167,20 +167,20 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if (am->ArgMgrDefined("warning")) - gdcm::Debug::WarningOn(); + GDCM_NAME_SPACE::Debug::WarningOn(); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } int level = am->ArgMgrGetInt("level", 1); @@ -228,12 +228,12 @@ int main(int argc, char *argv[]) if (ddict) { - gdcm::Global::GetDicts()->GetDefaultPubDict()->AddDict(dict); + GDCM_NAME_SPACE::Global::GetDicts()->GetDefaultPubDict()->AddDict(dict); } if ( fileName != 0 ) // ====== Deal with a single file ====== { - gdcm::File *f = gdcm::File::New(); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); f->SetLoadMode(loadMode); f->SetFileName( fileName ); @@ -250,9 +250,9 @@ errno = 0; bool res = f->Load(); - // gdcm::File::IsReadable() is no usable here, because we deal with + // GDCM_NAME_SPACE::File::IsReadable() is no usable here, because we deal with // any kind of gdcm-Parsable *document* - // not only gdcm::File (as opposed to gdcm::DicomDir) + // not only GDCM_NAME_SPACE::File (as opposed to GDCM_NAME_SPACE::DicomDir) if ( !res ) { std::cout << "Cannot process file [" << fileName << "]" << std::endl; @@ -268,7 +268,7 @@ errno = 0; if (nbP == 1) f->SetFourthDimensionLocation(FourthDimLoc[0],FourthDimLoc[1]); - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); fh->SetPrintLevel( level ); fh->Print(); @@ -339,49 +339,49 @@ errno = 0; std::string strPatientPosition = f->GetEntryString(0x0018,0x5100); - if ( strPatientPosition != gdcm::GDCM_UNFOUND + if ( strPatientPosition != GDCM_NAME_SPACE::GDCM_UNFOUND && strPatientPosition != "" ) std::cout << "PatientPosition (0x0010,0x5100)= [" << strPatientPosition << "]" << std::endl; std::string strViewPosition = f->GetEntryString(0x0018,0x5101); - if ( strViewPosition != gdcm::GDCM_UNFOUND + if ( strViewPosition != GDCM_NAME_SPACE::GDCM_UNFOUND && strViewPosition != "" ) std::cout << "View Position (0x0018,0x5101)= [" << strViewPosition << "]" << std::endl; std::string strPatientOrientation = f->GetEntryString(0x0020,0x0020); - if ( strPatientOrientation != gdcm::GDCM_UNFOUND + if ( strPatientOrientation != GDCM_NAME_SPACE::GDCM_UNFOUND && strPatientOrientation != "") std::cout << "PatientOrientation (0x0020,0x0020)= [" << strPatientOrientation << "]" << std::endl; std::string strImageOrientationPatient = f->GetEntryString(0x0020,0x0037); - if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND + if ( strImageOrientationPatient != GDCM_NAME_SPACE::GDCM_UNFOUND && strImageOrientationPatient != "" ) std::cout << "ImageOrientationPatient (0x0020,0x0037)= [" << strImageOrientationPatient << "]" << std::endl; std::string strImageOrientationRET = f->GetEntryString(0x0020,0x0035); - if ( strImageOrientationRET != gdcm::GDCM_UNFOUND + if ( strImageOrientationRET != GDCM_NAME_SPACE::GDCM_UNFOUND && strImageOrientationRET != "" ) std::cout << "ImageOrientationRET (0x0020,0x0035)= [" << strImageOrientationRET << "]" << std::endl; std::string strImagePositionPatient = f->GetEntryString(0x0020,0x0032); - if ( strImagePositionPatient != gdcm::GDCM_UNFOUND + if ( strImagePositionPatient != GDCM_NAME_SPACE::GDCM_UNFOUND && strImagePositionPatient != "" ) std::cout << "ImagePositionPatient (0x0020,0x0032)= [" << strImagePositionPatient << "]" << std::endl; std::string strImagePositionPatientRET = f->GetEntryString(0x0020,0x0030); - if ( strImagePositionPatientRET != gdcm::GDCM_UNFOUND + if ( strImagePositionPatientRET != GDCM_NAME_SPACE::GDCM_UNFOUND && strImagePositionPatientRET != "" ) std::cout << "ImagePositionPatientRET (0x0020,0x0030)= [" << strImagePositionPatientRET << "]" << std::endl; @@ -403,13 +403,13 @@ errno = 0; // Let's compute 'user friendly' results about 'Orientation' // --------------------------------------------------------- - gdcm::Orientation *o = gdcm::Orientation::New(); + GDCM_NAME_SPACE::Orientation *o = GDCM_NAME_SPACE::Orientation::New(); - if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND || - strImageOrientationRET != gdcm::GDCM_UNFOUND ) + if ( strImageOrientationPatient != GDCM_NAME_SPACE::GDCM_UNFOUND || + strImageOrientationRET != GDCM_NAME_SPACE::GDCM_UNFOUND ) { - gdcm::OrientationType orient = o->GetOrientationType( f ); + GDCM_NAME_SPACE::OrientationType orient = o->GetOrientationType( f ); std::cout << "TypeOrientation = " << orient << " (-> " << o->GetOrientationTypeString(orient) << " )" << std::endl; @@ -434,10 +434,10 @@ errno = 0; // Nothing is written yet to get LUT Data user friendly // The following is to be moved into a PixelRedaConvert method - gdcm::SeqEntry *modLutSeq = f->GetSeqEntry(0x0028,0x3000); + GDCM_NAME_SPACE::SeqEntry *modLutSeq = f->GetSeqEntry(0x0028,0x3000); if ( modLutSeq !=0 ) { - gdcm::SQItem *sqi= modLutSeq->GetFirstSQItem(); + GDCM_NAME_SPACE::SQItem *sqi= modLutSeq->GetFirstSQItem(); if ( !sqi ) { std::string lutDescriptor = sqi->GetEntryString(0x0028,0x3002); @@ -453,7 +453,7 @@ errno = 0; { std::cout << "Wrong LUT descriptor" << std::endl; } - gdcm::DataEntry *b = sqi->GetDataEntry(0x0028,0x3006); + GDCM_NAME_SPACE::DataEntry *b = sqi->GetDataEntry(0x0028,0x3006); if ( b != 0 ) { if ( b->GetLength() != 0 ) @@ -496,7 +496,7 @@ errno = 0; ShowLutData(f); } - // Parsability of the gdcm::Document already checked, after Load() ! + // Parsability of the GDCM_NAME_SPACE::Document already checked, after Load() ! if ( f->IsReadable() ) { @@ -525,18 +525,18 @@ errno = 0; else // ====== Deal with a Directory ====== { std::cout << "dirName [" << dirName << "]" << std::endl; - gdcm::DirList dirList(dirName,1); // gets recursively the file list - gdcm::DirListType fileList = dirList.GetFilenames(); - gdcm::File *f; + GDCM_NAME_SPACE::DirList dirList(dirName,1); // gets recursively the file list + GDCM_NAME_SPACE::DirListType fileList = dirList.GetFilenames(); + GDCM_NAME_SPACE::File *f; bool res; - for( gdcm::DirListType::iterator it = fileList.begin(); + for( GDCM_NAME_SPACE::DirListType::iterator it = fileList.begin(); it != fileList.end(); ++it ) { std::cout << std::endl<<" Start processing :[" << it->c_str() << "]" << std::endl; - f = gdcm::File::New(); + f = GDCM_NAME_SPACE::File::New(); f->SetLoadMode(loadMode); f->SetFileName( it->c_str() ); @@ -564,7 +564,7 @@ errno = 0; continue; } - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); fh->SetPrintLevel( level ); fh->Print(); @@ -575,35 +575,35 @@ errno = 0; std::string strPatientPosition = f->GetEntryString(0x0018,0x5100); - if ( strPatientPosition != gdcm::GDCM_UNFOUND + if ( strPatientPosition != GDCM_NAME_SPACE::GDCM_UNFOUND && strPatientPosition != "" ) std::cout << "PatientPosition (0x0010,0x5100)= [" << strPatientPosition << "]" << std::endl; std::string strViewPosition = f->GetEntryString(0x0018,0x5101); - if ( strViewPosition != gdcm::GDCM_UNFOUND + if ( strViewPosition != GDCM_NAME_SPACE::GDCM_UNFOUND && strViewPosition != "" ) std::cout << "strViewPosition (0x0010,0x5101)= [" << strViewPosition << "]" << std::endl; std::string strPatientOrientation = f->GetEntryString(0x0020,0x0020); - if ( strPatientOrientation != gdcm::GDCM_UNFOUND + if ( strPatientOrientation != GDCM_NAME_SPACE::GDCM_UNFOUND && strPatientOrientation != "") std::cout << "PatientOrientation (0x0020,0x0020)= [" << strPatientOrientation << "]" << std::endl; std::string strImageOrientationPatient = f->GetEntryString(0x0020,0x0037); - if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND + if ( strImageOrientationPatient != GDCM_NAME_SPACE::GDCM_UNFOUND && strImageOrientationPatient != "" ) std::cout << "ImageOrientationPatient (0x0020,0x0037)= [" << strImageOrientationPatient << "]" << std::endl; std::string strImageOrientationRET = f->GetEntryString(0x0020,0x0035); - if ( strImageOrientationRET != gdcm::GDCM_UNFOUND + if ( strImageOrientationRET != GDCM_NAME_SPACE::GDCM_UNFOUND && strImageOrientationRET != "" ) { std::cout << "ImageOrientationRET (0x0020,0x0035)= [" @@ -613,14 +613,14 @@ errno = 0; // Let's compute 'user friendly' results about 'Orientation' // --------------------------------------------------------- - gdcm::Orientation *o = gdcm::Orientation::New(); + GDCM_NAME_SPACE::Orientation *o = GDCM_NAME_SPACE::Orientation::New(); - if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND || - strImageOrientationRET != gdcm::GDCM_UNFOUND ) + if ( strImageOrientationPatient != GDCM_NAME_SPACE::GDCM_UNFOUND || + strImageOrientationRET != GDCM_NAME_SPACE::GDCM_UNFOUND ) { - gdcm::OrientationType orient = o->GetOrientationType( f ); + GDCM_NAME_SPACE::OrientationType orient = o->GetOrientationType( f ); std::cout << "TypeOrientation = " << orient << " (-> " << o->GetOrientationTypeString(orient) << " )" << std::endl; diff --git a/Example/RawToDicom.cxx b/Example/RawToDicom.cxx index e9fa0f66..62710fc7 100755 --- a/Example/RawToDicom.cxx +++ b/Example/RawToDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: RawToDicom.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 15:01:47 $ - Version: $Revision: 1.9 $ + Date: $Date: 2007/05/23 14:18:04 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) // Initialize Arguments Manager - gdcm::ArgMgr *am= new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am= new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage") ) { @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) char *pixelType = am->ArgMgrWantString("pixeltype", usage); if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); /* if unused Param we give up */ if ( am->ArgMgrPrintUnusedLabels() ) @@ -134,7 +134,7 @@ int main(int argc, char *argv[]) return 0; } - bool bigEndian = gdcm::Util::IsCurrentProcessorBigEndian(); + bool bigEndian = GDCM_NAME_SPACE::Util::IsCurrentProcessorBigEndian(); std::string strPixelType(pixelType); int pixelSign; @@ -189,10 +189,10 @@ int main(int argc, char *argv[]) // Create an empty FileHelper - gdcm::FileHelper *fileH = gdcm::FileHelper::New(); + GDCM_NAME_SPACE::FileHelper *fileH = GDCM_NAME_SPACE::FileHelper::New(); // Get the (empty) image header. - gdcm::File *fileToBuild = fileH->GetFile(); + GDCM_NAME_SPACE::File *fileToBuild = fileH->GetFile(); // If you want to use this program as a template to create @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) // keeping the same 'Study Instance UID' for various images // The user may add images to a 'Manufacturer Study', // adding new Series to an already existing Study - std::string studyUID = gdcm::Util::CreateUniqueUID(); + std::string studyUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); fileToBuild->InsertEntryString(studyUID, 0x0020,0x000d,"UI"); // 'Serie Instance UID' @@ -212,7 +212,7 @@ int main(int argc, char *argv[]) // keeping the same 'Serie Instance UID' for various images // The user shouldn't add any image to a 'Manufacturer Serie' // but there is no way no to prevent him for doing that - std::string serieUID = gdcm::Util::CreateUniqueUID(); + std::string serieUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); fileToBuild->InsertEntryString(serieUID, 0x0020,0x000e,"UI"); // end of 'keep out of loop lines diff --git a/Example/ReWrite.cxx b/Example/ReWrite.cxx index 2b374373..677ebdad 100644 --- a/Example/ReWrite.cxx +++ b/Example/ReWrite.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: ReWrite.cxx,v $ Language: C++ - Date: $Date: 2007/03/29 13:49:32 $ - Version: $Revision: 1.25 $ + Date: $Date: 2007/05/23 14:18:04 $ + Version: $Revision: 1.26 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) FINISH_USAGE // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -75,24 +75,24 @@ int main(int argc, char *argv[]) const char *mode = am->ArgMgrGetString("mode","X"); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } bool rgb = ( 0 != am->ArgMgrDefined("RGB") ); if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if (am->ArgMgrDefined("warning")) - gdcm::Debug::WarningOn(); + GDCM_NAME_SPACE::Debug::WarningOn(); bool fail = false; int *boundVal; @@ -146,7 +146,7 @@ int main(int argc, char *argv[]) // ----------- End Arguments Manager --------- - gdcm::File *f = gdcm::File::New(); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); f->SetLoadMode( loadMode ); f->SetFileName( fileName ); bool res = f->Load(); @@ -164,7 +164,7 @@ int main(int argc, char *argv[]) } - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); void *imageData; int dataSize; @@ -217,7 +217,7 @@ int main(int argc, char *argv[]) // Since we just ReWrite the image, we know no modification // was performed on the pixels. // We don't want this image appears as a 'Secondary Captured image' - fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE); + fh->SetContentType(GDCM_NAME_SPACE::UNMODIFIED_PIXELS_IMAGE); /// \todo : think about rubbing out a part of a *multiframe* image! diff --git a/Example/ReWriteExtended.cxx b/Example/ReWriteExtended.cxx index 1cac05ee..6faf1fbc 100755 --- a/Example/ReWriteExtended.cxx +++ b/Example/ReWriteExtended.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: ReWriteExtended.cxx,v $ Language: C++ - Date: $Date: 2007/03/29 12:02:22 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) FINISH_USAGE // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -72,23 +72,23 @@ int main(int argc, char *argv[]) const char *mode = am->ArgMgrGetString("mode","X"); - int filecontent = am->ArgMgrGetInt("filecontent", gdcm::UNMODIFIED_PIXELS_IMAGE); + int filecontent = am->ArgMgrGetInt("filecontent", GDCM_NAME_SPACE::UNMODIFIED_PIXELS_IMAGE); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } bool rgb = ( 0 != am->ArgMgrDefined("RGB") ); if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); @@ -130,7 +130,7 @@ int main(int argc, char *argv[]) // ----------- End Arguments Manager --------- - gdcm::File *f = gdcm::File::New(); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); f->SetLoadMode( loadMode ); f->SetFileName( fileName ); bool res = f->Load(); @@ -176,7 +176,7 @@ int main(int argc, char *argv[]) - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); void *imageData; int dataSize; @@ -257,7 +257,7 @@ int main(int argc, char *argv[]) // We trust user. (just an example; *never* trust an user !) - fh->SetContentType((gdcm::ImageContentType)filecontent); + fh->SetContentType((GDCM_NAME_SPACE::ImageContentType)filecontent); /// \todo Here, give the detail of operations a 'decent' user should perform, /// according to what *he* wants to do. @@ -265,26 +265,26 @@ int main(int argc, char *argv[]) // an user shouldn't add images to a 'native' serie. // He is allowed to create his own Serie, within a 'native' Study : - // if he wants to do so, he has to call gdcm::Util::GetUniqueUID + // if he wants to do so, he has to call GDCM_NAME_SPACE::Util::GetUniqueUID // only once for a given image set, belonging to a single 'user Serie' std::string SerieInstanceUID; switch(filecontent) { - case gdcm::USER_OWN_IMAGE : - SerieInstanceUID = gdcm::Util::CreateUniqueUID(); + case GDCM_NAME_SPACE::USER_OWN_IMAGE : + SerieInstanceUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); f->SetEntryString(SerieInstanceUID,0x0020,0x000e); break; - case gdcm::FILTERED_IMAGE : + case GDCM_NAME_SPACE::FILTERED_IMAGE : /// \todo : to be finished! break; - case gdcm::CREATED_IMAGE : + case GDCM_NAME_SPACE::CREATED_IMAGE : /// \todo : to be finished! break; - case gdcm::UNMODIFIED_PIXELS_IMAGE : + case GDCM_NAME_SPACE::UNMODIFIED_PIXELS_IMAGE : /// \todo : to be finished! break; } diff --git a/Example/TestValidate.cxx b/Example/TestValidate.cxx index 8cbd6113..c2913b65 100755 --- a/Example/TestValidate.cxx +++ b/Example/TestValidate.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestValidate.cxx,v $ Language: C++ - Date: $Date: 2005/11/18 11:09:06 $ - Version: $Revision: 1.3 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -29,10 +29,10 @@ int main(int argc, char *argv[]) const char *filename = argv[1]; - 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 ); return 0; diff --git a/Example/ToInTag.cxx b/Example/ToInTag.cxx index b95fb1ab..7ed73f31 100755 --- a/Example/ToInTag.cxx +++ b/Example/ToInTag.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: ToInTag.cxx,v $ Language: C++ - Date: $Date: 2007/02/26 08:47:29 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -38,7 +38,7 @@ * converted into a Brucker-like Dicom, Intags compliant */ -typedef std::map SortedFiles; +typedef std::map SortedFiles; int main(int argc, char *argv[]) { @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -120,19 +120,19 @@ int main(int argc, char *argv[]) const char *dirNameout; dirNameout = am->ArgMgrGetString("dirout","."); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); int verbose = am->ArgMgrDefined("verbose"); int split = am->ArgMgrDefined("split"); @@ -170,7 +170,7 @@ int main(int argc, char *argv[]) // ----- Begin Processing ----- - if ( ! gdcm::DirList::IsDirectory(dirNamein) ) + if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(dirNamein) ) { std::cout << "KO : [" << dirNamein << "] is not a Directory." << std::endl; return 0; @@ -185,14 +185,14 @@ int main(int argc, char *argv[]) std::cout << "Check for output directory :[" << dirNameout << "]." <Print(); */ - gdcm::File *f; - gdcm::FileHelper *fh; + GDCM_NAME_SPACE::File *f; + GDCM_NAME_SPACE::FileHelper *fh; std::vector tokens; std::vector tokensForFileName; // For Siemens pb, we need Station Name - gdcm::DirListType::iterator it1 = fileNames.begin(); - f = gdcm::File::New(); - f->SetLoadMode(gdcm::LD_ALL); + GDCM_NAME_SPACE::DirListType::iterator it1 = fileNames.begin(); + f = GDCM_NAME_SPACE::File::New(); + f->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); f->SetFileName( *it1 ); f->Load(); std::string stationName = f->GetEntryString(0x0008,0x1010); @@ -252,13 +252,13 @@ int main(int argc, char *argv[]) << std::endl; std::string uniqueSeriesIdentifier; - for (gdcm::DirListType::iterator it) = fileNames.begin(); + for (GDCM_NAME_SPACE::DirListType::iterator it) = fileNames.begin(); it != fileNames.end(); ++it) { std::cout << "File Name : " << *it << std::endl; - f = gdcm::File::New(); - f->SetLoadMode(gdcm::LD_ALL); + f = GDCM_NAME_SPACE::File::New(); + f->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); f->SetFileName( *it ); f->Load(); @@ -288,11 +288,11 @@ int main(int argc, char *argv[]) //uint8_t *imageData; // Useless : pixels will not be loaded // (images are overwritten) - for (gdcm::DirListType::iterator it = fileNames.begin(); + for (GDCM_NAME_SPACE::DirListType::iterator it = fileNames.begin(); it != fileNames.end(); ++it) { - f = gdcm::File::New(); + f = GDCM_NAME_SPACE::File::New(); f->SetLoadMode(loadMode); f->SetFileName( *it ); f->Load(); @@ -344,7 +344,7 @@ int main(int argc, char *argv[]) userFileIdentifier=s->CreateUserDefinedFileIdentifier(f); tokens.clear(); - gdcm::Util::Tokenize (userFileIdentifier, tokens, token); + GDCM_NAME_SPACE::Util::Tokenize (userFileIdentifier, tokens, token); int imageNum; // Within FileName char newName[1024]; @@ -353,10 +353,10 @@ int main(int argc, char *argv[]) { ///this is a trick to build up a lexicographical compliant name : /// eg : fich001.ima vs fich100.ima as opposed to fich1.ima vs fich100.ima - std::string name = gdcm::Util::GetName( *it ); + std::string name = GDCM_NAME_SPACE::Util::GetName( *it ); if (hasSkel) { - gdcm::Util::Tokenize (name, tokensForFileName, skel); + GDCM_NAME_SPACE::Util::Tokenize (name, tokensForFileName, skel); imageNum = atoi ( tokensForFileName[0].c_str() ); // probabely we could write something much more complicated using C++ ! sprintf (newName, "%s%06d%s", skel, imageNum, extent); @@ -397,7 +397,7 @@ int main(int argc, char *argv[]) std::string fullWriteFilename; std::string strExtent(extent); - writeDir = gdcm::Util::NormalizePath(dirNameout); + writeDir = GDCM_NAME_SPACE::Util::NormalizePath(dirNameout); SortedFiles::iterator it2; previousPatientName = ""; @@ -415,9 +415,9 @@ int main(int argc, char *argv[]) int flag = 0; - gdcm::File *currentFile; + GDCM_NAME_SPACE::File *currentFile; - std::string defaultStudyUID = gdcm::Util::CreateUniqueUID(); + std::string defaultStudyUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); std::string defaultSerieUID; for (it2 = sf.begin() ; it2 != sf.end(); ++it2) @@ -425,12 +425,12 @@ int main(int argc, char *argv[]) currentFile = it2->second; fullFilename = currentFile->GetFileName(); - lastFilename = gdcm::Util::GetName( fullFilename ); + lastFilename = GDCM_NAME_SPACE::Util::GetName( fullFilename ); std::cout << " --------------------------------------------------" << " Rewrite [" <first, tokens, token); + GDCM_NAME_SPACE::Util::Tokenize (it2->first, tokens, token); currentPatientName = tokens[0]; currentSerieInstanceUID = tokens[1]; @@ -445,26 +445,26 @@ int main(int argc, char *argv[]) currentImagePosition[0] = 'P'; // Add a default ImagePositionPatient to avoid confusion at post processing time - if ( currentFile->GetEntryString(0x0020,0x0032) == gdcm::GDCM_UNFOUND && - currentFile->GetEntryString(0x0020,0x0030) == gdcm::GDCM_UNFOUND ) + if ( currentFile->GetEntryString(0x0020,0x0032) == GDCM_NAME_SPACE::GDCM_UNFOUND && + currentFile->GetEntryString(0x0020,0x0030) == GDCM_NAME_SPACE::GDCM_UNFOUND ) { currentFile->InsertEntryString("0.\\0.\\0.",0x0020, 0x0032, "DS" ); } // Add a default ImagePositionPatient to avoid confusion at post processing time - if ( currentFile->GetEntryString(0x0020,0x0037) == gdcm::GDCM_UNFOUND && - currentFile->GetEntryString(0x0020,0x0035) == gdcm::GDCM_UNFOUND ) + if ( currentFile->GetEntryString(0x0020,0x0037) == GDCM_NAME_SPACE::GDCM_UNFOUND && + currentFile->GetEntryString(0x0020,0x0035) == GDCM_NAME_SPACE::GDCM_UNFOUND ) { currentFile->InsertEntryString("1.\\0.\\0.\\0.\\1.\\0.",0x0020, 0x0037, "DS" ); } if (previousPatientName != currentPatientName) { - if ( currentFile->GetEntryString(0x0020,0x000d) == gdcm::GDCM_UNFOUND) + if ( currentFile->GetEntryString(0x0020,0x000d) == GDCM_NAME_SPACE::GDCM_UNFOUND) { if (verbose) std::cout << "--- new Study UID created" << std::endl; - defaultStudyUID = gdcm::Util::CreateUniqueUID(); + defaultStudyUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); currentFile->InsertEntryString(defaultStudyUID, 0x0020, 0x000d, "UI" ); } @@ -479,7 +479,7 @@ int main(int argc, char *argv[]) previousPhaseEncodingDirection = ""; //currentPhaseEncodingDirection; currentPatientWriteDir = writeDir + currentPatientName; - //if ( ! gdcm::DirList::IsDirectory(currentPatientWriteDir) ) + //if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(currentPatientWriteDir) ) { systemCommand = "mkdir " + currentPatientWriteDir; if (verbose) @@ -496,17 +496,17 @@ int main(int argc, char *argv[]) std::cout << "==== === new Serie [" << currentSerieInstanceUID << "]" << std::endl; - if ( currentFile->GetEntryString(0x0020,0x000e) == gdcm::GDCM_UNFOUND) + if ( currentFile->GetEntryString(0x0020,0x000e) == GDCM_NAME_SPACE::GDCM_UNFOUND) { if (verbose) std::cout << "--- --- new Serie UID created" << std::endl; - defaultSerieUID = gdcm::Util::CreateUniqueUID(); + defaultSerieUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); currentFile->InsertEntryString(defaultSerieUID, 0x0020, 0x000e, "UI" ); } if (split) { - currentSerieWriteDir = currentPatientWriteDir + gdcm::GDCM_FILESEPARATOR + currentSerieWriteDir = currentPatientWriteDir + GDCM_NAME_SPACE::GDCM_FILESEPARATOR + currentSerieInstanceUID; systemCommand = "mkdir " + currentSerieWriteDir; system (systemCommand.c_str()); @@ -526,7 +526,7 @@ int main(int argc, char *argv[]) << std::endl; if (split) { - currentPositionWriteDir = currentSerieWriteDir + gdcm::GDCM_FILESEPARATOR + currentPositionWriteDir = currentSerieWriteDir + GDCM_NAME_SPACE::GDCM_FILESEPARATOR + currentImagePosition; systemCommand = "mkdir " + currentPositionWriteDir; system (systemCommand.c_str()); @@ -552,7 +552,7 @@ int main(int argc, char *argv[]) if (split) { currentPhaseEncodingDirectionWriteDir = currentPositionWriteDir - + gdcm::GDCM_FILESEPARATOR + + GDCM_NAME_SPACE::GDCM_FILESEPARATOR + currentPhaseEncodingDirection; systemCommand = "mkdir " + currentPhaseEncodingDirectionWriteDir; system (systemCommand.c_str()); @@ -566,10 +566,10 @@ int main(int argc, char *argv[]) std::cout << "--- --- --- --- --- " << (it2->second)->GetFileName() << std::endl; - if ( gdcm::Debug::GetDebugFlag()) + if ( GDCM_NAME_SPACE::Debug::GetDebugFlag()) std::cout << "--- --- --- --- --- " << it2->first << " " << (it2->second)->GetFileName() << " " - << gdcm::Util::GetName( fullFilename ) << std::endl; + << GDCM_NAME_SPACE::Util::GetName( fullFilename ) << std::endl; // Transform the image to be 'Brucker-Like' // ---------------------------------------- @@ -660,7 +660,7 @@ int main(int argc, char *argv[]) std::string strImagePositionPatient = currentFile->GetEntryString(0x0020, 0x0032 ); - if (strImagePositionPatient == gdcm::GDCM_UNFOUND) + if (strImagePositionPatient == GDCM_NAME_SPACE::GDCM_UNFOUND) { if (verbose) std::cout << "Duplicate ImagePosition into ImagePositionPatient" << std::endl; @@ -668,7 +668,7 @@ int main(int argc, char *argv[]) } std::string strImageOrientationPatient = f->GetEntryString(0x0020, 0x0037 ); - if (strImageOrientationPatient == gdcm::GDCM_UNFOUND) + if (strImageOrientationPatient == GDCM_NAME_SPACE::GDCM_UNFOUND) { if (verbose) std::cout << "Duplicate ImageOrientation into ImageOrientationPatient" << std::endl; @@ -694,12 +694,12 @@ int main(int argc, char *argv[]) if (split) - //fullWriteFilename = currentPhaseEncodingDirectionWriteDir + gdcm::GDCM_FILESEPARATOR + //fullWriteFilename = currentPhaseEncodingDirectionWriteDir + GDCM_NAME_SPACE::GDCM_FILESEPARATOR // + lastFilename + strExtent; - fullWriteFilename = currentPositionWriteDir + gdcm::GDCM_FILESEPARATOR + fullWriteFilename = currentPositionWriteDir + GDCM_NAME_SPACE::GDCM_FILESEPARATOR + lastFilename + strExtent; else - fullWriteFilename = currentPatientWriteDir + gdcm::GDCM_FILESEPARATOR + fullWriteFilename = currentPatientWriteDir + GDCM_NAME_SPACE::GDCM_FILESEPARATOR + lastFilename + strExtent; /* @@ -710,7 +710,7 @@ int main(int argc, char *argv[]) // Load the pixels in RAM. - fh = gdcm::FileHelper::New(currentFile); + fh = GDCM_NAME_SPACE::FileHelper::New(currentFile); uint8_t *imageData = fh->GetImageDataRaw(); // Don't convert (Gray Pixels + LUT) into (RGB pixels) ?!? fh->SetWriteTypeToDcmExplVR(); // We didn't modify pixels -> keep unchanged the following : @@ -726,7 +726,7 @@ int main(int argc, char *argv[]) for(int x=nX/3; xSetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE); + fh->SetContentType(GDCM_NAME_SPACE::UNMODIFIED_PIXELS_IMAGE); if (!fh->Write(fullWriteFilename)) { std::cout << "Fail to write :[" << fullWriteFilename << "]" diff --git a/Example/ToMRIregister.cxx b/Example/ToMRIregister.cxx index 536208b9..fd65238e 100755 --- a/Example/ToMRIregister.cxx +++ b/Example/ToMRIregister.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: ToMRIregister.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 15:01:48 $ - Version: $Revision: 1.3 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -27,9 +27,9 @@ #include #include -bool AquisitionTime_0008_0032_Compare(gdcm::File *file1, gdcm::File *file2); +bool AquisitionTime_0008_0032_Compare(GDCM_NAME_SPACE::File *file1, GDCM_NAME_SPACE::File *file2); -bool AquisitionTime_0008_0032_Compare(gdcm::File *file1, gdcm::File *file2) +bool AquisitionTime_0008_0032_Compare(GDCM_NAME_SPACE::File *file1, GDCM_NAME_SPACE::File *file2) { return file1->GetEntryString(0x0008,0x0032) < file2->GetEntryString(0x0008,0x0032); } @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) "\n ToMriregister :\n ", " - Converts the Siemens Sonata MRI '*tfl2d1' ", " to be processable by MriRegister software ", - " - May be used as a template for gdcm::SerieHelper use. ", + " - May be used as a template for GDCM_NAME_SPACE::SerieHelper use. ", " ", "usage: ToMriRegister dirin=inputDirectoryName ", " dirout=outputDirectoryName ", @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (am->ArgMgrDefined("usage") || argc == 1) { @@ -68,19 +68,19 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); int verbose = am->ArgMgrDefined("verbose"); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } const char *dirIn = am->ArgMgrGetString("dirin"); @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) // ======================== more checking on the params ============== - if ( ! gdcm::DirList::IsDirectory(dirIn) ) + if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(dirIn) ) { std::cout << "KO : [" << dirIn << "] is not a Directory." << std::endl; return 0; @@ -134,13 +134,13 @@ int main(int argc, char *argv[]) if (verbose) std::cout << "Check for output directory :[" << dirOut << "]." <c_str() << "]" << std::endl; } - gdcm::SerieHelper *s; + GDCM_NAME_SPACE::SerieHelper *s; - s = gdcm::SerieHelper::New(); - s->SetLoadMode(gdcm::LD_NOSEQ); // Don't load Sequences + s = GDCM_NAME_SPACE::SerieHelper::New(); + s->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ); // Don't load Sequences // we could choose to ignore some Files - //gdcm::TagKey t(0x0010,0x0024); // [Sequence Name] + //GDCM_NAME_SPACE::TagKey t(0x0010,0x0024); // [Sequence Name] // Keep only files where restriction is true - //s->AddRestriction(t, "*tfl2d1 ", gdcm::GDCM_EQUAL); + //s->AddRestriction(t, "*tfl2d1 ", GDCM_NAME_SPACE::GDCM_EQUAL); s->SetDirectory(dirIn, true); // true : recursive exploration @@ -200,8 +200,8 @@ int main(int argc, char *argv[]) std::ostringstream str; - gdcm::XCoherentFileSetmap xcm; - gdcm::FileHelper *fh; + GDCM_NAME_SPACE::XCoherentFileSetmap xcm; + GDCM_NAME_SPACE::FileHelper *fh; // will be used for ordering. s->SetUserLessThanFunction(AquisitionTime_0008_0032_Compare); @@ -209,8 +209,8 @@ int main(int argc, char *argv[]) int sliceNumber = 0; int imageNumber = 0; - // For all the Single SerieUID Files Sets of the gdcm::Serie - gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet(); + // For all the Single SerieUID Files Sets of the GDCM_NAME_SPACE::Serie + GDCM_NAME_SPACE::FileList *l = s->GetFirstSingleSerieUIDFileSet(); char numero[5]; while (l) @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) float position =0.0; char charPosition[10]; - for (gdcm::XCoherentFileSetmap::iterator i = xcm.begin(); + for (GDCM_NAME_SPACE::XCoherentFileSetmap::iterator i = xcm.begin(); i != xcm.end(); ++i) { @@ -250,7 +250,7 @@ int main(int argc, char *argv[]) sprintf(charPosition, "%f", position); //int imageNumber = 0; - for ( gdcm::FileList::iterator it = ((*i).second)->begin(); + for ( GDCM_NAME_SPACE::FileList::iterator it = ((*i).second)->begin(); it != ((*i).second)->end(); ++it) { @@ -290,21 +290,21 @@ int main(int argc, char *argv[]) // Load the pixels in RAM. - fh = gdcm::FileHelper::New(*it); + fh = GDCM_NAME_SPACE::FileHelper::New(*it); uint8_t *imageData = fh->GetImageDataRaw(); // Don't convert (Gray Pixels + LUT) into (RGB pixels) ?!? if (!imageData) std::cout << "fail to read [" << (*it)->GetFileName() << std::endl; fh->SetWriteTypeToAcr(); - fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE); + fh->SetContentType(GDCM_NAME_SPACE::UNMODIFIED_PIXELS_IMAGE); // forge the file name fullFilename = (*it)->GetFileName(); - lastFilename = gdcm::Util::GetName( fullFilename ); - //fullWriteFilename = strDirNameout + gdcm::GDCM_FILESEPARATOR + lastFilename = GDCM_NAME_SPACE::Util::GetName( fullFilename ); + //fullWriteFilename = strDirNameout + GDCM_NAME_SPACE::GDCM_FILESEPARATOR // + lastFilename; sprintf(fullWriteFilename, "%s%c%04d-%04d-%04d.dcm", - dirOut, gdcm::GDCM_FILESEPARATOR, + dirOut, GDCM_NAME_SPACE::GDCM_FILESEPARATOR, serieNumber, sliceNumber, imageNumber); if (verbose) @@ -312,7 +312,7 @@ int main(int argc, char *argv[]) // show [sliceLocation 0x0020,1041 (if any)] old name, -> newname std::string strSliceLocation; /* - gdcm::DataEntry e = (*it)->GetDataEntry(0x0020,0x1041); + GDCM_NAME_SPACE::DataEntry e = (*it)->GetDataEntry(0x0020,0x1041); if (e) strSliceLocation = e->GetString(); else diff --git a/Example/Volume2Dicom.cxx b/Example/Volume2Dicom.cxx index 1f271ee1..8ab62085 100644 --- a/Example/Volume2Dicom.cxx +++ b/Example/Volume2Dicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: Volume2Dicom.cxx,v $ Language: C++ - Date: $Date: 2006/01/27 10:03:23 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -103,12 +103,12 @@ int main( int argc, char *argv[] ) //////////////////////////////////////////////////////////// // Create a new dicom header and fill in some info // //////////////////////////////////////////////////////////// - gdcm::File *f = gdcm::File::New(); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); //////////////////////////////////////////////////////////// // Create a new dicom file object from the header // //////////////////////////////////////////////////////////// - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); uint8_t *myData = fh->GetImageData(); // Get an Image pointer fh->SetImageData( myData, sliceSize); // This callback ensures that the internal // Pixel_Data of fh is set correctly @@ -127,7 +127,7 @@ int main( int argc, char *argv[] ) memcpy(myData,imageData+z*sizex*sizey,sliceSize); // write the image - std::string filename = directory + gdcm::Util::Format("%Image_%05d.dcm", z); + std::string filename = directory + GDCM_NAME_SPACE::Util::Format("%Image_%05d.dcm", z); std::cout << "Writing file " << filename; fh->WriteDcmExplVR(filename); std::cout << " OK" << std::endl; diff --git a/Example/WriteDicomAsJPEG.cxx b/Example/WriteDicomAsJPEG.cxx index 16810470..9c6e7fa3 100644 --- a/Example/WriteDicomAsJPEG.cxx +++ b/Example/WriteDicomAsJPEG.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: WriteDicomAsJPEG.cxx,v $ Language: C++ - Date: $Date: 2006/08/18 16:08:16 $ - Version: $Revision: 1.13 $ + Date: $Date: 2007/05/23 14:18:04 $ + 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 @@ -50,15 +50,15 @@ void WriteDICOMItems(std::ostream *fp, JpegVector &v) // Item tag: uint16_t group = 0xfffe; uint16_t elem = 0xe000; - gdcm::binary_write(*fp, group); - gdcm::binary_write(*fp, elem); + GDCM_NAME_SPACE::binary_write(*fp, group); + GDCM_NAME_SPACE::binary_write(*fp, elem); // Item Length uint32_t dummy = 0x12345678; size_t offset = fp->tellp(); JpegPair jp; jp.first = offset; v.push_back(jp); - gdcm::binary_write(*fp, dummy); + GDCM_NAME_SPACE::binary_write(*fp, dummy); } // PS 3.5, page 66 @@ -69,11 +69,11 @@ void EncodeWithoutBasicOffsetTable(std::ostream *fp, int numFrag)// JpegVector& // Item tag: uint16_t group = 0xfffe; uint16_t elem = 0xe000; - gdcm::binary_write(*fp, group); - gdcm::binary_write(*fp, elem); + GDCM_NAME_SPACE::binary_write(*fp, group); + GDCM_NAME_SPACE::binary_write(*fp, elem); // Item Length uint32_t item_length = 0x0000; - gdcm::binary_write(*fp, item_length); + GDCM_NAME_SPACE::binary_write(*fp, item_length); } @@ -83,18 +83,18 @@ void EncodeWithBasicOffsetTable(std::ostream *fp, int numFrag, size_t &start) // Item tag: uint16_t group = 0xfffe; uint16_t elem = 0xe000; - gdcm::binary_write(*fp, group); - gdcm::binary_write(*fp, elem); + GDCM_NAME_SPACE::binary_write(*fp, group); + GDCM_NAME_SPACE::binary_write(*fp, elem); // Item Length uint32_t item_length = numFrag*4; // sizeof(uint32_t) - gdcm::binary_write(*fp, item_length); + GDCM_NAME_SPACE::binary_write(*fp, item_length); // Just prepare the space start = fp->tellp(); //to be able to rewind for(int i=0; iseekp( jp.first ); uint32_t length = jp.second; - gdcm::binary_write(*fp, length ); + GDCM_NAME_SPACE::binary_write(*fp, length ); //std::cerr << "Updating:" << jp.first << "," << jp.second << std::endl; } } @@ -131,11 +131,11 @@ void CloseJpeg(std::ostream *fp, JpegVector &v) // sequence terminator uint16_t group = 0xfffe; uint16_t elem = 0xe000; - gdcm::binary_write(*fp, group); - gdcm::binary_write(*fp, elem); + GDCM_NAME_SPACE::binary_write(*fp, group); + GDCM_NAME_SPACE::binary_write(*fp, elem); uint32_t length = 0x0; - gdcm::binary_write(*fp, length); + GDCM_NAME_SPACE::binary_write(*fp, length); // Jpeg is done, now update the frag length UpdateJpegFragmentSize(fp, v); @@ -369,12 +369,12 @@ int main(int argc, char *argv[]) std::cerr << "Using quality: " << quality << std::endl; // Step 1 : Create the header of the image - 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(); - gdcm::FileHelper *tested = gdcm::FileHelper::New( f ); + GDCM_NAME_SPACE::FileHelper *tested = GDCM_NAME_SPACE::FileHelper::New( f ); std::string PixelType = tested->GetFile()->GetPixelType(); int xsize = f->GetXSize(); int ysize = f->GetYSize(); @@ -439,7 +439,7 @@ int main(int argc, char *argv[]) // Step 1 : Create the header of the image - gdcm::File *fileToBuild = gdcm::File::New(); + GDCM_NAME_SPACE::File *fileToBuild = GDCM_NAME_SPACE::File::New(); std::ostringstream str; // Set the image size @@ -490,7 +490,7 @@ int main(int argc, char *argv[]) * samplesPerPixel /* * img.componentSize / 8*/; uint8_t *imageData = new uint8_t[size]; - gdcm::FileHelper *fileH = gdcm::FileHelper::New(fileToBuild); + GDCM_NAME_SPACE::FileHelper *fileH = GDCM_NAME_SPACE::FileHelper::New(fileToBuild); //fileH->SetImageData(imageData,size); assert( size == testedDataSize ); size = of->str().size(); diff --git a/Example/WriteDicomSimple.cxx b/Example/WriteDicomSimple.cxx index 846d0b75..d2946978 100644 --- a/Example/WriteDicomSimple.cxx +++ b/Example/WriteDicomSimple.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: WriteDicomSimple.cxx,v $ Language: C++ - Date: $Date: 2005/11/07 10:33:47 $ - Version: $Revision: 1.18 $ + Date: $Date: 2007/05/23 14:18:04 $ + Version: $Revision: 1.19 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) FINISH_USAGE // Initialize Arguments Manager - gdcm::ArgMgr *am= new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am= new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage") ) { @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); std::string fileOut = am->ArgMgrGetString("fileout",(char *)"WriteDicomSimple.dcm"); SIZE_X = am->ArgMgrGetInt("NX", 128); @@ -83,13 +83,13 @@ int main(int argc, char *argv[]) // ----------- End Arguments Manager --------- -// Step 1 : Create an empty gdcm::FileHelper for the image +// Step 1 : Create an empty GDCM_NAME_SPACE::FileHelper for the image // (it deals with the acces to the pixels) - gdcm::FileHelper *fileH = gdcm::FileHelper::New(); + GDCM_NAME_SPACE::FileHelper *fileH = GDCM_NAME_SPACE::FileHelper::New(); -// Get the empty gdcm::File of the image +// Get the empty GDCM_NAME_SPACE::File of the image // (it deals with the 'entries' od the image header) - gdcm::File *header = fileH->GetFile(); + GDCM_NAME_SPACE::File *header = fileH->GetFile(); std::ostringstream str; diff --git a/Example/WriteRead.cxx b/Example/WriteRead.cxx index 46634fde..c08e791b 100644 --- a/Example/WriteRead.cxx +++ b/Example/WriteRead.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: WriteRead.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:27 $ - Version: $Revision: 1.15 $ + Date: $Date: 2007/05/23 14:18:05 $ + Version: $Revision: 1.16 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,10 +24,10 @@ int main(int argc, char *argv[]) { std::string fileNameToWrite; - gdcm::File *e1; - gdcm::File *e2; - gdcm::FileHelper *f1; - gdcm::FileHelper *f2; + GDCM_NAME_SPACE::File *e1; + GDCM_NAME_SPACE::File *e2; + GDCM_NAME_SPACE::FileHelper *f1; + GDCM_NAME_SPACE::FileHelper *f2; uint8_t* imageData, *imageData2; int dataSize, dataSize2; @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) // --------------------- we read the input image std::cout << argv[1] << std::endl; - e1 = gdcm::File::New( ); + e1 = GDCM_NAME_SPACE::File::New( ); e1->SetFileName( fileName ); e1->Load(); if (!e1->IsReadable()) @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) return 1; } - f1 = gdcm::FileHelper::New(e1); + f1 = GDCM_NAME_SPACE::FileHelper::New(e1); imageData= f1->GetImageData(); dataSize = f1->GetImageDataSize(); @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) f1->WriteDcmExplVR(fileNameToWrite); // --------------------- we read the written image - e2 = gdcm::File::New( ); + e2 = GDCM_NAME_SPACE::File::New( ); e2->SetFileName( fileNameToWrite ); e2->Load(); if (!e2->IsReadable()) @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) f1->Delete(); return 1; } - f2 = gdcm::FileHelper::New(e2); + f2 = GDCM_NAME_SPACE::FileHelper::New(e2); imageData2= f2->GetImageData(); dataSize2 = f2->GetImageDataSize(); diff --git a/Example/exCTPET.cxx b/Example/exCTPET.cxx index 38ad5bbc..bcb52c8e 100644 --- a/Example/exCTPET.cxx +++ b/Example/exCTPET.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exCTPET.cxx,v $ Language: C++ - Date: $Date: 2006/01/02 22:02:50 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -49,28 +49,28 @@ int main(int argc, char *argv[]) // No -> Return // Yes: We found a match - gdcm::File *fileRef = gdcm::File::New(); + GDCM_NAME_SPACE::File *fileRef = GDCM_NAME_SPACE::File::New(); fileRef->SetFileName( reference ); - fileRef->SetLoadMode(gdcm::LD_NOSHADOW | gdcm::LD_NOSEQ); + fileRef->SetLoadMode(GDCM_NAME_SPACE::LD_NOSHADOW | GDCM_NAME_SPACE::LD_NOSEQ); fileRef->Load(); // 0008 0060 CS 1 Modality std::string modalityRef = fileRef->GetEntryString(0x0008,0x0060); - if( modalityRef == gdcm::GDCM_UNFOUND ) return 1; - if ( !gdcm::Util::DicomStringEqual(modalityRef, "CT") ) return 1; + if( modalityRef == GDCM_NAME_SPACE::GDCM_UNFOUND ) return 1; + if ( !GDCM_NAME_SPACE::Util::DicomStringEqual(modalityRef, "CT") ) return 1; // 0020 000d UI 1 Study Instance UID // 0020 000e UI REL Series Instance UID std::string series_uid_ref = fileRef->GetEntryString(0x0020, 0x000e); // 0020 0052 UI 1 Frame of Reference UID std::string frame_uid_ref = fileRef->GetEntryString(0x0020, 0x0052); // 0020 0032 DS 3 Image Position (Patient) - gdcm::DataEntry *imagePosRef = fileRef->GetDataEntry(0x0020,0x0032); + GDCM_NAME_SPACE::DataEntry *imagePosRef = fileRef->GetDataEntry(0x0020,0x0032); assert( imagePosRef->GetValueCount() == 3 ); - gdcm::DirList dirList( directory, true ); - const gdcm::DirListType filenames = dirList.GetFilenames(); - gdcm::DirListType::const_iterator it = filenames.begin(); - gdcm::File *file = gdcm::File::New(); - file->SetLoadMode(gdcm::LD_NOSHADOW | gdcm::LD_NOSEQ); + GDCM_NAME_SPACE::DirList dirList( directory, true ); + const GDCM_NAME_SPACE::DirListType filenames = dirList.GetFilenames(); + GDCM_NAME_SPACE::DirListType::const_iterator it = filenames.begin(); + GDCM_NAME_SPACE::File *file = GDCM_NAME_SPACE::File::New(); + file->SetLoadMode(GDCM_NAME_SPACE::LD_NOSHADOW | GDCM_NAME_SPACE::LD_NOSEQ); for( ; it != filenames.end(); ++it) { file->SetFileName( *it ); @@ -78,13 +78,13 @@ int main(int argc, char *argv[]) std::string modality = file->GetEntryString(0x0008,0x0060); // This is a dual modality: modality should be *different* if( modality == modalityRef ) continue; - if ( !gdcm::Util::DicomStringEqual(modality, "PT") ) continue; + if ( !GDCM_NAME_SPACE::Util::DicomStringEqual(modality, "PT") ) continue; std::string series_uid = file->GetEntryString(0x0020, 0x000e); // Not same series ! if( series_uid == series_uid_ref ) continue; std::string frame_uid = file->GetEntryString(0x0020, 0x0052); if( frame_uid_ref != frame_uid ) continue; - gdcm::DataEntry *imagePos = file->GetDataEntry(0x0020,0x0032); + GDCM_NAME_SPACE::DataEntry *imagePos = file->GetDataEntry(0x0020,0x0032); assert( imagePos->GetValueCount() == 3 ); if( imagePos->GetValue(0) == imagePosRef->GetValue(0) && imagePos->GetValue(1) == imagePosRef->GetValue(1) diff --git a/Example/exColorToRGB.cxx b/Example/exColorToRGB.cxx index 6d547945..e056b039 100644 --- a/Example/exColorToRGB.cxx +++ b/Example/exColorToRGB.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exColorToRGB.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:27 $ - Version: $Revision: 1.9 $ + Date: $Date: 2007/05/23 14:18:05 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -47,12 +47,12 @@ int main(int argc, char *argv[]) // ============================================================ // Read the input image. // ============================================================ - // a gdcm::File contains all the Dicom Field but the Pixels Element + // a GDCM_NAME_SPACE::File contains all the Dicom Field but the Pixels Element std::cout << argv[1] << std::endl; - gdcm::File *f = gdcm::File::New(); - f->SetLoadMode( gdcm::LD_ALL); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); + f->SetLoadMode( GDCM_NAME_SPACE::LD_ALL); f->SetFileName( fileName ); bool res = f->Load(); @@ -81,8 +81,8 @@ int main(int argc, char *argv[]) // Load the pixels in memory. // ============================================================ - // We need a gdcm::FileHelper, since we want to load the pixels - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + // We need a GDCM_NAME_SPACE::FileHelper, since we want to load the pixels + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); // uint8_t DOESN'T mean it's mandatory for the image to be a 8 bits one ! // It's just for prototyping. @@ -103,20 +103,20 @@ int main(int argc, char *argv[]) // ------ without Sequences ------------- - gdcm::FileHelper *copy = gdcm::FileHelper::New( ); + GDCM_NAME_SPACE::FileHelper *copy = GDCM_NAME_SPACE::FileHelper::New( ); copy->SetFileName( output ); copy->Load(); - gdcm::DocEntry *d = f->GetFirstEntry(); + GDCM_NAME_SPACE::DocEntry *d = f->GetFirstEntry(); while(d) { // We skip SeqEntries, since user cannot do much with them - if ( !(dynamic_cast(d)) + if ( !(dynamic_cast(d)) // We skip Shadow Groups, since nobody knows what they mean && !( d->GetGroup()%2 ) ) { - if ( gdcm::DataEntry *de = dynamic_cast(d) ) + if ( GDCM_NAME_SPACE::DataEntry *de = dynamic_cast(d) ) { copy->GetFile()->InsertEntryBinArea( de->GetBinArea(),de->GetLength(), de->GetGroup(),de->GetElement(), @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) } else { - // We skip gdcm::SeqEntries + // We skip GDCM_NAME_SPACE::SeqEntries } } d = f->GetNextEntry(); diff --git a/Example/exCurveData.cxx b/Example/exCurveData.cxx index ce1c5293..f7244b62 100644 --- a/Example/exCurveData.cxx +++ b/Example/exCurveData.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exCurveData.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:27 $ - Version: $Revision: 1.5 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -76,12 +76,12 @@ inline size_t PrintCurveData(DataValueRepresentation* data, unsigned short numPt * V 5004|0020 [CS] [Type of Data] [PHYSIO] * V 5004|0022 [LO] [Curve Description] [] * V 5004|0103 [US] [Data Value Representation] [0] x(0) - * B 5004|3000 [OW] [Curve Data] [gdcm::Binary data loaded;length = 1938] + * B 5004|3000 [OW] [Curve Data] [GDCM_NAME_SPACE::Binary data loaded;length = 1938] */ int main(int argc, char *argv[]) { - gdcm::File *f; + GDCM_NAME_SPACE::File *f; std::cout << "------------------------------------------------" << std::endl; std::cout << "Gets the 'Curve Data' from a full gdcm-readable DICOM " << std::endl; @@ -101,13 +101,13 @@ int main(int argc, char *argv[]) // Read the input image. // ============================================================ - f = gdcm::File::New( ); + f = GDCM_NAME_SPACE::File::New( ); - f->SetLoadMode(gdcm::LD_NOSEQ | gdcm::LD_NOSHADOW); + f->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ | GDCM_NAME_SPACE::LD_NOSHADOW); f->SetFileName( fileName ); bool res = f->Load(); - if( gdcm::Debug::GetDebugFlag() ) + if( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) { std::cout << "---------------------------------------------" << std::endl; f->Print(); @@ -126,9 +126,9 @@ int main(int argc, char *argv[]) // Check whether image contains Overlays ACR-NEMA style. // ============================================================ - //* B 5004|3000 [OW] [Curve Data] [gdcm::Binary data loaded;length = 1938] + //* B 5004|3000 [OW] [Curve Data] [GDCM_NAME_SPACE::Binary data loaded;length = 1938] std::string curve_data_str = f->GetEntryString(0x5004, 0x3000); - if (curve_data_str == gdcm::GDCM_UNFOUND) + if (curve_data_str == GDCM_NAME_SPACE::GDCM_UNFOUND) { std::cout << " Image doesn't contain any Curve Data" << std::endl; f->Delete(); @@ -169,8 +169,8 @@ int main(int argc, char *argv[]) convert >> data_rep; - gdcm::DocEntry *pCurveDataDoc = f->GetDocEntry(0x5004, 0x3000); - gdcm::DataEntry *pCurveData = dynamic_cast(pCurveDataDoc); + GDCM_NAME_SPACE::DocEntry *pCurveDataDoc = f->GetDocEntry(0x5004, 0x3000); + GDCM_NAME_SPACE::DataEntry *pCurveData = dynamic_cast(pCurveDataDoc); uint8_t *curve_data = pCurveData->GetBinArea(); // From Part3, C.10.2.1.2 Data value representation (p668) diff --git a/Example/exExtractDicomTags.cxx b/Example/exExtractDicomTags.cxx index e475ff86..223e4652 100644 --- a/Example/exExtractDicomTags.cxx +++ b/Example/exExtractDicomTags.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exExtractDicomTags.cxx,v $ Language: C++ - Date: $Date: 2005/11/09 08:34:29 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (am->ArgMgrDefined("usage")) { @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); // if unused Params we give up if ( am->ArgMgrPrintUnusedLabels() ) @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) int loadMode = 0x0; // load everything - gdcm::File *f = gdcm::File::New(); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); f->SetLoadMode( loadMode ); f->SetFileName( fileName ); bool res = f->Load(); diff --git a/Example/exExtractTag.cxx b/Example/exExtractTag.cxx index 07843925..d6006f62 100644 --- a/Example/exExtractTag.cxx +++ b/Example/exExtractTag.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exExtractTag.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:27 $ - Version: $Revision: 1.3 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -26,7 +26,7 @@ int main(int argc, char *argv[]) { - gdcm::File *f; + GDCM_NAME_SPACE::File *f; if( argc < 5 ) { @@ -41,13 +41,13 @@ int main(int argc, char *argv[]) // Read the input image. // ============================================================ - f = gdcm::File::New( ); + f = GDCM_NAME_SPACE::File::New( ); - //f->SetLoadMode(gdcm::LD_NOSEQ | gdcm::LD_NOSHADOW); + //f->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ | GDCM_NAME_SPACE::LD_NOSHADOW); f->SetFileName( fileName ); bool res = f->Load(); - if( gdcm::Debug::GetDebugFlag() ) + if( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) { std::cout << "---------------------------------------------" << std::endl; f->Print(); @@ -73,16 +73,16 @@ int main(int argc, char *argv[]) std::cout << "Extracting tag: (0x" << std::hex << std::setw(4) << std::setfill('0') << group << ",0x" << std::setw(4) << std::setfill('0') << elem << ")" << std::endl; std::string dicom_tag_value = f->GetEntryString(group, elem); - if (dicom_tag_value == gdcm::GDCM_UNFOUND) + if (dicom_tag_value == GDCM_NAME_SPACE::GDCM_UNFOUND) { - gdcm::DictEntry *dictEntry = f->GetPubDict()->GetEntry( group, elem); + GDCM_NAME_SPACE::DictEntry *dictEntry = f->GetPubDict()->GetEntry( group, elem); std::cerr << "Image doesn't contain any tag: " << dictEntry->GetName() << std::endl; f->Delete(); return 1; } - gdcm::DocEntry *dicom_tag_doc = f->GetDocEntry(group, elem); - gdcm::DataEntry *dicom_tag = dynamic_cast(dicom_tag_doc); + GDCM_NAME_SPACE::DocEntry *dicom_tag_doc = f->GetDocEntry(group, elem); + GDCM_NAME_SPACE::DataEntry *dicom_tag = dynamic_cast(dicom_tag_doc); if( !dicom_tag ) { std::cerr << "Sorry DataEntry only please" << std::endl; diff --git a/Example/exGC.cxx b/Example/exGC.cxx index 8a55ded2..51323299 100644 --- a/Example/exGC.cxx +++ b/Example/exGC.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exGC.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:27 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -70,12 +70,12 @@ int main(int argc, char *argv[]) // ============================================================ // Read the input image. // ============================================================ - // a gdcm::File contains all the Dicom Field but the Pixels Element + // a GDCM_NAME_SPACE::File contains all the Dicom Field but the Pixels Element std::cout << argv[1] << std::endl; - gdcm::File *f = gdcm::File::New(); - f->SetLoadMode( gdcm::LD_ALL); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); + f->SetLoadMode( GDCM_NAME_SPACE::LD_ALL); f->SetFileName( fileName ); bool res = f->Load(); @@ -101,8 +101,8 @@ int main(int argc, char *argv[]) // Load the pixels in memory. // ============================================================ - // We need a gdcm::FileHelper, since we want to load the pixels - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + // We need a GDCM_NAME_SPACE::FileHelper, since we want to load the pixels + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); // (unit8_t DOESN'T mean it's mandatory for the image to be a 8 bits one) @@ -121,20 +121,20 @@ int main(int argc, char *argv[]) // ------ without Sequences ------------- - gdcm::FileHelper *copy = gdcm::FileHelper::New( ); + GDCM_NAME_SPACE::FileHelper *copy = GDCM_NAME_SPACE::FileHelper::New( ); copy->SetFileName( output ); copy->Load(); - gdcm::DocEntry *d = f->GetFirstEntry(); + GDCM_NAME_SPACE::DocEntry *d = f->GetFirstEntry(); while(d) { // We skip SeqEntries, since user cannot do much with them - if ( !(dynamic_cast(d)) + if ( !(dynamic_cast(d)) // We skip Shadow Groups, since nobody knows what they mean && !( d->GetGroup()%2 ) ) { - if ( gdcm::DataEntry *de = dynamic_cast(d) ) + if ( GDCM_NAME_SPACE::DataEntry *de = dynamic_cast(d) ) { copy->GetFile()->InsertEntryBinArea( de->GetBinArea(),de->GetLength(), de->GetGroup(),de->GetElement(), @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) } else { - // We skip gdcm::SeqEntries + // We skip GDCM_NAME_SPACE::SeqEntries } } d = f->GetNextEntry(); diff --git a/Example/exGrey2RGB.cxx b/Example/exGrey2RGB.cxx index 2fba62d4..7fc2846a 100644 --- a/Example/exGrey2RGB.cxx +++ b/Example/exGrey2RGB.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exGrey2RGB.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:28 $ - Version: $Revision: 1.5 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) return 1; } - //gdcm::Debug::DebugOn(); + //GDCM_NAME_SPACE::Debug::DebugOn(); std::string filename = argv[1]; std::string output = argv[2]; @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) } } - gdcm::FileHelper *fh = gdcm::FileHelper::New( ); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New( ); fh->SetFileName( filename ); fh->Load(); diff --git a/Example/exImageLighten.cxx b/Example/exImageLighten.cxx index 7ee9e264..ba118664 100644 --- a/Example/exImageLighten.cxx +++ b/Example/exImageLighten.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exImageLighten.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:28 $ - Version: $Revision: 1.9 $ + Date: $Date: 2007/05/23 14:18:05 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -55,8 +55,8 @@ int main(int argc, char *argv[]) std::cout << argv[1] << std::endl; - gdcm::File *f = gdcm::File::New(); - f->SetLoadMode( gdcm::LD_ALL); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); + f->SetLoadMode( GDCM_NAME_SPACE::LD_ALL); f->SetFileName( fileName ); bool res = f->Load(); @@ -77,8 +77,8 @@ int main(int argc, char *argv[]) // Pixel Reading must be done here, to be sure // to load the Palettes Color (if any) - // First, create a gdcm::FileHelper - gdcm::FileHelper *fh = gdcm::FileHelper::New(f); + // First, create a GDCM_NAME_SPACE::FileHelper + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f); // Load the pixels, DO NOT transform LUT (if any) into RGB Pixels uint8_t *imageDataRaw = fh->GetImageDataRaw(); @@ -86,10 +86,10 @@ int main(int argc, char *argv[]) size_t dataRawSize = fh->GetImageDataRawSize(); // ============================================================ -// Create a new gdcm::Filehelper, to hold new image. +// Create a new GDCM_NAME_SPACE::Filehelper, to hold new image. // ============================================================ - gdcm::FileHelper *copy = gdcm::FileHelper::New( ); + GDCM_NAME_SPACE::FileHelper *copy = GDCM_NAME_SPACE::FileHelper::New( ); copy->SetFileName( output ); copy->Load(); @@ -97,16 +97,16 @@ int main(int argc, char *argv[]) // Selective copy of the entries (including Pixel Element). // ============================================================ - gdcm::DocEntry *d = f->GetFirstEntry(); + GDCM_NAME_SPACE::DocEntry *d = f->GetFirstEntry(); while(d) { // We skip SeqEntries, since user cannot do much with them - if ( !(dynamic_cast(d)) + if ( !(dynamic_cast(d)) // We skip Shadow Groups, since nobody knows what they mean && !( d->GetGroup()%2 ) ) { - if ( gdcm::DataEntry *de = dynamic_cast(d) ) + if ( GDCM_NAME_SPACE::DataEntry *de = dynamic_cast(d) ) { copy->GetFile()->InsertEntryBinArea( de->GetBinArea(),de->GetLength(), de->GetGroup(),de->GetElement(), @@ -114,7 +114,7 @@ int main(int argc, char *argv[]) } else { - // We skip gdcm::SeqEntries + // We skip GDCM_NAME_SPACE::SeqEntries } } d = f->GetNextEntry(); diff --git a/Example/exMoveImagesToSingleSerieUID.cxx b/Example/exMoveImagesToSingleSerieUID.cxx index d3504c23..8e35c797 100755 --- a/Example/exMoveImagesToSingleSerieUID.cxx +++ b/Example/exMoveImagesToSingleSerieUID.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exMoveImagesToSingleSerieUID.cxx,v $ Language: C++ - Date: $Date: 2007/03/27 11:38:02 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (am->ArgMgrDefined("usage") || argc == 1) { @@ -114,7 +114,7 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); int verbose = am->ArgMgrDefined("verbose"); std::string patName = am->ArgMgrGetString("patname", "g^PatientName"); @@ -130,15 +130,15 @@ int main(int argc, char *argv[]) int userDefinedSerie = am->ArgMgrDefined("serieUID"); const char *serieUID = am->ArgMgrGetString("serieUID"); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } /* if unused Param we give up */ @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) //std::cout << "dirIn [" << dirIn << "]" << std::endl; - if ( ! gdcm::DirList::IsDirectory(dirIn) ) + if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(dirIn) ) { std::cout << "KO : [" << dirIn << "] is not a Directory." << std::endl; return 0; @@ -171,13 +171,13 @@ int main(int argc, char *argv[]) std::string strDirNameout(dirOut); // to please gcc 4 std::cout << "Check for output directory :[" << dirOut << "]." <SetLoadMode(loadMode); f->SetFileName( it->c_str() ); @@ -247,7 +247,7 @@ int main(int argc, char *argv[]) // Load the pixels in RAM. - fh = gdcm::FileHelper::New(f); + fh = GDCM_NAME_SPACE::FileHelper::New(f); uint8_t *imageData = fh->GetImageDataRaw(); // Don't convert (Gray Pixels + LUT) into (RGB pixels) ?!? if (!imageData) std::cout << "fail to read [" << it->c_str() << std::endl; @@ -292,10 +292,10 @@ int main(int argc, char *argv[]) // ================================================================================================== - fh->SetContentType(gdcm::UNMODIFIED_PIXELS_IMAGE); + fh->SetContentType(GDCM_NAME_SPACE::UNMODIFIED_PIXELS_IMAGE); - lastFilename = gdcm::Util::GetName( fullFilename ); - std::string fullWriteFilename = strDirNameout + gdcm::GDCM_FILESEPARATOR + lastFilename = GDCM_NAME_SPACE::Util::GetName( fullFilename ); + std::string fullWriteFilename = strDirNameout + GDCM_NAME_SPACE::GDCM_FILESEPARATOR + lastFilename; if (verbose) std::cout << "Write : [" << fullWriteFilename << "]" << std::endl; diff --git a/Example/exOverlaysACR.cxx b/Example/exOverlaysACR.cxx index 21d69bc3..8ede8c90 100644 --- a/Example/exOverlaysACR.cxx +++ b/Example/exOverlaysACR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exOverlaysACR.cxx,v $ Language: C++ - Date: $Date: 2006/06/30 09:52:53 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -59,9 +59,9 @@ V 6006|0102[US] [Overlay Bit Position] [15] x(f) int main(int argc, char *argv[]) { - gdcm::File *f; + GDCM_NAME_SPACE::File *f; - //gdcm::Debug::DebugOn(); + //GDCM_NAME_SPACE::Debug::DebugOn(); std::cout << "------------------------------------------------" << std::endl; std::cout << "Gets the 'Overlays' from a full gdcm-readable ACR-NEMA " @@ -86,13 +86,13 @@ int main(int argc, char *argv[]) //std::cout << argv[1] << std::endl; - f = gdcm::File::New( ); + f = GDCM_NAME_SPACE::File::New( ); - f->SetLoadMode(gdcm::LD_NOSEQ | gdcm::LD_NOSHADOW); + f->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ | GDCM_NAME_SPACE::LD_NOSHADOW); f->SetFileName( fileName ); bool res = f->Load(); - if( gdcm::Debug::GetDebugFlag() ) + if( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) { std::cout << "---------------------------------------------" << std::endl; f->Print(); @@ -119,7 +119,7 @@ int main(int argc, char *argv[]) return 0; } std::string s1 = f->GetEntryString(0x6000, 0x0102); - if (s1 == gdcm::GDCM_UNFOUND) + if (s1 == GDCM_NAME_SPACE::GDCM_UNFOUND) { std::cout << " Image doesn't contain any Overlay " << std::endl; f->Delete(); @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) // Load the pixels in memory. // ============================================================ - // We don't use a gdcm::FileHelper, since it rubs out + // We don't use a GDCM_NAME_SPACE::FileHelper, since it rubs out // the 'non image' bits of the pixels... /// \todo : Previous remark doesn't work if pixels are compressed ! @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) std::cout << "Dimensions " << ny << " " <GetDocEntry(f->GetGrPixel(), f->GetNumPixel()); + GDCM_NAME_SPACE::DocEntry *p = f->GetDocEntry(f->GetGrPixel(), f->GetNumPixel()); if (p == 0) std::cout << "Pixels element not found" << std::endl; else @@ -197,16 +197,16 @@ int main(int argc, char *argv[]) uint16_t overlayLocation; std::ostringstream str; std::string strOverlayLocation; - gdcm::File *fileToBuild = 0; - gdcm::FileHelper *fh = 0; + GDCM_NAME_SPACE::File *fileToBuild = 0; + GDCM_NAME_SPACE::FileHelper *fh = 0; while ( (strOvlBitPosition = f->GetEntryString(currentOvlGroup, 0x0102)) - != gdcm::GDCM_UNFOUND ) + != GDCM_NAME_SPACE::GDCM_UNFOUND ) { strOverlayLocation = f->GetEntryString(currentOvlGroup, 0x0200); - if ( strOverlayLocation != gdcm::GDCM_UNFOUND ) + if ( strOverlayLocation != GDCM_NAME_SPACE::GDCM_UNFOUND ) { overlayLocation = atoi(strOverlayLocation.c_str()); if ( overlayLocation != f->GetGrPixel() ) @@ -224,7 +224,7 @@ int main(int argc, char *argv[]) std::cout << "Mask :[" <= 0x1000)// if it contains at least one overlay bit printf("%d : %04x\n",j, pixels[j]); @@ -233,12 +233,12 @@ int main(int argc, char *argv[]) else tabPixels[j] = 128; } - if( gdcm::Debug::GetDebugFlag() ) + if( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) std::cout << "About to built empty file" << std::endl; - fileToBuild = gdcm::File::New(); + fileToBuild = GDCM_NAME_SPACE::File::New(); - if( gdcm::Debug::GetDebugFlag() ) + if( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) std::cout << "Finish to built empty file" << std::endl; str.str(""); @@ -258,12 +258,12 @@ int main(int argc, char *argv[]) // Other mandatory fields will be set automatically, // just before Write(), by FileHelper::CheckMandatoryElements() - if( gdcm::Debug::GetDebugFlag() ) + if( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) std::cout << "-------------About to built FileHelper" << std::endl; - fh = gdcm::FileHelper::New(fileToBuild); + fh = GDCM_NAME_SPACE::FileHelper::New(fileToBuild); - if( gdcm::Debug::GetDebugFlag() ) + if( GDCM_NAME_SPACE::Debug::GetDebugFlag() ) std::cout << "-------------Finish to built FileHelper" << std::endl; fh->SetImageData(tabPixels,nx*ny); diff --git a/Example/exOverlaysDCM.cxx b/Example/exOverlaysDCM.cxx index 956d9ae0..8efa49eb 100755 --- a/Example/exOverlaysDCM.cxx +++ b/Example/exOverlaysDCM.cxx @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) FINISH_USAGE // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (argc == 1 || am->ArgMgrDefined("usage")) { @@ -76,10 +76,10 @@ int main(int argc, char *argv[]) return 0; } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if (am->ArgMgrDefined("warning")) - gdcm::Debug::WarningOn(); + GDCM_NAME_SPACE::Debug::WarningOn(); // if unused Param we give up if ( am->ArgMgrPrintUnusedLabels() ) @@ -95,10 +95,10 @@ int main(int argc, char *argv[]) // Read the input file. // ============================================================ - gdcm::File *f; + GDCM_NAME_SPACE::File *f; - f = gdcm::File::New( ); - f->SetLoadMode( gdcm::LD_ALL ); + f = GDCM_NAME_SPACE::File::New( ); + f->SetLoadMode( GDCM_NAME_SPACE::LD_ALL ); f->SetFileName( fileName ); f->AddForceLoadElement(0x6000,0x3000); // Overlay Data int res = f->Load(); @@ -116,7 +116,7 @@ int main(int argc, char *argv[]) // Load the Overlays in memory (the first one) // ============================================================ - gdcm::DataEntry *e = f->GetDataEntry(0x6000, 0x3000); + GDCM_NAME_SPACE::DataEntry *e = f->GetDataEntry(0x6000, 0x3000); if (e == 0) { std::cout << " Image doesn't contain any Overlay " << std::endl; @@ -157,8 +157,8 @@ int main(int argc, char *argv[]) // ============================================================ // Write a new file // ============================================================ - gdcm::File *f2; - f2 = gdcm::File::New( ); + GDCM_NAME_SPACE::File *f2; + f2 = GDCM_NAME_SPACE::File::New( ); char temp[256]; @@ -177,7 +177,7 @@ int main(int argc, char *argv[]) // feel free to add any field (Dicom Data Entry) you like, here. // ... - gdcm::FileHelper *fh = gdcm::FileHelper::New(f2); + GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f2); fh->SetImageData(outputData,dimXY); fh->WriteDcmExplVR(outputFileName); diff --git a/Example/exReadPapyrus.cxx b/Example/exReadPapyrus.cxx index dcde6b82..61a877d1 100644 --- a/Example/exReadPapyrus.cxx +++ b/Example/exReadPapyrus.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exReadPapyrus.cxx,v $ Language: C++ - Date: $Date: 2006/08/29 14:39:45 $ - Version: $Revision: 1.7 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -63,7 +63,7 @@ bool RemoveFile(const char *source) } // ---------------------------------------------------------------------- -// Here we load a supposed to be Papyrus File (gdcm::File compliant) +// Here we load a supposed to be Papyrus File (GDCM_NAME_SPACE::File compliant) // and then try to get the pixels, using low-level SeqEntry accessors. // Since it's not a general purpose Papyrus related program // (just a light example) we suppose *everything* is clean @@ -88,7 +88,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (am->ArgMgrDefined("usage")) { @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); // if unused Params we give up if ( am->ArgMgrPrintUnusedLabels() ) @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) } int loadMode = 0x0; // load everything - gdcm::File *f = gdcm::File::New(); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); f->SetLoadMode( loadMode ); f->SetFileName( fileName ); bool res = f->Load(); @@ -147,7 +147,7 @@ int main(int argc, char *argv[]) } // Look for private Papyrus Sequence - gdcm::SeqEntry *seqPapyrus= f->GetSeqEntry(0x0041, 0x1050); + GDCM_NAME_SPACE::SeqEntry *seqPapyrus= f->GetSeqEntry(0x0041, 0x1050); if (!seqPapyrus) { std::cout << "NOT a Papyrus File : " << fileName <GetFile(); +// GDCM_NAME_SPACE::FileHelper *original = new GDCM_NAME_SPACE::FileHelper( fileName ); +// GDCM_NAME_SPACE::File *h = original->GetFile(); - //gdcm::FileHelper *f1 = new gdcm::FileHelper(f); - gdcm::SQItem *sqi = seqPapyrus->GetFirstSQItem(); + //GDCM_NAME_SPACE::FileHelper *f1 = new GDCM_NAME_SPACE::FileHelper(f); + GDCM_NAME_SPACE::SQItem *sqi = seqPapyrus->GetFirstSQItem(); if (sqi == 0) { std::cout << "NO SQItem found within private Papyrus Sequence" @@ -226,7 +226,7 @@ int main(int argc, char *argv[]) // allocate enough room to get the pixels of all images. uint8_t *PixelArea = new uint8_t[lgrImage*nbImages]; uint8_t *currentPosition = PixelArea; - gdcm::DataEntry *pixels; + GDCM_NAME_SPACE::DataEntry *pixels; // declare and open the file std::ifstream *Fp; @@ -274,9 +274,9 @@ int main(int argc, char *argv[]) // build up a new File, with file info + images info + global pixel area. - std::string NumberOfFrames = gdcm::Util::Format("%d", nbImages); + std::string NumberOfFrames = GDCM_NAME_SPACE::Util::Format("%d", nbImages); - gdcm::File *n = gdcm::File::New(); + GDCM_NAME_SPACE::File *n = GDCM_NAME_SPACE::File::New(); n->InsertEntryString(MediaStSOPinstUID, 0x0002,0x0002); // Whe keep default gdcm Transfer Syntax (Explicit VR Little Endian) @@ -297,7 +297,7 @@ int main(int argc, char *argv[]) n->InsertEntryString(PixelRepresentation,0x0028,0x0103); // create the file - gdcm::FileHelper *file = gdcm::FileHelper::New(n); + GDCM_NAME_SPACE::FileHelper *file = GDCM_NAME_SPACE::FileHelper::New(n); file->SetImageData(PixelArea,lgrImage*nbImages); file->SetWriteTypeToDcmExplVR(); diff --git a/Example/exReadWriteFile.cxx b/Example/exReadWriteFile.cxx index 7599959c..3d53160b 100644 --- a/Example/exReadWriteFile.cxx +++ b/Example/exReadWriteFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exReadWriteFile.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:28 $ - Version: $Revision: 1.9 $ + Date: $Date: 2007/05/23 14:18:05 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -56,10 +56,10 @@ std::cout << " --- WARNING --- WARNING --- WARNING --- WARNING ---" <SetFileName( filename ); f1->Load(); @@ -79,18 +79,18 @@ std::cout << " --- WARNING --- WARNING --- WARNING --- WARNING ---" <GetFirstEntry(); + GDCM_NAME_SPACE::DocEntry *d = f1->GetFirstEntry(); while( d ) { // We skip SeqEntries, since user cannot do much with them - if ( !(dynamic_cast(d)) + if ( !(dynamic_cast(d)) // We skip Shadow Groups, since nobody knows what they mean && !( d->GetGroup()%2 ) ) { @@ -100,7 +100,7 @@ std::cout << " --- WARNING --- WARNING --- WARNING --- WARNING ---" <(d); + dataEntry = dynamic_cast(d); // Let's be carefull -maybe he commented out some previous line- if (!dataEntry) continue; @@ -217,8 +217,8 @@ std::cout << " --- WARNING --- WARNING --- WARNING --- WARNING ---" <GetImageData(); @@ -253,7 +253,7 @@ std::cout << " --- WARNING --- WARNING --- WARNING --- WARNING ---" <SetFileName( output ); copy->Load(); @@ -261,12 +261,12 @@ std::cout << " --- WARNING --- WARNING --- WARNING --- WARNING ---" <(d)) + if ( !(dynamic_cast(d)) // We skip Shadow Groups, since nobody knows what they mean && !( d->GetGroup()%2 ) ) { - if ( gdcm::DataEntry *de = dynamic_cast(d) ) + if ( GDCM_NAME_SPACE::DataEntry *de = dynamic_cast(d) ) { copy->GetFile()->InsertEntryBinArea( de->GetBinArea(),de->GetLength(), de->GetGroup(),de->GetElement(), @@ -274,7 +274,7 @@ std::cout << " --- WARNING --- WARNING --- WARNING --- WARNING ---" <GetNextEntry(); diff --git a/Example/exSerieHelper.cxx b/Example/exSerieHelper.cxx index fb48ad03..e20309d4 100644 --- a/Example/exSerieHelper.cxx +++ b/Example/exSerieHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exSerieHelper.cxx,v $ Language: C++ - Date: $Date: 2005/11/14 15:55:17 $ - Version: $Revision: 1.7 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -22,7 +22,7 @@ int main(int argc, char *argv[]) { - gdcm::SerieHelper *s; + GDCM_NAME_SPACE::SerieHelper *s; std::string dirName; if (argc > 1) @@ -33,15 +33,15 @@ int main(int argc, char *argv[]) } if (argc > 2) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); std::cout << "Dir Name :[" << dirName << "]" << std::endl; - s = gdcm::SerieHelper::New(); - s->SetLoadMode(gdcm::LD_ALL); // Load everything for each File - //gdcm::TagKey t(0x0020,0x0013); - //s->AddRestriction(t, "340", gdcm::GDCM_LESS); // Keep only files where + s = GDCM_NAME_SPACE::SerieHelper::New(); + s->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); // Load everything for each File + //GDCM_NAME_SPACE::TagKey t(0x0020,0x0013); + //s->AddRestriction(t, "340", GDCM_NAME_SPACE::GDCM_LESS); // Keep only files where // restriction is true s->SetDirectory(dirName, true); // true : recursive exploration @@ -53,8 +53,8 @@ int main(int argc, char *argv[]) << std::endl; int nbFiles; - // For all the Single SerieUID Files Sets of the gdcm::Serie - gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet(); + // For all the Single SerieUID Files Sets of the GDCM_NAME_SPACE::Serie + GDCM_NAME_SPACE::FileList *l = s->GetFirstSingleSerieUIDFileSet(); while (l) { nbFiles = l->size() ; @@ -78,7 +78,7 @@ int main(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/Example/exXCoherentFileSet.cxx b/Example/exXCoherentFileSet.cxx index 5f0dcfb7..37daea6a 100755 --- a/Example/exXCoherentFileSet.cxx +++ b/Example/exXCoherentFileSet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exXCoherentFileSet.cxx,v $ Language: C++ - Date: $Date: 2006/07/26 17:05:25 $ - Version: $Revision: 1.8 $ + Date: $Date: 2007/05/23 14:18:05 $ + Version: $Revision: 1.9 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (am->ArgMgrDefined("usage") || argc == 1) { @@ -58,17 +58,17 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); - int loadMode = gdcm::LD_ALL; + int loadMode = GDCM_NAME_SPACE::LD_ALL; if ( am->ArgMgrDefined("noshadowseq") ) - loadMode |= gdcm::LD_NOSHADOWSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ; else { if ( am->ArgMgrDefined("noshadow") ) - loadMode |= gdcm::LD_NOSHADOW; + loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW; if ( am->ArgMgrDefined("noseq") ) - loadMode |= gdcm::LD_NOSEQ; + loadMode |= GDCM_NAME_SPACE::LD_NOSEQ; } const char *dirName = am->ArgMgrGetString("dirin"); @@ -113,15 +113,20 @@ int main(int argc, char *argv[]) delete am; // ------ we don't need Arguments Manager any longer ------ - gdcm::SerieHelper *s; + GDCM_NAME_SPACE::SerieHelper *s; - s = gdcm::SerieHelper::New(); - s->SetLoadMode(gdcm::LD_ALL); // Load everything for each File - //gdcm::TagKey t(0x0020,0x0013); - //s->AddRestriction(t, "340", gdcm::GDCM_LESS); // Keep only files where + s = GDCM_NAME_SPACE::SerieHelper::New(); + s->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); // Load everything for each File + //GDCM_NAME_SPACE::TagKey t(0x0020,0x0013); + //s->AddRestriction(t, "340", GDCM_NAME_SPACE::GDCM_LESS); // Keep only files where // restriction is true s->SetDirectory(dirName, true); // true : recursive exploration + // The Dicom file set is splitted into several 'Single SerieUID Files Sets' + // (a 'Single SerieUID Files Set' per SerieUID) + // In some cases, it's not enough, since, in some cases + // we can find scout view with the same SerieUID + /* std::cout << " ---------------------------------------- " << "'Single UID' Filesets found in :[" @@ -133,11 +138,11 @@ int main(int argc, char *argv[]) */ int nbFiles; std::string fileName; - // For all the Single SerieUID Files Sets of the gdcm::Serie - gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet(); + // For all the Single SerieUID Files Sets of the GDCM_NAME_SPACE::Serie + GDCM_NAME_SPACE::FileList *l = s->GetFirstSingleSerieUIDFileSet(); - gdcm::XCoherentFileSetmap xcm; - while (l) + GDCM_NAME_SPACE::XCoherentFileSetmap xcm; + while (l) // for each 'Single SerieUID FileSet' { nbFiles = l->size() ; if ( l->size() > 3 ) // Why not ? Just an example, for testing @@ -154,7 +159,7 @@ int main(int argc, char *argv[]) if (groupelem != 0) xcm = s->SplitOnTagValue(l, groupelem[0],groupelem[1] ); - for (gdcm::XCoherentFileSetmap::iterator i = xcm.begin(); + for (GDCM_NAME_SPACE::XCoherentFileSetmap::iterator i = xcm.begin(); i != xcm.end(); ++i) { @@ -175,7 +180,7 @@ int main(int argc, char *argv[]) //s->OrderFileList((*i).second); // sort the XCoherent Fileset - for (gdcm::FileList::iterator it = ((*i).second)->begin(); + for (GDCM_NAME_SPACE::FileList::iterator it = ((*i).second)->begin(); it != ((*i).second)->end(); ++it) { diff --git a/PACKAGER b/PACKAGER index 7a8d88da..11231874 100644 --- a/PACKAGER +++ b/PACKAGER @@ -35,7 +35,7 @@ Here is the checklist when freezing a version of gdcm: - Binary distribution: cd $GDCMHOME make clean - [ or you migth get some complains about the function + [ or you might get some complains about the function PyVTKClass_vtkGdcmReaderNew being multiply defined: this is because of the loose definition of vtkSources in setup.py in which the usage of the glob function will produce a link diff --git a/Testing/TestBug.cxx b/Testing/TestBug.cxx index 8f810d18..959b5f1a 100644 --- a/Testing/TestBug.cxx +++ b/Testing/TestBug.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestBug.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 15:03:00 $ - Version: $Revision: 1.23 $ + Date: $Date: 2007/05/23 14:18:06 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,8 +24,8 @@ int TestBug(int argc, char *argv[]) { std::cout << "==========test" < 1) f->SetFileName( argv[1] ); diff --git a/Testing/TestCommand.cxx b/Testing/TestCommand.cxx index f9878660..642d5c0c 100644 --- a/Testing/TestCommand.cxx +++ b/Testing/TestCommand.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestCommand.cxx,v $ Language: C++ - Date: $Date: 2005/11/30 08:48:15 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18: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 @@ -22,7 +22,7 @@ #include #include -class CommandTest : public gdcm::Command +class CommandTest : public GDCM_NAME_SPACE::Command { gdcmTypeMacro(CommandTest); gdcmNewMacro(CommandTest); @@ -46,7 +46,7 @@ private: }; static bool fctExecuted = false; -void CallbackTest(gdcm::CallbackCommand *cmd) +void CallbackTest(GDCM_NAME_SPACE::CallbackCommand *cmd) { std::cout << "Test class command... for " << typeid(cmd->GetObject()).name() @@ -60,31 +60,31 @@ int TestCommand(int , char *[]) { int error=0; - gdcm::CallbackCommand *cbk = gdcm::CallbackCommand::New(); + GDCM_NAME_SPACE::CallbackCommand *cbk = GDCM_NAME_SPACE::CallbackCommand::New(); cbk->SetCallback(CallbackTest); - gdcm::CommandManager::SetCommand(NULL,1,cbk); + GDCM_NAME_SPACE::CommandManager::SetCommand(NULL,1,cbk); cbk->Delete(); CommandTest *cmd = CommandTest::New(); - gdcm::CommandManager::SetCommand(NULL,2,cmd); + GDCM_NAME_SPACE::CommandManager::SetCommand(NULL,2,cmd); cmd->Delete(); std::cout << "Test on callback function execution\n"; - gdcm::CommandManager::ExecuteCommand(NULL,1,"Test on callback function"); + GDCM_NAME_SPACE::CommandManager::ExecuteCommand(NULL,1,"Test on callback function"); if(!fctExecuted) std::cout<<"... Failed\n"; error+=!fctExecuted; std::cout << std::endl; std::cout << "Test on command class execution\n"; - gdcm::CommandManager::ExecuteCommand(NULL,2,"Test on command class"); + GDCM_NAME_SPACE::CommandManager::ExecuteCommand(NULL,2,"Test on command class"); if(!cmd->IsExecuted()) std::cout<<"... Failed\n"; error+=!cmd->IsExecuted(); std::cout << std::endl; std::cout << "Test on unset command execution\n"; - gdcm::CommandManager::ExecuteCommand(NULL,3,"Test on callback function"); + GDCM_NAME_SPACE::CommandManager::ExecuteCommand(NULL,3,"Test on callback function"); std::cout << std::endl; return error; diff --git a/Testing/TestDicomDirElement.cxx b/Testing/TestDicomDirElement.cxx index 7eb6a17f..8eed4530 100644 --- a/Testing/TestDicomDirElement.cxx +++ b/Testing/TestDicomDirElement.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDicomDirElement.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:30 $ - Version: $Revision: 1.6 $ + Date: $Date: 2007/05/23 14:18:06 $ + Version: $Revision: 1.7 $ 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 @@ int TestDicomDirElement(int , char *[]) { - gdcm::DicomDirElement *ddElt = gdcm::DicomDirElement::New(); + GDCM_NAME_SPACE::DicomDirElement *ddElt = GDCM_NAME_SPACE::DicomDirElement::New(); if (ddElt == 0) { std::cout << "new DicomDirElement failed" << std::endl; diff --git a/Testing/TestDict.cxx b/Testing/TestDict.cxx index 2a85a6c8..aa6b1ffd 100644 --- a/Testing/TestDict.cxx +++ b/Testing/TestDict.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDict.cxx,v $ Language: C++ - Date: $Date: 2005/11/29 17:08:54 $ - Version: $Revision: 1.12 $ + Date: $Date: 2007/05/23 14:18: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 @@ -28,7 +28,7 @@ int TestDict(int , char *[]) std::cout << "----- Test Default Dicom Dictionary : ----------" << std::endl; // Just to improve test coverage: - gdcm::Dict *tempDict = gdcm::Dict::New("dummyFileNameThatDoesntExist"); + GDCM_NAME_SPACE::Dict *tempDict = GDCM_NAME_SPACE::Dict::New("dummyFileNameThatDoesntExist"); // Default dict is supposed to be used. tempDict->Print(); std::cout << "---- end Test Default Dicom Dictionary : -------" << std::endl; @@ -39,7 +39,7 @@ int TestDict(int , char *[]) // Print the DictSet std::cout<<"#######################################################\n"; - gdcm::DictSet *dicts=gdcm::Global::GetDicts(); + GDCM_NAME_SPACE::DictSet *dicts=GDCM_NAME_SPACE::Global::GetDicts(); if(!dicts) { std::cout<<"DictSet hasn't be found... Failed\n"; @@ -48,7 +48,7 @@ int TestDict(int , char *[]) std::cout<<"DictSet content :\n"; - gdcm::Dict *d = dicts->GetFirstDict(); + GDCM_NAME_SPACE::Dict *d = dicts->GetFirstDict(); if (!d) { std::cout << "Dictset is empty" << std::endl; @@ -68,7 +68,7 @@ int TestDict(int , char *[]) // Print the Dict (public) std::cout<<"#######################################################\n"; - gdcm::Dict *pubDict=dicts->GetDefaultPubDict(); + GDCM_NAME_SPACE::Dict *pubDict=dicts->GetDefaultPubDict(); if(!pubDict) { std::cout<<"The public Dict hasn't be found... Failed\n"; @@ -81,8 +81,8 @@ int TestDict(int , char *[]) std::cout<<"#######################################################\n"; const int ENTRY_GR = 0x10; const int ENTRY_EL = 0x20; - gdcm::TagKey key = gdcm::DictEntry::TranslateToKey(ENTRY_GR,ENTRY_EL); - gdcm::DictEntry *entry=pubDict->GetEntry(ENTRY_GR,ENTRY_EL); + GDCM_NAME_SPACE::TagKey key = GDCM_NAME_SPACE::DictEntry::TranslateToKey(ENTRY_GR,ENTRY_EL); + GDCM_NAME_SPACE::DictEntry *entry=pubDict->GetEntry(ENTRY_GR,ENTRY_EL); if(!entry) { std::cout<<"The DictEntry hasn't be found... Failed\n"; diff --git a/Testing/TestDictGroupName.cxx b/Testing/TestDictGroupName.cxx index 47add5e4..daa6f700 100644 --- a/Testing/TestDictGroupName.cxx +++ b/Testing/TestDictGroupName.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDictGroupName.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:30 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18: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 @@ -21,7 +21,7 @@ #include -int CompareDictGroupName(gdcm::DictGroupName *groupName, +int CompareDictGroupName(GDCM_NAME_SPACE::DictGroupName *groupName, uint16_t group,std::string ref) { std::string val = groupName->GetName(group); @@ -34,7 +34,7 @@ int CompareDictGroupName(gdcm::DictGroupName *groupName, int TestDictGroupName(int , char *[]) { - gdcm::DictGroupName *groupName = gdcm::DictGroupName::New(); + GDCM_NAME_SPACE::DictGroupName *groupName = GDCM_NAME_SPACE::DictGroupName::New(); groupName->Print( std::cout ); int ret = 0; @@ -42,7 +42,7 @@ int TestDictGroupName(int , char *[]) std::cout << std::endl; ret += CompareDictGroupName(groupName,0x0002,"Meta Elements"); ret += CompareDictGroupName(groupName,0x7fe0,"Pixels"); - ret += CompareDictGroupName(groupName,0x0007,gdcm::GDCM_UNFOUND); + ret += CompareDictGroupName(groupName,0x0007,GDCM_NAME_SPACE::GDCM_UNFOUND); groupName->Delete(); diff --git a/Testing/TestImageSet.cxx b/Testing/TestImageSet.cxx index 789a43b2..24168671 100644 --- a/Testing/TestImageSet.cxx +++ b/Testing/TestImageSet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestImageSet.cxx,v $ Language: C++ - Date: $Date: 2006/04/11 16:05:03 $ - Version: $Revision: 1.7 $ + Date: $Date: 2007/05/23 14:18:06 $ + 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 @@ -32,17 +32,17 @@ #include #include -typedef std::list FileList; +typedef std::list FileList; // If there is sameSerie, sameStudy is set to true int CompareImages(FileList &list, bool sameSerie, bool sameStudy) { - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if( sameSerie ) sameStudy = true; - gdcm::DataEntry *entry; + GDCM_NAME_SPACE::DataEntry *entry; std::map instUID; std::map mediaUID; std::map serieUID; @@ -146,7 +146,7 @@ void ClearList(FileList &list) list.clear(); } -gdcm::File *WriteImage(gdcm::File *file, const std::string &fileName) +GDCM_NAME_SPACE::File *WriteImage(GDCM_NAME_SPACE::File *file, const std::string &fileName) { // Create a 256x256x1 image 8 bits, unsigned std::ostringstream str; @@ -182,7 +182,7 @@ gdcm::File *WriteImage(gdcm::File *file, const std::string &fileName) memset(imageData,0,size); // Write the image - gdcm::FileHelper *hlp = gdcm::FileHelper::New(file); + GDCM_NAME_SPACE::FileHelper *hlp = GDCM_NAME_SPACE::FileHelper::New(file); hlp->SetImageData(imageData,size); hlp->SetWriteTypeToDcmExplVR(); if( !hlp->Write(fileName) ) @@ -198,7 +198,7 @@ gdcm::File *WriteImage(gdcm::File *file, const std::string &fileName) hlp->Delete(); // Read the written image - gdcm::File *reread = gdcm::File::New( ); + GDCM_NAME_SPACE::File *reread = GDCM_NAME_SPACE::File::New( ); reread->SetFileName( fileName ); reread->Load(); if( !reread->IsReadable() ) @@ -233,8 +233,8 @@ int TestImageSet(int argc, char *argv[]) << " to different Series within the same Study" << std::endl; std::cout << std::endl << std::endl; - gdcm::File *file; - gdcm::File *newFile; + GDCM_NAME_SPACE::File *file; + GDCM_NAME_SPACE::File *newFile; FileList fileList; int i; @@ -248,13 +248,13 @@ int TestImageSet(int argc, char *argv[]) { std::ostringstream fileName; fileName << "FileSeq" << i << ".dcm"; - file = gdcm::File::New(); + file = GDCM_NAME_SPACE::File::New(); // It's up to the user to initialize Serie UID and Study UID // Study Instance UID - studyUID = gdcm::Util::CreateUniqueUID(); + studyUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); file->InsertEntryString(studyUID, 0x0020, 0x000d, "UI"); // Series Instance UID - serieUID = gdcm::Util::CreateUniqueUID(); + serieUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); file->InsertEntryString(serieUID, 0x0020, 0x000e, "UI"); newFile = WriteImage(file, fileName.str()); @@ -280,13 +280,13 @@ int TestImageSet(int argc, char *argv[]) // Step 2 : Same Serie & Study fileList.clear(); - studyUID = gdcm::Util::CreateUniqueUID(); - serieUID = gdcm::Util::CreateUniqueUID(); + studyUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); + serieUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); for(i = 0;i < 4;i++) { std::ostringstream fileName; fileName << "FileSeq" << i << ".dcm"; - file = gdcm::File::New(); + file = GDCM_NAME_SPACE::File::New(); file->InsertEntryString(studyUID, 0x0020, 0x000d, "UI"); file->InsertEntryString(serieUID, 0x0020, 0x000e, "UI"); @@ -313,14 +313,14 @@ int TestImageSet(int argc, char *argv[]) // Step 3 : Same Study fileList.clear(); - serieUID = gdcm::Util::CreateUniqueUID(); + serieUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); for(i = 0;i < 4;i++) { std::ostringstream fileName; fileName << "FileSeq" << i << ".dcm"; - file = gdcm::File::New(); + file = GDCM_NAME_SPACE::File::New(); file->InsertEntryString(studyUID, 0x0020, 0x000d, "UI"); - serieUID = gdcm::Util::CreateUniqueUID(); + serieUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); file->InsertEntryString(serieUID, 0x0020, 0x000e, "UI"); newFile = WriteImage(file, fileName.str()); if( !newFile ) diff --git a/Testing/TestTS.cxx b/Testing/TestTS.cxx index b757561e..9c608cd7 100644 --- a/Testing/TestTS.cxx +++ b/Testing/TestTS.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestTS.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:31 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18: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 @@ -20,7 +20,7 @@ int TestTS(int , char *[]) { - gdcm::TS *ts = gdcm::TS::New(); + GDCM_NAME_SPACE::TS *ts = GDCM_NAME_SPACE::TS::New(); // There should be ~150 entries ts->Print( std::cout ); @@ -70,10 +70,10 @@ int TestTS(int , char *[]) std::cout << ts->IsJPEG( "1.2.840.10008.1.2.5") << std::endl; std::cout << ts->GetSpecialTransferSyntax( ts->GetSpecialTransferSyntax( "1.2.840.10008.1.2.5")) << std::endl; - std::cout << gdcm::Global::GetTS()->IsRLELossless( "1.2.840.10008.1.2.5" ) + std::cout << GDCM_NAME_SPACE::Global::GetTS()->IsRLELossless( "1.2.840.10008.1.2.5" ) << std::endl; - bool ret = ts->GetValue( "" ) != gdcm::GDCM_UNFOUND; + bool ret = ts->GetValue( "" ) != GDCM_NAME_SPACE::GDCM_UNFOUND; ts->Delete(); diff --git a/Testing/TestUtil.cxx b/Testing/TestUtil.cxx index ef1ab628..f7b2952c 100644 --- a/Testing/TestUtil.cxx +++ b/Testing/TestUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestUtil.cxx,v $ Language: C++ - Date: $Date: 2006/05/31 16:25:09 $ - Version: $Revision: 1.20 $ + Date: $Date: 2007/05/23 14:18:06 $ + Version: $Revision: 1.21 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,7 +33,7 @@ int TestUtil(int , char *[]) float flt; double dbl=1.0; - std::cout << "This is gdcm version: " << gdcm::Util::GetVersion() << std::endl; + std::cout << "This is gdcm version: " << GDCM_NAME_SPACE::Util::GetVersion() << std::endl; std::cout << "---------- uint16 : " << std::dec << u16 << " = 0x" << std::hex << u16 << std::endl; @@ -100,7 +100,7 @@ int TestUtil(int , char *[]) // CreateCleanString std::string x = "a#@-bc\tdef"; - std::string y = gdcm::Util::CreateCleanString(x); + std::string y = GDCM_NAME_SPACE::Util::CreateCleanString(x); std::cout << "Clean : [" << x <<"] --> [" << y <<"]" << std::endl; @@ -108,12 +108,12 @@ int TestUtil(int , char *[]) x = "abcd#@-wyz*@-lmn#@-uvw-#@ijk"; std::cout << "in [" << x << "] " << std::endl; std::cout << " - count '#@-' : " - << gdcm::Util::CountSubstring(x, "#@-") << std::endl; + << GDCM_NAME_SPACE::Util::CountSubstring(x, "#@-") << std::endl; // Tokenize : tokens are '#', '@', '-' std::vector tokens; std::cout << " - use tokens '#@-' :" << std::endl; - gdcm::Util::Tokenize (x, tokens, "#@-"); + GDCM_NAME_SPACE::Util::Tokenize (x, tokens, "#@-"); for (unsigned int ui=0; ui MD5 : " << gdcm::Util::ConvertToMD5(s1) + std::cout << s1 << " --> MD5 : " << GDCM_NAME_SPACE::Util::ConvertToMD5(s1) < MD5 : " << gdcm::Util::ConvertToMD5(s1) + std::cout << s1 << " --> MD5 : " << GDCM_NAME_SPACE::Util::ConvertToMD5(s1) < MD5 : " << gdcm::Util::ConvertToMD5(s1) + std::cout << s1 << " --> MD5 : " << GDCM_NAME_SPACE::Util::ConvertToMD5(s1) < MD5 : " << gdcm::Util::ConvertToMD5(s1) + std::cout << s1 << " --> MD5 : " << GDCM_NAME_SPACE::Util::ConvertToMD5(s1) < MD5 : " << gdcm::Util::ConvertToMD5(s1) + std::cout << s1 << " --> MD5 : " << GDCM_NAME_SPACE::Util::ConvertToMD5(s1) <Print( std::cout ); @@ -54,7 +54,7 @@ int TestVR(int , char *[]) std::cerr << "' /' is recognized as a valid VR" << std::endl; error++; } - if( vr->IsValidVR( gdcm::GDCM_VRUNKNOWN ) ) + if( vr->IsValidVR( GDCM_NAME_SPACE::GDCM_VRUNKNOWN ) ) { std::cerr << "' ' is recognized as a valid VR" << std::endl; error++; diff --git a/Testing/TestWriteSimple.cxx b/Testing/TestWriteSimple.cxx index c96bcfe0..39a3a3af 100644 --- a/Testing/TestWriteSimple.cxx +++ b/Testing/TestWriteSimple.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestWriteSimple.cxx,v $ Language: C++ - Date: $Date: 2006/10/23 15:49:14 $ - Version: $Revision: 1.50 $ + Date: $Date: 2007/05/23 14:18:06 $ + Version: $Revision: 1.51 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -118,10 +118,10 @@ int WriteSimple(Image &img) // Step 1 : Create an empty FileHelper std::cout << " 1..."; - gdcm::FileHelper *fileH = gdcm::FileHelper::New(); + GDCM_NAME_SPACE::FileHelper *fileH = GDCM_NAME_SPACE::FileHelper::New(); // Get the (empty) image header. - gdcm::File *fileToBuild = fileH->GetFile(); + GDCM_NAME_SPACE::File *fileToBuild = fileH->GetFile(); std::ostringstream str; // Set the image size @@ -157,7 +157,7 @@ int WriteSimple(Image &img) // Set the pixel representation str.str(""); str << img.sign; - fileToBuild->InsertEntryString(str.str(),0x0028,0x0103, "US"); // Pixel Representation + fileToBuild->InsertEntryString(str.str(),0x0028,0x0103,"US"); // Pixel Representation fileName << "-" << img.componentSize; if(img.sign == 0) @@ -165,7 +165,7 @@ int WriteSimple(Image &img) else fileName << "S"; - fileToBuild->InsertEntryString("0",0x0008,0x0000, "UL"); // Should be removed + fileToBuild->InsertEntryString("0",0x0008,0x0000,"UL"); // Should be removed // except for ACR switch (img.writeMode) { @@ -184,7 +184,7 @@ int WriteSimple(Image &img) // Set the samples per pixel str.str(""); str << img.components; - fileToBuild->InsertEntryString(str.str(),0x0028,0x0002, "US"); // Samples per Pixel + fileToBuild->InsertEntryString(str.str(),0x0028,0x0002,"US"); // Samples per Pixel // Step 2 : Create the output image std::cout << "2..."; @@ -265,24 +265,24 @@ int WriteSimple(Image &img) // Step 5 : Read the written image std::cout << "5..." << std::endl; // old form. - //gdcm::FileHelper *reread = new gdcm::FileHelper( fileName.str() ); + //GDCM_NAME_SPACE::FileHelper *reread = new GDCM_NAME_SPACE::FileHelper( fileName.str() ); // Better use : - gdcm::File *f = gdcm::File::New( ); - f->SetLoadMode(gdcm::LD_ALL); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New( ); + f->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); f->SetFileName( fileName.str() ); //reread->SetFileName( fileName.str() ); - //reread->SetLoadMode(gdcm::LD_ALL); // Load everything + //reread->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); // Load everything // Possible values are - // gdcm::LD_ALL, - // gdcm::LD_NOSEQ, - // gdcm::LD_NOSHADOW, - // gdcm::LD_NOSEQ|gdcm::LD_NOSHADOW, - // gdcm::LD_NOSHADOWSEQ + // GDCM_NAME_SPACE::LD_ALL, + // GDCM_NAME_SPACE::LD_NOSEQ, + // GDCM_NAME_SPACE::LD_NOSHADOW, + // GDCM_NAME_SPACE::LD_NOSEQ|GDCM_NAME_SPACE::LD_NOSHADOW, + // GDCM_NAME_SPACE::LD_NOSHADOWSEQ f->Load(); // reread->Load(); - gdcm::FileHelper *reread = gdcm::FileHelper::New( f ); + GDCM_NAME_SPACE::FileHelper *reread = GDCM_NAME_SPACE::FileHelper::New( f ); reread->Print(); @@ -398,7 +398,7 @@ int TestWriteSimple(int argc, char *argv[]) return 1; } - // gdcm::Debug::DebugOn(); + // GDCM_NAME_SPACE::Debug::DebugOn(); int ret=0; int i=0; diff --git a/gdcmConfigure.h.in b/gdcmConfigure.h.in index 24a781ac..e4b7528a 100644 --- a/gdcmConfigure.h.in +++ b/gdcmConfigure.h.in @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmConfigure.h.in,v $ Language: C++ - Date: $Date: 2005/10/27 20:43:53 $ - Version: $Revision: 1.21 $ + Date: $Date: 2007/05/23 14:18:03 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -95,5 +95,10 @@ #cmakedefine GDCM_LEGACY_REMOVE #cmakedefine GDCM_LEGACY_SILENT +/*--------------------------------------------------------------------------*/ +/* Will be usefull to use 2 different versions of gdcm. */ +/* e.g. : ITK uses gdcm1.2; vtkgdcmImageReader uses gdcm1.3 */ + +#define GDCM_NAME_SPACE @GDCM_NAME_SPACE@ #endif diff --git a/gdcmPython/gdcm.i b/gdcmPython/gdcm.i index a91a4635..91206450 100644 --- a/gdcmPython/gdcm.i +++ b/gdcmPython/gdcm.i @@ -23,6 +23,8 @@ #include "gdcmDicomDirPatient.h" #include "gdcmDicomDirStudy.h" #include "gdcmDicomDirSerie.h" +#include "gdcmDicomDirVisit.h" +#include "gdcmDicomDirPrivate.h" #include "gdcmDirList.h" #include "gdcmDocEntrySet.h" #include "gdcmDocument.h" @@ -43,7 +45,7 @@ #include "gdcmDictGroupName.h" /// This is required in order to avoid %including all the gdcm include files. -using namespace gdcm; +using namespace GDCM_NAME_SPACE; %} @@ -62,16 +64,16 @@ typedef unsigned long long uint64_t; //////////////////////////////////////////////// // Convert a DocEntry * to the real derived class -%typemap(out) gdcm::DocEntry * +%typemap(out) GDCM_NAME_SPACE::DocEntry * { PyObject *newEntry; if($1) { if(dynamic_cast($1)) // SeqEntry * - newEntry = SWIG_NewPointerObj($1,SWIGTYPE_p_gdcm__SeqEntry,0); + newEntry = SWIG_NewPointerObj($1,SWIGTYPE_p_GDCM_NAME_SPACE__SeqEntry,0); else if(dynamic_cast($1)) // DataEntry * - newEntry = SWIG_NewPointerObj($1,SWIGTYPE_p_gdcm__DataEntry,0); + newEntry = SWIG_NewPointerObj($1,SWIGTYPE_p_GDCM_NAME_SPACE__DataEntry,0); else newEntry = NULL; } @@ -106,27 +108,27 @@ typedef unsigned long long uint64_t; } // Same convertion as above but references (since swig converts C++ -// refererences to pointers) +// references to pointers) %typemap(python, in) std::string const & { $1 = new std::string( PyString_AsString( $input ) ); } //////////////////// gdcm.TagName versus Python str ////////////////////// -%typemap(out) gdcm::TagName, const gdcm::TagName & +%typemap(out) GDCM_NAME_SPACE::TagName, const GDCM_NAME_SPACE::TagName & { $result = PyString_FromString(($1)->c_str()); } // Convertion of incoming Python str to STL string -%typemap(python, in) const gdcm::TagName, gdcm::TagName +%typemap(python, in) const GDCM_NAME_SPACE::TagName, GDCM_NAME_SPACE::TagName { $1 = PyString_AsString($input); } // Same convertion as above but references (since swig converts C++ // refererences to pointers) -%typemap(python, in) gdcm::TagName const & +%typemap(python, in) GDCM_NAME_SPACE::TagName const & { $1 = new std::string( PyString_AsString( $input ) ); } @@ -134,21 +136,21 @@ typedef unsigned long long uint64_t; //////////////////////////////////////////////////////////////////////////// // Because overloading and %rename don't work together (see below Note 1) // we need to ignore some methods (e.g. the overloaded default constructor). -// The gdcm::File class doesn't have any SetFilename method anyhow, and +// The GDCM_NAME_SPACE::File class doesn't have any SetFilename method anyhow, and // this constructor is only used internaly (not from the API) so this is // not a big loss. -%ignore gdcm::binary_write(std::ostream &,uint32_t const &); -%ignore gdcm::binary_write(std::ostream &,uint16_t const &); +%ignore GDCM_NAME_SPACE::binary_write(std::ostream &,uint32_t const &); +%ignore GDCM_NAME_SPACE::binary_write(std::ostream &,uint16_t const &); -%ignore gdcm::VRKey::operator=(const VRKey &_val); -%ignore gdcm::VRKey::operator=(const std::string &_val); -%ignore gdcm::VRKey::operator=(const char *_val); -%ignore gdcm::VRKey::operator[](const unsigned int &_id) const; -%ignore gdcm::VRKey::operator[](const unsigned int &_id); +%ignore GDCM_NAME_SPACE::VRKey::operator=(const VRKey &_val); +%ignore GDCM_NAME_SPACE::VRKey::operator=(const std::string &_val); +%ignore GDCM_NAME_SPACE::VRKey::operator=(const char *_val); +%ignore GDCM_NAME_SPACE::VRKey::operator[](const unsigned int &_id) const; +%ignore GDCM_NAME_SPACE::VRKey::operator[](const unsigned int &_id); -%ignore gdcm::TagKey::operator=(const TagKey &_val); -%ignore gdcm::TagKey::operator[](const unsigned int &_id) const; -%ignore gdcm::TagKey::operator[](const unsigned int &_id); +%ignore GDCM_NAME_SPACE::TagKey::operator=(const TagKey &_val); +%ignore GDCM_NAME_SPACE::TagKey::operator[](const unsigned int &_id) const; +%ignore GDCM_NAME_SPACE::TagKey::operator[](const unsigned int &_id); // Ignore all placed in gdcmCommon.h %ignore GDCM_UNKNOWN; @@ -191,7 +193,9 @@ typedef unsigned long long uint64_t; %include "gdcmDicomDirElement.h" %include "gdcmDicomDirObject.h" %include "gdcmDicomDirImage.h" +%include "gdcmDicomDirPrivate.h" %include "gdcmDicomDirSerie.h" +%include "gdcmDicomDirVisit.h" %include "gdcmDicomDirStudy.h" %include "gdcmDicomDirPatient.h" %include "gdcmDicomDirMeta.h" diff --git a/gdcmPython/gdcmCommandPy.h b/gdcmPython/gdcmCommandPy.h index 8732bdd7..cdc5d27e 100644 --- a/gdcmPython/gdcmCommandPy.h +++ b/gdcmPython/gdcmCommandPy.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommandPy.h,v $ Language: C++ - Date: $Date: 2005/11/29 08:32:40 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/05/23 14:18:07 $ + 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 @@ -23,7 +23,7 @@ #include "gdcmCommand.h" #include "Python.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmArgMgr.cxx b/src/gdcmArgMgr.cxx index 732a1c81..6ec26367 100644 --- a/src/gdcmArgMgr.cxx +++ b/src/gdcmArgMgr.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmArgMgr.cxx,v $ Language: C++ - Date: $Date: 2006/05/31 16:39:25 $ - Version: $Revision: 1.23 $ + Date: $Date: 2007/05/23 14:18:07 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -32,7 +32,7 @@ #include "gdcmArgMgr.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmArgMgr.h b/src/gdcmArgMgr.h index 1d48babe..f31ff390 100644 --- a/src/gdcmArgMgr.h +++ b/src/gdcmArgMgr.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmArgMgr.h,v $ Language: C++ - Date: $Date: 2006/01/26 16:01:04 $ - Version: $Revision: 1.12 $ + Date: $Date: 2007/05/23 14:18:07 $ + 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 // for FILE #include // For atof -namespace gdcm +namespace GDCM_NAME_SPACE { #define ID_RFILE_TEXT "rt" diff --git a/src/gdcmBase.cxx b/src/gdcmBase.cxx index 873e442f..343ea1d7 100644 --- a/src/gdcmBase.cxx +++ b/src/gdcmBase.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBase.cxx,v $ Language: C++ - Date: $Date: 2005/10/20 15:24:08 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:07 $ + 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 @@ -18,7 +18,7 @@ #include "gdcmBase.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmBase.h b/src/gdcmBase.h index 8d88bf50..3f4024a4 100644 --- a/src/gdcmBase.h +++ b/src/gdcmBase.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBase.h,v $ Language: C++ - Date: $Date: 2005/10/23 15:32:30 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:07 $ + 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 @@ #include "gdcmCommon.h" #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmCallbackCommand.cxx b/src/gdcmCallbackCommand.cxx index d8046f33..598bd50c 100644 --- a/src/gdcmCallbackCommand.cxx +++ b/src/gdcmCallbackCommand.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCallbackCommand.cxx,v $ Language: C++ - Date: $Date: 2005/11/29 17:21:33 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/05/23 14:18:07 $ + 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 @@ -18,7 +18,7 @@ // --------------------------------------------------------------- #include "gdcmCallbackCommand.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmCallbackCommand.h b/src/gdcmCallbackCommand.h index d47315ea..365ce602 100644 --- a/src/gdcmCallbackCommand.h +++ b/src/gdcmCallbackCommand.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCallbackCommand.h,v $ Language: C++ - Date: $Date: 2005/11/28 15:20:35 $ - Version: $Revision: 1.1 $ + Date: $Date: 2007/05/23 14:18:07 $ + Version: $Revision: 1.2 $ 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 @@ #include "gdcmDebug.h" #include "gdcmCommand.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmCommand.cxx b/src/gdcmCommand.cxx index 221e00a8..188b2f75 100644 --- a/src/gdcmCommand.cxx +++ b/src/gdcmCommand.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommand.cxx,v $ Language: C++ - Date: $Date: 2005/11/28 16:31:22 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/05/23 14:18:08 $ + 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 @@ -18,7 +18,7 @@ // --------------------------------------------------------------- #include "gdcmCommand.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmCommand.h b/src/gdcmCommand.h index 034976ee..fab5737a 100644 --- a/src/gdcmCommand.h +++ b/src/gdcmCommand.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommand.h,v $ Language: C++ - Date: $Date: 2005/11/28 16:31:22 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/05/23 14:18:08 $ + 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 @@ -21,7 +21,7 @@ #include "gdcmRefCounter.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class CommandManager; diff --git a/src/gdcmCommandManager.cxx b/src/gdcmCommandManager.cxx index bb24b005..b99af196 100644 --- a/src/gdcmCommandManager.cxx +++ b/src/gdcmCommandManager.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommandManager.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 15:05:11 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18:08 $ + 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 @@ -20,7 +20,7 @@ #include "gdcmCommand.h" #include // for typeif (needed by __BORLANDC__ v6) -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- CommandManager CommandManager::Instance; diff --git a/src/gdcmCommandManager.h b/src/gdcmCommandManager.h index ff21e0c1..1a581212 100644 --- a/src/gdcmCommandManager.h +++ b/src/gdcmCommandManager.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommandManager.h,v $ Language: C++ - Date: $Date: 2007/03/23 15:30:15 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18:08 $ + 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 @@ -24,7 +24,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class Command; diff --git a/src/gdcmCommon.h b/src/gdcmCommon.h index 64720371..750effac 100644 --- a/src/gdcmCommon.h +++ b/src/gdcmCommon.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommon.h,v $ Language: C++ - Date: $Date: 2007/03/23 15:30:15 $ - Version: $Revision: 1.114 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.115 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -42,7 +42,7 @@ //----------------------------------------------------------------------------- /// \brief namespace for Grass root DiCoM -namespace gdcm +namespace GDCM_NAME_SPACE { // Centralize information about the gdcm dictionary in only one file: diff --git a/src/gdcmDataEntry.cxx b/src/gdcmDataEntry.cxx index 5bdfe968..ecc4b88f 100644 --- a/src/gdcmDataEntry.cxx +++ b/src/gdcmDataEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDataEntry.cxx,v $ Language: C++ - Date: $Date: 2006/07/10 08:27:27 $ - Version: $Revision: 1.41 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.42 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -31,7 +31,7 @@ #include // for isdigit #endif -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- #define MAX_SIZE_PRINT_ELEMENT_VALUE 0x7fffffff @@ -726,7 +726,7 @@ void DataEntry::Print(std::ostream &os, std::string const & ) } else { - s << " [gdcm::too long for print (" << cleanString.length() << ") ]"; + s << " [GDCM_NAME_SPACE::too long for print (" << cleanString.length() << ") ]"; } } else diff --git a/src/gdcmDataEntry.h b/src/gdcmDataEntry.h index 0a891f5e..adcc8235 100644 --- a/src/gdcmDataEntry.h +++ b/src/gdcmDataEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDataEntry.h,v $ Language: C++ - Date: $Date: 2006/07/10 08:27:28 $ - Version: $Revision: 1.15 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.16 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include // for GetDSValue #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmDebug.cxx b/src/gdcmDebug.cxx index 81c5c819..3c712e7a 100644 --- a/src/gdcmDebug.cxx +++ b/src/gdcmDebug.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.cxx,v $ Language: C++ - Date: $Date: 2006/01/03 14:28:53 $ - Version: $Revision: 1.30 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.31 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Warning message level to be displayed diff --git a/src/gdcmDebug.h b/src/gdcmDebug.h index d8a9f3da..4a3240eb 100644 --- a/src/gdcmDebug.h +++ b/src/gdcmDebug.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.h,v $ Language: C++ - Date: $Date: 2006/05/30 08:12:51 $ - Version: $Revision: 1.55 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.56 $ 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 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class CommandManager; @@ -48,7 +48,7 @@ class CommandManager; * * A debugging message is only shown if the flag is on (DebugFlag) * This is static var and can be set at beginning of code: - * gdcm::Debug::SetDebugOn(); + * GDCM_NAME_SPACE::Debug::SetDebugOn(); * * Warning : Warns the user when some oddity occured, and we used an heuristics * to bypass the trouble. @@ -78,7 +78,7 @@ public: /// (used to warn user when file contains some oddity) static void SetDebugFlag (bool flag); /// \brief Gets the debug flag value - static bool GetDebugFlag () {return DebugFlag;} + static bool GetDebugFlag () {return DebugFlag; } /// \brief Sets the Debug Flag to true static void DebugOn () { SetDebugFlag(true); } /// \brief Sets the Debug Flag to false @@ -88,7 +88,7 @@ public: /// log messages are displayed. static void SetLogFlag (bool flag); /// \brief Gets the Log flag value - static bool GetLogFlag () {return LogFlag;} + static bool GetLogFlag () {return LogFlag; } /// \brief Sets the Log Flag to true static void LogOn () { SetLogFlag(true); } /// \brief Sets the Log Flag to false @@ -98,7 +98,7 @@ public: /// warning messages are displayed. static void SetWarningFlag (bool flag); /// \brief Gets the warning flag value - static bool GetWarningFlag () {return WarningFlag;} + static bool GetWarningFlag () {return WarningFlag; } /// \brief Sets the Warning Flag to true static void WarningOn () { SetWarningFlag(true); } /// \brief Sets the Warning Flag to false @@ -170,7 +170,7 @@ private: osmacro << "In " __FILE__ ", line " << __LINE__ \ << ", function " << GDCM_FUNCTION << "\n" \ << adds << msg << "\n\n"; \ - gdcm::Debug::SendToOutput(type,osmacro.str(),obj); \ + GDCM_NAME_SPACE::Debug::SendToOutput(type,osmacro.str(),obj);\ } // ------------------------------------------------------------------------ @@ -195,7 +195,7 @@ private: adds += strerror(errno); \ adds += "\n"; \ } \ - gdcmMessageBodyMacro(gdcm::CMD_DEBUG,obj,msg,adds); \ + gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_DEBUG,obj,msg,adds);\ } \ } #define gdcmDebugMacro(msg) \ @@ -215,7 +215,7 @@ private: #define gdcmLogBodyMacro(obj, msg) \ { \ if( Debug::GetLogFlag() ) \ - gdcmMessageBodyMacro(gdcm::CMD_LOG,obj,msg,""); \ + gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_LOG,obj,msg,"");\ } #define gdcmLogMacro(msg) \ gdcmLogBodyMacro(this,msg) @@ -233,7 +233,7 @@ private: #define gdcmWarningBodyMacro(obj, msg) \ { \ if( Debug::GetWarningFlag() ) \ - gdcmMessageBodyMacro(gdcm::CMD_WARNING,obj,msg,""); \ + gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_WARNING,obj,msg,"");\ } #define gdcmWarningMacro(msg) \ gdcmWarningBodyMacro(this,msg) @@ -251,7 +251,7 @@ private: // -> Rien compris! JPRx #define gdcmErrorBodyMacro(obj, msg) \ { \ - gdcmMessageBodyMacro(gdcm::CMD_ERROR,obj,msg,""); \ + gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_ERROR,obj,msg,"");\ } #define gdcmErrorMacro(msg) \ gdcmErrorBodyMacro(this,msg) @@ -274,7 +274,7 @@ private: { \ if( !(arg) ) \ { \ - gdcmMessageBodyMacro(gdcm::CMD_ASSERT,obj,"",""); \ + gdcmMessageBodyMacro(GDCM_NAME_SPACE::CMD_ASSERT,obj,"","");\ assert ( arg ); \ } \ } diff --git a/src/gdcmDefaultDicts.cxx.in b/src/gdcmDefaultDicts.cxx.in index 9e7b4397..62fdb4e3 100644 --- a/src/gdcmDefaultDicts.cxx.in +++ b/src/gdcmDefaultDicts.cxx.in @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDefaultDicts.cxx.in,v $ Language: C++ - Date: $Date: 2006/04/11 16:03:26 $ - Version: $Revision: 1.12 $ + Date: $Date: 2007/05/23 14:18:08 $ + 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 @@ -26,7 +26,7 @@ #include "gdcmDictGroupName.h" #include "gdcmDicomDirElement.h" -namespace gdcm +namespace GDCM_NAME_SPACE { typedef struct diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index dae78e85..5a6a91c9 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2007/04/12 13:06:03 $ - Version: $Revision: 1.192 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.193 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -102,6 +102,64 @@ // PRIVATE // ENCAP DOC // + +/* + +// see also : ftp://medical.nema.org/medical/dicom/final/cp343_ft.doc + +RELATIONSHIP BETWEEN DIRECTORY RECORDS + +Directory Record Type Directory Record Types which may be included + in the next lower-level directory Entity + +(Root Directory Entity) PATIENT, TOPIC, PRIVATE + +PATIENT STUDY, PRIVATE + +STUDY SERIES, VISIT, RESULTS, STUDY COMPONENT, PRIVATE + +SERIES IMAGE, OVERLAY, MODALITY LUT, VOI LUT, CURVE, + STORED PRINT, RT DOSE, RT STRUCTURE SET, RT PLAN, + RT TREAT RECORD, PRESENTATION, WAVEFORM, SR DOCUMENT, + KEY OBJECT DOC, SPECTROSCOPY, RAW DATA, PRIVATE + +IMAGE PRIVATE +OVERLAY PRIVATE +MODALITY LUT PRIVATE +VOI LUT PRIVATE +CURVE PRIVATE +STORED PRINT PRIVATE +RT DOSE PRIVATE +RT STRUCTURE SET PRIVATE +RT PLAN PRIVATE +RT TREAT RECORD PRIVATE +PRESENTATION PRIVATE +WAVEFORM PRIVATE +SR DOCUMENT PRIVATE +KEY OBJECT DOC PRIVATE +SPECTROSCOPY PRIVATE +RAW DATA PRIVATE + +TOPIC STUDY, SERIES, IMAGE, OVERLAY, MODALITY LUT, VOI LUT, + CURVE, STORED PRINT, RT DOSE, RT STRUCTURE SET, + RT PLAN, RT TREAT RECORD, PRESENTATION, WAVEFORM, + SR DOCUMENT, KEY OBJECT DOC, SPECTROSCOPY, RAW DATA, + PRIVATE + +VISIT PRIVATE + +RESULTS INTERPRETATION, PRIVATE + +INTERPRETATION PRIVATE +STUDY COMPONENT PRIVATE +PRIVATE PRIVATE, (any of the above as privately defined) +MRDR (Not applicable) + +Note : Directory Record Types PRINT QUEUE, FILM SESSION, FILM BOX, and + IMAGE BOX were previously defined in DICOM. They have been retired. + See PS 3.3-1998. +*/ + // ---------------------- // The current gdcm version only deals with : // @@ -116,7 +174,7 @@ // Treelike structure management will have to be upgraded // ---------------------------------------------------------------------------- -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor @@ -609,6 +667,7 @@ void DicomDir::CreateDicomDir() { // The SeqEntries of "Directory Record Sequence" are parsed. // When a DicomDir tag ("PATIENT", "STUDY", "SERIE", "IMAGE") is found : + // N.B. : VISIT, PRIVATE not fully dealt with // 1 - we save the beginning iterator // 2 - we continue to parse // 3 - we find an other tag @@ -726,7 +785,7 @@ void DicomDir::CreateDicomDir() // It was neither a 'PATIENT', nor a 'STUDY', nor a 'SERIE', // nor an 'IMAGE' SQItem. Skip to next item. gdcmWarningMacro( " -------------------------------------------" - << "a non PATIENT/STUDY/SERIE/IMAGE SQItem was found : " + << "a non PATIENT/STUDY/SERIE/IMAGE /VISIT/PRIVATE SQItem was found : " << v); // FIXME : deal with other item types ! diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index cb9145b2..ebe30795 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.h,v $ Language: C++ - Date: $Date: 2007/03/23 15:30:15 $ - Version: $Revision: 1.78 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.79 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class DicomDirPatient; @@ -44,10 +44,14 @@ typedef std::vector VectDocument; //----------------------------------------------------------------------------- /** * \brief DicomDir defines an object representing a DICOMDIR in memory - * as a tree-like structure DicomDirPatient - * -> DicomDirStudy - * -> DicomDirSerie - * -> DicomDirImage + * as a tree-like structure : + * + * ->DicomDirPatient + * -> DicomDirStudy + * -> DicomDirVisit + * -> DicomDirSerie + * -> DicomDirImage + * -> DicomDirPrivate (for Siemens CSA non image) */ class GDCM_EXPORT DicomDir: public Document { @@ -111,7 +115,8 @@ public: GDCM_DICOMDIR_STUDY, GDCM_DICOMDIR_SERIE, GDCM_DICOMDIR_VISIT, - GDCM_DICOMDIR_IMAGE + GDCM_DICOMDIR_IMAGE, + GDCM_DICOMDIR_PRIVATE } DicomDirType; protected: @@ -126,10 +131,10 @@ private: void CreateDicomDir(); bool DoTheLoadingJob(); bool AddPatientToEnd(DicomDirPatient *dd); - bool AddStudyToEnd (DicomDirStudy *dd); - bool AddSerieToEnd (DicomDirSerie *dd); - bool AddVisitToEnd (DicomDirVisit *dd); - bool AddImageToEnd (DicomDirImage *dd); + bool AddStudyToEnd (DicomDirStudy *dd); + bool AddSerieToEnd (DicomDirSerie *dd); + bool AddVisitToEnd (DicomDirVisit *dd); + bool AddImageToEnd (DicomDirImage *dd); bool AddPrivateToEnd(DicomDirPrivate *dd); void SetElements(std::string const &path, VectDocument const &list); diff --git a/src/gdcmDicomDirElement.cxx b/src/gdcmDicomDirElement.cxx index c7ab9cf8..3d5733d5 100644 --- a/src/gdcmDicomDirElement.cxx +++ b/src/gdcmDicomDirElement.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 15:30:15 $ - Version: $Revision: 1.44 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.45 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /// \brief auto generate function, to fill up the default elements for diff --git a/src/gdcmDicomDirElement.h b/src/gdcmDicomDirElement.h index b14be854..bc4a6bd3 100644 --- a/src/gdcmDicomDirElement.h +++ b/src/gdcmDicomDirElement.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.h,v $ Language: C++ - Date: $Date: 2007/03/23 15:30:15 $ - Version: $Revision: 1.39 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.40 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmDicomDirImage.cxx b/src/gdcmDicomDirImage.cxx index 06dde6d5..e13bc891 100644 --- a/src/gdcmDicomDirImage.cxx +++ b/src/gdcmDicomDirImage.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirImage.cxx,v $ Language: C++ - Date: $Date: 2005/10/18 08:35:49 $ - Version: $Revision: 1.24 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.25 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,7 +20,7 @@ #include "gdcmGlobal.h" #include "gdcmDataEntry.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDicomDirImage.h b/src/gdcmDicomDirImage.h index 8f04b09f..32eb8aa2 100644 --- a/src/gdcmDicomDirImage.h +++ b/src/gdcmDicomDirImage.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirImage.h,v $ Language: C++ - Date: $Date: 2005/11/21 09:46:25 $ - Version: $Revision: 1.18 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.19 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmDicomDirObject.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmDicomDirMeta.cxx b/src/gdcmDicomDirMeta.cxx index c19de1aa..8dfdb628 100644 --- a/src/gdcmDicomDirMeta.cxx +++ b/src/gdcmDicomDirMeta.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirMeta.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 15:30:15 $ - Version: $Revision: 1.36 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.37 $ 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 "gdcmUtil.h" #include "gdcmDataEntry.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDicomDirMeta.h b/src/gdcmDicomDirMeta.h index 8fc668ba..dc467107 100644 --- a/src/gdcmDicomDirMeta.h +++ b/src/gdcmDicomDirMeta.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirMeta.h,v $ Language: C++ - Date: $Date: 2005/11/21 09:46:25 $ - Version: $Revision: 1.21 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmDicomDirObject.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmDicomDirObject.cxx b/src/gdcmDicomDirObject.cxx index 4013716b..61f67396 100644 --- a/src/gdcmDicomDirObject.cxx +++ b/src/gdcmDicomDirObject.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirObject.cxx,v $ Language: C++ - Date: $Date: 2006/04/11 16:03:26 $ - Version: $Revision: 1.24 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.25 $ 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 @@ #include "gdcmDictSet.h" #include "gdcmDataEntry.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmDicomDirObject.h b/src/gdcmDicomDirObject.h index 39e4e996..64ce981a 100644 --- a/src/gdcmDicomDirObject.h +++ b/src/gdcmDicomDirObject.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirObject.h,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:33 $ - Version: $Revision: 1.18 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.19 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class DicomDirObject; diff --git a/src/gdcmDicomDirPatient.cxx b/src/gdcmDicomDirPatient.cxx index 4fc33c58..616d182c 100644 --- a/src/gdcmDicomDirPatient.cxx +++ b/src/gdcmDicomDirPatient.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPatient.cxx,v $ Language: C++ - Date: $Date: 2005/11/29 12:48:46 $ - Version: $Revision: 1.40 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.41 $ 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 "gdcmSQItem.h" #include "gdcmDebug.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDicomDirPatient.h b/src/gdcmDicomDirPatient.h index c192970c..74345d8b 100644 --- a/src/gdcmDicomDirPatient.h +++ b/src/gdcmDicomDirPatient.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPatient.h,v $ Language: C++ - Date: $Date: 2005/11/29 12:48:46 $ - Version: $Revision: 1.30 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.31 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmDicomDirObject.h" -namespace gdcm +namespace GDCM_NAME_SPACE { class DicomDirStudy; diff --git a/src/gdcmDicomDirPrivate.cxx b/src/gdcmDicomDirPrivate.cxx index ae7305da..17f659f5 100755 --- a/src/gdcmDicomDirPrivate.cxx +++ b/src/gdcmDicomDirPrivate.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPrivate.cxx,v $ Language: C++ - Date: $Date: 2007/03/26 13:32:54 $ - Version: $Revision: 1.1 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,7 +20,7 @@ #include "gdcmGlobal.h" #include "gdcmDataEntry.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDicomDirPrivate.h b/src/gdcmDicomDirPrivate.h index 11f57a45..69717fa4 100755 --- a/src/gdcmDicomDirPrivate.h +++ b/src/gdcmDicomDirPrivate.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPrivate.h,v $ Language: C++ - Date: $Date: 2007/03/26 13:32:54 $ - Version: $Revision: 1.1 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmDicomDirObject.h" -namespace gdcm +namespace GDCM_NAME_SPACE { /** diff --git a/src/gdcmDicomDirSerie.cxx b/src/gdcmDicomDirSerie.cxx index 9cfc3fb4..97bd2594 100644 --- a/src/gdcmDicomDirSerie.cxx +++ b/src/gdcmDicomDirSerie.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirSerie.cxx,v $ Language: C++ - Date: $Date: 2007/05/23 14:01:44 $ - Version: $Revision: 1.42 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.43 $ 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 "gdcmGlobal.h" #include "gdcmDebug.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor @@ -113,7 +113,6 @@ void DicomDirSerie::ClearPrivate() Privates.clear(); } - /** * \brief Remove all 'Images' in the serie */ @@ -127,6 +126,7 @@ void DicomDirSerie::ClearImage() } Images.clear(); } + /** * \brief Get the first entry while visiting the DicomDirImage * \return The first DicomDirImage if DicomDirserie not empty, otherwhise NULL diff --git a/src/gdcmDicomDirSerie.h b/src/gdcmDicomDirSerie.h index ddbc51af..e1f535ae 100644 --- a/src/gdcmDicomDirSerie.h +++ b/src/gdcmDicomDirSerie.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirSerie.h,v $ Language: C++ - Date: $Date: 2007/03/23 15:30:15 $ - Version: $Revision: 1.33 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.34 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmDicomDirObject.h" -namespace gdcm +namespace GDCM_NAME_SPACE { class DicomDirImage; class DicomDirPrivate; diff --git a/src/gdcmDicomDirStudy.cxx b/src/gdcmDicomDirStudy.cxx index 66c29bcb..0353b078 100644 --- a/src/gdcmDicomDirStudy.cxx +++ b/src/gdcmDicomDirStudy.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.cxx,v $ Language: C++ - Date: $Date: 2005/11/29 12:48:46 $ - Version: $Revision: 1.42 $ + Date: $Date: 2007/05/23 14:18:08 $ + Version: $Revision: 1.43 $ 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 "gdcmDicomDirVisit.h" #include "gdcmDebug.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDicomDirStudy.h b/src/gdcmDicomDirStudy.h index afe52f85..d4a82b5a 100644 --- a/src/gdcmDicomDirStudy.h +++ b/src/gdcmDicomDirStudy.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.h,v $ Language: C++ - Date: $Date: 2005/11/29 12:48:46 $ - Version: $Revision: 1.32 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.33 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmDicomDirObject.h" -namespace gdcm +namespace GDCM_NAME_SPACE { class DicomDirSerie; class DicomDirVisit; diff --git a/src/gdcmDicomDirVisit.cxx b/src/gdcmDicomDirVisit.cxx index 98e9226c..1509d517 100644 --- a/src/gdcmDicomDirVisit.cxx +++ b/src/gdcmDicomDirVisit.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirVisit.cxx,v $ Language: C++ - Date: $Date: 2005/10/18 08:35:49 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/05/23 14:18:09 $ + 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 @@ -20,7 +20,7 @@ #include "gdcmGlobal.h" #include "gdcmDataEntry.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDicomDirVisit.h b/src/gdcmDicomDirVisit.h index 580eb705..b4a925ba 100644 --- a/src/gdcmDicomDirVisit.h +++ b/src/gdcmDicomDirVisit.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirVisit.h,v $ Language: C++ - Date: $Date: 2005/11/21 09:46:25 $ - Version: $Revision: 1.3 $ + Date: $Date: 2007/05/23 14:18:09 $ + 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 @@ -21,7 +21,7 @@ #include "gdcmDicomDirObject.h" -namespace gdcm +namespace GDCM_NAME_SPACE { /** diff --git a/src/gdcmDicomEntry.cxx b/src/gdcmDicomEntry.cxx index 9afd602c..3f466e44 100644 --- a/src/gdcmDicomEntry.cxx +++ b/src/gdcmDicomEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomEntry.cxx,v $ Language: C++ - Date: $Date: 2006/04/11 16:03:26 $ - Version: $Revision: 1.4 $ + Date: $Date: 2007/05/23 14:18:09 $ + 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 @@ -24,7 +24,7 @@ #include //#include // for sprintf -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDicomEntry.h b/src/gdcmDicomEntry.h index 8a3efee6..3fc1bc1e 100644 --- a/src/gdcmDicomEntry.h +++ b/src/gdcmDicomEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomEntry.h,v $ Language: C++ - Date: $Date: 2006/04/13 08:06:56 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/05/23 14:18:09 $ + 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 @@ -24,7 +24,7 @@ #include "gdcmVRKey.h" #include "gdcmTagKey.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmDict.cxx b/src/gdcmDict.cxx index e7bd6e1f..a314a91a 100644 --- a/src/gdcmDict.cxx +++ b/src/gdcmDict.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDict.cxx,v $ Language: C++ - Date: $Date: 2007/04/12 13:22:49 $ - Version: $Revision: 1.86 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.87 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /// \brief auto generated function, to fill up the Dicom Dictionnary, diff --git a/src/gdcmDict.h b/src/gdcmDict.h index 0e86bedf..a1e72aad 100644 --- a/src/gdcmDict.h +++ b/src/gdcmDict.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDict.h,v $ Language: C++ - Date: $Date: 2006/04/11 16:03:26 $ - Version: $Revision: 1.49 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.50 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,7 +27,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmDictEntry.cxx b/src/gdcmDictEntry.cxx index b348b39e..3b67a2a9 100644 --- a/src/gdcmDictEntry.cxx +++ b/src/gdcmDictEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictEntry.cxx,v $ Language: C++ - Date: $Date: 2006/02/16 20:06:13 $ - Version: $Revision: 1.60 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.61 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include #include // for sprintf -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDictEntry.h b/src/gdcmDictEntry.h index b3e6ffa7..4e6484c8 100644 --- a/src/gdcmDictEntry.h +++ b/src/gdcmDictEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictEntry.h,v $ Language: C++ - Date: $Date: 2005/11/29 17:21:34 $ - Version: $Revision: 1.44 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.45 $ 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 "gdcmTagKey.h" #include "gdcmVRKey.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class VRKey; diff --git a/src/gdcmDictGroupName.cxx b/src/gdcmDictGroupName.cxx index db791bd7..bc6477d8 100644 --- a/src/gdcmDictGroupName.cxx +++ b/src/gdcmDictGroupName.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictGroupName.cxx,v $ Language: C++ - Date: $Date: 2005/11/21 09:46:25 $ - Version: $Revision: 1.7 $ + Date: $Date: 2007/05/23 14:18:09 $ + 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 @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /// \brief auto generated function, to fill up the 'Group Name' diff --git a/src/gdcmDictGroupName.h b/src/gdcmDictGroupName.h index bb0d7cc5..230bf0fb 100644 --- a/src/gdcmDictGroupName.h +++ b/src/gdcmDictGroupName.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictGroupName.h,v $ Language: C++ - Date: $Date: 2005/11/28 16:31:23 $ - Version: $Revision: 1.8 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.9 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index 218acc65..b173a088 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictSet.cxx,v $ Language: C++ - Date: $Date: 2006/05/12 19:09:55 $ - Version: $Revision: 1.77 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.78 $ 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 // For getenv #include // For sprintf -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmDictSet.h b/src/gdcmDictSet.h index 0638e7b7..3c196d9c 100644 --- a/src/gdcmDictSet.h +++ b/src/gdcmDictSet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictSet.h,v $ Language: C++ - Date: $Date: 2006/03/22 13:19:25 $ - Version: $Revision: 1.53 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.54 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -26,7 +26,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- typedef std::map DictSetHT; diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index badef729..d881e59f 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDirList.cxx,v $ Language: C++ - Date: $Date: 2006/11/15 15:53:08 $ - Version: $Revision: 1.60 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.61 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,7 +33,7 @@ #include #endif -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDirList.h b/src/gdcmDirList.h index 2362a8e5..9891970c 100644 --- a/src/gdcmDirList.h +++ b/src/gdcmDirList.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDirList.h,v $ Language: C++ - Date: $Date: 2006/11/15 15:53:08 $ - Version: $Revision: 1.32 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.33 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { typedef std::vector DirListType; diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index 14a8a81d..3a0ec998 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2007/02/23 15:29:56 $ - Version: $Revision: 1.87 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.88 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,7 +27,7 @@ #include // for std::ios::left, ... #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmDocEntry.h b/src/gdcmDocEntry.h index 2534f3fa..ba4dda21 100644 --- a/src/gdcmDocEntry.h +++ b/src/gdcmDocEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.h,v $ Language: C++ - Date: $Date: 2006/07/06 16:57:06 $ - Version: $Revision: 1.66 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.67 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { class File; class SeqEntry; diff --git a/src/gdcmDocEntryArchive.cxx b/src/gdcmDocEntryArchive.cxx index b8bb023b..d3213c26 100644 --- a/src/gdcmDocEntryArchive.cxx +++ b/src/gdcmDocEntryArchive.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntryArchive.cxx,v $ Language: C++ - Date: $Date: 2006/04/11 16:03:26 $ - Version: $Revision: 1.18 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.19 $ 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 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDocEntryArchive.h b/src/gdcmDocEntryArchive.h index eabf6d7c..f6afee14 100644 --- a/src/gdcmDocEntryArchive.h +++ b/src/gdcmDocEntryArchive.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntryArchive.h,v $ Language: C++ - Date: $Date: 2005/11/18 11:54:01 $ - Version: $Revision: 1.9 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmFile.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmDocEntrySet.cxx b/src/gdcmDocEntrySet.cxx index dd21173d..46f4434b 100644 --- a/src/gdcmDocEntrySet.cxx +++ b/src/gdcmDocEntrySet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.cxx,v $ Language: C++ - Date: $Date: 2007/04/12 13:22:49 $ - Version: $Revision: 1.73 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.74 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -31,7 +31,7 @@ #include // for memset #endif -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmDocEntrySet.h b/src/gdcmDocEntrySet.h index a9c98e42..73b3ca98 100644 --- a/src/gdcmDocEntrySet.h +++ b/src/gdcmDocEntrySet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.h,v $ Language: C++ - Date: $Date: 2006/04/11 16:03:26 $ - Version: $Revision: 1.68 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.69 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class DocEntry; diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 1c50ab55..c2754559 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2007/04/12 13:22:49 $ - Version: $Revision: 1.357 $ + Date: $Date: 2007/05/23 14:18:09 $ + Version: $Revision: 1.358 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -37,7 +37,7 @@ #include // for memset #endif -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- @@ -244,7 +244,7 @@ bool Document::DoTheLoadingDocumentJob( ) // Force Loading some more elements if user asked to. - gdcm::DocEntry *d; + GDCM_NAME_SPACE::DocEntry *d; for (ListElements::iterator it = UserForceLoadList.begin(); it != UserForceLoadList.end(); ++it) diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index 243f2f45..ae6ce9ac 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.h,v $ Language: C++ - Date: $Date: 2006/07/10 09:41:46 $ - Version: $Revision: 1.142 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.143 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -30,7 +30,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { class SeqEntry; class Dict; diff --git a/src/gdcmElementSet.cxx b/src/gdcmElementSet.cxx index bf35f1f3..ecac10b2 100644 --- a/src/gdcmElementSet.cxx +++ b/src/gdcmElementSet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmElementSet.cxx,v $ Language: C++ - Date: $Date: 2007/03/23 15:05:11 $ - Version: $Revision: 1.75 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.76 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmSeqEntry.h" #include "gdcmDataEntry.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmElementSet.h b/src/gdcmElementSet.h index ccf78090..ec9b90cd 100644 --- a/src/gdcmElementSet.h +++ b/src/gdcmElementSet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmElementSet.h,v $ Language: C++ - Date: $Date: 2006/01/31 11:39:47 $ - Version: $Revision: 1.54 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.55 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { typedef std::map TagDocEntryHT; diff --git a/src/gdcmException.cxx b/src/gdcmException.cxx index e0ebbb8d..1e5ccb17 100644 --- a/src/gdcmException.cxx +++ b/src/gdcmException.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmException.cxx,v $ Language: C++ - Date: $Date: 2005/07/02 18:09:36 $ - Version: $Revision: 1.28 $ + Date: $Date: 2007/05/23 14:18:10 $ + 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 @@ -21,7 +21,7 @@ #include #include // for exit -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Exception diff --git a/src/gdcmException.h b/src/gdcmException.h index 3b5c7d2e..0565e487 100644 --- a/src/gdcmException.h +++ b/src/gdcmException.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmException.h,v $ Language: C++ - Date: $Date: 2005/09/02 07:10:03 $ - Version: $Revision: 1.23 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index da9c7a8c..576f5e89 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.cxx,v $ Language: C++ - Date: $Date: 2007/04/12 13:22:49 $ - Version: $Revision: 1.329 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.330 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -101,7 +101,7 @@ #include //sscanf #include // for atoi -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- @@ -1636,7 +1636,7 @@ void File::AnonymizeNoLoad() { std::fstream *fp = new std::fstream(Filename.c_str(), std::ios::in | std::ios::out | std::ios::binary); - gdcm::DocEntry *d; + GDCM_NAME_SPACE::DocEntry *d; uint32_t offset; uint32_t lgth; uint32_t valLgth = 0; @@ -1715,7 +1715,7 @@ bool File::AnonymizeFile() } else { - gdcm::DocEntry *d; + GDCM_NAME_SPACE::DocEntry *d; for (ListElements::iterator it = UserAnonymizeList.begin(); it != UserAnonymizeList.end(); ++it) diff --git a/src/gdcmFile.h b/src/gdcmFile.h index 1eb3efc2..68a29fd3 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.h,v $ Language: C++ - Date: $Date: 2006/11/15 15:54:15 $ - Version: $Revision: 1.130 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.131 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include "gdcmTagKey.h" -namespace gdcm +namespace GDCM_NAME_SPACE { class RLEFramesInfo; diff --git a/src/gdcmFileHelper.cxx b/src/gdcmFileHelper.cxx index 70034af2..4cb22d52 100644 --- a/src/gdcmFileHelper.cxx +++ b/src/gdcmFileHelper.cxx @@ -4,8 +4,8 @@ Module: $RCSfile: gdcmFileHelper.cxx,v $ Language: C++ - Date: $Date: 2007/04/12 13:22:49 $ - Version: $Revision: 1.111 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.112 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -117,7 +117,7 @@ fh1->Write(newFileName); -namespace gdcm +namespace GDCM_NAME_SPACE { typedef std::map GroupHT; // Hash Table //------------------------------------------------------------------------- @@ -1764,7 +1764,7 @@ is only from (0020,0030) and (0020,0035) // Patient Orientation // Can be computed from (0020|0037) : Image Orientation (Patient) - gdcm::Orientation *o = gdcm::Orientation::New(); + GDCM_NAME_SPACE::Orientation *o = GDCM_NAME_SPACE::Orientation::New(); std::string ori = o->GetOrientation ( FileInternal ); o->Delete(); if (ori != "\\" && ori != GDCM_UNFOUND) diff --git a/src/gdcmFileHelper.h b/src/gdcmFileHelper.h index 34b0c7a3..e0ae6b34 100644 --- a/src/gdcmFileHelper.h +++ b/src/gdcmFileHelper.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFileHelper.h,v $ Language: C++ - Date: $Date: 2006/07/06 12:38:06 $ - Version: $Revision: 1.46 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.47 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include "gdcmVRKey.h" #include "gdcmFile.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //class File; class DataEntry; diff --git a/src/gdcmGlobal.cxx b/src/gdcmGlobal.cxx index bf364f99..2f523fc2 100644 --- a/src/gdcmGlobal.cxx +++ b/src/gdcmGlobal.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.cxx,v $ Language: C++ - Date: $Date: 2006/07/06 15:08:10 $ - Version: $Revision: 1.33 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.34 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include "gdcmDictSet.h" #include "gdcmDicomDirElement.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /// \brief Those global string that are returned by reference everywhere in diff --git a/src/gdcmGlobal.h b/src/gdcmGlobal.h index 262bf077..8b1ca815 100644 --- a/src/gdcmGlobal.h +++ b/src/gdcmGlobal.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.h,v $ Language: C++ - Date: $Date: 2007/03/23 15:05:10 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/05/23 14:18:10 $ + 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 @@ -21,7 +21,7 @@ #include "gdcmCommon.h" -namespace gdcm +namespace GDCM_NAME_SPACE { class DictSet; class VR; diff --git a/src/gdcmJPEGFragment.cxx b/src/gdcmJPEGFragment.cxx index 709d4a54..f7f1f1df 100644 --- a/src/gdcmJPEGFragment.cxx +++ b/src/gdcmJPEGFragment.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragment.cxx,v $ Language: C++ - Date: $Date: 2005/11/28 17:24:21 $ - Version: $Revision: 1.17 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.18 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -19,7 +19,7 @@ #include "gdcmJPEGFragment.h" #include "gdcmDebug.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- // For JPEG 2000, body in file gdcmJpeg2000.cxx diff --git a/src/gdcmJPEGFragment.h b/src/gdcmJPEGFragment.h index 18cd2a01..ea16b361 100644 --- a/src/gdcmJPEGFragment.h +++ b/src/gdcmJPEGFragment.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragment.h,v $ Language: C++ - Date: $Date: 2005/11/28 17:24:21 $ - Version: $Revision: 1.20 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.21 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { /** * \brief *very* internal class . Shouldn't appear here ! diff --git a/src/gdcmJPEGFragmentsInfo.cxx b/src/gdcmJPEGFragmentsInfo.cxx index ccf920b2..3102c4f3 100644 --- a/src/gdcmJPEGFragmentsInfo.cxx +++ b/src/gdcmJPEGFragmentsInfo.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragmentsInfo.cxx,v $ Language: C++ - Date: $Date: 2005/11/28 16:50:32 $ - Version: $Revision: 1.20 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.21 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmJPEGFragmentsInfo.h b/src/gdcmJPEGFragmentsInfo.h index a34c6ff0..ad796939 100644 --- a/src/gdcmJPEGFragmentsInfo.h +++ b/src/gdcmJPEGFragmentsInfo.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragmentsInfo.h,v $ Language: C++ - Date: $Date: 2005/11/18 14:49:15 $ - Version: $Revision: 1.21 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { /** * \brief Utility class for gathering the informations of the collection diff --git a/src/gdcmJpeg.cxx b/src/gdcmJpeg.cxx index 76dfaa07..eb6597fa 100644 --- a/src/gdcmJpeg.cxx +++ b/src/gdcmJpeg.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJpeg.cxx,v $ Language: C++ - Date: $Date: 2006/01/27 10:01:34 $ - Version: $Revision: 1.55 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.56 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -47,7 +47,7 @@ #include "jdatasrc.cxx" #include "jdatadst.cxx" -namespace gdcm +namespace GDCM_NAME_SPACE { /** diff --git a/src/gdcmJpeg2000.cxx b/src/gdcmJpeg2000.cxx index 4224f1a7..ed0f09f2 100644 --- a/src/gdcmJpeg2000.cxx +++ b/src/gdcmJpeg2000.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJpeg2000.cxx,v $ Language: C++ - Date: $Date: 2006/05/15 15:24:43 $ - Version: $Revision: 1.42 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.43 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -48,7 +48,7 @@ void info_callback(const char *msg, void *) { } } -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmJpegLS.cxx b/src/gdcmJpegLS.cxx index d43ac7f4..b8427818 100644 --- a/src/gdcmJpegLS.cxx +++ b/src/gdcmJpegLS.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJpegLS.cxx,v $ Language: C++ - Date: $Date: 2005/05/24 09:11:44 $ - Version: $Revision: 1.5 $ + Date: $Date: 2007/05/23 14:18:10 $ + 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 @@ -21,7 +21,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmMpeg.cxx b/src/gdcmMpeg.cxx index 301ba84f..9480b5f5 100644 --- a/src/gdcmMpeg.cxx +++ b/src/gdcmMpeg.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmMpeg.cxx,v $ Language: C++ - Date: $Date: 2006/05/30 08:19:25 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:10 $ + 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 @@ -62,7 +62,7 @@ int my_close(istream *infile) return 0; } -namespace gdcm +namespace GDCM_NAME_SPACE { static int Headers(); diff --git a/src/gdcmOrientation.cxx b/src/gdcmOrientation.cxx index c22325d8..5340edeb 100644 --- a/src/gdcmOrientation.cxx +++ b/src/gdcmOrientation.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmOrientation.cxx,v $ Language: C++ - Date: $Date: 2006/11/15 15:54:15 $ - Version: $Revision: 1.24 $ + Date: $Date: 2007/05/23 14:18:10 $ + Version: $Revision: 1.25 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,7 +21,7 @@ #include "gdcmDebug.h" #include // for sqrt -namespace gdcm +namespace GDCM_NAME_SPACE { //-------------------------------------------------------------------- // THERALYS Algorithm to determine the most similar basic orientation diff --git a/src/gdcmOrientation.h b/src/gdcmOrientation.h index 0692d9d5..e5382386 100644 --- a/src/gdcmOrientation.h +++ b/src/gdcmOrientation.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmOrientation.h,v $ Language: C++ - Date: $Date: 2006/02/16 20:06:14 $ - Version: $Revision: 1.18 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.19 $ 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 @@ #include "gdcmRefCounter.h" #include -namespace gdcm +namespace GDCM_NAME_SPACE { typedef struct { diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index 858894d6..2a80ca64 100644 --- a/src/gdcmPixelReadConvert.cxx +++ b/src/gdcmPixelReadConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.cxx,v $ Language: C++ - Date: $Date: 2006/08/30 13:31:05 $ - Version: $Revision: 1.114 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.115 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -32,7 +32,7 @@ #include // for memset #endif -namespace gdcm +namespace GDCM_NAME_SPACE { //bool ReadMPEGFile (std::ifstream *fp, char *inputdata, size_t lenght); diff --git a/src/gdcmPixelReadConvert.h b/src/gdcmPixelReadConvert.h index 196b9649..5d363b9d 100644 --- a/src/gdcmPixelReadConvert.h +++ b/src/gdcmPixelReadConvert.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.h,v $ Language: C++ - Date: $Date: 2006/03/29 16:09:48 $ - Version: $Revision: 1.30 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.31 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,7 +27,7 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { class File; class RLEFramesInfo; diff --git a/src/gdcmPixelWriteConvert.cxx b/src/gdcmPixelWriteConvert.cxx index 9258fc14..8002dd42 100644 --- a/src/gdcmPixelWriteConvert.cxx +++ b/src/gdcmPixelWriteConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelWriteConvert.cxx,v $ Language: C++ - Date: $Date: 2005/10/23 15:09:19 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/05/23 14:18:11 $ + 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 @@ -19,7 +19,7 @@ #include "gdcmDebug.h" #include "gdcmPixelWriteConvert.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmPixelWriteConvert.h b/src/gdcmPixelWriteConvert.h index 01c20c2a..59ddb914 100644 --- a/src/gdcmPixelWriteConvert.h +++ b/src/gdcmPixelWriteConvert.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelWriteConvert.h,v $ Language: C++ - Date: $Date: 2006/02/16 20:06:15 $ - Version: $Revision: 1.8 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.9 $ 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 "gdcmCommon.h" #include "gdcmBase.h" -namespace gdcm +namespace GDCM_NAME_SPACE { /** * \brief Utility container for gathering the various forms the pixel data diff --git a/src/gdcmRLEFrame.cxx b/src/gdcmRLEFrame.cxx index a3330bb2..d22e21fd 100644 --- a/src/gdcmRLEFrame.cxx +++ b/src/gdcmRLEFrame.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFrame.cxx,v $ Language: C++ - Date: $Date: 2005/11/28 17:24:21 $ - Version: $Revision: 1.12 $ + Date: $Date: 2007/05/23 14:18:11 $ + 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 @@ -19,7 +19,7 @@ #include "gdcmRLEFrame.h" #include "gdcmDebug.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmRLEFrame.h b/src/gdcmRLEFrame.h index f265b713..0a09a007 100644 --- a/src/gdcmRLEFrame.h +++ b/src/gdcmRLEFrame.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFrame.h,v $ Language: C++ - Date: $Date: 2006/02/16 20:06:15 $ - Version: $Revision: 1.20 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.21 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { /** * \brief Utility class for summerizing the informations of a SINGLE RLE diff --git a/src/gdcmRLEFramesInfo.cxx b/src/gdcmRLEFramesInfo.cxx index a4d37edd..189596db 100644 --- a/src/gdcmRLEFramesInfo.cxx +++ b/src/gdcmRLEFramesInfo.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFramesInfo.cxx,v $ Language: C++ - Date: $Date: 2006/03/29 16:09:48 $ - Version: $Revision: 1.21 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include // for memset #endif -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmRLEFramesInfo.h b/src/gdcmRLEFramesInfo.h index d4280bd2..2c66578c 100644 --- a/src/gdcmRLEFramesInfo.h +++ b/src/gdcmRLEFramesInfo.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFramesInfo.h,v $ Language: C++ - Date: $Date: 2006/03/29 16:09:48 $ - Version: $Revision: 1.22 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.23 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { /** * \brief Utility class for gathering the informations of the collection diff --git a/src/gdcmRefCounter.cxx b/src/gdcmRefCounter.cxx index 0af71e96..8e1613c7 100644 --- a/src/gdcmRefCounter.cxx +++ b/src/gdcmRefCounter.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRefCounter.cxx,v $ Language: C++ - Date: $Date: 2005/10/20 15:24:10 $ - Version: $Revision: 1.1 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -18,7 +18,7 @@ #include "gdcmRefCounter.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmRefCounter.h b/src/gdcmRefCounter.h index bb036b7f..d528b7b8 100644 --- a/src/gdcmRefCounter.h +++ b/src/gdcmRefCounter.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRefCounter.h,v $ Language: C++ - Date: $Date: 2006/04/11 16:03:26 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:11 $ + 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 @@ -23,7 +23,7 @@ //#include "gdcmDebug.h" #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /** diff --git a/src/gdcmSQItem.cxx b/src/gdcmSQItem.cxx index f4f2a766..a945413b 100644 --- a/src/gdcmSQItem.cxx +++ b/src/gdcmSQItem.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSQItem.cxx,v $ Language: C++ - Date: $Date: 2006/02/16 20:06:15 $ - Version: $Revision: 1.84 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.85 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmSQItem.h b/src/gdcmSQItem.h index 8d4e81c7..147643e5 100644 --- a/src/gdcmSQItem.h +++ b/src/gdcmSQItem.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSQItem.h,v $ Language: C++ - Date: $Date: 2006/02/16 20:06:15 $ - Version: $Revision: 1.51 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.52 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { class DocEntry; diff --git a/src/gdcmSeqEntry.cxx b/src/gdcmSeqEntry.cxx index def82df6..684d444d 100644 --- a/src/gdcmSeqEntry.cxx +++ b/src/gdcmSeqEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSeqEntry.cxx,v $ Language: C++ - Date: $Date: 2006/04/13 08:05:52 $ - Version: $Revision: 1.67 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.68 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,7 +27,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor diff --git a/src/gdcmSeqEntry.h b/src/gdcmSeqEntry.h index 386eab32..778858c6 100644 --- a/src/gdcmSeqEntry.h +++ b/src/gdcmSeqEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSeqEntry.h,v $ Language: C++ - Date: $Date: 2006/04/13 08:05:52 $ - Version: $Revision: 1.42 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.43 $ 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 -namespace gdcm +namespace GDCM_NAME_SPACE { class SQItem; //----------------------------------------------------------------------------- diff --git a/src/gdcmSerieHelper.cxx b/src/gdcmSerieHelper.cxx index d16d5263..a16c8d05 100644 --- a/src/gdcmSerieHelper.cxx +++ b/src/gdcmSerieHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHelper.cxx,v $ Language: C++ - Date: $Date: 2006/05/30 08:10:19 $ - Version: $Revision: 1.53 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.54 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -29,7 +29,7 @@ #include #include //for sscanf -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- @@ -63,8 +63,8 @@ void SerieHelper::ClearAll() FileList *l = GetFirstSingleSerieUIDFileSet(); while (l) { - // For all the gdcm::File of a File set - for (gdcm::FileList::iterator it = l->begin(); + // For all the GDCM_NAME_SPACE::File of a File set + for (GDCM_NAME_SPACE::FileList::iterator it = l->begin(); it != l->end(); ++it) { @@ -84,7 +84,7 @@ void SerieHelper::ClearAll() // Public /** - * \brief add a gdcm::File to the Fileset corresponding to its Serie UID + * \brief add a GDCM_NAME_SPACE::File to the Fileset corresponding to its Serie UID * @param filename Name of the file to deal with */ void SerieHelper::AddFileName(std::string const &filename) @@ -111,10 +111,10 @@ void SerieHelper::AddFileName(std::string const &filename) } /** - * \brief add a gdcm::File to the first (and supposed to be unique) file set - * of the gdcm::SerieHelper. + * \brief add a GDCM_NAME_SPACE::File to the first (and supposed to be unique) file set + * of the GDCM_NAME_SPACE::SerieHelper. * \warning : this method should be used by aware users only! - * Passing a gdcm::File* has the same effect than passing a file name! + * Passing a GDCM_NAME_SPACE::File* has the same effect than passing a file name! * \todo : decide which one is wrong (the method, or the commentary)! * the following comment doesn't match the method :-( * User is supposed to know the files he want to deal with @@ -126,7 +126,7 @@ void SerieHelper::AddFileName(std::string const &filename) * vtkGdcmReader parsing twice the same files. * *no* coherence check is performed, but those specified * by SerieHelper::AddRestriction() - * @param header gdcm::File* of the file to deal with + * @param header GDCM_NAME_SPACE::File* of the file to deal with * @return true if file was added, false if file was rejected */ bool SerieHelper::AddFile(File *header) @@ -857,7 +857,7 @@ bool SerieHelper::UserOrdering(FileList *fileList) */ void SerieHelper::Print(std::ostream &os, std::string const &indent) { - // For all the Coherent File lists of the gdcm::Serie + // For all the Coherent File lists of the GDCM_NAME_SPACE::Serie SingleSerieUIDFileSetmap::iterator itl = SingleSerieUIDFileSetHT.begin(); if ( itl == SingleSerieUIDFileSetHT.end() ) { @@ -918,7 +918,7 @@ void SerieHelper::CreateDefaultUniqueSeriesIdentifier() * (he knows more than we do about his images!) * ex : in tagging series, the only pertnent tag is * 0018|1312 [In-plane Phase Encoding Direction] value : ROW/COLUMN - * @param inFile gdcm::File we want to build a Serie Identifier for. + * @param inFile GDCM_NAME_SPACE::File we want to build a Serie Identifier for. * @return the SeriesIdentifier */ std::string SerieHelper::CreateUniqueSeriesIdentifier( File *inFile ) @@ -936,7 +936,7 @@ std::string SerieHelper::CreateUniqueSeriesIdentifier( File *inFile ) { const ExRule &r = *it2; std::string s = inFile->GetEntryString( r.group, r.elem ); - if( s == gdcm::GDCM_UNFOUND ) + if( s == GDCM_NAME_SPACE::GDCM_UNFOUND ) { s = ""; } @@ -965,7 +965,7 @@ std::string SerieHelper::CreateUniqueSeriesIdentifier( File *inFile ) else // Could not open inFile { gdcmWarningMacro("Could not parse series info."); - std::string id = gdcm::GDCM_UNFOUND; + std::string id = GDCM_NAME_SPACE::GDCM_UNFOUND; return id; } } diff --git a/src/gdcmSerieHelper.h b/src/gdcmSerieHelper.h index 14a13df0..363970f7 100644 --- a/src/gdcmSerieHelper.h +++ b/src/gdcmSerieHelper.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHelper.h,v $ Language: C++ - Date: $Date: 2006/05/30 08:10:19 $ - Version: $Revision: 1.41 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.42 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,7 +27,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { class File; diff --git a/src/gdcmTS.cxx b/src/gdcmTS.cxx index d10f6630..d3751af0 100644 --- a/src/gdcmTS.cxx +++ b/src/gdcmTS.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmTS.cxx,v $ Language: C++ - Date: $Date: 2006/06/08 13:37:33 $ - Version: $Revision: 1.54 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.55 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -36,7 +36,7 @@ // PrintFile debug filein=... // and fix the bugs -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /// \brief Transfer Syntaxes gdcm deals with (internal use only) diff --git a/src/gdcmTS.h b/src/gdcmTS.h index 773a8ff6..87c13913 100644 --- a/src/gdcmTS.h +++ b/src/gdcmTS.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmTS.h,v $ Language: C++ - Date: $Date: 2006/06/08 13:37:33 $ - Version: $Revision: 1.28 $ + Date: $Date: 2007/05/23 14:18:11 $ + 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 @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- typedef std::string TSKey; diff --git a/src/gdcmTagKey.h b/src/gdcmTagKey.h index d569db44..168b03dd 100644 --- a/src/gdcmTagKey.h +++ b/src/gdcmTagKey.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmTagKey.h,v $ Language: C++ - Date: $Date: 2006/04/11 16:03:26 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/05/23 14:18:11 $ + 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 @@ -26,7 +26,7 @@ #include // for std::ios::left, ... #include // for ugly sprintf -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class TagKey diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 2d06382d..23106dc7 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2006/11/08 17:04:32 $ - Version: $Revision: 1.186 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.187 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -92,7 +92,7 @@ #include #endif -namespace gdcm +namespace GDCM_NAME_SPACE { //------------------------------------------------------------------------- const std::string Util::GDCM_UID = "1.2.826.0.1.3680043.2.1143"; @@ -1247,7 +1247,7 @@ void Util::hfpswap(double *a, double *b) ghost@aladdin.com */ -/* $Id: gdcmUtil.cxx,v 1.186 2006/11/08 17:04:32 jpr Exp $ */ +/* $Id: gdcmUtil.cxx,v 1.187 2007/05/23 14:18:11 jpr Exp $ */ /* Independent implementation of MD5 (RFC 1321). diff --git a/src/gdcmUtil.h b/src/gdcmUtil.h index 080ba223..e1f823e8 100644 --- a/src/gdcmUtil.h +++ b/src/gdcmUtil.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.h,v $ Language: C++ - Date: $Date: 2006/05/31 16:09:29 $ - Version: $Revision: 1.67 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.68 $ 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 #include -namespace gdcm +namespace GDCM_NAME_SPACE { /** * \brief Here are some utility functions, belonging to the gdcm::Util class, @@ -149,7 +149,7 @@ private: ghost@aladdin.com */ -/* $Id: gdcmUtil.h,v 1.67 2006/05/31 16:09:29 jpr Exp $ */ +/* $Id: gdcmUtil.h,v 1.68 2007/05/23 14:18:11 jpr Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose diff --git a/src/gdcmVR.cxx b/src/gdcmVR.cxx index 3a7cd294..48f53b35 100644 --- a/src/gdcmVR.cxx +++ b/src/gdcmVR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmVR.cxx,v $ Language: C++ - Date: $Date: 2006/08/18 18:34:57 $ - Version: $Revision: 1.54 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.55 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- /// \brief auto generated function, to fill up the 'Value Representation' diff --git a/src/gdcmVR.h b/src/gdcmVR.h index 5f6da95c..b187b30f 100644 --- a/src/gdcmVR.h +++ b/src/gdcmVR.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmVR.h,v $ Language: C++ - Date: $Date: 2006/08/18 16:11:36 $ - Version: $Revision: 1.31 $ + Date: $Date: 2007/05/23 14:18:12 $ + Version: $Revision: 1.32 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -26,7 +26,7 @@ #include #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- diff --git a/src/gdcmVRKey.h b/src/gdcmVRKey.h index 069cbe35..31221e29 100644 --- a/src/gdcmVRKey.h +++ b/src/gdcmVRKey.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmVRKey.h,v $ Language: C++ - Date: $Date: 2006/05/15 14:47:13 $ - Version: $Revision: 1.6 $ + Date: $Date: 2007/05/23 14:18:12 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,7 @@ #include // important #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- class VRKey diff --git a/src/gdcmValidator.cxx b/src/gdcmValidator.cxx index ff1b532f..98f79252 100644 --- a/src/gdcmValidator.cxx +++ b/src/gdcmValidator.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValidator.cxx,v $ Language: C++ - Date: $Date: 2006/02/16 20:06:15 $ - Version: $Revision: 1.14 $ + Date: $Date: 2007/05/23 14:18:12 $ + 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,7 +24,7 @@ #include -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- typedef std::map GroupHT; // Hash Table @@ -96,7 +96,7 @@ DocEntry *d; { if ( DataEntry *v = dynamic_cast(d) ) { - if ( v->GetVM() != gdcm::GDCM_UNKNOWN ) + if ( v->GetVM() != GDCM_NAME_SPACE::GDCM_UNKNOWN ) if ( !CheckVM(v) ) { if (v->GetVM() == "FIXME" ) diff --git a/src/gdcmValidator.h b/src/gdcmValidator.h index a5930876..e63b1e93 100644 --- a/src/gdcmValidator.h +++ b/src/gdcmValidator.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValidator.h,v $ Language: C++ - Date: $Date: 2005/11/28 16:31:24 $ - Version: $Revision: 1.5 $ + Date: $Date: 2007/05/23 14:18:12 $ + 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 @@ -21,7 +21,7 @@ #include "gdcmRefCounter.h" -namespace gdcm +namespace GDCM_NAME_SPACE { /** * \brief Class to perform some verifications on a gdcm::Document diff --git a/src/gdcmjpegls/Decoder/gdcmfstream.cxx b/src/gdcmjpegls/Decoder/gdcmfstream.cxx index 83cd2e53..9724f86a 100644 --- a/src/gdcmjpegls/Decoder/gdcmfstream.cxx +++ b/src/gdcmjpegls/Decoder/gdcmfstream.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmfstream.cxx,v $ Language: C++ - Date: $Date: 2005/06/13 00:22:14 $ - Version: $Revision: 1.1 $ + Date: $Date: 2007/05/23 14:18:13 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -19,7 +19,7 @@ #include "gdcmfstream.h" #include -namespace gdcm { +namespace GDCM_NAME_SPACE { ifstream::ifstream(const char* filename,openmode mode) diff --git a/src/gdcmjpegls/Decoder/gdcmfstream.h b/src/gdcmjpegls/Decoder/gdcmfstream.h index 3a332a2d..8f2a520b 100644 --- a/src/gdcmjpegls/Decoder/gdcmfstream.h +++ b/src/gdcmjpegls/Decoder/gdcmfstream.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmfstream.h,v $ Language: C++ - Date: $Date: 2005/06/13 00:22:14 $ - Version: $Revision: 1.1 $ + Date: $Date: 2007/05/23 14:18:14 $ + Version: $Revision: 1.2 $ 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 @@ #include #include -namespace gdcm { +namespace GDCM_NAME_SPACE { class ifstream : public std::ifstream { diff --git a/src/jdatasrc.cxx b/src/jdatasrc.cxx index bf658ef1..cfb526ab 100644 --- a/src/jdatasrc.cxx +++ b/src/jdatasrc.cxx @@ -31,7 +31,7 @@ typedef struct { JOCTET * buffer; /* start of buffer */ boolean start_of_file; /* have we gotten any data yet? */ - gdcm::JPEGFragment *frag; + GDCM_NAME_SPACE::JPEGFragment *frag; size_t bytes_read; } my_source_mgr; @@ -198,7 +198,7 @@ term_source (j_decompress_ptr cinfo) */ GLOBAL(void) -jpeg_stdio_src (j_decompress_ptr cinfo, std::istream * infile, gdcm::JPEGFragment *frag, int flag) +jpeg_stdio_src (j_decompress_ptr cinfo, std::istream * infile, GDCM_NAME_SPACE::JPEGFragment *frag, int flag) { my_src_ptr src;