From ba78e6c6d47d6db1528e8e88e5ebde7296a26692 Mon Sep 17 00:00:00 2001 From: malaterre Date: Fri, 3 Dec 2004 20:16:55 +0000 Subject: [PATCH] ENH: * Huge cleanup: - Remove printf / sprintf - include iostream AFTER gdcm so we don't get warnings - GDCM_NO_ANSI_STRING_STREAM shouldn't be used explitely ouside of gdcm source - Also remove tons of include from header files, hopefully this should speeup the compilation time, since it was becoming a dog slow. - Remove gdcm.h as it include way too many files and slow down compilation (plus it is not up to date) - remove /using namespace std/ this is BAD --- ChangeLog | 9 +++ Example/BuildUpDicomDir.cxx | 38 ++-------- Example/CMakeLists.txt | 3 + Example/FindTags.cxx | 39 +++++----- Example/FlatHashTablePrint.cxx | 5 +- Example/PrintDicomDir.cxx | 16 ++-- Example/PrintDocument.cxx | 7 +- Example/PrintFile.cxx | 8 +- Example/PrintHeader.cxx | 6 +- Example/TestDcm2Acr.cxx | 32 ++++---- Example/TestWrite.cxx | 35 ++++----- Example/TestWriteSimple.cxx | 7 +- Example/Write.cxx | 31 ++++---- Example/WriteDicom.cxx | 111 ++++++++++++++-------------- Example/WriteRead.cxx | 16 ++-- Example/makeDicomDir.cxx | 8 +- Testing/CMakeLists.txt | 1 + Testing/TestAllReadCompareDicom.cxx | 6 +- Testing/TestBug.cxx | 6 +- Testing/TestChangeHeader.cxx | 5 +- Testing/TestCopyDicom.cxx | 5 +- Testing/TestDicomDir.cxx | 10 ++- Testing/TestUtil.cxx | 7 +- src/gdcmBinEntry.h | 5 +- src/gdcmDebug.h | 6 +- src/gdcmDicomDir.cxx | 7 +- src/gdcmDicomDir.h | 16 ++-- src/gdcmDicomDirMeta.cxx | 5 +- src/gdcmDicomDirMeta.h | 5 +- src/gdcmDicomDirObject.cxx | 6 +- src/gdcmDicomDirObject.h | 6 +- src/gdcmDicomDirPatient.cxx | 7 +- src/gdcmDicomDirPatient.h | 8 +- src/gdcmDicomDirSerie.cxx | 5 +- src/gdcmDicomDirSerie.h | 6 +- src/gdcmDicomDirStudy.cxx | 5 +- src/gdcmDicomDirStudy.h | 8 +- src/gdcmDict.h | 6 +- src/gdcmDictSet.h | 6 +- src/gdcmDocEntry.cxx | 5 +- src/gdcmDocEntry.h | 9 ++- src/gdcmDocEntryArchive.cxx | 5 +- src/gdcmDocEntryArchive.h | 5 +- src/gdcmDocEntrySet.cxx | 5 +- src/gdcmDocument.cxx | 11 ++- src/gdcmDocument.h | 23 +++--- src/gdcmElementSet.h | 10 +-- src/gdcmException.h | 6 +- src/gdcmFile.cxx | 16 +++- src/gdcmFile.h | 22 +++--- src/gdcmGlobal.cxx | 9 ++- src/gdcmGlobal.h | 14 ++-- src/gdcmHeader.h | 5 +- src/gdcmJPEGFragment.h | 18 +++-- src/gdcmJPEGFragmentsInfo.h | 5 +- src/gdcmJpeg2000.cxx | 6 +- src/gdcmPixelReadConvert.cxx | 10 ++- src/gdcmPixelReadConvert.h | 10 +-- src/gdcmRLEFrame.h | 5 +- src/gdcmRLEFramesInfo.h | 6 +- src/gdcmSQItem.cxx | 6 +- src/gdcmSeqEntry.h | 9 ++- src/gdcmSerieHeader.cxx | 6 +- src/gdcmSerieHeader.h | 9 ++- src/gdcmTS.h | 5 +- src/gdcmValEntry.h | 5 +- vtk/vtkGdcmReader.cxx | 3 +- 67 files changed, 413 insertions(+), 353 deletions(-) diff --git a/ChangeLog b/ChangeLog index 39408951..fa93a9a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-12-03 Mathieu Malaterre + * Huge cleanup: + - Remove printf / sprintf + - include iostream AFTER gdcm so we don't get warnings + - GDCM_NO_ANSI_STRING_STREAM shouldn't be used explitely ouside of gdcm source + - Also remove tons of include from header files, hopefully this should speeup the compilation time, since it was becoming a dog slow. + - Remove gdcm.h as it include way too many files and slow down compilation (plus it is not up to date) + - remove 'using namespace std' this is BAD ! + 2004-12-03 Benoit Regrain * Remove memory leaks on the DicomDir * Remove some useless datas in DicomDirObject diff --git a/Example/BuildUpDicomDir.cxx b/Example/BuildUpDicomDir.cxx index 7aa49723..f531f2cb 100644 --- a/Example/BuildUpDicomDir.cxx +++ b/Example/BuildUpDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: BuildUpDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/11/30 18:10:23 $ - Version: $Revision: 1.9 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,40 +15,14 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include "gdcm.h" #include "gdcmDocEntry.h" #include "gdcmDicomDir.h" #include "gdcmDicomDirPatient.h" #include "gdcmDirList.h" #include "gdcmDebug.h" - -#include -#include -#include -#ifdef GDCM_NO_ANSI_STRING_STREAM -# include -# define ostringstream ostrstream -# else -# include -#endif - -#define ostringstream ostrstream - -#include -#include - -// for Directory pb -#if defined(_MSC_VER) || defined(__BORLANDC__) - #include - #include - #include -#else - #include - #include -#endif - -#include -#include +#include "gdcmDicomDirStudy.h" +#include "gdcmDicomDirSerie.h" +#include "gdcmDicomDirImage.h" // =============================================================== /** @@ -72,7 +46,7 @@ int main(int argc, char* argv[]) gdcm::DicomDir *dcmdir; dcmdir = new gdcm::DicomDir(); - printf( "\n------- BuildUpDicomDir: Test Print Meta only -----\n"); + std::cout << "\n------- BuildUpDicomDir: Test Print Meta only -----" << std::endl; ((gdcm::Document *)dcmdir)->Print(); gdcm::DicomDirPatient *p1=dcmdir->NewPatient(); diff --git a/Example/CMakeLists.txt b/Example/CMakeLists.txt index b49dbe1a..1a588bb6 100644 --- a/Example/CMakeLists.txt +++ b/Example/CMakeLists.txt @@ -58,3 +58,6 @@ TARGET_LINK_LIBRARIES(TestReadWriteReadCompare gdcm) ADD_EXECUTABLE(FlatHashTablePrint FlatHashTablePrint.cxx) TARGET_LINK_LIBRARIES(FlatHashTablePrint gdcm) + +ADD_EXECUTABLE(Volume2Dicom Volume2Dicom.cxx) +TARGET_LINK_LIBRARIES(Volume2Dicom gdcm) diff --git a/Example/FindTags.cxx b/Example/FindTags.cxx index 7bd9c00e..6620c327 100644 --- a/Example/FindTags.cxx +++ b/Example/FindTags.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: FindTags.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:17 $ - Version: $Revision: 1.5 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,13 +15,14 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include -#include "gdcm.h" -#include "math.h" -#include +#include "gdcmFile.h" +#include "gdcmHeader.h" +#include "gdcmUtil.h" -int main(int argc, char* argv[]) { +#include +int main(int argc, char* argv[]) +{ std::string toto, titi; gdcm::File * f1; @@ -37,13 +38,13 @@ int main(int argc, char* argv[]) { std::string ManufacturerName="SIEMENS "; std::string RecCode="ACR-NEMA 2.0"; std::string ImagePositionPatient, Location, ImageLocation; - char zozo[100], zizi[50]; + std::string zozo; char c; float x, y, z, l; int dataSize = f1->GetImageDataSize(); - printf ("---> pourFindTaggs : dataSize %d\n",dataSize); + std::cout << "---> pourFindTaggs : dataSize " << dataSize << std::endl; f1->SetEntryByNumber(RecCode ,0x0008,0x0010); f1->SetEntryByNumber(ManufacturerName ,0x0008,0x0070); @@ -66,8 +67,8 @@ int main(int argc, char* argv[]) { // existerait-il qq chose qui marche à tout coup? // Location - sprintf(zizi,"%f\n",l); - Location = zizi; + std::string zizi = gdcm::Util::Format("%f",l); + Location = gdcm::Util::DicomString(zizi.c_str()); f1->SetEntryByNumber(Location, 0x0020,0x0050); // sinon, la longueur du champ est erronée (?!?) @@ -81,8 +82,8 @@ int main(int argc, char* argv[]) { // Image Location - sprintf(zizi,"%d\n",0x7FE0); - ImageLocation = zizi; + zizi = gdcm::Util::Format("%d",0x7FE0); + ImageLocation = gdcm::Util::DicomString(zizi.c_str()); //f1->SetEntryByNumber(Location, 0x0028,0x0200); //f1->GetHeader()->SetEntryLengthByNumber(strlen(ImageLocation.c_str())-1, 0x0020,0x0050); // prudence ! @@ -90,20 +91,20 @@ int main(int argc, char* argv[]) { // ecriture d'un fichier ACR à partir d'un dcmHeader correct. - printf ("----------------avant PrintEntry---------------------\n"); + std::cout << "----------------avant PrintEntry---------------------" << std::endl; f1->GetHeader()->Print(); - printf ("----------------avant WriteDcm---------------------\n"); + std::cout << "----------------avant WriteDcm---------------------" << std::endl; // ecriture d'un fichier ACR à partir d'un dcmHeader correct. - sprintf(zozo, "%s.acr", toto.c_str()); - printf ("WriteACR\n"); + zozo = toto + ".acr"; + std::cout << "WriteACR" << std::endl; f1->WriteAcr(zozo); - printf ("----------------apres Write---------------------\n"); + std::cout << "----------------apres Write---------------------" << std::endl; - return 0; + return 0; } diff --git a/Example/FlatHashTablePrint.cxx b/Example/FlatHashTablePrint.cxx index c330dda8..9403d02d 100644 --- a/Example/FlatHashTablePrint.cxx +++ b/Example/FlatHashTablePrint.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: FlatHashTablePrint.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:17 $ - Version: $Revision: 1.4 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -16,6 +16,7 @@ =========================================================================*/ #include "gdcmHeader.h" +#include "gdcmDocEntry.h" // Iterate on all the Dicom entries encountered in the gdcmFile (given // as line argument) and print them. This is an illustration of the diff --git a/Example/PrintDicomDir.cxx b/Example/PrintDicomDir.cxx index 257823e8..eb2052c8 100644 --- a/Example/PrintDicomDir.cxx +++ b/Example/PrintDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:17 $ - Version: $Revision: 1.6 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,15 +15,17 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include -#include "gdcm.h" #include "gdcmDocument.h" #include "gdcmDicomDir.h" #include "gdcmValEntry.h" +#include "gdcmDicomDirPatient.h" +#include "gdcmDicomDirStudy.h" +#include "gdcmDicomDirSerie.h" +#include "gdcmDicomDirImage.h" +#include "gdcmTS.h" #include - -using namespace std; +#include int main(int argc, char* argv[]) { @@ -90,7 +92,7 @@ int main(int argc, char* argv[]) */ - cout << std::endl << std::endl + std::cout << std::endl << std::endl << " = PATIENT/STUDY/SERIE List ==================================" << std::endl<< std::endl; diff --git a/Example/PrintDocument.cxx b/Example/PrintDocument.cxx index 43b95b13..02f2b33e 100644 --- a/Example/PrintDocument.cxx +++ b/Example/PrintDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintDocument.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:17 $ - Version: $Revision: 1.8 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,8 +15,9 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ +#include "gdcmHeader.h" + #include -#include "gdcm.h" int main(int argc, char* argv[]) { diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index 2d2f671f..85275e2e 100644 --- a/Example/PrintFile.cxx +++ b/Example/PrintFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintFile.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 11:55:37 $ - Version: $Revision: 1.16 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,8 +15,10 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ +#include "gdcmHeader.h" +#include "gdcmFile.h" + #include -#include "gdcm.h" int main(int argc, char* argv[]) { diff --git a/Example/PrintHeader.cxx b/Example/PrintHeader.cxx index 04a1c291..68b09261 100644 --- a/Example/PrintHeader.cxx +++ b/Example/PrintHeader.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintHeader.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 10:21:53 $ - Version: $Revision: 1.11 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,8 +15,8 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ +#include "gdcmHeader.h" #include -#include "gdcm.h" int main(int argc, char* argv[]) { diff --git a/Example/TestDcm2Acr.cxx b/Example/TestDcm2Acr.cxx index 4e8332a8..86a6ba7b 100644 --- a/Example/TestDcm2Acr.cxx +++ b/Example/TestDcm2Acr.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDcm2Acr.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:18 $ - Version: $Revision: 1.4 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,29 +15,33 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ +#include "gdcmFile.h" +#include "gdcmHeader.h" + #include -#include "gdcm.h" -#include int main(int argc, char* argv[]) { std::string toto; - char zozo[100]; + std::string zozo; gdcm::File * f1; - printf (" Before gdcmFile() \n"); - printf ("\n\n---------------------------------------\n\n"); + std::cout << " Before gdcmFile()" << std::endl; + std::cout << "\n\n---------------------------------------" << std::endl; - if (argc > 1) { + if (argc > 1) + { toto = argv[1]; f1 = new gdcm::File(toto); - } else { + } + else + { std::string filename = GDCM_DATA_ROOT; filename += "/test.acr"; - f1 = new gdcm::File(filename.c_str()); + f1 = new gdcm::File(filename); } - printf (" Sortie gdcmFile() \n"); + std::cout << " Sortie gdcmFile()" << std::endl; //e1.PrintPubDict(std::cout); f1->GetHeader()->Print(); @@ -45,7 +49,7 @@ int main(int argc, char* argv[]) //cle = gdcmDictEntry::TranslateToKey(0x0028,0x0008); int dataSize = f1->GetImageDataSize(); - printf ("dataSize %d\n",dataSize); + std::cout << "dataSize:" << dataSize << std::endl; // void* imageData= f1->GetHeader()->GetImageData(); @@ -58,9 +62,9 @@ int main(int argc, char* argv[]) // ecriture d'un fichier ACR à partir d'un dcmHeader correct. - sprintf(zozo, "%s.nema", toto.c_str()); + zozo = toto + ".nema"; f1->WriteAcr(zozo); - printf ("\n\n---------------------------------------\n\n"); + std::cout << "\n\n---------------------------------------\n\n" << std::endl; f1->GetHeader()->Print(); diff --git a/Example/TestWrite.cxx b/Example/TestWrite.cxx index 3355ed43..fb546826 100644 --- a/Example/TestWrite.cxx +++ b/Example/TestWrite.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestWrite.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 11:55:37 $ - Version: $Revision: 1.11 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,15 +15,14 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ +#include "gdcmHeader.h" +#include "gdcmFile.h" + #include -#include -#include "gdcm.h" int main(int argc, char* argv[]) { - std::string toto; - char zozo[200]; - + std::string zozo; gdcm::Header* e1; gdcm::File * f1; @@ -64,7 +63,8 @@ int main(int argc, char* argv[]) << "--------------------- file :" << argv[1] << std::endl; - toto = argv[1]; + std::string toto = argv[1]; + std::string mode = argv[2]; e1 = new gdcm::Header( toto.c_str() ); if (!e1->IsReadable()) @@ -115,13 +115,14 @@ int main(int argc, char* argv[]) }*/ imageData= f1->GetImageData(); - switch (argv[2][0]) { + switch (mode[0]) + { case 'a' : // ecriture d'un fichier ACR // à partir d'un dcmHeader correct. - sprintf(zozo, "%s.ACR", toto.c_str()); - printf ("WriteACR\n"); + zozo = toto + ".ACR"; + std::cout << "WriteACR" << std::endl; f1->WriteAcr(zozo); break; @@ -130,8 +131,8 @@ int main(int argc, char* argv[]) // ecriture d'un fichier DICOM Implicit VR // à partir d'un dcmHeader correct. - sprintf(zozo, "%s.DCM", toto.c_str()); - printf ("WriteDCM Implicit VR\n"); + zozo = toto + ".DCM"; + std::cout << "WriteDCM Implicit VR" << std::endl; f1->WriteDcmImplVR(zozo); break; @@ -139,7 +140,7 @@ int main(int argc, char* argv[]) // ecriture d'un fichier DICOM Explicit VR // à partir d'un dcmHeader correct. - sprintf(zozo, "%s.XDCM", toto.c_str()); + zozo = toto + ".XDCM"; std::cout << "WriteDCM Explicit VR" << std::endl; f1->WriteDcmExplVR(zozo); break; @@ -148,7 +149,7 @@ int main(int argc, char* argv[]) // Ecriture d'un Raw File, a afficher avec // affim filein= dimx= dimy= nbit= signe= - sprintf(zozo, "%s.RAW", toto.c_str()); + zozo = toto + ".RAW"; std::cout << "WriteRaw" << std::endl; f1->WriteRawData(zozo); break; @@ -171,8 +172,8 @@ int main(int argc, char* argv[]) ((uint16_t*)imageData)[i] += 60000; //32767; } } - sprintf(zozo, "%s.VDCM", toto.c_str()); - printf ("WriteDCM Explicit VR + VideoInv\n"); + zozo = toto + ".VDCM"; + std::cout << "WriteDCM Explicit VR + VideoInv" << std::endl; f1->WriteDcmExplVR(zozo); break; diff --git a/Example/TestWriteSimple.cxx b/Example/TestWriteSimple.cxx index f474e3cb..f194fe05 100644 --- a/Example/TestWriteSimple.cxx +++ b/Example/TestWriteSimple.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestWriteSimple.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:18 $ - Version: $Revision: 1.5 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,7 +15,8 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include "gdcm.h" +#include "gdcmHeader.h" +#include "gdcmFile.h" int main(int argc, char* argv[]) { diff --git a/Example/Write.cxx b/Example/Write.cxx index 7c1d0e2e..492506bf 100644 --- a/Example/Write.cxx +++ b/Example/Write.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: Write.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 11:55:37 $ - Version: $Revision: 1.11 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,14 +15,14 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ +#include "gdcmHeader.h" +#include "gdcmFile.h" + #include -#include -#include "gdcm.h" int main(int argc, char* argv[]) { - std::string toto; - char zozo[200]; + std::string zozo; gdcm::Header* e1; gdcm::File * f1; @@ -60,7 +60,7 @@ int main(int argc, char* argv[]) << "--------------------- file :" << argv[1] << std::endl; - toto = argv[1]; + std::string toto = argv[1]; e1 = new gdcm::Header( toto.c_str() ); if (!e1->IsReadable()) { @@ -111,13 +111,14 @@ int main(int argc, char* argv[]) imageData= f1->GetImageData(); (void)imageData; // to avoid warnings - switch (argv[2][0]) { + switch (argv[2][0]) + { case 'a' : // ecriture d'un fichier ACR // à partir d'un dcmHeader correct. - sprintf(zozo, "%s.ACR", toto.c_str()); - printf ("WriteACR\n"); + zozo = toto + ".ACR"; + std::cout << "WriteACR" << std::endl; f1->WriteAcr(zozo); break; @@ -125,8 +126,8 @@ int main(int argc, char* argv[]) // ecriture d'un fichier DICOM Implicit VR // à partir d'un dcmHeader correct. - sprintf(zozo, "%s.DCM", toto.c_str()); - printf ("WriteDCM Implicit VR\n"); + zozo = toto + ".DCM"; + std::cout << "WriteDCM Implicit VR" << std::endl; f1->WriteDcmImplVR(zozo); break; @@ -134,8 +135,8 @@ int main(int argc, char* argv[]) // ecriture d'un fichier DICOM Explicit VR // à partir d'un dcmHeader correct. - sprintf(zozo, "%s.XDCM", toto.c_str()); - std::cout << "WriteDCM Explicit VR" << std::endl; + zozo = toto + ".DCM"; + std::cout << "WriteDCM Implicit VR" << std::endl; f1->WriteDcmExplVR(zozo); break; @@ -143,7 +144,7 @@ int main(int argc, char* argv[]) // Ecriture d'un Raw File, a afficher avec // affim filein= dimx= dimy= nbit= signe= - sprintf(zozo, "%s.RAW", toto.c_str()); + zozo = toto + ".RAW"; std::cout << "WriteRaw" << std::endl; f1->WriteRawData(zozo); break; diff --git a/Example/WriteDicom.cxx b/Example/WriteDicom.cxx index 7116f734..9f83a2a0 100644 --- a/Example/WriteDicom.cxx +++ b/Example/WriteDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: WriteDicom.cxx,v $ Language: C++ - Date: $Date: 2004/11/26 10:55:03 $ - Version: $Revision: 1.8 $ + Date: $Date: 2004/12/03 20:16:55 $ + 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 @@ -15,7 +15,8 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include "gdcm.h" +#include "gdcmHeader.h" +#include "gdcmFile.h" // Writting of a DICOM file based on a correct dicom header // and data pixel of another image @@ -23,56 +24,56 @@ int main(int argc, char* argv[]) { - if (argc < 3) - { - std::cerr << "Usage :" << std::endl << argv[0] << - " HeaderFileName DataFileName" << std::endl; - return 0; - } - - const char *first = argv[1]; - gdcm::File *f1 = new gdcm::File( first ); - - const char *second = argv[2]; - gdcm::File *f2 = new gdcm::File( second ); - - // We assume that DICOM fields of second file actually exists : - - std::string nbFrames = f2->GetHeader()->GetEntryByNumber(0x0028, 0x0008); - if(nbFrames != "gdcm::Unfound") { - f1->GetHeader()->ReplaceOrCreateByNumber( nbFrames, 0x0028, 0x0008); - } - - f1->GetHeader()->ReplaceOrCreateByNumber( - f2->GetHeader()->GetEntryByNumber(0x0028, 0x0010), 0x0028, 0x0010); // nbLig - f1->GetHeader()->ReplaceOrCreateByNumber( - f2->GetHeader()->GetEntryByNumber(0x0028, 0x0011), 0x0028, 0x0011); // nbCol - - // Some other tags should be updated: - - // TODO : add a default value - // TODO : a function which take as input a list of tuple (gr, el) - // and that does the job - - int dataSize = f2->GetImageDataSize(); - uint8_t* imageData = f2->GetImageData(); - - std::cout << "dataSize :" << dataSize << std::endl; - - // TODO : Shouldn't we merge those two functions ? - f1->SetImageData( imageData, dataSize); - - f1->GetHeader()->Print(); - - std::string s0 = f2->GetHeader()->GetEntryByNumber(0x7fe0, 0x0000); - std::string s10 = f2->GetHeader()->GetEntryByNumber(0x7fe0, 0x0010); - - std::cout << "lgr 7fe0, 0000 " << s0 << std::endl; - std::cout << "lgr 7fe0, 0010 " << s10 << std::endl; - - std::cout << "WriteDCM" << std::endl; - - f1->WriteDcmExplVR("WriteDicom.dcm"); - - return 0; + if (argc < 3) + { + std::cerr << "Usage :" << std::endl << argv[0] << + " HeaderFileName DataFileName" << std::endl; + return 0; + } + + const char *first = argv[1]; + gdcm::File *f1 = new gdcm::File( first ); + + const char *second = argv[2]; + gdcm::File *f2 = new gdcm::File( second ); + + // We assume that DICOM fields of second file actually exists : + + std::string nbFrames = f2->GetHeader()->GetEntryByNumber(0x0028, 0x0008); + if(nbFrames != "gdcm::Unfound") { + f1->GetHeader()->ReplaceOrCreateByNumber( nbFrames, 0x0028, 0x0008); + } + + f1->GetHeader()->ReplaceOrCreateByNumber( + f2->GetHeader()->GetEntryByNumber(0x0028, 0x0010), 0x0028, 0x0010); // nbLig + f1->GetHeader()->ReplaceOrCreateByNumber( + f2->GetHeader()->GetEntryByNumber(0x0028, 0x0011), 0x0028, 0x0011); // nbCol + + // Some other tags should be updated: + + // TODO : add a default value + // TODO : a function which take as input a list of tuple (gr, el) + // and that does the job + + int dataSize = f2->GetImageDataSize(); + uint8_t* imageData = f2->GetImageData(); + + std::cout << "dataSize :" << dataSize << std::endl; + + // TODO : Shouldn't we merge those two functions ? + f1->SetImageData( imageData, dataSize); + + f1->GetHeader()->Print(); + + std::string s0 = f2->GetHeader()->GetEntryByNumber(0x7fe0, 0x0000); + std::string s10 = f2->GetHeader()->GetEntryByNumber(0x7fe0, 0x0010); + + std::cout << "lgr 7fe0, 0000 " << s0 << std::endl; + std::cout << "lgr 7fe0, 0010 " << s10 << std::endl; + + std::cout << "WriteDCM" << std::endl; + + f1->WriteDcmExplVR("WriteDicom.dcm"); + + return 0; } diff --git a/Example/WriteRead.cxx b/Example/WriteRead.cxx index fab3f75d..7e75baae 100644 --- a/Example/WriteRead.cxx +++ b/Example/WriteRead.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: WriteRead.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:18 $ - Version: $Revision: 1.8 $ + Date: $Date: 2004/12/03 20:16:56 $ + 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 @@ -15,14 +15,14 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ +#include "gdcmHeader.h" +#include "gdcmFile.h" + #include -#include -#include "gdcm.h" int main(int argc, char* argv[]) { - std::string toto; - char zozo[200]; + std::string zozo; gdcm::Header* e1, *e2; gdcm::File * f1, *f2; @@ -36,7 +36,7 @@ int main(int argc, char* argv[]) return 1; } - toto = argv[1]; + std::string toto = argv[1]; // --------------------- we read the input image @@ -55,7 +55,7 @@ int main(int argc, char* argv[]) // --------------------- we write it as an Explicit VR DICOM file - sprintf(zozo, "temp.XDCM" ); + zozo = "temp.XDCM"; std::cout << "WriteDCM Explicit VR" << std::endl; f1->WriteDcmExplVR(zozo); diff --git a/Example/makeDicomDir.cxx b/Example/makeDicomDir.cxx index 4ffd464b..fbaf7f35 100644 --- a/Example/makeDicomDir.cxx +++ b/Example/makeDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: makeDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:26:18 $ - Version: $Revision: 1.8 $ + Date: $Date: 2004/12/03 20:16:56 $ + 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 @@ -15,13 +15,13 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include -#include "gdcm.h" #include "gdcmDocEntry.h" #include "gdcmDicomDir.h" #include "gdcmDicomDirPatient.h" #include "gdcmDirList.h" +#include + // --- void StartMethod(void *toto) { (void)toto; diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index d53cbc71..11d18988 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -29,6 +29,7 @@ IF (GDCM_DATA_ROOT) BuildUpDicomDir.cxx # writes a file named "NewDICOMDIR" makeDicomDir.cxx # writes a file named "NewDICOMDIR" TestCopyDicom.cxx + # TestRescaleDicom.cxx ) # add test that require VTK: IF(GDCM_VTK) diff --git a/Testing/TestAllReadCompareDicom.cxx b/Testing/TestAllReadCompareDicom.cxx index e341b645..48e2f00b 100644 --- a/Testing/TestAllReadCompareDicom.cxx +++ b/Testing/TestAllReadCompareDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllReadCompareDicom.cxx,v $ Language: C++ - Date: $Date: 2004/11/30 14:17:52 $ - Version: $Revision: 1.20 $ + Date: $Date: 2004/12/03 20:16:56 $ + 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 @@ -17,7 +17,7 @@ =========================================================================*/ #include "gdcmHeader.h" #include "gdcmFile.h" -#include +#include //Generated file: #include "gdcmDataImages.h" diff --git a/Testing/TestBug.cxx b/Testing/TestBug.cxx index f0c7e389..848fa862 100644 --- a/Testing/TestBug.cxx +++ b/Testing/TestBug.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestBug.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:28:20 $ - Version: $Revision: 1.15 $ + Date: $Date: 2004/12/03 20:16:56 $ + 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 @@ -19,7 +19,7 @@ // We have to be carefull when the code both use cout + printf VC++ gets // confused, thus make sure we use only one kind of iostream -#include "gdcm.h" +#include "gdcmHeader.h" int TestBug(int argc, char* argv[]) { diff --git a/Testing/TestChangeHeader.cxx b/Testing/TestChangeHeader.cxx index 3fb0ab9a..72d55563 100644 --- a/Testing/TestChangeHeader.cxx +++ b/Testing/TestChangeHeader.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestChangeHeader.cxx,v $ Language: C++ - Date: $Date: 2004/11/26 10:55:03 $ - Version: $Revision: 1.27 $ + Date: $Date: 2004/12/03 20:16:56 $ + Version: $Revision: 1.28 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -17,7 +17,6 @@ =========================================================================*/ #include "gdcmHeader.h" #include "gdcmFile.h" -#include // Writting of a DICOM file, using a correct gdcmHeader. // and pixels of an other image diff --git a/Testing/TestCopyDicom.cxx b/Testing/TestCopyDicom.cxx index f9682db6..38cc73e0 100644 --- a/Testing/TestCopyDicom.cxx +++ b/Testing/TestCopyDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestCopyDicom.cxx,v $ Language: C++ - Date: $Date: 2004/12/02 15:14:16 $ - Version: $Revision: 1.24 $ + Date: $Date: 2004/12/03 20:16:56 $ + 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 @@ -17,7 +17,6 @@ =========================================================================*/ #include "gdcmHeader.h" #include "gdcmFile.h" -#include "gdcmDocument.h" #include "gdcmValEntry.h" #include "gdcmBinEntry.h" diff --git a/Testing/TestDicomDir.cxx b/Testing/TestDicomDir.cxx index 16113463..a855b871 100644 --- a/Testing/TestDicomDir.cxx +++ b/Testing/TestDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:28:20 $ - Version: $Revision: 1.21 $ + Date: $Date: 2004/12/03 20:16:56 $ + 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 @@ -15,9 +15,13 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include "gdcm.h" #include "gdcmDocEntry.h" #include "gdcmDicomDir.h" +#include "gdcmDicomDirPatient.h" +#include "gdcmDicomDirStudy.h" +#include "gdcmDicomDirSerie.h" +#include "gdcmDicomDirImage.h" +#include "gdcmTS.h" #include #include diff --git a/Testing/TestUtil.cxx b/Testing/TestUtil.cxx index e74cf0e9..9e0261dc 100644 --- a/Testing/TestUtil.cxx +++ b/Testing/TestUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestUtil.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 04:28:20 $ - Version: $Revision: 1.3 $ + Date: $Date: 2004/12/03 20:16:56 $ + 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 @@ -18,7 +18,8 @@ // This test should test everything in Util, since I didn't know any other // way to test this class. -#include "gdcm.h" +#include "gdcmUtil.h" +#include int TestUtil(int , char * []) { diff --git a/src/gdcmBinEntry.h b/src/gdcmBinEntry.h index 3f1c865b..c659b11d 100644 --- a/src/gdcmBinEntry.h +++ b/src/gdcmBinEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmBinEntry.h,v $ Language: C++ - Date: $Date: 2004/11/25 15:46:10 $ - Version: $Revision: 1.26 $ + Date: $Date: 2004/12/03 20:16:57 $ + Version: $Revision: 1.27 $ 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,6 @@ #define GDCMBINENTRY_H #include "gdcmValEntry.h" - #include namespace gdcm diff --git a/src/gdcmDebug.h b/src/gdcmDebug.h index 83939678..6e719784 100644 --- a/src/gdcmDebug.h +++ b/src/gdcmDebug.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.h,v $ Language: C++ - Date: $Date: 2004/10/12 04:35:44 $ - Version: $Revision: 1.8 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -20,9 +20,9 @@ #define GDCMDEBUG_H #include "gdcmCommon.h" + namespace gdcm { - //----------------------------------------------------------------------------- /** diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 8394a498..58e58b63 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.84 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -20,6 +20,9 @@ #include "gdcmDicomDirStudy.h" #include "gdcmDicomDirSerie.h" #include "gdcmDicomDirImage.h" +#include "gdcmDicomDirPatient.h" +#include "gdcmDicomDirMeta.h" +#include "gdcmDicomDirElement.h" #include "gdcmDirList.h" #include "gdcmUtil.h" #include "gdcmDebug.h" diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index 16666170..5aae1c91 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.h,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.40 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -19,11 +19,7 @@ #ifndef GDCMDICOMDIR_H #define GDCMDICOMDIR_H -#include "gdcmCommon.h" #include "gdcmDocument.h" -#include "gdcmDicomDirPatient.h" -#include "gdcmDicomDirMeta.h" -#include "gdcmDicomDirElement.h" #include #include @@ -31,6 +27,14 @@ namespace gdcm { //----------------------------------------------------------------------------- +class DicomDirPatient; +class DicomDirMeta; +class DicomDirElement; +class DicomDirStudy; +class DicomDirSerie; +class DicomDirImage; +class SQItem; + typedef std::list ListDicomDirPatient; typedef std::vector VectDocument; diff --git a/src/gdcmDicomDirMeta.cxx b/src/gdcmDicomDirMeta.cxx index be4ecbfd..cadbc216 100644 --- a/src/gdcmDicomDirMeta.cxx +++ b/src/gdcmDicomDirMeta.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirMeta.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.16 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -18,6 +18,7 @@ #include "gdcmDicomDirMeta.h" #include "gdcmDocument.h" +#include "gdcmDocEntry.h" namespace gdcm { diff --git a/src/gdcmDicomDirMeta.h b/src/gdcmDicomDirMeta.h index 9c50ee16..5dd4ee82 100644 --- a/src/gdcmDicomDirMeta.h +++ b/src/gdcmDicomDirMeta.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirMeta.h,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.12 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -20,6 +20,7 @@ #define GDCMDICOMDIRMETA_H #include "gdcmDicomDirObject.h" + namespace gdcm { diff --git a/src/gdcmDicomDirObject.cxx b/src/gdcmDicomDirObject.cxx index 882b8a2f..245f9901 100644 --- a/src/gdcmDicomDirObject.cxx +++ b/src/gdcmDicomDirObject.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirObject.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.8 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -20,6 +20,8 @@ #include "gdcmGlobal.h" #include "gdcmDebug.h" #include "gdcmValEntry.h" +#include "gdcmDictSet.h" + namespace gdcm { diff --git a/src/gdcmDicomDirObject.h b/src/gdcmDicomDirObject.h index 8503569b..efa3742b 100644 --- a/src/gdcmDicomDirObject.h +++ b/src/gdcmDicomDirObject.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirObject.h,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.7 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -29,7 +29,6 @@ namespace gdcm { //----------------------------------------------------------------------------- class DicomDirObject; -typedef std::list ListContent; //----------------------------------------------------------------------------- /** @@ -38,6 +37,7 @@ typedef std::list ListContent; */ class GDCM_EXPORT DicomDirObject : public SQItem { +typedef std::list ListContent; public: DicomDirObject(int depth = 1); diff --git a/src/gdcmDicomDirPatient.cxx b/src/gdcmDicomDirPatient.cxx index 93a459ca..fb5fa9ac 100644 --- a/src/gdcmDicomDirPatient.cxx +++ b/src/gdcmDicomDirPatient.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPatient.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.20 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -19,6 +19,9 @@ #include "gdcmDicomDirPatient.h" #include "gdcmDicomDirElement.h" #include "gdcmGlobal.h" +#include "gdcmDicomDirStudy.h" +#include "gdcmSQItem.h" + namespace gdcm { diff --git a/src/gdcmDicomDirPatient.h b/src/gdcmDicomDirPatient.h index 2052d025..5c4505fd 100644 --- a/src/gdcmDicomDirPatient.h +++ b/src/gdcmDicomDirPatient.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPatient.h,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.14 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -20,12 +20,10 @@ #define GDCMPATIENT_H #include "gdcmDicomDirObject.h" -#include "gdcmDicomDirStudy.h" -#include "gdcmSQItem.h" namespace gdcm { - +class DicomDirStudy; //----------------------------------------------------------------------------- typedef std::list ListDicomDirStudy; diff --git a/src/gdcmDicomDirSerie.cxx b/src/gdcmDicomDirSerie.cxx index dcdd7465..541cee2f 100644 --- a/src/gdcmDicomDirSerie.cxx +++ b/src/gdcmDicomDirSerie.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirSerie.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.22 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -18,6 +18,7 @@ #include "gdcmDicomDirSerie.h" #include "gdcmDicomDirElement.h" +#include "gdcmDicomDirImage.h" #include "gdcmGlobal.h" namespace gdcm diff --git a/src/gdcmDicomDirSerie.h b/src/gdcmDicomDirSerie.h index 4f4371a3..c9d14d6a 100644 --- a/src/gdcmDicomDirSerie.h +++ b/src/gdcmDicomDirSerie.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirSerie.h,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.15 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -20,10 +20,10 @@ #define GDCMDICOMDIRSERIE_H #include "gdcmDicomDirObject.h" -#include "gdcmDicomDirImage.h" namespace gdcm { +class DicomDirImage; //----------------------------------------------------------------------------- typedef std::list ListDicomDirImage; diff --git a/src/gdcmDicomDirStudy.cxx b/src/gdcmDicomDirStudy.cxx index a602cdd2..c4678132 100644 --- a/src/gdcmDicomDirStudy.cxx +++ b/src/gdcmDicomDirStudy.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.19 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -19,6 +19,7 @@ #include "gdcmDicomDirStudy.h" #include "gdcmDicomDirElement.h" #include "gdcmGlobal.h" +#include "gdcmDicomDirSerie.h" namespace gdcm { diff --git a/src/gdcmDicomDirStudy.h b/src/gdcmDicomDirStudy.h index 7ddd3666..e6a1bbbb 100644 --- a/src/gdcmDicomDirStudy.h +++ b/src/gdcmDicomDirStudy.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.h,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.14 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -20,10 +20,10 @@ #define GDCMDICOMDIRSTUDY_H #include "gdcmDicomDirObject.h" -#include "gdcmDicomDirSerie.h" + namespace gdcm { - +class DicomDirSerie; //----------------------------------------------------------------------------- typedef std::list ListDicomDirSerie; diff --git a/src/gdcmDict.h b/src/gdcmDict.h index dd4910dc..6764bbd4 100644 --- a/src/gdcmDict.h +++ b/src/gdcmDict.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDict.h,v $ Language: C++ - Date: $Date: 2004/11/16 02:54:35 $ - Version: $Revision: 1.23 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -19,7 +19,6 @@ #ifndef GDCMDICT_H #define GDCMDICT_H -#include "gdcmCommon.h" #include "gdcmDictEntry.h" #include @@ -30,6 +29,7 @@ namespace gdcm { //----------------------------------------------------------------------------- +typedef std::string DictKey; typedef std::map TagKeyHT; typedef std::map TagNameHT; typedef std::list EntryNamesList; diff --git a/src/gdcmDictSet.h b/src/gdcmDictSet.h index 895459d0..2d7789ab 100644 --- a/src/gdcmDictSet.h +++ b/src/gdcmDictSet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDictSet.h,v $ Language: C++ - Date: $Date: 2004/10/18 02:17:07 $ - Version: $Revision: 1.28 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -20,12 +20,12 @@ #define GDCMDICTSET_H #include "gdcmDict.h" + #include #include namespace gdcm { -typedef std::string DictKey; typedef std::map DictSetHT; //----------------------------------------------------------------------------- diff --git a/src/gdcmDocEntry.cxx b/src/gdcmDocEntry.cxx index b6d8f0ad..fcd2db28 100644 --- a/src/gdcmDocEntry.cxx +++ b/src/gdcmDocEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.cxx,v $ Language: C++ - Date: $Date: 2004/11/25 15:46:11 $ - Version: $Revision: 1.33 $ + Date: $Date: 2004/12/03 20:16:57 $ + 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 @@ -18,6 +18,7 @@ #include "gdcmDocEntry.h" #include "gdcmTS.h" +#include "gdcmVR.h" #include "gdcmGlobal.h" #include "gdcmUtil.h" diff --git a/src/gdcmDocEntry.h b/src/gdcmDocEntry.h index 7373c728..62757c34 100644 --- a/src/gdcmDocEntry.h +++ b/src/gdcmDocEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntry.h,v $ Language: C++ - Date: $Date: 2004/11/30 16:24:31 $ - Version: $Revision: 1.31 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -20,16 +20,17 @@ #define GDCMDOCENTRY_H #include "gdcmDictEntry.h" + #include #include +namespace gdcm +{ class Header; class ValEntry; class BinEntry; class SeqEntry; -namespace gdcm -{ //----------------------------------------------------------------------------- /** * \brief The dicom header of a Dicom file contains a set of such entries diff --git a/src/gdcmDocEntryArchive.cxx b/src/gdcmDocEntryArchive.cxx index 9a5a498c..fae78fcd 100644 --- a/src/gdcmDocEntryArchive.cxx +++ b/src/gdcmDocEntryArchive.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntryArchive.cxx,v $ Language: C++ - Date: $Date: 2004/11/24 10:23:47 $ - Version: $Revision: 1.3 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -18,6 +18,7 @@ #include "gdcmDocEntryArchive.h" #include "gdcmDebug.h" +#include "gdcmDocEntry.h" #include diff --git a/src/gdcmDocEntryArchive.h b/src/gdcmDocEntryArchive.h index ae6550ab..1f068b4c 100644 --- a/src/gdcmDocEntryArchive.h +++ b/src/gdcmDocEntryArchive.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntryArchive.h,v $ Language: C++ - Date: $Date: 2004/11/24 10:23:47 $ - Version: $Revision: 1.2 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -19,7 +19,6 @@ #ifndef GDCMDOCENTRYARCHIVE_H #define GDCMDOCENTRYARCHIVE_H -#include "gdcmCommon.h" #include "gdcmHeader.h" namespace gdcm diff --git a/src/gdcmDocEntrySet.cxx b/src/gdcmDocEntrySet.cxx index 0a076049..5835a8f3 100644 --- a/src/gdcmDocEntrySet.cxx +++ b/src/gdcmDocEntrySet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.cxx,v $ Language: C++ - Date: $Date: 2004/11/16 10:25:53 $ - Version: $Revision: 1.26 $ + Date: $Date: 2004/12/03 20:16:58 $ + Version: $Revision: 1.27 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -19,6 +19,7 @@ #include "gdcmDebug.h" #include "gdcmCommon.h" +#include "gdcmDictSet.h" #include "gdcmGlobal.h" #include "gdcmException.h" #include "gdcmDocEntry.h" diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 2fd8fdfe..0570d454 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2004/12/02 15:14:17 $ - Version: $Revision: 1.145 $ + Date: $Date: 2004/12/03 20:16:58 $ + Version: $Revision: 1.146 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -23,6 +23,13 @@ #include "gdcmGlobal.h" #include "gdcmUtil.h" #include "gdcmDebug.h" +#include "gdcmTS.h" +#include "gdcmException.h" +#include "gdcmDictSet.h" +#include "gdcmRLEFramesInfo.h" +#include "gdcmJPEGFragmentsInfo.h" +#include "gdcmDocEntrySet.h" +#include "gdcmSQItem.h" #include #include diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index 7e4e8d99..2df5f0be 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.h,v $ Language: C++ - Date: $Date: 2004/11/26 10:55:04 $ - Version: $Revision: 1.66 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -19,27 +19,22 @@ #ifndef GDCMDOCUMENT_H #define GDCMDOCUMENT_H -#include "gdcmCommon.h" #include "gdcmVR.h" -#include "gdcmTS.h" -#include "gdcmException.h" -#include "gdcmDictSet.h" -#include "gdcmDocEntry.h" -#include "gdcmRLEFramesInfo.h" -#include "gdcmJPEGFragmentsInfo.h" -#include "gdcmDocEntrySet.h" +#include "gdcmDict.h" #include "gdcmElementSet.h" -class ValEntry; -class BinEntry; -class SeqEntry; - #include #include #include namespace gdcm { +class ValEntry; +class BinEntry; +class SeqEntry; +class Dict; +class RLEFramesInfo; +class JPEGFragmentsInfo; enum TransferSyntaxType { ImplicitVRLittleEndian = 0, diff --git a/src/gdcmElementSet.h b/src/gdcmElementSet.h index 2d1529cb..819435e1 100644 --- a/src/gdcmElementSet.h +++ b/src/gdcmElementSet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmElementSet.h,v $ Language: C++ - Date: $Date: 2004/11/30 16:24:31 $ - Version: $Revision: 1.25 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -19,18 +19,18 @@ #ifndef GDCMELEMENTSET_H #define GDCMELEMENTSET_H -#include "gdcmCommon.h" #include "gdcmDocEntrySet.h" + #include #include #include +namespace gdcm +{ class ValEntry; class BinEntry; class SeqEntry; -namespace gdcm -{ typedef std::map TagDocEntryHT; //----------------------------------------------------------------------------- diff --git a/src/gdcmException.h b/src/gdcmException.h index b1875b58..ff0fa67d 100644 --- a/src/gdcmException.h +++ b/src/gdcmException.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmException.h,v $ Language: C++ - Date: $Date: 2004/11/04 18:14:34 $ - Version: $Revision: 1.18 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -20,9 +20,11 @@ #define GDCM_EXCEPTION_H #include "gdcmCommon.h" + #include #include #include + namespace gdcm { diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 45aaa81e..c7f72f23 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 14:22:40 $ - Version: $Revision: 1.170 $ + Date: $Date: 2004/12/03 20:16:58 $ + Version: $Revision: 1.171 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,6 +21,11 @@ #include "gdcmDebug.h" #include "gdcmUtil.h" #include "gdcmBinEntry.h" +#include "gdcmHeader.h" +#include "gdcmPixelReadConvert.h" +#include "gdcmPixelWriteConvert.h" +#include "gdcmDocEntryArchive.h" + #include namespace gdcm @@ -375,6 +380,13 @@ bool File::Write(std::string const& fileName) return WriteBase(fileName); } +bool File::SetEntryByNumber(std::string const& content, + uint16_t group, uint16_t element) +{ + HeaderInternal->SetEntryByNumber(content,group,element); + return true; +} + /** * \brief Access to the underlying \ref PixelReadConverter RGBA LUT */ diff --git a/src/gdcmFile.h b/src/gdcmFile.h index f87a1a9e..485bcf71 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.h,v $ Language: C++ - Date: $Date: 2004/12/03 14:22:40 $ - Version: $Revision: 1.82 $ + Date: $Date: 2004/12/03 20:16:58 $ + Version: $Revision: 1.83 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,13 +20,15 @@ #define GDCMFILE_H #include "gdcmCommon.h" -#include "gdcmHeader.h" -#include "gdcmPixelReadConvert.h" -#include "gdcmPixelWriteConvert.h" -#include "gdcmDocEntryArchive.h" namespace gdcm { +class Header; +class ValEntry; +class BinEntry; +class PixelReadConvert; +class PixelWriteConvert; +class DocEntryArchive; //----------------------------------------------------------------------------- /* * In addition to Dicom header exploration, this class is designed @@ -69,12 +71,8 @@ public: bool WriteAcr (std::string const& fileName); bool Write(std::string const& fileName); - virtual bool SetEntryByNumber(std::string const& content, - uint16_t group, uint16_t element) - { - HeaderInternal->SetEntryByNumber(content,group,element); - return true; - } + bool SetEntryByNumber(std::string const& content, + uint16_t group, uint16_t element); uint8_t* GetLutRGBA(); // Write mode diff --git a/src/gdcmGlobal.cxx b/src/gdcmGlobal.cxx index 70dc9355..8df156b5 100644 --- a/src/gdcmGlobal.cxx +++ b/src/gdcmGlobal.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.cxx,v $ Language: C++ - Date: $Date: 2004/10/28 18:13:36 $ - Version: $Revision: 1.6 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -17,7 +17,12 @@ =========================================================================*/ #include "gdcmGlobal.h" + #include "gdcmDebug.h" +#include "gdcmVR.h" +#include "gdcmTS.h" +#include "gdcmDictSet.h" +#include "gdcmDicomDirElement.h" namespace gdcm { diff --git a/src/gdcmGlobal.h b/src/gdcmGlobal.h index 7043d6d6..c32be006 100644 --- a/src/gdcmGlobal.h +++ b/src/gdcmGlobal.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.h,v $ Language: C++ - Date: $Date: 2004/10/12 04:35:46 $ - Version: $Revision: 1.4 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -19,14 +19,14 @@ #ifndef GDCMGLOBAL_H #define GDCMGLOBAL_H -#include "gdcmVR.h" -#include "gdcmTS.h" -#include "gdcmDictSet.h" -#include "gdcmDicomDirElement.h" +#include "gdcmCommon.h" namespace gdcm { - +class DictSet; +class VR; +class TS; +class DicomDirElement; //----------------------------------------------------------------------------- /** * \brief This class contains all globals elements that might be diff --git a/src/gdcmHeader.h b/src/gdcmHeader.h index de5acd13..4e674763 100644 --- a/src/gdcmHeader.h +++ b/src/gdcmHeader.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmHeader.h,v $ Language: C++ - Date: $Date: 2004/11/26 10:55:04 $ - Version: $Revision: 1.95 $ + Date: $Date: 2004/12/03 20:16:58 $ + Version: $Revision: 1.96 $ 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,6 @@ #ifndef GDCMHEADER_H #define GDCMHEADER_H -#include "gdcmCommon.h" #include "gdcmDocument.h" namespace gdcm diff --git a/src/gdcmJPEGFragment.h b/src/gdcmJPEGFragment.h index 203cd2e6..a446d9c7 100644 --- a/src/gdcmJPEGFragment.h +++ b/src/gdcmJPEGFragment.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragment.h,v $ Language: C++ - Date: $Date: 2004/12/03 10:21:54 $ - Version: $Revision: 1.5 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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,6 +21,7 @@ #define GDCMJPEGFRAGMENT_H #include "gdcmCommon.h" + #include namespace gdcm @@ -39,14 +40,17 @@ namespace gdcm */ class GDCM_EXPORT JPEGFragment { -friend class Document; -friend class File; -friend class PixelReadConvert; - long Offset; - long Length; public: JPEGFragment(); void Print( std::string indent = "", std::ostream &os = std::cout ); + +private: + long Offset; + long Length; + +friend class Document; +friend class File; +friend class PixelReadConvert; }; } // end namespace gdcm diff --git a/src/gdcmJPEGFragmentsInfo.h b/src/gdcmJPEGFragmentsInfo.h index 6b1115ca..4f445b7d 100644 --- a/src/gdcmJPEGFragmentsInfo.h +++ b/src/gdcmJPEGFragmentsInfo.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJPEGFragmentsInfo.h,v $ Language: C++ - Date: $Date: 2004/12/03 10:21:54 $ - Version: $Revision: 1.6 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -21,6 +21,7 @@ #define GDCMJPEGFRAGMENTSINFO_H #include "gdcmJPEGFragment.h" + #include #include diff --git a/src/gdcmJpeg2000.cxx b/src/gdcmJpeg2000.cxx index f5ea6569..780ad09f 100644 --- a/src/gdcmJpeg2000.cxx +++ b/src/gdcmJpeg2000.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmJpeg2000.cxx,v $ Language: C++ - Date: $Date: 2004/10/22 03:05:42 $ - Version: $Revision: 1.13 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -18,6 +18,8 @@ //----------------------------------------------------------------------------- #include "gdcmFile.h" +#include + namespace gdcm { diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index d4c57abf..36e790fa 100644 --- a/src/gdcmPixelReadConvert.cxx +++ b/src/gdcmPixelReadConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 10:21:55 $ - Version: $Revision: 1.1 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -23,9 +23,13 @@ // grep PixelReadConvert everywhere and clean up ! #include "gdcmDebug.h" +#include "gdcmHeader.h" #include "gdcmPixelReadConvert.h" +#include "gdcmDocEntry.h" +#include "gdcmRLEFramesInfo.h" +#include "gdcmJPEGFragmentsInfo.h" + #include -#include namespace gdcm { diff --git a/src/gdcmPixelReadConvert.h b/src/gdcmPixelReadConvert.h index 2be2bc8e..743d1ef5 100644 --- a/src/gdcmPixelReadConvert.h +++ b/src/gdcmPixelReadConvert.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.h,v $ Language: C++ - Date: $Date: 2004/12/03 11:55:38 $ - Version: $Revision: 1.2 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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,13 +21,13 @@ #define GDCMPIXELREADCONVERT_H #include "gdcmCommon.h" -#include "gdcmRLEFramesInfo.h" -#include "gdcmJPEGFragmentsInfo.h" #include "gdcmException.h" -#include "gdcmHeader.h" namespace gdcm { +class Header; +class RLEFramesInfo; +class JPEGFragmentsInfo; /* * \brief Utility container for gathering the various forms the pixel data * migth take during the user demanded processes. diff --git a/src/gdcmRLEFrame.h b/src/gdcmRLEFrame.h index 735ffffe..21b2dd30 100644 --- a/src/gdcmRLEFrame.h +++ b/src/gdcmRLEFrame.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFrame.h,v $ Language: C++ - Date: $Date: 2004/12/03 10:21:54 $ - Version: $Revision: 1.9 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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,6 +21,7 @@ #define GDCMRLEFRAME_H #include "gdcmCommon.h" + #include namespace gdcm diff --git a/src/gdcmRLEFramesInfo.h b/src/gdcmRLEFramesInfo.h index f712f959..d8cb65ef 100644 --- a/src/gdcmRLEFramesInfo.h +++ b/src/gdcmRLEFramesInfo.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFramesInfo.h,v $ Language: C++ - Date: $Date: 2004/12/03 10:21:54 $ - Version: $Revision: 1.7 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -21,7 +21,9 @@ #define GDCMRLEFRAMESINFO_H #include "gdcmRLEFrame.h" + #include + namespace gdcm { diff --git a/src/gdcmSQItem.cxx b/src/gdcmSQItem.cxx index 62e50677..a9c1ed5e 100644 --- a/src/gdcmSQItem.cxx +++ b/src/gdcmSQItem.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSQItem.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 17:13:18 $ - Version: $Revision: 1.39 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -21,8 +21,10 @@ #include "gdcmValEntry.h" #include "gdcmBinEntry.h" #include "gdcmGlobal.h" +#include "gdcmDictSet.h" #include "gdcmUtil.h" #include "gdcmDebug.h" + #include namespace gdcm diff --git a/src/gdcmSeqEntry.h b/src/gdcmSeqEntry.h index d89632f2..4f22ff2f 100644 --- a/src/gdcmSeqEntry.h +++ b/src/gdcmSeqEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSeqEntry.h,v $ Language: C++ - Date: $Date: 2004/11/25 15:46:12 $ - Version: $Revision: 1.24 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -19,12 +19,13 @@ #ifndef GDCMSQDOCENTRY_H #define GDCMSQDOCENTRY_H -#include "gdcmSQItem.h" #include "gdcmDocEntry.h" + #include + namespace gdcm { - +class SQItem; //----------------------------------------------------------------------------- typedef std::list ListSQItem; //----------------------------------------------------------------------------- diff --git a/src/gdcmSerieHeader.cxx b/src/gdcmSerieHeader.cxx index 37da36b1..ff773d8b 100644 --- a/src/gdcmSerieHeader.cxx +++ b/src/gdcmSerieHeader.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHeader.cxx,v $ Language: C++ - Date: $Date: 2004/11/26 10:55:04 $ - Version: $Revision: 1.1 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 "gdcmSerieHeader.h" #include "gdcmDirList.h" -#include "gdcmDebug.h" +#include "gdcmHeader.h" #include #include diff --git a/src/gdcmSerieHeader.h b/src/gdcmSerieHeader.h index 6b062296..fe95a31b 100644 --- a/src/gdcmSerieHeader.h +++ b/src/gdcmSerieHeader.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSerieHeader.h,v $ Language: C++ - Date: $Date: 2004/11/26 10:55:04 $ - Version: $Revision: 1.1 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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,11 +19,12 @@ #ifndef GDCMSERIEHEADER_H #define GDCMSERIEHEADER_H -#include "gdcmHeader.h" +#include "gdcmCommon.h" +#include namespace gdcm { - +class Header; //----------------------------------------------------------------------------- /* * \defgroup SerieHeader diff --git a/src/gdcmTS.h b/src/gdcmTS.h index 1d9b84b2..76ecc90a 100644 --- a/src/gdcmTS.h +++ b/src/gdcmTS.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmTS.h,v $ Language: C++ - Date: $Date: 2004/10/27 01:32:15 $ - Version: $Revision: 1.11 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -20,6 +20,7 @@ #define GDCMTS_H #include "gdcmCommon.h" + #include #include #include diff --git a/src/gdcmValEntry.h b/src/gdcmValEntry.h index b3fc2081..b014e74b 100644 --- a/src/gdcmValEntry.h +++ b/src/gdcmValEntry.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValEntry.h,v $ Language: C++ - Date: $Date: 2004/11/25 15:46:12 $ - Version: $Revision: 1.31 $ + Date: $Date: 2004/12/03 20:16:58 $ + 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 @@ -20,6 +20,7 @@ #define GDCMVALENTRY_H #include "gdcmDocEntry.h" + #include namespace gdcm diff --git a/vtk/vtkGdcmReader.cxx b/vtk/vtkGdcmReader.cxx index ae0c8099..580379cb 100644 --- a/vtk/vtkGdcmReader.cxx +++ b/vtk/vtkGdcmReader.cxx @@ -58,7 +58,7 @@ #include #include -vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.59 $"); +vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.60 $"); vtkStandardNewMacro(vtkGdcmReader); //----------------------------------------------------------------------------- @@ -666,6 +666,7 @@ size_t vtkGdcmReader::LoadImageInMemory( { for (int line = 0; line < numLines; line++) { + cerr << line << endl; // Copy one line at proper destination: memcpy((void*)destination, (void*)source, lineSize); source += lineSize; -- 2.45.1