]> Creatis software - gdcm.git/commitdiff
Normalization
authorjpr <jpr>
Wed, 2 Feb 2005 10:02:16 +0000 (10:02 +0000)
committerjpr <jpr>
Wed, 2 Feb 2005 10:02:16 +0000 (10:02 +0000)
56 files changed:
Example/BuildUpDicomDir.cxx
Example/FindTags.cxx
Example/FlatHashTablePrint.cxx
Example/PrintDocument.cxx
Example/PrintFile.cxx
Example/TestChangeHeader.cxx
Example/TestCopyDicom.cxx
Example/TestDcm2Acr.cxx
Example/TestFromScratch.cxx
Example/TestPapyrus.cxx
Example/TestReadWriteReadCompare.cxx
Example/TestWrite.cxx
Example/TestWriteSimple.cxx
Example/Volume2Dicom.cxx
Example/Write.cxx
Example/WriteDicom.cxx
Example/WriteDicomSimple.cxx
Example/WriteRead.cxx
Example/makeDicomDir.cxx
Testing/CMakeLists.txt
Testing/TestAllEntryVerify.cxx
Testing/TestBug.cxx
Testing/TestChangeHeader.cxx
Testing/TestCopyDicom.cxx
Testing/TestCopyRescaleDicom.cxx
Testing/TestDicomDirElement.cxx
Testing/TestDicomString.cxx
Testing/TestDict.cxx
Testing/TestDirList.cxx
Testing/TestHash.cxx
Testing/TestReadWriteReadCompare.cxx
Testing/TestTS.cxx
Testing/TestUtil.cxx
Testing/TestVR.cxx
Testing/TestWriteSimple.cxx
Testing/VTKTestRead.cxx
Testing/VTKTestReadSeq.cxx
Testing/VTKTestWrite.cxx
src/gdcmBinEntry.cxx
src/gdcmContentEntry.cxx
src/gdcmDebug.cxx
src/gdcmDicomDir.cxx
src/gdcmDicomDirPatient.cxx
src/gdcmDicomDirStudy.cxx
src/gdcmDictSet.cxx
src/gdcmDocEntry.cxx
src/gdcmDocEntrySet.cxx
src/gdcmDocument.cxx
src/gdcmFile.cxx
src/gdcmFileHelper.cxx
src/gdcmJpeg.cxx
src/gdcmPixelReadConvert.cxx
src/gdcmRLEFramesInfo.cxx
src/gdcmTS.cxx
src/gdcmUtil.cxx
src/gdcmValEntry.cxx

index 6de2f2023dc06ae0dca2ace1a647a853d057a206..5fcbb33cfeb5858654c6a6f3ea549a551c746d5e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: BuildUpDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:22 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/02/02 10:06:31 $
+  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
@@ -33,7 +33,7 @@
   *          and writes a file named NewDICOMDIR. 
   */
   
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
    std::string dirName = "NewDICOMDIR";
 
index 38d4b2e4ef238fa7f681d76dcb241a3f467e495f..566c86343870ea7f2964591c7e1c1cedacecf87e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: FindTags.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:22 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/02/02 10:06:31 $
+  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
 #include <iostream>
 #include <stdio.h> // for sscanf
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
-   std::string toto, titi;
+   std::string fileName;
 
    gdcm::FileHelper *f1;
 
    if(argc > 1 )
       f1 = new gdcm::FileHelper(argv[1]);
    else  {
-      toto = GDCM_DATA_ROOT;
-      toto += "/test.acr";
-      f1 = new gdcm::FileHelper(toto);
+      fileName = GDCM_DATA_ROOT;
+      fileName += "/test.acr";
+      f1 = new gdcm::FileHelper(fileName);
    }
 
    std::string ManufacturerName="SIEMENS ";
    std::string RecCode="ACR-NEMA 2.0";
    std::string ImagePositionPatient, Location, ImageLocation;
-   std::string zozo;
+   std::string fileNameToWrite;
    char c;
 
    float x, y, z, l;
@@ -58,12 +58,12 @@ int main(int argc, char* argv[])
 
    sscanf(ImagePositionPatient.c_str(), "%f%c%f%c%f", &x,&c,&y,&c,&z);
 
-// ceci est probablement une mauvaise idée !
+// probablely a bad idea !
 // (peut casser l'ordre des images si la pile d'images 
 // traverse l'axe des X, ou des Y, ou des Z)
 //l=sqrt(x*x + y*y + z*z);
 
-// ceci ne marchera pas si on se déplace à Z constant :-(
+// Will not work if we move on a Z constant :-(
    l=z;
 // existerait-il qq chose qui marche à tout coup?
 
@@ -77,7 +77,7 @@ int main(int argc, char* argv[])
 // a eclaircir !
 
 // SetEntryLength is private now.
-//TO DO : see is the pb goes on...
+//TO DO : see if the pb goes on...
 
 //f1->GetFile()->SetEntryLength(strlen(Location.c_str())-1, 0x0020,0x0050);
 
@@ -88,20 +88,20 @@ int main(int argc, char* argv[])
 //f1->SetValEntry(Location, 0x0028,0x0200);
 //f1->GetFile()->SetEntryLength(strlen(ImageLocation.c_str())-1, 0x0020,0x0050); // prudence !
 
-// voidimageData= f1->GetImageData();
+// void *imageData= f1->GetImageData();
 
 // ecriture d'un fichier ACR à partir d'un dcmFile correct.
 
-   std::cout << "----------------avant PrintEntry---------------------" << std::endl;
+   std::cout << "----------------before PrintEntry---------------------" << std::endl;
    f1->GetFile()->Print();
-   std::cout << "----------------avant WriteDcm---------------------" << std::endl;
+   std::cout << "----------------before WriteDcm---------------------" << std::endl;
 
 
 // ecriture d'un fichier ACR à partir d'un dcmFile correct.
 
-   zozo = toto + ".acr";
+   fileNameToWrite = fileName + ".acr";
    std::cout << "WriteACR" << std::endl;
-   f1->WriteAcr(zozo);
+   f1->WriteAcr(fileNameToWrite);
 
    std::cout << "----------------apres Write---------------------" << std::endl;
 
index fd134640c5e3f1309a580a001afc6b78d3e8a2d7..183ec8c1857f4561ab35fe6009cc528d2043fbec 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: FlatHashTablePrint.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:52 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/02/02 10:06:31 $
+  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
@@ -22,7 +22,7 @@
 // as line argument) and print them. This is an illustration of the
 // usage of \ref gdcmDocument::BuildFlatHashTable().
 
-int main(int , char* [])
+int main(int, char*[])
 {
 /*   if (argc < 2)
    {
@@ -31,8 +31,8 @@ int main(int , char* [])
       return 1;
    }
 
-   gdcm::Fileheader = new gdcm::File( argv[1] );
-   gdcm::TagDocEntryHTHt = header->BuildFlatHashTable();
+   gdcm::File *header = new gdcm::File( argv[1] );
+   gdcm::TagDocEntryHT *Ht = header->BuildFlatHashTable();
    
    for (gdcm::TagDocEntryHT::iterator tag = Ht->begin(); tag != Ht->end(); ++tag)
    {
index 8d7a0aadd2f46021f7627861abda286951998f88..c2a6ceec709e6e60d26d5e5a91e50b081c9b2e7f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:52 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/02/02 10:06:31 $
+  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
@@ -19,7 +19,7 @@
 
 #include <iostream>
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
  
    gdcm::File *e1;
index bb9789abff2b92bf1acaa4258f6bc73a0a957d27..f449c69636ffd888d40bc3fcd669b14a4e32150f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 11:13:08 $
-  Version:   $Revision: 1.28 $
+  Date:      $Date: 2005/02/02 10:06:31 $
+  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 <iostream>
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
    gdcm::File *e1;
    gdcm::FileHelper   *f1;
index b8de5e276a62fe60d1ec0f780ac0ab049e0c5bf4..4e8b7503f82d68fd620d974f30fbff94085b8f1d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestChangeHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:22 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/02/02 10:06:31 $
+  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
@@ -21,7 +21,7 @@
 // This examples read two images (could be the same). Try to modify
 // Acquisition Matrix and then write the image again
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
     if (argc < 3)
     {
index 8e7a43b2cb00f00ed4ba5fadff92979329385c97..423a3ded8ce7d0adfa6148b0b3ae75b64848aa49 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:22 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/02/02 10:06:31 $
+  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
@@ -28,7 +28,7 @@
 #endif
 
 // return true if the file exists
-bool FileExists(const charfilename)
+bool FileExists(const char *filename)
 {
 #ifdef _MSC_VER
 # define access _access
@@ -46,7 +46,7 @@ bool FileExists(const char* filename)
     }
 }
 
-bool RemoveFile(const charsource)
+bool RemoveFile(const char *source)
 {
 #ifdef _MSC_VER
 #define _unlink unlink
@@ -88,27 +88,22 @@ int main(int argc, char* argv[])
       gdcm::FileHelper *copy = new gdcm::FileHelper( output );
 
       size_t dataSize = original->GetImageDataSize();
-      uint8_timageData = original->GetImageData();
+      uint8_t *imageData = original->GetImageData();
       (void)imageData;
       (void)dataSize;
   
       //First of all copy the header field by field
-  
-      // Warning :Accessor gdcmElementSet::GetEntry() should not exist 
-      // It was commented out by Mathieu, that was a *good* idea
-      // (the user does NOT have to know the way we implemented the File !)
-      // Waiting for a 'clean' solution, I keep the method ...JPRx
 
-      gdcm::DocEntry* d=original->GetFile()->GetFirstEntry();
+      gdcm::DocEntry *d = original->GetFile()->GetFirstEntry();
       while(d)
       {
-         if ( gdcm::BinEntryb = dynamic_cast<gdcm::BinEntry*>(d) )
+         if ( gdcm::BinEntry *b = dynamic_cast<gdcm::BinEntry*>(d) )
          {              
             copy->GetFile()->InsertBinEntry( b->GetBinArea(),b->GetLength(),
                                              b->GetGroup(),b->GetElement(),
                                              b->GetVR() );
          }
-         else if ( gdcm::ValEntryv = dynamic_cast<gdcm::ValEntry*>(d) )
+         else if ( gdcm::ValEntry *v = dynamic_cast<gdcm::ValEntry*>(d) )
          {   
             copy->GetFile()->InsertValEntry( v->GetValue(),
                                              v->GetGroup(),v->GetElement(),
index f16e9ef90e627bbaf79dbfaabd73d86e72ce2730..0582cbf6b000ed7972cc11aad855d4aedaa1bfb0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDcm2Acr.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:52 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/02/02 10:06:31 $
+  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
 
 #include <iostream>
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {  
-   std::string toto;
-   std::string zozo;
+   std::string fileName;
+   std::string fileNameToWrite;
 
-   gdcm::FileHelper  * f1;
+   gdcm::FileHelper *f1;
 
    std::cout << " Before gdcmFileHelper()" << std::endl;
    std::cout << "\n\n---------------------------------------" << std::endl;
 
    if (argc > 1)
    {
-      toto = argv[1];
-      f1 = new gdcm::FileHelper(toto);
+      fileName = argv[1];
+      f1 = new gdcm::FileHelper(fileName);
    }
    else
    {
@@ -41,17 +41,14 @@ int main(int argc, char* argv[])
       filename += "/test.acr";
       f1 = new gdcm::FileHelper(filename);
    }
-   std::cout << " Sortie gdcmFileHelper()" << std::endl;
+   std::cout << " After gdcmFileHelper()" << std::endl;
 
-   //e1.PrintPubDict(std::cout);
    f1->GetFile()->Print();
 
-   //cle = gdcmDictEntry::TranslateToKey(0x0028,0x0008);
-
    int dataSize = f1->GetImageDataSize();
    std::cout << "dataSize:" << dataSize << std::endl;
 
-   // voidimageData= f1->GetFile()->GetImageData();
+   // void *imageData= f1->GetFile()->GetImageData();
 
    // Ecriture d'un Raw File, a afficher avec affim filein= dim= nbit= signe=
    //f1->WriteRawData("image.raw");
@@ -62,8 +59,8 @@ int main(int argc, char* argv[])
 
    // ecriture d'un fichier ACR à partir d'un dcmFile correct.
 
-   zozo = toto + ".nema";
-   f1->WriteAcr(zozo);
+   fileNameToWrite = fileName + ".nema";
+   f1->WriteAcr(fileNameToWrite);
    std::cout << "\n\n---------------------------------------\n\n" << std::endl;
 
    f1->GetFile()->Print();
index 0c8f32fd746e9a55dc3bce770f4599d6be72de8a..7bb6884737737cc38608783b20c1fca7734d31b3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestFromScratch.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 11:13:08 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
@@ -49,16 +49,16 @@ int main(int argc, char *argv[])
    int dataSize = f1->GetImageDataSize();
    std::cout << "DataSize:      " << dataSize << std::endl;
    // Since we know the image is 16bits:
-   uint8_timageData = f1->GetImageData();
+   uint8_t *imageData = f1->GetImageData();
  
    // Hopefully default to something
    gdcm::File *h2 = new gdcm::File();
 
    // Copy of the header content
-   gdcm::DocEntryd = h1->GetFirstEntry();
+   gdcm::DocEntry *d = h1->GetFirstEntry();
    while(d)
    {
-      if ( gdcm::ValEntryv = dynamic_cast<gdcm::ValEntry*>(d) )
+      if ( gdcm::ValEntry *v = dynamic_cast<gdcm::ValEntry*>(d) )
       {   
          // Do not bother with field from private dict
          if( v->GetName() != "gdcm::Unknown" )
index b64b6e52508e7ddae4602cb00abf25a6040eeef0..28ad2245086438220969e40e8f374fa1762ab6c2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestPapyrus.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:34:59 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
@@ -34,7 +34,7 @@
 #endif
 
 // return true if the file exists
-bool FileExists(const charfilename)
+bool FileExists(const char *filename)
 {
 #ifdef _MSC_VER
 # define access _access
@@ -52,7 +52,7 @@ bool FileExists(const char* filename)
     }
 }
 
-bool RemoveFile(const charsource)
+bool RemoveFile(const char *source)
 {
 #ifdef _MSC_VER
 #define _unlink unlink
@@ -68,7 +68,7 @@ bool RemoveFile(const char* source)
 // and we don't perform any integrity check
 // ----------------------------------------------------------------------
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
    if (argc < 3)
    {
@@ -184,7 +184,7 @@ int main(int argc, char* argv[])
       return 0;
    }
    // to be sure to be at the beginning
-   Fp->seekg(0,  std::ios::end);
+   Fp->seekg(0, std::ios::end);
 
    uint32_t offset;
    std::string previousRows = Rows;
index 79679194318e08cb80129b1f2802628401f7f70b..98a3a08a620a521e16ddca0c36506de2c706537c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestReadWriteReadCompare.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:52 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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 @@
 //Generated file:
 #include "gdcmDataImages.h"
 
-int main(int argc, charargv[]) 
+int main(int argc, char *argv[]) 
 {
    if (argc<2)
    {
index 8fce916bd8c3f2f342a1f84a062fb49a58ea538f..ee92a4b19307208965f6311084e2b39311856689 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWrite.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 16:10:49 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
 
 int main(int argc, char *argv[])
 {  
-   std::string zozo;
+   std::string fileNameToWrite;
 
    gdcm::File *e1;
    gdcm::FileHelper *f1;
 
-   voidimageData;
+   void *imageData;
    int dataSize;
 
    if (argc < 3) {
@@ -62,10 +62,10 @@ int main(int argc, char *argv[])
              << "--------------------- file :" << argv[1] 
              << std::endl;
      
-   std::string toto = argv[1]; 
+   std::string fileName = argv[1]; 
    std::string mode = argv[2];
 
-   e1 = new gdcm::File( toto.c_str() );
+   e1 = new gdcm::File( fileName.c_str() );
    if (!e1->IsReadable())
    {
        std::cerr << "Sorry, not a Readable DICOM / ACR File"  <<std::endl;
@@ -120,9 +120,9 @@ int main(int argc, char *argv[])
             // ecriture d'un fichier ACR 
             // à partir d'un dcmFile correct.
 
-      zozo = toto + ".ACR";
+      fileNameToWrite = fileName + ".ACR";
       std::cout << "WriteACR" << std::endl;
-      f1->WriteAcr(zozo);
+      f1->WriteAcr(fileNameToWrite);
       break;
 
    case 'd' :  // Not document in the 'usage', because the method is knowed to be bugged. 
@@ -130,27 +130,27 @@ int main(int argc, char *argv[])
            // ecriture d'un fichier DICOM Implicit VR 
            // à partir d'un dcmFile correct.
 
-      zozo = toto + ".DCM";
+      fileNameToWrite = fileName + ".DCM";
       std::cout << "WriteDCM Implicit VR" << std::endl;
-      f1->WriteDcmImplVR(zozo);
+      f1->WriteDcmImplVR(fileNameToWrite);
       break;
 
    case 'x' :
               // ecriture d'un fichier DICOM Explicit VR 
               // à partir d'un dcmFile correct.
 
-      zozo = toto + ".XDCM";
+      fileNameToWrite = fileName + ".XDCM";
       std::cout << "WriteDCM Explicit VR" << std::endl;
-      f1->WriteDcmExplVR(zozo);
+      f1->WriteDcmExplVR(fileNameToWrite);
       break;
 
    case 'r' :
              //  Ecriture d'un Raw File, a afficher avec 
              // affim filein= dimx= dimy= nbit= signe=
 
-      zozo = toto + ".RAW";
+      fileNameToWrite = fileName + ".RAW";
       std::cout << "WriteRaw" << std::endl;
-      f1->WriteRawData(zozo);
+      f1->WriteRawData(fileNameToWrite);
       break;
 
    case 'v' :
@@ -171,9 +171,9 @@ int main(int argc, char *argv[])
            ((uint16_t*)imageData)[i] += 60000; //32767;
         }
      }
-     zozo = toto + ".VDCM";
+     fileNameToWrite = fileName + ".VDCM";
      std::cout << "WriteDCM Explicit VR + VideoInv" << std::endl;
-     f1->WriteDcmExplVR(zozo);
+     f1->WriteDcmExplVR(fileNameToWrite);
      break;
 
    }
index 7c76e13eac3b1172ca8c4dcbfbc7ff624d6fb87b..ee4f15f976c831b46a54cc730992b65c68f637b5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/22 12:39:11 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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 "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
    if (argc < 3) 
    {
@@ -31,7 +31,7 @@ int main(int argc, char* argv[])
    const char *output = argv[2];
 
    gdcm::File       *f1 = new gdcm::File( header );
-   gdcm::FileHelper   *f2 = new gdcm::FileHelper( f1 );
+   gdcm::FileHelper *f2 = new gdcm::FileHelper( f1 );
 
    // If the following call is important, then the API sucks. Why is it
    // required to allocate PixelData when we are not using it !?
index 98bd8dc35769e2eb58fc68ab244251960c6f33c0..3b852d27b6760041b946b929bfd8930bbf74a769 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Volume2Dicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:53 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
 const unsigned int Dimension = 3;
 
 void gdcmwrite(const char *inputfile, std::string directory);
-void GetFileDateAndTime(const char *inputfile, std::string &date, std::string &time);
+void GetFileDateAndTime(const char *inputfile, 
+                        std::string &date, std::string &time);
 
-int main( int argc, char * argv[] )
+int main( int argc, char *argv[] )
 {
    if (argc < 2) 
    {
@@ -158,7 +159,8 @@ int main( int argc, char * argv[] )
 
 
 // just an utility function to retrieve date and time of a file
-void GetFileDateAndTime(const char *inputfile, std::string &date, std::string &time)
+void GetFileDateAndTime(const char *inputfile, std::string &date, 
+                                               std::string &time)
 {
    struct stat buf;    
    if (stat(inputfile, &buf) == 0) 
index d2b6ca10c2d4b67dbe9e17b83335346c86a18cfe..5a864870b57fd9b14d5dd002f25b2c624d1e450c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Write.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 16:10:49 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
 
 #include <iostream>
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {  
-   std::string zozo;
+   std::string FileNameToWrite;
 
-   gdcm::Filee1;
-   gdcm::FileHelper  * f1;
+   gdcm::File *e1;
+   gdcm::FileHelper *f1;
 
-   //gdcmDocument * d;  //not used
-   uint8_t* imageData;
+   uint8_t *imageData;
    int dataSize;
 
    if (argc < 3) {
@@ -60,9 +59,9 @@ int main(int argc, char* argv[])
              << "--------------------- file :" << argv[1] 
              << std::endl;
      
-   std::string toto = argv[1]; 
+   std::string FileName = argv[1]; 
 
-   e1 = new gdcm::File( toto.c_str() );
+   e1 = new gdcm::File( FileName.c_str() );
    if (!e1->IsReadable()) {
        std::cerr << "Sorry, not a Readable DICOM / ACR File"  <<std::endl;
        return 0;
@@ -117,36 +116,36 @@ int main(int argc, char* argv[])
             // ecriture d'un fichier ACR 
             // à partir d'un dcmFile correct.
 
-      zozo = toto + ".ACR";
+      FileNameToWrite = FileName + ".ACR";
       std::cout << "WriteACR" << std::endl;
-      f1->WriteAcr(zozo);
+      f1->WriteAcr(FileNameToWrite);
       break;
 
    case 'd' :
            // ecriture d'un fichier DICOM Implicit VR 
            // à partir d'un dcmFile correct.
 
-      zozo = toto + ".DCM";
+      FileNameToWrite = FileName + ".DCM";
       std::cout << "WriteDCM Implicit VR" << std::endl;
-      f1->WriteDcmImplVR(zozo);
+      f1->WriteDcmImplVR(FileNameToWrite);
       break;
 
    case 'x' :
               // ecriture d'un fichier DICOM Explicit VR 
               // à partir d'un dcmFile correct.
 
-      zozo = toto + ".DCM";
+      FileNameToWrite = FileName + ".DCM";
       std::cout << "WriteDCM Implicit VR" << std::endl;
-      f1->WriteDcmExplVR(zozo);
+      f1->WriteDcmExplVR(FileNameToWrite);
       break;
 
    case 'r' :
              //  Ecriture d'un Raw File, a afficher avec 
              // affim filein= dimx= dimy= nbit= signe=
 
-      zozo = toto + ".RAW";
+      FileNameToWrite = FileName + ".RAW";
       std::cout << "WriteRaw" << std::endl;
-      f1->WriteRawData(zozo);
+      f1->WriteRawData(FileNameToWrite);
       break;
 
    }
index e450f33f0689307afbc75561dc2353682d72af40..406a00acb937b6427132b2117723ddf38f803e1a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:22 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
@@ -21,7 +21,7 @@
 // Writting of a DICOM file based on a correct dicom header
 // and data pixel of another image
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
  
    if (argc < 3) 
@@ -56,7 +56,7 @@ int main(int argc, char* argv[])
    //        and that does the job
  
    int dataSize    = f2->GetImageDataSize();
-   uint8_timageData = f2->GetImageData();
+   uint8_t *imageData = f2->GetImageData();
  
    std::cout << "dataSize :" << dataSize << std::endl;
  
index f5b4e273d29058f53daa67f706be7d19c4634459..03ae9b3c65866c0413a32333e998c33c3560da5b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicomSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:44:22 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
@@ -39,7 +39,7 @@
 #define COLOR_WINDOW    256
 #define COLOR_LEVEL     128
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {
    if (argc < 3) 
    {
index b5a5a9415f5e0f8820d7af6018a34c11b536cac2..8ff10006dfe3329750b7aa98122224d073e81747 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteRead.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:53 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
 
 #include <iostream>
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {  
-   std::string zozo;
-
-   gdcm::File* e1, *e2;
-   gdcm::FileHelper  * f1, *f2;
+   std::string fileNameToWrite;
 
+   gdcm::File *e1;
+   gdcm::File *e2;
+   gdcm::FileHelper *f1;
+   gdcm::FileHelper *f2;
    uint8_t* imageData, *imageData2;
    int dataSize, dataSize2;
      
@@ -36,15 +37,15 @@ int main(int argc, char* argv[])
     return 1;
     }
 
-   std::string toto = argv[1];
+   std::string fileName = argv[1];
 
 // --------------------- we read the input image
 
    std::cout << argv[1] << std::endl;
 
-   e1 = new gdcm::File( toto );
+   e1 = new gdcm::File( fileName );
    if (!e1->IsReadable()) {
-       std::cerr << "Sorry, " << toto <<"  not a Readable DICOM / ACR File"
+       std::cerr << "Sorry, " << fileName <<"  not a Readable DICOM / ACR File"
                  <<std::endl;
        return 0;
    }
@@ -55,15 +56,15 @@ int main(int argc, char* argv[])
 
 // --------------------- we write it as an Explicit VR DICOM file
 
-      zozo = "temp.XDCM";
+      fileNameToWrite = "temp.XDCM";
       std::cout << "WriteDCM Explicit VR" << std::endl;
-      f1->WriteDcmExplVR(zozo);
+      f1->WriteDcmExplVR(fileNameToWrite);
 
 // --------------------- we read the written image
       
-   e2 = new gdcm::File( zozo );
+   e2 = new gdcm::File( fileNameToWrite );
    if (!e2->IsReadable()) {
-       std::cerr << "Sorry, " << zozo << " not a Readable DICOM / ACR File"  
+       std::cerr << "Sorry, " << fileNameToWrite << " not a Readable DICOM / ACR File"  
                  <<std::endl;
        return 0;
    }
@@ -77,14 +78,14 @@ int main(int argc, char* argv[])
      std::cout << " ----------------------------------------- " 
           << "Bad shot! Lengthes are different : " 
           << dataSize << " # " << dataSize2
-          << " for file : " << toto << std::endl;
+          << " for file : " << fileName << std::endl;
 
      return 0;
   }
   if (int res=memcmp(imageData,imageData2,dataSize) !=0) {
      std::cout << " ----------------------------------------- " 
           << "Bad shot! Pixels are different : " 
-          << " for file : " << toto << std::endl;
+          << " for file : " << fileName << std::endl;
      std::cout << "memcmp(imageData,imageData2,dataSize) = " << res << std::endl;
      return 1;
   }
index 948e24f7e38758ba7cb6d09f5b0f9b5aef3819df..81e3b9cfd3ed8df12ccc57366a59eea9f08ed8c7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: makeDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 07:55:16 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/02/02 10:06:32 $
+  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
@@ -43,7 +43,8 @@ void EndMethod(void *toto) {
   *          and writes a file named NewDICOMDIR..
   */  
 
-int main(int argc, char* argv[]) {
+int main(int argc, char *argv[]) 
+{
    gdcm::DicomDir *dcmdir;
    std::string dirName;   
 
index 5a25f63a4d6dcee4c862207d4e7d0d7798ae64ac..f0d5eae88075bea07f0c8964f8a94fd7da172e97 100644 (file)
@@ -138,19 +138,13 @@ ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9)
 
 # Black list of images known to break lots of readers (efilm, xmedcon ...):
 SET(BLACK_LIST
-  # serial killer (also segfaults vtkgdcmViewer, but NOT PrintFile)
-  #"gdcm-JPEG-LossLessThoravision.dcm"
-
-  # Mathieu: temporarily remove as it kills my gnome session (but not kde)
-  # JPR: also breaks TestReadWriteReadCompare : Pixel differ (as expanded
-  #      in memory)  
-  #"KODAK-12-MONO1-Odd_Terminated_Sequence.dcm"
   
   # Multiframe Papyrus format image
-  # Just to remember this format exist, and is gdcm::Header compliant
-  # (NOT gdcm::File ...)
+  # Just to remember this format exists, and is gdcm::File compliant
+  # (NOT gdcm::FileHelper ...)
   # any contribution is welcome
-  "PET-cardio-Multiframe-Papyrus.dcm"   
+  "PET-cardio-Multiframe-Papyrus.dcm"
+  # From David Clunie's Compresion Dataset  
   "D_CLUNIE_CT1_JLSN.dcm"
   "D_CLUNIE_CT1_JLSL.dcm"
   "D_CLUNIE_CT1_J2KR.dcm"
index adcf230699a5c32217b448900d6e6902b022af38..7f7937c52c34c5cbb2f85dce9b9001cd783ca6ef 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllEntryVerify.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/27 10:47:29 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -28,7 +28,7 @@
 
 typedef std::string EntryValueType;   // same type as ValEntry::value
 typedef std::map< gdcm::TagKey, EntryValueType > MapEntryValues;
-typedef MapEntryValuesMapEntryValuesPtr;
+typedef MapEntryValues *MapEntryValuesPtr;
 typedef std::string FileNameType;
 typedef std::map< FileNameType, MapEntryValuesPtr > MapFileValuesType;
 
@@ -61,21 +61,21 @@ public:
    bool Check( std::string fileName );
 
 private:
-   bool AddKeyValuePairToMap( std::string& key, std::string& value );
+   bool AddKeyValuePairToMap( std::string &key, std::string &value );
 
-   std::istream& eatwhite(std::istreamis);
-   void eatwhite(std::stringtoClean);
-   std::string ExtractFirstString(std::stringtoSplit);
-   void CleanUpLine( std::stringline );
+   std::istream& eatwhite(std::istream &is);
+   void eatwhite(std::string &toClean);
+   std::string ExtractFirstString(std::string &toSplit);
+   void CleanUpLine( std::string &line );
 
    bool Check( MapFileValuesType::iterator &fileIt );
-   std::string ExtractValue(std::stringtoSplit)  throw ( ParserException );
-   void ParseRegularLine( std::stringline )      throw ( ParserException );
+   std::string ExtractValue(std::string &toSplit)  throw ( ParserException );
+   void ParseRegularLine( std::string &line )      throw ( ParserException );
    void FirstPassReferenceFile()                   throw ( ParserException );
    bool SecondPassReferenceFile()                  throw ( ParserException );
-   void HandleFileName( std::stringline )        throw ( ParserException );
-   void HandleKey( std::stringline )             throw ( ParserException );
-   bool HandleValue( std::stringline )           throw ( ParserException );
+   void HandleFileName( std::string &line )        throw ( ParserException );
+   void HandleKey( std::string &line )             throw ( ParserException );
+   bool HandleValue( std::string &line )           throw ( ParserException );
    static uint16_t axtoi( char* );
 
 private:
@@ -104,7 +104,7 @@ private:
    std::string CurrentValue;
 
    /// The current MapEntryValues pointer:
-   MapEntryValuesCurrentMapEntryValuesPtr;
+   MapEntryValues *CurrentMapEntryValuesPtr;
 };
 
 ReferenceFileParser::ReferenceFileParser()
@@ -160,13 +160,13 @@ uint16_t ReferenceFileParser::axtoi(char *hexStg)
    return intValue;
 }
 
-void ReferenceFileParser::SetDataPath( std::stringinDataPath )
+void ReferenceFileParser::SetDataPath( std::string &inDataPath )
 {
    DataPath = inDataPath;
 }
 
-bool ReferenceFileParser::AddKeyValuePairToMap( std::stringkey, 
-                                                std::stringvalue )
+bool ReferenceFileParser::AddKeyValuePairToMap( std::string &key, 
+                                                std::string &value )
 {
    if ( !CurrentMapEntryValuesPtr )
       return false;
@@ -277,7 +277,7 @@ bool ReferenceFileParser::Check( MapFileValuesType::iterator &fileIt )
    return true;
 }
 
-std::istream& ReferenceFileParser::eatwhite( std::istream& is )
+std::istream &ReferenceFileParser::eatwhite( std::istream &is )
 {
    char c;
    while (is.get(c)) {
@@ -295,7 +295,7 @@ void ReferenceFileParser::eatwhite( std::string& toClean )
       toClean.erase( 0, toClean.find_first_of( " " ) + 1 );
 }
 
-std::string ReferenceFileParser::ExtractFirstString( std::stringtoSplit )
+std::string ReferenceFileParser::ExtractFirstString( std::string &toSplit )
 {
    std::string firstString;
    eatwhite( toSplit );
@@ -310,7 +310,7 @@ std::string ReferenceFileParser::ExtractFirstString( std::string& toSplit )
    return firstString;
 }
 
-std::string ReferenceFileParser::ExtractValue( std::stringtoSplit )
+std::string ReferenceFileParser::ExtractValue( std::string &toSplit )
    throw ( ParserException )
 {
    eatwhite( toSplit );
@@ -477,7 +477,7 @@ void ReferenceFileParser::FirstPassReferenceFile() throw ( ParserException )
    from.seekg( 0, std::ios::beg );
 }
 
-bool ReferenceFileParser::Open( std::stringreferenceFileName )
+bool ReferenceFileParser::Open( std::string &referenceFileName )
 {
    from.open( referenceFileName.c_str(), std::ios::in );
    if ( !from.is_open() )
@@ -500,7 +500,7 @@ bool ReferenceFileParser::Open( std::string& referenceFileName )
    return true; //??
 }
 
-void ReferenceFileParser::CleanUpLine( std::stringline )
+void ReferenceFileParser::CleanUpLine( std::string &line )
 {
    // Cleanup from comments:
    if ( line.find_first_of( "#" ) != std::string::npos )
@@ -514,7 +514,7 @@ void ReferenceFileParser::CleanUpLine( std::string& line )
    eatwhite( line );
 }
 
-void ReferenceFileParser::HandleFileName( std::stringline )
+void ReferenceFileParser::HandleFileName( std::string &line )
    throw ( ParserException )
 {
    if ( line.length() == 0 )
@@ -526,7 +526,7 @@ void ReferenceFileParser::HandleFileName( std::string& line )
    CurrentFileName = ExtractFirstString(line);
 }
 
-void ReferenceFileParser::HandleKey( std::stringline )
+void ReferenceFileParser::HandleKey( std::string &line )
    throw ( ParserException )
 {
    if ( CurrentKey.length() != 0 )
@@ -541,7 +541,7 @@ void ReferenceFileParser::HandleKey( std::string& line )
    }
 }
 
-bool ReferenceFileParser::HandleValue( std::stringline )
+bool ReferenceFileParser::HandleValue( std::string &line )
    throw ( ParserException )
 {
    if ( line.length() == 0 )
@@ -564,7 +564,7 @@ bool ReferenceFileParser::HandleValue( std::string& line )
    return true;
 }
 
-void ReferenceFileParser::ParseRegularLine( std::stringline)
+void ReferenceFileParser::ParseRegularLine( std::string &line)
    throw ( ParserException )
 {
    if ( line.length() == 0 )
@@ -648,7 +648,7 @@ bool ReferenceFileParser::SecondPassReferenceFile()
    return true; //??
 }
 
-int TestAllEntryVerify(int argc, charargv[]) 
+int TestAllEntryVerify(int argc, char *argv[]) 
 {
    if ( argc > 2 )
    {
index 4f918c73443817df78a3bf81a337338a7a6bdc57..4f5b7a282d0270e93b30dcf4ff29a477d96b0990 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestBug.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:54 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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,9 +21,9 @@
 
 #include "gdcmFile.h"
 
-int TestBug(int argc, charargv[])
+int TestBug(int argc, char *argv[])
 {  
-  gdcm::Filee1;
+  gdcm::File *e1;
 
    if (argc > 1)
       e1 = new gdcm::File( argv[1] );
@@ -32,8 +32,7 @@ int TestBug(int argc, char* argv[])
       filename += "/test.acr";
       e1 = new gdcm::File( filename.c_str() );
    }
-   //e1->PrintPubDict();
-   //e1->GetPubDict()->GetEntriesByKey();
+
    e1->GetPubDict()->Print();
    delete e1;
 
index 7d7723f2548b9e25bde95632c5f5f914987eb1da..e4898a0c429de486d4d3b507543aefc27c32c75a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestChangeHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:29:33 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -22,7 +22,7 @@
 // and pixels of an other image
 
 
-int TestChangeHeader(int argc, charargv[])
+int TestChangeHeader(int argc, char *argv[])
 {
    if (argc < 3)
    {
@@ -77,7 +77,7 @@ int TestChangeHeader(int argc, char* argv[])
 
    int dataSize = f2->GetImageDataSize();
    printf ("dataSize %d\n",dataSize);
-   uint8_timageData= f2->GetImageData();
+   uint8_t *imageData= f2->GetImageData();
 
 // TODO : Why don't we merge theese 2 functions ?
 
index 8c3ad7491b056a390eadeabee24ef9b5eec5e11e..d274440eed7f1856b52b7f8787174c018e2e471c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/26 16:43:10 $
-  Version:   $Revision: 1.37 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  Version:   $Revision: 1.38 $
                                                                                 
   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 @@ bool FileExists(const char* filename)
     }
 }
 
-bool RemoveFile(const charsource)
+bool RemoveFile(const char *source)
 {
 #ifdef _MSC_VER
 #define _unlink unlink
@@ -56,8 +56,8 @@ bool RemoveFile(const char* source)
   return unlink(source) != 0 ? false : true;
 }
 
-int CopyDicom(std::string const & filename, 
-              std::string const & output )
+int CopyDicom(std::string const &filename, 
+              std::string const &output )
 {
       std::cout << "   Testing: " << filename << std::endl;
       if( FileExists( output.c_str() ) )
@@ -78,16 +78,16 @@ int CopyDicom(std::string const & filename,
 
       //////////////// Step 2:
       std::cout << "2...";
-      gdcm::DocEntryd=originalH->GetFirstEntry();
+      gdcm::DocEntry *d=originalH->GetFirstEntry();
       while(d)
       {
-         if ( gdcm::BinEntryb = dynamic_cast<gdcm::BinEntry*>(d) )
+         if ( gdcm::BinEntry *b = dynamic_cast<gdcm::BinEntry*>(d) )
          {
             copyH->InsertBinEntry( b->GetBinArea(),b->GetLength(),
                                    b->GetGroup(),b->GetElement(),
                                    b->GetVR() );
          }
-         else if ( gdcm::ValEntryv = dynamic_cast<gdcm::ValEntry*>(d) )
+         else if ( gdcm::ValEntry *v = dynamic_cast<gdcm::ValEntry*>(d) )
          {   
              copyH->InsertValEntry( v->GetValue(),
                                     v->GetGroup(),v->GetElement(),
@@ -105,7 +105,7 @@ int CopyDicom(std::string const & filename,
       gdcm::FileHelper *copy     = new gdcm::FileHelper( copyH );
 
       size_t dataSize = original->GetImageDataSize();
-      uint8_timageData = original->GetImageData();
+      uint8_t *imageData = original->GetImageData();
 
       // Useless to set the image data, because it's already made when
       // copying the corresponding BinEntry that contains the pixel data
@@ -149,7 +149,7 @@ int CopyDicom(std::string const & filename,
       //////////////// Step 5:
       std::cout << "5...";
       size_t    dataSizeWritten = copy->GetImageDataSize();
-      uint8_timageDataWritten = copy->GetImageData();
+      uint8_t *imageDataWritten = copy->GetImageData();
 
       if (dataSize != dataSizeWritten)
       {
@@ -188,7 +188,7 @@ int CopyDicom(std::string const & filename,
 // Here we load a gdcmFile and then try to create from scratch a copy of it,
 // copying field by field the dicom image
 
-int TestCopyDicom(int argc, charargv[])
+int TestCopyDicom(int argc, char *argv[])
 {
    if ( argc == 3 )
    {
index dc9b2a9244e4db63308419364fbcc626e29a4adf..f93f5e681d8125fc1a56dbba42a733e7c138111a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyRescaleDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/26 16:43:10 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -50,7 +50,7 @@ int CopyRescaleDicom(std::string const & filename,
 
    //////////////// Step 2:
    std::cout << "2...";
-   // Copy of the header content
+   // Copy of the file content
    gdcm::DocEntry* d = originalF->GetFirstEntry();
    while(d)
    {
index ddea03e5364f67add4a3a280b1897359cacb4d4f..a5f1c9f75ad36cee3882b72ebba7724a50548b9a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDicomDirElement.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/26 16:43:10 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -29,6 +29,8 @@ int TestDicomDirElement(int , char *[])
    }  
    ddElt->Print( std::cout );
 
+   // TODO : User add an Entry (e.g Physician Name )
+
    delete ddElt;
    return 0;
 }
index c778fa112a7a7dd8d09583d1dcfed48470404a9a..006d3b450042db153ff533fb5f374bf6186905b4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDicomString.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 23:18:31 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -18,7 +18,7 @@
 #include "gdcmUtil.h"
 #include <assert.h>
 
-int TestDicomString(int , char* [])
+int TestDicomString(int, char *[])
 {
   int i;
   const char *s = "\0\0";
@@ -36,7 +36,8 @@ std::string zeros(x, 0);
 char s1[] = "\0";
 char s2[] = "\0\0";
 char s3[] = "\0\0\0";
-char s4[] = "\0abc";*/
+char s4[] = "\0abc";
+*/
 
   return 0;
 }
index 54c87a5b16d4c9fdee4a7df799a38805a34b80cc..8cf93f70b91684ee70b927cf3b92bea16071fe6e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDict.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/26 16:43:10 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
 #include <iostream>
 #include <iomanip>
 
-int TestDict(int , char[])
+int TestDict(int , char *[])
 { 
 
-   std::cout << "-------- Test Default Dicom Dictionary : ----------" << std::endl;
+   std::cout << "----- Test Default Dicom Dictionary : ----------" << std::endl;
    // Just to improve test coverage:
    gdcm::Dict *tempDict = new gdcm::Dict("dummyFileNameThatDoesntExist");
    // Default dict is supposed to be used.
    tempDict->Print();
-   std::cout << "-------- end Test Default Dicom Dictionary : --------" << std::endl;
+   std::cout << "---- end Test Default Dicom Dictionary : -------" << std::endl;
 
    // Lets delete it.
    delete tempDict;
index b60cdc38af2033574dad051b11f3db5d0efc4a25..cd34df8f9d365540775838698cd52a781f43e997 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDirList.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/14 23:57:06 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -17,7 +17,7 @@
 =========================================================================*/
 #include "gdcmDirList.h"
 
-int TestDirList(int , char[])
+int TestDirList(int , char *[])
 {  
    std::string path = GDCM_DATA_ROOT;
    std::cerr << path << std::endl;
index 28c6875ed6c767a1887a3ff75c61aa771ebc597c..385bb14d2ce0d3221eb5a79b8c4eb8dedfaf6e6b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestHash.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/16 04:28:20 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -21,7 +21,7 @@
 #include <string>
 #include <iostream>
 
-int TestHash( int, char * [] )
+int TestHash( int, char *[] )
 {
    std::cout << "Test::TestHash : " << std::endl;
    std::cout << "   Checks that the basic STL <map> functionalities required "
index 468b8721840febb9fa0087fc72fb81cc8d511422..8a821950e4fbbf870fe1283a0f9fb75c39a5f4c9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestReadWriteReadCompare.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:54 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -27,21 +27,21 @@ int CompareInternal(std::string const & filename, std::string const & output)
 
    //////////////// Step 1 (see above description):
 
-   gdcm::File *header = new gdcm::File( filename );
-   if( !header->IsReadable() )
+   gdcm::File *file = new gdcm::File( filename );
+   if( !file->IsReadable() )
    {
       std::cerr << "Test::TestReadWriteReadCompare: Image not gdcm compatible:"
                 << filename << std::endl;
-      delete header;
+      delete file;
       return 1;
    }
    std::cout << "           step 1...";
 
    //////////////// Step 2:
 
-   gdcm::FileHelper*  file = new gdcm::FileHelper( header );
-   int dataSize    = file->GetImageDataSize();
-   uint8_t* imageData = file->GetImageData(); //EXTREMELY IMPORTANT
+   gdcm::FileHelper *filehelper = new gdcm::FileHelper( file );
+   int dataSize    = filehelper->GetImageDataSize();
+   uint8_t *imageData = filehelper->GetImageData(); //EXTREMELY IMPORTANT
           // Sure, it is : It's up to the user to decide if he wants to
           // GetImageData or if he wants to GetImageDataRaw
           // (even if we do it by setting a flag, he will have to decide) 
@@ -62,46 +62,46 @@ int CompareInternal(std::string const & filename, std::string const & output)
    
    // --> I did. ctest doesn't break. But ... is it enought to say it's OK ?
    
-   file->SetImageData(imageData, dataSize);
+   filehelper->SetImageData(imageData, dataSize);
    
-   file->SetWriteModeToRGB();
-   file->WriteDcmExplVR( output );
+   filehelper->SetWriteModeToRGB();
+   filehelper->WriteDcmExplVR( output );
    std::cout << "2...";
  
    //////////////// Step 3:
 
-   gdcm::FileHelperreread = new gdcm::FileHelper( output );
+   gdcm::FileHelper *reread = new gdcm::FileHelper( output );
    if( !reread->GetFile()->IsReadable() )
    {
      std::cerr << "Failed" << std::endl
                << "Test::TestReadWriteReadCompare: Could not reread image "
                << "written:" << filename << std::endl;
-     delete header;
      delete file;
+     delete filehelper;
      delete reread;
      return 1;
    }
    std::cout << "3...";
    // For the next step:
    int    dataSizeWritten = reread->GetImageDataSize();
-   uint8_timageDataWritten = reread->GetImageData();
+   uint8_t *imageDataWritten = reread->GetImageData();
 
    //////////////// Step 4:
    // Test the image size
-   if (header->GetXSize() != reread->GetFile()->GetXSize() ||
-       header->GetYSize() != reread->GetFile()->GetYSize() ||
-       header->GetZSize() != reread->GetFile()->GetZSize())
+   if (file->GetXSize() != reread->GetFile()->GetXSize() ||
+       file->GetYSize() != reread->GetFile()->GetYSize() ||
+       file->GetZSize() != reread->GetFile()->GetZSize())
    {
       std::cout << "Failed" << std::endl
          << "        X Size differs: "
-         << "X: " << header->GetXSize() << " # " 
+         << "X: " << file->GetXSize() << " # " 
                   << reread->GetFile()->GetXSize() << " | "
-         << "Y: " << header->GetYSize() << " # " 
+         << "Y: " << file->GetYSize() << " # " 
                   << reread->GetFile()->GetYSize() << " | "
-         << "Z: " << header->GetZSize() << " # " 
+         << "Z: " << file->GetZSize() << " # " 
                   << reread->GetFile()->GetZSize() << std::endl;
-      delete header;
       delete file;
+      delete filehelper;
       delete reread;
       return 1;
    }
@@ -112,34 +112,33 @@ int CompareInternal(std::string const & filename, std::string const & output)
       std::cout << "Failed" << std::endl
          << "        Pixel areas lengths differ: "
          << dataSize << " # " << dataSizeWritten << std::endl;
-      delete header;
       delete file;
+      delete filehelper;
       delete reread;
       return 1;
    }
 
    // Test the data's content
-   if (int res = memcmp(imageData, imageDataWritten, dataSize) !=0)
+   if (memcmp(imageData, imageDataWritten, dataSize) !=0)
    {
-      (void)res;
       std::cout << "Failed" << std::endl
          << "        Pixel differ (as expanded in memory)." << std::endl;
-      delete header;
       delete file;
+      delete filehelper;
       delete reread;
       return 1;
    }
    std::cout << "4...OK." << std::endl ;
 
    //////////////// Clean up:
-   delete header;
    delete file;
+   delete filehelper;
    delete reread;
 
    return 0;
 }
 
-int TestReadWriteReadCompare(int argc, charargv[]) 
+int TestReadWriteReadCompare(int argc, char *argv[]) 
 {
    int result = 0;
    if (argc == 3)
index 77d528b9b2104d23b8e7510f36991653bab3769a..7b3c457c5a253236dd3e61ba52f9905095bcebee 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestTS.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:32 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -46,7 +46,8 @@ int TestTS(int , char *[])
    std::cout << ts.IsTransferSyntax( "1.2.840.10008.1.2.4.55" ) << std::endl;
    // JPEG Lossless, Non-Hierarchical (Process 14)
    std::cout << ts.IsTransferSyntax( "1.2.840.10008.1.2.4.57" ) << std::endl;
-   // JPEG Lossless, Hierarchical, First-Order Prediction (Process 14, [Selection Value 1])
+   // JPEG Lossless, Hierarchical, First-Order Prediction (Process 14, 
+   //               [Selection Value 1])
    std::cout << ts.IsTransferSyntax( "1.2.840.10008.1.2.4.70" ) << std::endl;
    // JPEG 2000 Lossless
    std::cout << ts.IsTransferSyntax( "1.2.840.10008.1.2.4.90" ) << std::endl;
@@ -61,14 +62,16 @@ int TestTS(int , char *[])
    std::cout << "Test TS:" << std::endl;
    std::cout << ts.IsJPEGLossless( "1.2.840.10008.1.2.4.55") << std::endl;
 //if ( key == "1.2.840.10008.1.2.4.55"
-//        || key == "1.2.840.10008.1.2.4.57"
-//        || key == "1.2.840.10008.1.2.4.70" )
+//  || key == "1.2.840.10008.1.2.4.57"
+//  || key == "1.2.840.10008.1.2.4.70" )
    std::cout << ts.IsRLELossless( "1.2.840.10008.1.2.5") << std::endl;
    std::cout << ts.IsJPEGLossless( "1.2.840.10008.1.2.5") << std::endl;
    std::cout << ts.IsJPEG2000( "1.2.840.10008.1.2.5") << std::endl;
    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::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::endl;
 
    return ts.GetValue( "" ) != gdcm::GDCM_UNFOUND;
 }
index 969d28d78bf0af57e1c05ac67172f9f17b7f1c27..9574fece0029b8e6bc44831d0cfb22c29506a0fb 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/27 12:02:26 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -22,7 +22,7 @@
 #include "gdcmDebug.h"
 #include <iostream>
 
-int TestUtil(int , char * [])
+int TestUtil(int , char *[])
 {
    // Time 
    std::cout << "Time:" << gdcm::Util::GetCurrentDateTime() << std::endl;
index ddcee2d31cb35c8a4408417910b4f5863f4110fb..36710c63685b81c70ea15c84e227f1b1330b577a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestVR.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/28 09:31:51 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -31,7 +31,7 @@ int TestVR(int , char *[])
 
    gdcm::VR *vr = new gdcm::VR();
  
-   // There should be 16 entries
+   // There should be 16 entries ...
    vr->Print( std::cout );
 
    vr->IsVROfStringRepresentable( "PN" );
@@ -41,7 +41,7 @@ int TestVR(int , char *[])
    vr->IsVROfBinaryRepresentable( "PN" );
 
    vr->IsVROfSequence( "" );
-
+   vr->IsVROfSequence( "SQ" );
    delete vr;
    return 0;
 }
index 60b31813c7b245bdb59b4a442f4f49ceb6417016..51d04094fcff7e183de784a3c79f6944f5be99c8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/26 16:43:10 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -200,7 +200,7 @@ int WriteSimple(Image &img)
 
 // Step 5 : Read the written image
    std::cout << "5...";
-   gdcm::FileHelperreread = new gdcm::FileHelper( fileName );
+   gdcm::FileHelper *reread = new gdcm::FileHelper( fileName );
    if( !reread->GetFile()->IsReadable() )
    {
      std::cerr << "Failed" << std::endl
@@ -215,7 +215,7 @@ int WriteSimple(Image &img)
 // Step 6 : Compare to the written image
    std::cout << "6...";
    size_t dataSizeWritten = reread->GetImageDataSize();
-   uint8_timageDataWritten = reread->GetImageData();
+   uint8_t *imageDataWritten = reread->GetImageData();
 
    // Test the image size
    if (fileToBuild->GetXSize() != reread->GetFile()->GetXSize() ||
@@ -276,7 +276,7 @@ int WriteSimple(Image &img)
    return 0;
 }
 
-int TestWriteSimple(int argc, charargv[])
+int TestWriteSimple(int argc, char *argv[])
 {
    if (argc < 1) 
    {
index 3ac95d26baa75af4500a29efed29d679cfb5625f..89015c9ed48c9c1fb3f552303b137ce4ad4f0975 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: VTKTestRead.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:45:49 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -37,8 +37,8 @@
 #endif
 
 int VTKReadTest(vtkTesting *t,vtkImageViewer *viewer,
-                std::string const & filename, 
-                std::string const & referenceFileName)
+                std::string const &filename, 
+                std::string const &referenceFileName)
 {
    int retVal = 0;  //by default this is an error
 
@@ -194,7 +194,7 @@ int VTKTestRead(int argc, char *argv[])
    }
 
    int ret = 0;
-   vtkTestingt = vtkTesting::New();
+   vtkTesting *t = vtkTesting::New();
    vtkImageViewer *viewer;
    if( show )
       viewer = vtkImageViewer::New();
index 1bc77c1d62b9737aae1acc36922f3e6ce7f907db..e7a35127ca01dd11a3b69dea9586d8ee37ea125f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: VTKTestReadSeq.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:45:49 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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
@@ -34,9 +34,9 @@
 #define vtkFloatingPointType float
 #endif
 
-int VTKReadSeqTest(vtkTesting *t,vtkImageViewer *viewer,
-                   std::string const & filename, 
-                   std::string const & referenceFileName)
+int VTKReadSeqTest(vtkTesting *t, vtkImageViewer *viewer,
+                   std::string const &filename, 
+                   std::string const &referenceFileName)
 {
    int retVal = 0;  //by default this is an error
 
index 0ec988e6884e9f8180cf179c68306cc12a3e9db0..ea204cf11e078f6978712527dd3de0030ef22981 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: VTKTestWrite.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:45:49 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/02/02 10:05:26 $
+  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,8 +36,8 @@
 #endif
 
 int VTKWriteTest(vtkTesting *t,vtkImageViewer *viewer,
-                 std::string const & filename, 
-                 std::string const & referenceFileName)
+                 std::string const &filename, 
+                 std::string const &referenceFileName)
 {
    int retVal = 0;  //by default this is an error
 
@@ -197,7 +197,7 @@ int VTKTestWrite(int argc, char *argv[])
    }
 
    int ret = 0;
-   vtkTestingt = vtkTesting::New();
+   vtkTesting *t = vtkTesting::New();
    vtkImageViewer *viewer;
    if( show )
       viewer = vtkImageViewer::New();
index 37e9267fa3d44fafc10868d35623e77536c11281..e4460c60b12c365f6e3b306dee341bc7f762e131 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:54 $
-  Version:   $Revision: 1.60 $
+  Date:      $Date: 2005/02/02 10:02:16 $
+  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
@@ -32,7 +32,8 @@ namespace gdcm
 /**
  * \brief   Constructor from a given BinEntry
  */
-BinEntry::BinEntry(DictEntry *e) : ContentEntry(e)
+BinEntry::BinEntry(DictEntry *e) 
+         :ContentEntry(e)
 {
    BinArea = 0;
    SelfArea = true;
@@ -42,7 +43,8 @@ BinEntry::BinEntry(DictEntry *e) : ContentEntry(e)
  * \brief   Constructor from a given BinEntry
  * @param   e Pointer to existing Doc entry
  */
-BinEntry::BinEntry(DocEntry *e) : ContentEntry(e->GetDictEntry())
+BinEntry::BinEntry(DocEntry *e) 
+        : ContentEntry(e->GetDictEntry())
 {
    Copy(e);
 
@@ -168,7 +170,6 @@ void BinEntry::Print(std::ostream &os, std::string const & )
    void* binArea = GetBinArea();
    if (binArea)
    {
-      //s << " [" << GDCM_BINLOADED 
       s << " [" << GetValue()
         << "; length = " << GetLength() << "]";
    }
@@ -180,7 +181,6 @@ void BinEntry::Print(std::ostream &os, std::string const & )
       }
       else 
       {
-         //s << " [gdcm::Binary data NOT loaded]";
          s << " [" <<GetValue() << "]";
       }         
    }
index 22ca6d2f6a6b0442c0173320de5f436513699d5f..a7d57867bdf82263d94f0e238711148449deb1c8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmContentEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/30 17:30:57 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/02/02 10:02:16 $
+  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
@@ -34,7 +34,8 @@ namespace gdcm
  * \brief   Constructor for a given DictEntry
  * @param   e Pointer to existing dictionary entry
  */
-ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e)
+ContentEntry::ContentEntry(DictEntry *e) 
+            : DocEntry(e)
 {
    Value = GDCM_UNFOUND;
 }
@@ -44,7 +45,7 @@ ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e)
  * @param   e Pointer to existing Doc entry
  */
 ContentEntry::ContentEntry(DocEntry *e)
-             : DocEntry(e->GetDictEntry())
+            : DocEntry(e->GetDictEntry())
 {
    Copy(e);
 }
index f9a9adde8a42a1a910c1eff33a9eafa4358c2cae..3e9ca4e2797183ffa7284b210725365f4c7c5d74 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 13:00:16 $
-  Version:   $Revision: 1.21 $
+  Date:      $Date: 2005/02/02 10:02:16 $
+  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
@@ -57,7 +57,6 @@ void Debug::SetDebugFlag (bool flag)
 
 /**
  * \brief   Gets the debug flag value
- * @param   level Get the debug flag
  * @return debug flag value
  */ 
 bool Debug::GetDebugFlag ()
@@ -84,7 +83,7 @@ bool Debug::GetDebugToFile ()
 
 /**
  * \brief   Set Accessor
- * @param   flag Set the debug flag to redirect to file
+ * @param   filename  File to redirect debug info
  *          Absolutely nothing is check. You have to pass in
  *          a correct filename
  */ 
index f65828013b6d5119419c81140f37e9d7a0a76eca..1c205cb948b077e5556ed7f7147b6b8caa18273b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 13:00:16 $
-  Version:   $Revision: 1.125 $
+  Date:      $Date: 2005/02/02 10:02:16 $
+  Version:   $Revision: 1.126 $
   
   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 @@ namespace gdcm
  * \brief   Constructor : creates an empty DicomDir
  */
 DicomDir::DicomDir()
-   :Document( )
+         :Document( )
 {
    Initialize();  // sets all private fields to NULL
    NewMeta();
@@ -68,7 +68,7 @@ DicomDir::DicomDir()
 /**
  * \brief Constructor Parses recursively the directory and creates the DicomDir
  *        or uses an already built DICOMDIR, depending on 'parseDir' value.
- * @param fileName        name 
+ * @param fileName  name 
  *                      - of the root directory (parseDir = true)
  *                      - of the DICOMDIR       (parseDir = false)
  * @param parseDir boolean
@@ -378,7 +378,7 @@ bool DicomDir::WriteDicomDir(std::string const &fileName)
  * \brief create a Document-like chained list from a root Directory 
  * @param path entry point of the tree-like structure
  */
-void DicomDir::CreateDicomDirChainedList(std::string const & path)
+void DicomDir::CreateDicomDirChainedList(std::string const &path)
 {
    CallStartMethod();
    DirList dirList(path,1); // gets recursively the file list
index c35b2f10a939d97715c2de7f5e3bf15560de9a88..58ad12948bda5b2903f58b108198510d1f1256df 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.36 $
+  Date:      $Date: 2005/02/02 10:02:16 $
+  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
@@ -31,8 +31,8 @@ namespace gdcm
  * \brief   Constructor
  * \note End user must use : DicomDir::NewPatient()
  */
-DicomDirPatient::DicomDirPatient(bool empty):
-   DicomDirObject()
+DicomDirPatient::DicomDirPatient(bool empty)
+                :DicomDirObject()
 {
    if( !empty )
    {
index 0c6fab78c45c06872e70d0eb8bd6f455c7229498..5d30d595871454551076915352d5c77670fb76c6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.35 $
+  Date:      $Date: 2005/02/02 10:02:16 $
+  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
@@ -30,8 +30,8 @@ namespace gdcm
  * \brief  Constructor 
  * \note End user must use : DicomDirPatient::NewStudy()
  */
-DicomDirStudy::DicomDirStudy(bool empty):
-   DicomDirObject()
+DicomDirStudy::DicomDirStudy(bool empty)
+              :DicomDirObject()
 {
    if( !empty )
    {
@@ -75,7 +75,7 @@ void DicomDirStudy::WriteContent(std::ofstream *fp, FileType t)
  */
 DicomDirSerie *DicomDirStudy::NewSerie()
 {
-   DicomDirSeriest = new DicomDirSerie();
+   DicomDirSerie *st = new DicomDirSerie();
    Series.push_back(st);
    return st;
 } 
index 02063318609651db2274c2b8e6a0a0a1285a7196..7256c6b1dccaace89f9ea559a9e043b657453d6e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.57 $
+  Date:      $Date: 2005/02/02 10:02:16 $
+  Version:   $Revision: 1.58 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -69,8 +69,8 @@ DictSet::~DictSet()
  * @param   name Symbolic name that be used as identifier of the newly 
  *          created dictionary.
  */
-Dict *DictSet::LoadDictFromFile(std::string const & filename, 
-                                DictKey const & name) 
+Dict *DictSet::LoadDictFromFile(std::string const &filename, 
+                                DictKey const &name) 
 {
    Dict *newDict = new Dict(filename);
    AppendDict(newDict, name);
index d90383c0822c693e498073f278bb4a4969f5f22c..3e218c41968260f8c01ffb1a2c64f84eea4f7f05 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.50 $
+  Date:      $Date: 2005/02/02 10:02:17 $
+  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
@@ -60,7 +60,7 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
    uint32_t ffff  = 0xffffffff;
    uint16_t group = GetGroup();
-   VRKey vr   = GetVR();
+   VRKey vr       = GetVR();
    uint16_t el    = GetElement();
    uint32_t lgr   = GetLength();
 
@@ -74,8 +74,8 @@ void DocEntry::WriteContent(std::ofstream *fp, FileType filetype)
    //
    // ----------- Writes the common part
    //
-   binary_write( *fp, group); //group
-   binary_write( *fp, el);    //element
+   binary_write( *fp, group); //group number
+   binary_write( *fp, el);    //element number
 
    if ( filetype == ExplicitVR )
    {
index e2370812b6b6c76f6477c68a234c5f1acce41d05..9f4d7c421f19d071010da68f8b989db31eecd100 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.50 $
+  Date:      $Date: 2005/02/02 10:02:17 $
+  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
@@ -56,7 +56,7 @@ std::string DocEntrySet::GetEntryValue(uint16_t group, uint16_t elem)
  */
 void *DocEntrySet::GetEntryBinArea(uint16_t group, uint16_t elem) 
 {
-   BinEntry *entry = GetBinEntry(group,elem);
+   BinEntry *entry = GetBinEntry(group, elem);
    if( entry )
       return entry->GetBinArea();
    return 0;
@@ -72,7 +72,7 @@ void *DocEntrySet::GetEntryBinArea(uint16_t group, uint16_t elem)
  */
 int DocEntrySet::GetEntryLength(uint16_t group, uint16_t elem)
 {
-   DocEntry *entry = GetDocEntry(group,elem);
+   DocEntry *entry = GetDocEntry(group, elem);
    if( entry )
       return entry->GetLength();
    return -1;
@@ -93,7 +93,7 @@ int DocEntrySet::GetEntryLength(uint16_t group, uint16_t elem)
  */
 std::string DocEntrySet::GetEntryVR(uint16_t group, uint16_t elem)
 {
-   DocEntry *entry = GetDocEntry(group,elem);
+   DocEntry *entry = GetDocEntry(group, elem);
    if( entry )
       return entry->GetVR();
    return GDCM_UNFOUND;
@@ -166,7 +166,7 @@ SeqEntry *DocEntrySet::GetSeqEntry(uint16_t group, uint16_t elem)
  * @param   group  group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool DocEntrySet::SetValEntry(std::string constcontent, 
+bool DocEntrySet::SetValEntry(std::string const &content, 
                               uint16_t group, uint16_t elem) 
 {
    ValEntry *entry = GetValEntry(group, elem);
@@ -305,7 +305,7 @@ ValEntry *DocEntrySet::InsertValEntry(std::string const &value,
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */
-BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea,int lgth, 
+BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth, 
                                       uint16_t group, uint16_t elem,
                                       TagName const &vr )
 {
@@ -479,8 +479,8 @@ ValEntry *DocEntrySet::NewValEntry(uint16_t group,uint16_t elem,
  * @param   elem  element number of the new Entry
  * @param   vr     VR of the new Entry 
  */
-BinEntry *DocEntrySet::NewBinEntry(uint16_t group,uint16_t elem,
-                                   TagName const & vr) 
+BinEntry *DocEntrySet::NewBinEntry(uint16_t group, uint16_t elem,
+                                   TagName const &vr) 
 {
    DictEntry *dictEntry = GetDictEntry(group, elem, vr);
    gdcmAssertMacro(dictEntry);
@@ -501,7 +501,7 @@ BinEntry *DocEntrySet::NewBinEntry(uint16_t group,uint16_t elem,
  * @param   group group   number of the new Entry
  * @param   elem  element number of the new Entry
  */
-SeqEntry* DocEntrySet::NewSeqEntry(uint16_t group,uint16_t elem) 
+SeqEntry* DocEntrySet::NewSeqEntry(uint16_t group, uint16_t elem) 
 {
    DictEntry *dictEntry = GetDictEntry(group, elem, "SQ");
    gdcmAssertMacro(dictEntry);
@@ -551,7 +551,7 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group,uint16_t elem)
  * @return  Corresponding DictEntry when it exists, NULL otherwise.
  */
 DictEntry *DocEntrySet::GetDictEntry(uint16_t group, uint16_t elem,
-                                             TagName const & vr)
+                                     TagName const &vr)
 {
    DictEntry *dictEntry = GetDictEntry(group,elem);
    DictEntry *goodEntry = dictEntry;
index afd0e6ef5bf46e6e7de1f584436ee943e50c52ca..0f76b64a3068759285e129c12b76899e3f78873d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.218 $
+  Date:      $Date: 2005/02/02 10:02:17 $
+  Version:   $Revision: 1.219 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -57,7 +57,8 @@ const unsigned int Document::MAX_SIZE_PRINT_ELEMENT_VALUE = 0x7fffffff;
  * \brief   constructor  
  * @param   filename 'Document' (File or DicomDir) to be opened for parsing
  */
-Document::Document( std::string const &filename ) : ElementSet(-1)
+Document::Document( std::string const &filename ) 
+         :ElementSet(-1)
 {
    SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE); 
    Filename = filename;
@@ -74,10 +75,10 @@ Document::Document( std::string const &filename ) : ElementSet(-1)
    gdcmVerboseMacro( "Starting parsing of file: " << Filename.c_str());
   // Fp->seekg( 0,  std::ios::beg);
    
-   Fp->seekg(0,  std::ios::end);
+   Fp->seekg(0, std::ios::end);
    long lgt = Fp->tellg();
            
-   Fp->seekg( 0,  std::ios::beg);
+   Fp->seekg(0, std::ios::beg);
 
    CheckSwap();
    long beg = Fp->tellg();
@@ -153,7 +154,8 @@ Document::Document( std::string const &filename ) : ElementSet(-1)
  * \brief This default constructor doesn't parse the file. You should
  *        then invoke \ref Document::SetFileName and then the parsing.
  */
-Document::Document() : ElementSet(-1)
+Document::Document() 
+         :ElementSet(-1)
 {
    Fp = 0;
 
@@ -1602,10 +1604,10 @@ void Document::FixDocEntryFoundLength(DocEntry *entry,
  */
 bool Document::IsDocEntryAnInteger(DocEntry *entry)
 {
-   uint16_t elem    = entry->GetElement();
-   uint16_t group   = entry->GetGroup();
+   uint16_t elem          = entry->GetElement();
+   uint16_t group         = entry->GetGroup();
    const std::string &vr  = entry->GetVR();
-   uint32_t length  = entry->GetLength();
+   uint32_t length        = entry->GetLength();
 
    // When we have some semantics on the element we just read, and if we
    // a priori know we are dealing with an integer, then we shall be
@@ -1648,7 +1650,7 @@ void Document::Initialize()
 {
    RefPubDict = Global::GetDicts()->GetDefaultPubDict();
    RefShaDict = NULL;
-   Filetype = Unknown;
+   Filetype   = Unknown;
 }
 
 /**
@@ -1918,7 +1920,6 @@ DocEntry *Document::ReadNextDocEntry()
    {
       // We reached the EOF (or an error occured) therefore 
       // header parsing has to be considered as finished.
-      //std::cout << e;
       return 0;
    }
 
index cf11b665b8e5586935e7d149c6fe4a4fdba0599b..0b31c5ceeb8f72673aa04a509621f78af1693aad 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.206 $
+  Date:      $Date: 2005/02/02 10:02:17 $
+  Version:   $Revision: 1.207 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -37,8 +37,8 @@ namespace gdcm
  * \brief  Constructor 
  * @param  filename name of the file whose header we want to analyze
  */
-File::File( std::string const &filename ):
-   Document( filename )
+File::File( std::string const &filename )
+     :Document( filename )
 {    
    RLEInfo  = new RLEFramesInfo;
    JPEGInfo = new JPEGFragmentsInfo;
@@ -248,7 +248,7 @@ bool File::Write(std::string fileName, FileType filetype)
    BinEntry *b = GetBinEntry(GrPixel,NumPixel);
    if ( GetPixelSize() ==  16 )
    {
-      uint16_t *im16 = (uint16_t*)b->GetBinArea();
+      uint16_t *im16 = (uint16_t *)b->GetBinArea();
       int lgr = b->GetLength();
       for( int i = 0; i < lgr / 2; i++ )
       {
@@ -258,7 +258,7 @@ bool File::Write(std::string fileName, FileType filetype)
 #endif //GDCM_WORDS_BIGENDIAN
 */
 
-   Document::WriteContent(fp,filetype);
+   Document::WriteContent(fp, filetype);
 
 /*
 #ifdef GDCM_WORDS_BIGENDIAN
@@ -928,7 +928,7 @@ int File::GetBitsAllocated()
  */
 int File::GetSamplesPerPixel()
 {
-   const std::stringstrSize = GetEntryValue(0x0028,0x0002);
+   const std::string &strSize = GetEntryValue(0x0028,0x0002);
    if ( strSize == GDCM_UNFOUND )
    {
       gdcmVerboseMacro( "(0028,0002) is supposed to be mandatory");
@@ -945,7 +945,7 @@ int File::GetSamplesPerPixel()
  */
 bool File::IsMonochrome()
 {
-   const std::stringPhotometricInterp = GetEntryValue( 0x0028, 0x0004 );
+   const std::string &PhotometricInterp = GetEntryValue( 0x0028, 0x0004 );
    if (  Util::DicomStringEqual(PhotometricInterp, "MONOCHROME1")
       || Util::DicomStringEqual(PhotometricInterp, "MONOCHROME2") )
    {
index 33d9f0f8f0dd6ead58f468e0404aa916017d98ee..fb243911fb23958c2dbc29f83c7e23ffd2ebe0a7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/02/02 10:02:18 $
+  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
@@ -88,7 +88,7 @@ FileHelper::FileHelper(File *header)
  *        seen as a side effect).   
  * @param filename file to be opened for parsing
  */
-FileHelper::FileHelper(std::string const & filename )
+FileHelper::FileHelper(std::string const &filename )
 {
    FileInternal = new File( filename );
    SelfHeader = true;
index 66a6dca66289224b3200d18e7242790fef72588b..762de9d4f70e69dc2d6dd688d469873308b52f0f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJpeg.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/31 04:00:04 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2005/02/02 10:02:18 $
+  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
@@ -56,11 +56,11 @@ namespace gdcm
  * @return 1 on success, 0 on error
  */
  
-bool gdcm_write_JPEG_file (std::ofstream* fp, void*  im_buf, 
+bool gdcm_write_JPEG_file (std::ofstream *fp, void *im_buf, 
                            int image_width, int image_height, int quality)
 {
 
-   JSAMPLEimage_buffer = (JSAMPLE*) im_buf;
+   JSAMPLE *image_buffer = (JSAMPLE*) im_buf;
 
   /* This struct contains the JPEG compression parameters and pointers to
    * working space (which is allocated as needed by the JPEG library).
@@ -208,7 +208,7 @@ METHODDEF(void) my_error_exit (j_common_ptr cinfo) {
  * @return 1 on success, 0 on error
  */
 void *SampBuffer; 
-bool JPEGFragment::ReadJPEGFile (std::ifstream* fp, void* image_buffer , int& statesuspension)
+bool JPEGFragment::ReadJPEGFile (std::ifstream *fp, void *image_buffer, int &statesuspension)
 {
    pImage = (uint8_t*)image_buffer;
    // This struct contains the JPEG decompression parameters and pointers to
index 27ff8e2b83384398ebb43b587b4f63467d724c31..db3880e49300a1441ddd4b5a95545a95cb62db3e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:55 $
-  Version:   $Revision: 1.43 $
+  Date:      $Date: 2005/02/02 10:02:18 $
+  Version:   $Revision: 1.44 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -37,14 +37,14 @@ namespace gdcm
 // Constructor / Destructor
 PixelReadConvert::PixelReadConvert() 
 {
-   RGB = 0;
-   RGBSize = 0;
-   Raw = 0;
-   RawSize = 0;
-   LutRGBA = 0;
-   LutRedData = 0;
+   RGB          = 0;
+   RGBSize      = 0;
+   Raw          = 0;
+   RawSize      = 0;
+   LutRGBA      = 0;
+   LutRedData   = 0;
    LutGreenData = 0;
-   LutBlueData =0;
+   LutBlueData  = 0;
 }
 
 PixelReadConvert::~PixelReadConvert() 
@@ -91,7 +91,7 @@ void PixelReadConvert::ReadAndDecompress12BitsTo16Bits( std::ifstream *fp )
                throw ( FormatError )
 {
    int nbPixels = XSize * YSize;
-   uint16_tlocalDecompres = (uint16_t*)Raw;
+   uint16_t *localDecompres = (uint16_t*)Raw;
 
    for( int p = 0; p < nbPixels; p += 2 )
    {
@@ -163,7 +163,7 @@ void PixelReadConvert::ConvertSwapZone()
       uint32_t s32;
       uint16_t high;
       uint16_t low;
-      uint32_tim32 = (uint32_t*)Raw;
+      uint32_t *im32 = (uint32_t*)Raw;
       switch ( SwapCode )
       {
          case 1234:
@@ -279,7 +279,7 @@ bool PixelReadConvert::ConvertReArrangeBits() throw ( FormatError )
       {
          uint16_t mask = 0xffff;
          mask = mask >> ( BitsAllocated - BitsStored );
-         uint16_tdeb = (uint16_t*)Raw;
+         uint16_t *deb = (uint16_t*)Raw;
          for(int i = 0; i<l; i++)
          {
             *deb = (*deb >> (BitsStored - HighBitPosition - 1)) & mask;
@@ -290,7 +290,7 @@ bool PixelReadConvert::ConvertReArrangeBits() throw ( FormatError )
       {
          uint32_t mask = 0xffffffff;
          mask = mask >> ( BitsAllocated - BitsStored );
-         uint32_tdeb = (uint32_t*)Raw;
+         uint32_t *deb = (uint32_t*)Raw;
          for(int i = 0; i<l; i++)
          {
             *deb = (*deb >> (BitsStored - HighBitPosition - 1)) & mask;
@@ -372,9 +372,9 @@ void PixelReadConvert::ConvertRGBPlanesToRGBPixels()
 
    int l = XSize * YSize * ZSize;
 
-   uint8_ta = copyRaw;
-   uint8_tb = copyRaw + l;
-   uint8_tc = copyRaw + l + l;
+   uint8_t *a = copyRaw;
+   uint8_t *b = copyRaw + l;
+   uint8_t *c = copyRaw + l + l;
 
    for (int j = 0; j < l; j++)
    {
@@ -790,7 +790,7 @@ void PixelReadConvert::BuildLUTRGBA()
    // We give up the checking to avoid some (useless ?) overhead
    // (optimistic asumption)
    int i;
-   uint8_ta = LutRGBA + 0;
+   uint8_t *a = LutRGBA + 0;
    for( i=0; i < lengthR; ++i )
    {
       *a = LutRedData[i*mult+1];
@@ -845,7 +845,7 @@ bool PixelReadConvert::BuildRGBImage()
                                                                                 
    // Build RGB Pixels
    AllocateRGB();
-   uint8_tlocalRGB = RGB;
+   uint8_t *localRGB = RGB;
    for (size_t i = 0; i < RawSize; ++i )
    {
       int j  = Raw[i] * 4;
@@ -869,7 +869,7 @@ bool PixelReadConvert::BuildRGBImage()
  * @param indent Indentation string to be prepended during printing.
  * @param os     Stream to print to.
  */
-void PixelReadConvert::Print( std::ostream &os, std::string const & indent )
+void PixelReadConvert::Print( std::ostream &os, std::string const &indent )
 {
    os << indent
       << "--- Pixel information -------------------------"
index b9337640809a53fbc8d1230cb21a3a68234def2b..26797b4dc686c2cdef757e4d7f2fe83b0d8aba60 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmRLEFramesInfo.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 13:00:16 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/02/02 10:02:18 $
+  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
@@ -62,9 +62,15 @@ RLEFrame *RLEFramesInfo::GetNextFrame()
  *            Dicom encapsulated file and decompress it.
  * @param     fp already open File Pointer
  *            at which the pixel data should be copied
+ * @param raw raw
+ * @param xSize x Size
+ * @param ySize y Size
+ * @param BitsAllocated Bits allocated
  * @return    Boolean
  */
-bool RLEFramesInfo::DecompressRLEFile( std::ifstream *fp , uint8_t *raw, int xSize, int ySize, int zSize, int bitsAllocated )
+bool RLEFramesInfo::DecompressRLEFile( std::ifstream *fp , uint8_t *raw, 
+                                       int xSize, int ySize, int zSize, 
+                                       int bitsAllocated )
 {
    uint8_t *subRaw = raw;
    long rawSegmentSize = xSize * ySize;
@@ -94,8 +100,8 @@ bool RLEFramesInfo::DecompressRLEFile( std::ifstream *fp , uint8_t *raw, int xSi
  * @param numberOfFrames number of frames 
  * @return    Boolean always true
  */
-bool RLEFramesInfo::ConvertRLE16BitsFromRLE8Bits( uint8_t* raw, int xSize, 
-                                             int ySize,int numberOfFrames  )
+bool RLEFramesInfo::ConvertRLE16BitsFromRLE8Bits(uint8_t *raw, int xSize, 
+                                                 int ySize, int numberOfFrames)
 {
    size_t pixelNumber = xSize * ySize;
    size_t rawSize = xSize * ySize * numberOfFrames;
@@ -105,12 +111,12 @@ bool RLEFramesInfo::ConvertRLE16BitsFromRLE8Bits( uint8_t* raw, int xSize,
    // per pixel we cannot work in place within Raw and hence
    // we copy it in a safe place, say copyRaw.
 
-   uint8_tcopyRaw = new uint8_t[rawSize * 2];
+   uint8_t *copyRaw = new uint8_t[rawSize * 2];
    memmove( copyRaw, raw, rawSize * 2 );
 
-   uint8_tx = raw;
-   uint8_ta = copyRaw;
-   uint8_tb = a + pixelNumber;
+   uint8_t *x = raw;
+   uint8_t *a = copyRaw;
+   uint8_t *b = a + pixelNumber;
 
    for ( int i = 0; i < numberOfFrames; i++ )
    {
@@ -122,7 +128,7 @@ bool RLEFramesInfo::ConvertRLE16BitsFromRLE8Bits( uint8_t* raw, int xSize,
    }
    delete[] copyRaw;
 
-   /// \todo check that operator new []didn't fail, and sometimes return false
+   /// \todo check that operator new [] didn't fail, and sometimes return false
 
    return true;
 }
index 3b951c32443c2bd514ed7b374b6bf8f2a45e1d23..fcf4d5b3fa5212adf2d4fa87e9aaf9a2bda9f8bd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmTS.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:56 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2005/02/02 10:02:18 $
+  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
@@ -119,7 +119,7 @@ int TS::Count(TSKey const &key)
    return TsMap.count(key);
 }
 
-TSAtr const & TS::GetValue(TSKey const &key) 
+TSAtr const &TS::GetValue(TSKey const &key) 
 {
    // First thing clean up the string sometime the transfer syntax is padded with spaces
    std::string copy = key;
index 552b5840af767f19e0a9d055283d24b18728a0d3..4bff2d78961d712800cebfcea4fcb189c5e851b9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:56 $
-  Version:   $Revision: 1.128 $
+  Date:      $Date: 2005/02/02 10:02:18 $
+  Version:   $Revision: 1.129 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -35,7 +35,7 @@
 #include <stdio.h>   //only included in implementation file
 
 #if defined(_MSC_VER) || defined(__MINGW32__)
-   #include <winsock.h>  // for gethostname & gethostbyname
+   #include <winsock.h>  // for gethostname and gethostbyname
    #undef GetCurrentTime
 #else
 #ifndef __BORLANDC__
@@ -127,7 +127,7 @@ std::string Util::Format(const char *format, ...)
  */
 void Util::Tokenize (const std::string &str,
                      std::vector<std::string> &tokens,
-                     const std::stringdelimiters)
+                     const std::string &delimiters)
 {
    std::string::size_type lastPos = str.find_first_not_of(delimiters,0);
    std::string::size_type pos     = str.find_first_of    (delimiters,lastPos);
index cc1f36381bce8cb6d02f30ddfdedf7d5335a99d9..9a7d6538639aceaa38ef3ae85c5d304a9b76c544 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/01 10:29:56 $
-  Version:   $Revision: 1.54 $
+  Date:      $Date: 2005/02/02 10:02:18 $
+  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,8 @@ namespace gdcm
  * \brief   Constructor from a given DictEntry
  * @param   e Pointer to existing dictionary entry
  */
-ValEntry::ValEntry(DictEntry *e) : ContentEntry(e)
+ValEntry::ValEntry(DictEntry *e) 
+        : ContentEntry(e)
 {
 }
 
@@ -45,7 +46,7 @@ ValEntry::ValEntry(DictEntry *e) : ContentEntry(e)
  * @param   e Pointer to existing Doc entry
  */
 ValEntry::ValEntry(DocEntry *e)
-             : ContentEntry(e->GetDictEntry())
+        : ContentEntry(e->GetDictEntry())
 {
    Copy(e);
 }
@@ -174,7 +175,7 @@ void ValEntry::Print(std::ostream &os, std::string const &)
 {
    uint16_t g = GetGroup();
    uint16_t e = GetElement();
-   VRKey vr = GetVR();
+   VRKey vr   = GetVR();
    std::ostringstream s; 
    std::string st;
    std::string d2;
@@ -188,7 +189,7 @@ void ValEntry::Print(std::ostream &os, std::string const &)
       return;
    }
    
-   TS * ts = Global::GetTS();
+   TS *ts = Global::GetTS();
     
    TSAtr v  = GetValue();  // not applicable for SQ ...     
    d2 = Util::CreateCleanString(v);  // replace non printable characters by '.'