]> Creatis software - gdcm.git/commitdiff
First stage of name normalisation : gdcm::File replace by gdcm::FileHelper
authorjpr <jpr>
Thu, 20 Jan 2005 16:16:57 +0000 (16:16 +0000)
committerjpr <jpr>
Thu, 20 Jan 2005 16:16:57 +0000 (16:16 +0000)
in src, Examples, Test, vtk, gdcmPython

33 files changed:
Doc/Website/Support.html
Example/FindTags.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
Testing/TestAllReadCompareDicom.cxx
Testing/TestCopyDicom.cxx
Testing/TestCopyRescaleDicom.cxx
Testing/TestReadWriteReadCompare.cxx
Testing/TestWriteSimple.cxx
Testing/VTKTestRead.cxx
gdcmPython/gdcm.i
src/CMakeLists.txt
src/gdcmDocEntrySet.h
src/gdcmDocument.h
src/gdcmFile.cxx
src/gdcmFile.h
src/gdcmJPEGFragment.h
src/gdcmJPEGFragmentsInfo.h
src/gdcmRLEFramesInfo.h
vtk/vtkGdcmReader.cxx
vtk/vtkGdcmWriter.cxx

index d3d985faafa214721fb84bdd2f3e395612a6304e..66bfbf6f2ea1d18ac007ef8b2987f68ebb210dc6 100644 (file)
@@ -39,13 +39,10 @@ The current developpers are (alphabetical order)
 The contributors are
 <UL>
 <LI> Hugues Benoit-Cattin
-</LI>
 <LI> Fabrice Bellet
-</LI>
 <LI> Jean-Michel Rouet
-</LI>
 <LI> Peter Cech
-</LI>
+<LI> Edouardo Davila
 </UL>
 
 <!####################################>
index 83c6e599f1ab073059e64975a55a4207425f9310..4cbba5e01b2fcb2620bcdb9c1c09d461048b769b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: FindTags.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmHeader.h"
 #include "gdcmUtil.h"
 
@@ -26,14 +26,14 @@ int main(int argc, char* argv[])
 {
    std::string toto, titi;
 
-   gdcm::File  * f1;
+   gdcm::FileHelper *f1;
 
    if(argc > 1 )
-      f1 = new gdcm::File(argv[1]);
+      f1 = new gdcm::FileHelper(argv[1]);
    else  {
       toto = GDCM_DATA_ROOT;
       toto += "/test.acr";
-      f1 = new gdcm::File(toto);
+      f1 = new gdcm::FileHelper(toto);
    }
 
    std::string ManufacturerName="SIEMENS ";
index cafceb7067522b6b57a7f297608a1bea9f43c8e7..4d6a65fe6d628d588da57cfae29fc1d2d75a7e89 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/19 15:26:42 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  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
 =========================================================================*/
 #include "gdcmHeader.h"
 #include "gdcmDebug.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 #include <iostream>
 
 int main(int argc, char* argv[])
 {
    gdcm::Header *e1;
-   gdcm::File   *f1;
+   gdcm::FileHelper   *f1;
    std::string fileName;   
    if (argc != 2) 
    {
@@ -46,7 +46,7 @@ int main(int argc, char* argv[])
       gdcm::Debug::SetDebugOn();
    
    e1= new gdcm::Header( fileName.c_str() );
-   f1 = new gdcm::File(e1);
+   f1 = new gdcm::FileHelper(e1);
 
    if (argc > 2) 
    {
index aa4ae3bc09772f5f0c8b29e5b5f9a634c8ecf5f3..6baada033ddfd82cf96e61edd57c2c0f4df5f892 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestChangeHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 // This examples read two images (could be the same). Try to modify
 // Acquisition Matrix and then write the image again
@@ -32,8 +32,8 @@ int main(int argc, char* argv[])
     }
 
     gdcm::Header *h1 = new gdcm::Header( argv[1] );
-    gdcm::File  *f1 = new gdcm::File( h1 );
-    gdcm::File  *f2 = new gdcm::File( argv[2] );
+    gdcm::FileHelper  *f1 = new gdcm::FileHelper( h1 );
+    gdcm::FileHelper  *f2 = new gdcm::FileHelper( argv[2] );
 
     // 0018 1310 US ACQ Acquisition Matrix
     gdcm::DictEntry *dictEntry =
index e7ced62bee59791c01d68ae2d0694bae9a3798e2..8d386103252e2a5c10f1a966909b1eaf18f0bdde 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 07:55:16 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  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
@@ -80,12 +80,12 @@ int main(int argc, char* argv[])
             return 1;
          }
       }
-      gdcm::File *original = new gdcm::File( filename );
+      gdcm::FileHelper *original = new gdcm::FileHelper( filename );
    
       std::cout << "--- Original ----------------------" << std::endl;
       //original->GetHeader()->Print();
    
-      gdcm::File *copy = new gdcm::File( output );
+      gdcm::FileHelper *copy = new gdcm::FileHelper( output );
 
       size_t dataSize = original->GetImageDataSize();
       uint8_t* imageData = original->GetImageData();
index 86a6ba7be3a5ffeeaa81ec0b4ceb1f7a87e98e63..7441a17439b2d5088f9627e6c99db52dd891c8dd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDcm2Acr.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:55 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -25,23 +25,23 @@ int main(int argc, char* argv[])
    std::string toto;
    std::string zozo;
 
-   gdcm::File  * f1;
+   gdcm::FileHelper  * f1;
 
-   std::cout << " Before gdcmFile()" << std::endl;
+   std::cout << " Before gdcmFileHelper()" << std::endl;
    std::cout << "\n\n---------------------------------------" << std::endl;
 
    if (argc > 1)
    {
       toto = argv[1];
-      f1 = new gdcm::File(toto);
+      f1 = new gdcm::FileHelper(toto);
    }
    else
    {
       std::string filename = GDCM_DATA_ROOT;
       filename += "/test.acr";
-      f1 = new gdcm::File(filename);
+      f1 = new gdcm::FileHelper(filename);
    }
-   std::cout << " Sortie gdcmFile()" << std::endl;
+   std::cout << " Sortie gdcmFileHelper()" << std::endl;
 
    //e1.PrintPubDict(std::cout);
    f1->GetHeader()->Print();
index 6b1ebaa0bfc899cd8df0fc66e55cbe3f481fad7c..e501807d9f68b7642fd5695c32c84a186e48851e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestFromScratch.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 07:55:16 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
    //gdcm::Debug::GetReference().SetDebug(1);
 
    std::string filename = argv[1];
-   gdcm::File *f1 = new gdcm::File( filename );
+   gdcm::FileHelper *f1 = new gdcm::FileHelper( filename );
    gdcm::Header *h1 = f1->GetHeader();
 
    int dataSize = f1->GetImageDataSize();
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
    }
    h2->Print( std::cout );
 
-   gdcm::File *f2 = new gdcm::File( h2 );
+   gdcm::FileHelper *f2 = new gdcm::FileHelper( h2 );
    f2->SetImageData(imageData, dataSize);
 
    f2->SetWriteTypeToDcmExplVR();
index e0f956f17e0e1e3ad172f91462658e3ad28355e7..9f99e31a26200d1f40d4b50a0e760b8437547544 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestPapyrus.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 13:28:23 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmDocument.h"
 #include "gdcmValEntry.h"
 #include "gdcmBinEntry.h"
@@ -91,7 +91,7 @@ int main(int argc, char* argv[])
          return 1;
       }
    }
-   gdcm::File *original = new gdcm::File( filename );
+   gdcm::FileHelper *original = new gdcm::FileHelper( filename );
    gdcm::Header *h = original->GetHeader();
 
    // Look for private Papyrus Sequence
@@ -246,7 +246,7 @@ int main(int argc, char* argv[])
    n->ReplaceOrCreate(PixelRepresentation,0x0028,0x0102);
 
    // create the file
-   gdcm::File *file = new gdcm::File(n);
+   gdcm::FileHelper *file = new gdcm::FileHelper(n);
 
    file->SetImageData(PixelArea,lgrImage*nbImages);
    file->SetWriteTypeToDcmExplVR();
index 2eab99008bce0fd40672377233faf2974d041cab..5441c7a7fd7a1528ecf92cd08afaf0c9a50fd7ff 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestReadWriteReadCompare.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/16 04:26:18 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 //Generated file:
 #include "gdcmDataImages.h"
@@ -69,7 +69,7 @@ int main(int argc, char* argv[])
 
       //////////////// Step 2:
 
-      gdcm::File*  file = new gdcm::File( header );
+      gdcm::FileHelper *file = new gdcm::FileHelper( header );
       int dataSize    = file->GetImageDataSize();
       uint8_t* imageData = file->GetImageData(); //EXTREMELY IMPORTANT
              // Sure, it is : It's up to the user to decide if he wants to
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
     
       //////////////// Step 3:
 
-      gdcm::File* reread = new gdcm::File( "TestReadWriteReadCompare.dcm" );
+      gdcm::FileHelper *reread = new gdcm::FileHelper( "TestReadWriteReadCompare.dcm" );
       if( !reread->GetHeader()->IsReadable() )
       {
         std::cerr << "Test::TestReadWriteReadCompare: Could not reread image "
@@ -112,7 +112,7 @@ int main(int argc, char* argv[])
       std::cout << "3...";
       // For the next step:
       int    dataSizeWritten = reread->GetImageDataSize();
-      uint8_timageDataWritten = reread->GetImageData();
+      uint8_t *imageDataWritten = reread->GetImageData();
 
       //////////////// Step 4:
  
index 9243880c49dd772084faa7ccfde89627f758658e..4c4607c9d4d3533b96ed776f0924e113fe4bdd61 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWrite.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 11:37:13 $
-  Version:   $Revision: 1.14 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.15 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 #include <iostream>
 
-int main(int argc, charargv[])
+int main(int argc, char *argv[])
 {  
    std::string zozo;
 
-   gdcm::Headere1;
-   gdcm::File  * f1;
+   gdcm::Header *e1;
+   gdcm::FileHelper *f1;
 
-   //gdcmDocument * d;  //not used
    void* imageData;
    int dataSize;
 
@@ -74,7 +73,7 @@ int main(int argc, char* argv[])
    }
   // e1->Print(); 
    
-   f1 = new gdcm::File(e1);
+   f1 = new gdcm::FileHelper(e1);
 // ---     
 
    dataSize = f1->GetImageDataSize();
index f194fe0518b6214149118913d895024c0ac8eca5..45b9b4eb693b138924e20c3c5d4aaac39dd3b9a1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:55 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -31,8 +31,8 @@ int main(int argc, char* argv[])
   std::string header = argv[1];
   const char *output = argv[2];
 
-  gdcm::Header *f1 = new gdcm::Header( header );
-  gdcm::File   *f2 = new gdcm::File( f1 );
+  gdcm::Header       *f1 = new gdcm::Header( header );
+  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 !?
@@ -42,9 +42,9 @@ int main(int argc, char* argv[])
   int dataSize    = f2->GetImageDataSize();
   // unsigned char cast is necessary to be able to delete the buffer
   // since deleting a void* is not allowed in c++
-  uint8_t* imageData = (uint8_t*)f2->GetImageData();
+  uint8_t *imageData = (uint8_t *)f2->GetImageData();
 
-  f2->SetImageData( imageData, dataSize);
+  f2->SetImageData( imageData, dataSize );
 
   f2->WriteDcmExplVR( output );
   
index 96010e817e36c53c3fdd3b8fe5e0e1e6f0750121..a4721fff2563c5e3cf5abca43a28292b5fa4da9e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Volume2Dicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/06 11:37:37 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.4 $
                                                                                  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -26,7 +26,7 @@
 #include "gdcmHeader.h"
 #include "gdcmDocEntry.h"
 #include "gdcmBinEntry.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmUtil.h"
 
 #define USAGE "USAGE: Input3DImage OutputDirectory"
@@ -122,7 +122,7 @@ int main( int argc, char * argv[] )
     ////////////////////////////////////////////////////////////
     // Create a new dicom file object from the header         //
     ////////////////////////////////////////////////////////////
-    gdcm::File  *f1 = new gdcm::File(h1);
+    gdcm::FileHelper  *f1 = new gdcm::FileHelper(h1);
     uint8_t *myData = f1->GetImageData(); // Get an Image pointer
     f1->SetImageData( myData, sliceSize); // This callback ensures that the internal
                                           // Pixel_Data of f1 is set correctly
index 0d1d32bc06a0591d3a21d0abff51a6d72de406ea..bec3f306b4c6fb0f99159b4a89673641162db8ba 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Write.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 11:37:13 $
-  Version:   $Revision: 1.14 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.15 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -25,7 +25,7 @@ int main(int argc, char* argv[])
    std::string zozo;
 
    gdcm::Header* e1;
-   gdcm::File  * f1;
+   gdcm::FileHelper  * f1;
 
    //gdcmDocument * d;  //not used
    uint8_t* imageData;
@@ -69,7 +69,7 @@ int main(int argc, char* argv[])
    }
   // e1->Print(); 
    
-   f1 = new gdcm::File(e1);
+   f1 = new gdcm::FileHelper(e1);
 // ---     
 
    dataSize = f1->GetImageDataSize();
index 81a790484beb16b1b950e4b9361b6c6132f6371f..684d6213db70848c63c086223bb3a05b4e9fde54 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  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
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 // Writting of a DICOM file based on a correct dicom header
 // and data pixel of another image
@@ -32,10 +32,10 @@ int main(int argc, char* argv[])
      }
  
    const char *first = argv[1];
-   gdcm::File *f1 = new gdcm::File( first );
+   gdcm::FileHelper *f1 = new gdcm::FileHelper( first );
  
    const char *second = argv[2];
-   gdcm::File *f2 = new gdcm::File( second );
+   gdcm::FileHelper *f2 = new gdcm::FileHelper( second );
  
    // We assume that DICOM fields of second file actually exists :
  
index 213ce26820dd9e922d7e50f02c6094cd7568fe12..19f8a9c818560a8dda99c4febeeb8f3edc6d2891 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicomSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 23:18:30 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -23,7 +23,7 @@
  * 
  */
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 #include <iostream>
 #include <sstream>
@@ -124,7 +124,7 @@ int main(int argc, char* argv[])
    }
 
 // Step 3 : Create the file of the image
-   gdcm::File *file = new gdcm::File(header);
+   gdcm::FileHelper *file = new gdcm::FileHelper(header);
    file->SetImageData(imageData,size);
 
 // Step 4 : Set the writting mode and write the image
index 7e75baaeee21c00110375660d4e32b81a310145d..d4b5594d204f8ef2278b7f7bf7cc09ec9b679536 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteRead.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:56 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/20 16:16:58 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -25,7 +25,7 @@ int main(int argc, char* argv[])
    std::string zozo;
 
    gdcm::Header* e1, *e2;
-   gdcm::File  * f1, *f2;
+   gdcm::FileHelper  * f1, *f2;
 
    uint8_t* imageData, *imageData2;
    int dataSize, dataSize2;
@@ -49,7 +49,7 @@ int main(int argc, char* argv[])
        return 0;
    }
    
-   f1 = new gdcm::File(e1);
+   f1 = new gdcm::FileHelper(e1);
    imageData= f1->GetImageData();
    dataSize = f1->GetImageDataSize();
 
@@ -67,7 +67,7 @@ int main(int argc, char* argv[])
                  <<std::endl;
        return 0;
    }
-   f2 = new gdcm::File(e2);
+   f2 = new gdcm::FileHelper(e2);
    imageData2= f2->GetImageData();
    dataSize2 = f2->GetImageDataSize();
 
index eea858b2d30e44499efdbcda2e3438e662fd636a..aba924629643210b6c633898e0368204df8b3c90 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllReadCompareDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 15:58:36 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2005/01/20 16:16:59 $
+  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
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 #include <iostream>
 #include <fstream>
@@ -31,7 +31,7 @@ int InternalTest(std::string const & filename,
 
       ////// Step 1:
       std::cout << "      1...";
-      gdcm::File* tested = new gdcm::File( filename );
+      gdcm::FileHelper* tested = new gdcm::FileHelper( filename );
       if( !tested->GetHeader()->IsReadable() )
       {
         std::cout << " Failed" << std::endl
@@ -65,7 +65,7 @@ int InternalTest(std::string const & filename,
       ////// When reference file is not gdcm readable test is failed:
       std::cout << "3a...";
 
-      gdcm::File* reference = new gdcm::File( referenceFileName );
+      gdcm::FileHelper* reference = new gdcm::FileHelper( referenceFileName );
       if( !reference->GetHeader()->IsReadable() )
       {
          std::cout << " Failed" << std::endl
index 1d26baeff58071e192b0efd342e9bae7eab78c3e..d012050af58816cf462a84ba60e9a39045a5cbe4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/19 08:58:33 $
-  Version:   $Revision: 1.31 $
+  Date:      $Date: 2005/01/20 16:16:59 $
+  Version:   $Revision: 1.32 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmValEntry.h"
 #include "gdcmBinEntry.h"
 
@@ -109,8 +109,8 @@ int CopyDicom(std::string const & filename,
          d=originalH->GetNextEntry();
       }
 
-      gdcm::File *original = new gdcm::File( originalH );
-      gdcm::File *copy     = new gdcm::File( copyH );
+      gdcm::FileHelper *original = new gdcm::FileHelper( originalH );
+      gdcm::FileHelper *copy     = new gdcm::FileHelper( copyH );
 
       size_t dataSize = original->GetImageDataSize();
       uint8_t* imageData = original->GetImageData();
@@ -140,7 +140,7 @@ int CopyDicom(std::string const & filename,
 
       //////////////// Step 4:
       std::cout << "4...";
-      copy = new gdcm::File( output );
+      copy = new gdcm::FileHelper( output );
 
       //Is the file written still gdcm parsable ?
       if ( !copy->GetHeader()->IsReadable() )
index e566dda4f02424f8607c15f84876b79fa08747f4..6616afa17340987ce594af802f771f2a3686c5f5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyRescaleDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 07:56:21 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/01/20 16:16:59 $
+  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
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmValEntry.h"
 #include "gdcmBinEntry.h"
 
@@ -85,8 +85,8 @@ int CopyRescaleDicom(std::string const & filename,
       d=originalH->GetNextEntry();
    }
 
-   gdcm::File *original = new gdcm::File( originalH );
-   gdcm::File *copy     = new gdcm::File( copyH );
+   gdcm::FileHelper *original = new gdcm::FileHelper( originalH );
+   gdcm::FileHelper *copy     = new gdcm::FileHelper( copyH );
 
    size_t dataSize = original->GetImageDataSize();
 
@@ -144,7 +144,7 @@ int CopyRescaleDicom(std::string const & filename,
 
    //////////////// Step 4:
    std::cout << "4...";
-   copy = new gdcm::File( output );
+   copy = new gdcm::FileHelper( output );
 
    //Is the file written still gdcm parsable ?
    if ( !copy->GetHeader()->IsReadable() )
index cc48edb7bd94bdf1bf46d7df9c7218e8d0c7b859..74030d58736348d44a30d959db001396a2d9bcdf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestReadWriteReadCompare.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/30 14:17:52 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2005/01/20 16:16:59 $
+  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
@@ -39,7 +39,7 @@ int CompareInternal(std::string const & filename, std::string const & output)
 
    //////////////// Step 2:
 
-   gdcm::File*  file = new gdcm::File( header );
+   gdcm::FileHelper*  file = new gdcm::FileHelper( header );
    int dataSize    = file->GetImageDataSize();
    uint8_t* imageData = file->GetImageData(); //EXTREMELY IMPORTANT
           // Sure, it is : It's up to the user to decide if he wants to
@@ -70,7 +70,7 @@ int CompareInternal(std::string const & filename, std::string const & output)
  
    //////////////// Step 3:
 
-   gdcm::File* reread = new gdcm::File( output );
+   gdcm::FileHelper* reread = new gdcm::FileHelper( output );
    if( !reread->GetHeader()->IsReadable() )
    {
      std::cerr << "Failed" << std::endl
index 3b1dc14b4bd242b85629db4b76ffa7c40da24566..2280d76ca4e235077b7cf693b275a7af86bea64a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 23:18:31 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/01/20 16:16:59 $
+  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
@@ -23,7 +23,7 @@
  * 
  */
 #include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 
 #include <iostream>
 #include <sstream>
@@ -155,7 +155,7 @@ int WriteSimple(Image &img)
 
 // Step 3 : Create the file of the image
    std::cout << "3...";
-   gdcm::File *file = new gdcm::File(header);
+   gdcm::FileHelper *file = new gdcm::FileHelper(header);
    file->SetImageData(imageData,size);
 
 // Step 4 : Set the writting mode and write the image
@@ -199,7 +199,7 @@ int WriteSimple(Image &img)
 
 // Step 5 : Read the written image
    std::cout << "5...";
-   gdcm::File* reread = new gdcm::File( fileName );
+   gdcm::FileHelper* reread = new gdcm::FileHelper( fileName );
    if( !reread->GetHeader()->IsReadable() )
    {
      std::cerr << "Failed" << std::endl
index 29089d91ee8b5dda2eaf76e8b58d964b5e3941a0..6a0838507471944d38eacf726508d1707607b670 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: VTKTestRead.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/19 14:45:40 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/01/20 16:16:59 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "vtkGdcmReader.h"
 #include "vtkImageViewer.h"
 #include "vtkImageData.h"
@@ -52,7 +52,7 @@ int VTKReadTest(vtkTesting *t,vtkImageViewer *viewer,
    // Instead of directly reading the dicom let's write it down to another file
    // do a scope to be sure everything gets cleanup
    {
-      gdcm::File file( filename );
+      gdcm::FileHelper file( filename );
       file.GetImageData();
       file.SetWriteModeToRaw();
       file.WriteDcmExplVR( "TestWrite.dcm" );
index d12ca6bc609ee789ddbc76b724e923bb513669ef..2d3c5ad64e9d5a13c1c255949d7017b85ee0ab41 100644 (file)
@@ -16,7 +16,7 @@
 #include "gdcmDocEntrySet.h"
 #include "gdcmDocument.h"
 #include "gdcmElementSet.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmGlobal.h"
 #include "gdcmHeader.h"
 #include "gdcmSerieHeader.h"
index 828f1832043b3b6d3f30af9bca99d7114819cc65..e4b6e30a4342ccf150835fc2d80d49c89003306f 100644 (file)
@@ -34,7 +34,7 @@ SET(libgdcm_la_SOURCES
    gdcmDocument.cxx
    gdcmElementSet.cxx
    gdcmException.cxx
-   gdcmFile.cxx
+   gdcmFileHelper.cxx
    gdcmGlobal.cxx
    gdcmHeader.cxx
    gdcmJPEGFragment.cxx
index 4c5fd14aa56d3315a8da41892e0e4c434707b2dd..745261fbfac626f1fea38b97d809a2002f50dd16 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 11:39:49 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2005/01/20 16:17:00 $
+  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
@@ -58,7 +58,7 @@ typedef std::string BaseTagKey;
  */
 class GDCM_EXPORT DocEntrySet : public Base
 {
-friend class File;
+friend class FileHelper;
 public:
    DocEntrySet() {};
    virtual ~DocEntrySet() {};
index 21d5558b380c20729cd8aed6147534b5f0f5ff97..a1c445f729b2b9181e24eeffe3747cd556b13b2e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 11:37:37 $
-  Version:   $Revision: 1.94 $
+  Date:      $Date: 2005/01/20 16:17:00 $
+  Version:   $Revision: 1.95 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -65,10 +65,10 @@ public:
    /// 'Swap code' accessor (see \ref SwapCode )
    int GetSwapCode() { return SwapCode; }
    // System access (meaning endian related !?)
-   uint16_t SwapShort(uint16_t);   // needed by File
-   uint32_t SwapLong(uint32_t);    // needed by File
-   uint16_t UnswapShort(uint16_t); // needed by File
-   uint32_t UnswapLong(uint32_t);  // needed by File
+   uint16_t SwapShort(uint16_t);   // needed by Document
+   uint32_t SwapLong(uint32_t);    // needed by Document
+   uint16_t UnswapShort(uint16_t); // needed by Document
+   uint32_t UnswapLong(uint32_t);  // needed by Document
    
 // Ordering of Documents
    bool operator<(Document &document);
@@ -254,7 +254,7 @@ private:
    uint32_t MaxSizePrintEntry;   
 
 private:
-   friend class File;
+   friend class FileHelper;
 };
 } // end namespace gdcm
 
index 593a0998dddb740408e43b48807ec1b358e7aefa..c90075b193da78cdfe5435632a9641c20d2b2717 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:42 $
-  Version:   $Revision: 1.193 $
+  Date:      $Date: 2005/01/20 16:17:00 $
+  Version:   $Revision: 1.194 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmGlobal.h"
 #include "gdcmTS.h"
 #include "gdcmDocument.h"
@@ -49,7 +49,7 @@ typedef std::pair<TagDocEntryHT::iterator,TagDocEntryHT::iterator> IterHT;
  *        one sets an a posteriori shadow dictionary (efficiency can be
  *        seen as a side effect).   
  */
-File::File( )
+FileHelper::FileHelper( )
 {
    HeaderInternal = new Header( );
    SelfHeader = true;
@@ -70,7 +70,7 @@ File::File( )
  *        seen as a side effect).   
  * @param header already built Header
  */
-File::File(Header *header)
+FileHelper::FileHelper(Header *header)
 {
    HeaderInternal = header;
    SelfHeader = false;
@@ -91,7 +91,7 @@ File::File(Header *header)
  *        seen as a side effect).   
  * @param filename file to be opened for parsing
  */
-File::File(std::string const & filename )
+FileHelper::FileHelper(std::string const & filename )
 {
    HeaderInternal = new Header( filename );
    SelfHeader = true;
@@ -100,10 +100,10 @@ File::File(std::string const & filename )
 
 /**
  * \brief canonical destructor
- * \note  If the Header was created by the File constructor,
- *        it is destroyed by the File
+ * \note  If the header (gdcm::File) was created by the FileHelper constructor,
+ *        it is destroyed by the FileHelper
  */
-File::~File()
+FileHelper::~FileHelper()
 { 
    if( PixelReadConverter )
    {
@@ -127,7 +127,7 @@ File::~File()
 
 //-----------------------------------------------------------------------------
 // Print
-void File::Print(std::ostream &os, std::string const &)
+void FileHelper::Print(std::ostream &os, std::string const &)
 {
    HeaderInternal->SetPrintLevel(PrintLevel);
    HeaderInternal->Print(os);
@@ -146,7 +146,7 @@ void File::Print(std::ostream &os, std::string const &)
  *          the size of the pixels)
  * @return  The image size
  */
-size_t File::GetImageDataSize()
+size_t FileHelper::GetImageDataSize()
 {
    if ( PixelWriteConverter->GetUserData() )
    {
@@ -163,7 +163,7 @@ size_t File::GetImageDataSize()
  *          (use GetImageDataSize if you wish)
  * @return  The raw image size
  */
-size_t File::GetImageDataRawSize()
+size_t FileHelper::GetImageDataRawSize()
 {
    if ( PixelWriteConverter->GetUserData() )
    {
@@ -183,7 +183,7 @@ size_t File::GetImageDataRawSize()
  * @return  Pointer to newly allocated pixel data.
  *          NULL if alloc fails 
  */
-uint8_t *File::GetImageData()
+uint8_t *FileHelper::GetImageData()
 {
    if ( PixelWriteConverter->GetUserData() )
    {
@@ -216,7 +216,7 @@ uint8_t *File::GetImageData()
  * @return  Pointer to newly allocated pixel data.
  * \        NULL if alloc fails 
  */
-uint8_t *File::GetImageDataRaw ()
+uint8_t *FileHelper::GetImageDataRaw ()
 {
    return GetRaw();
 }
@@ -246,7 +246,7 @@ uint8_t *File::GetImageDataRaw ()
  * @return  On success, the number of bytes actually copied. Zero on
  *          failure e.g. MaxSize is lower than necessary.
  */
-size_t File::GetImageDataIntoVector (void *destination, size_t maxSize)
+size_t FileHelper::GetImageDataIntoVector (void *destination, size_t maxSize)
 {
    if ( ! GetRaw() )
    {
@@ -292,7 +292,7 @@ size_t File::GetImageDataIntoVector (void *destination, size_t maxSize)
  *
  * @return boolean
  */
-void File::SetImageData(uint8_t *inData, size_t expectedSize)
+void FileHelper::SetImageData(uint8_t *inData, size_t expectedSize)
 {
    SetUserData(inData,expectedSize);
 }
@@ -301,7 +301,7 @@ void File::SetImageData(uint8_t *inData, size_t expectedSize)
  * \brief   Set the image datas defined by the user
  * \warning When writting the file, this datas are get as default datas to write
  */
-void File::SetUserData(uint8_t *data, size_t expectedSize)
+void FileHelper::SetUserData(uint8_t *data, size_t expectedSize)
 {
    PixelWriteConverter->SetUserData(data,expectedSize);
 }
@@ -310,7 +310,7 @@ void File::SetUserData(uint8_t *data, size_t expectedSize)
  * \brief   Get the image datas defined by the user
  * \warning When writting the file, this datas are get as default data to write
  */
-uint8_t *File::GetUserData()
+uint8_t *FileHelper::GetUserData()
 {
    return PixelWriteConverter->GetUserData();
 }
@@ -319,7 +319,7 @@ uint8_t *File::GetUserData()
  * \brief   Get the image data size defined by the user
  * \warning When writting the file, this datas are get as default data to write
  */
-size_t File::GetUserDataSize()
+size_t FileHelper::GetUserDataSize()
 {
    return PixelWriteConverter->GetUserDataSize();
 }
@@ -328,7 +328,7 @@ size_t File::GetUserDataSize()
  * \brief   Get the image datas from the file.
  *          If a LUT is found, the data are expanded to be RGB
  */
-uint8_t *File::GetRGBData()
+uint8_t *FileHelper::GetRGBData()
 {
    return PixelReadConverter->GetRGB();
 }
@@ -337,7 +337,7 @@ uint8_t *File::GetRGBData()
  * \brief   Get the image data size from the file.
  *          If a LUT is found, the data are expanded to be RGB
  */
-size_t File::GetRGBDataSize()
+size_t FileHelper::GetRGBDataSize()
 {
    return PixelReadConverter->GetRGBSize();
 }
@@ -346,7 +346,7 @@ size_t File::GetRGBDataSize()
  * \brief   Get the image datas from the file.
  *          If a LUT is found, the datas are not expanded !
  */
-uint8_t *File::GetRawData()
+uint8_t *FileHelper::GetRawData()
 {
    return PixelReadConverter->GetRaw();
 }
@@ -355,7 +355,7 @@ uint8_t *File::GetRawData()
  * \brief   Get the image data size from the file.
  *          If a LUT is found, the data are not expanded !
  */
-size_t File::GetRawDataSize()
+size_t FileHelper::GetRawDataSize()
 {
    return PixelReadConverter->GetRawSize();
 }
@@ -369,7 +369,7 @@ size_t File::GetRawDataSize()
  * @return false if write fails
  */
 
-bool File::WriteRawData(std::string const &fileName)
+bool FileHelper::WriteRawData(std::string const &fileName)
 {
   std::ofstream fp1(fileName.c_str(), std::ios::out | std::ios::binary );
    if (!fp1)
@@ -412,7 +412,7 @@ bool File::WriteRawData(std::string const &fileName)
  * @return false if write fails
  */
 
-bool File::WriteDcmImplVR (std::string const &fileName)
+bool FileHelper::WriteDcmImplVR (std::string const &fileName)
 {
    SetWriteTypeToDcmImplVR();
    return Write(fileName);
@@ -427,7 +427,7 @@ bool File::WriteDcmImplVR (std::string const &fileName)
  * @return false if write fails
  */
 
-bool File::WriteDcmExplVR (std::string const &fileName)
+bool FileHelper::WriteDcmExplVR (std::string const &fileName)
 {
    SetWriteTypeToDcmExplVR();
    return Write(fileName);
@@ -447,7 +447,7 @@ bool File::WriteDcmExplVR (std::string const &fileName)
  * @return false if write fails
  */
 
-bool File::WriteAcr (std::string const &fileName)
+bool FileHelper::WriteAcr (std::string const &fileName)
 {
    SetWriteTypeToAcr();
    return Write(fileName);
@@ -459,7 +459,7 @@ bool File::WriteAcr (std::string const &fileName)
  *                 (any already existing file is overwritten)
  * @return false if write fails
  */
-bool File::Write(std::string const &fileName)
+bool FileHelper::Write(std::string const &fileName)
 {
    switch(WriteType)
    {
@@ -533,7 +533,7 @@ bool File::Write(std::string const &fileName)
  * @param   group     group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool File::SetEntry(std::string const &content,
+bool FileHelper::SetEntry(std::string const &content,
                     uint16_t group, uint16_t elem)
 { 
    return HeaderInternal->SetEntry(content,group,elem);
@@ -549,7 +549,7 @@ bool File::SetEntry(std::string const &content,
  * @param   group     group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool File::SetEntry(uint8_t *content, int lgth,
+bool FileHelper::SetEntry(uint8_t *content, int lgth,
                     uint16_t group, uint16_t elem)
 {
    return HeaderInternal->SetEntry(content,lgth,group,elem);
@@ -564,7 +564,7 @@ bool File::SetEntry(uint8_t *content, int lgth,
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */ 
-bool File::ReplaceOrCreate(std::string const &content,
+bool FileHelper::ReplaceOrCreate(std::string const &content,
                            uint16_t group, uint16_t elem)
 {
    return HeaderInternal->ReplaceOrCreate(content,group,elem) != NULL;
@@ -580,7 +580,7 @@ bool File::ReplaceOrCreate(std::string const &content,
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */
-bool File::ReplaceOrCreate(uint8_t *binArea, int lgth,
+bool FileHelper::ReplaceOrCreate(uint8_t *binArea, int lgth,
                            uint16_t group, uint16_t elem)
 {
    return HeaderInternal->ReplaceOrCreate(binArea,lgth,group,elem) != NULL;
@@ -589,7 +589,7 @@ bool File::ReplaceOrCreate(uint8_t *binArea, int lgth,
 /**
  * \brief Access to the underlying \ref PixelReadConverter RGBA LUT
  */
-uint8_t* File::GetLutRGBA()
+uint8_t* FileHelper::GetLutRGBA()
 {
    return PixelReadConverter->GetLutRGBA();
 }
@@ -605,7 +605,7 @@ uint8_t* File::GetLutRGBA()
  *    when the user set an image data
  * @return true if the check successfulls
  */
-bool File::CheckWriteIntegrity()
+bool FileHelper::CheckWriteIntegrity()
 {
    if(PixelWriteConverter->GetUserData())
    {
@@ -648,7 +648,10 @@ bool File::CheckWriteIntegrity()
    return true;
 }
 
-void File::SetWriteToRaw()
+/**
+ * \brief   
+ */ 
+void FileHelper::SetWriteToRaw()
 {
    if( HeaderInternal->GetNumberOfScalarComponents() == 3 
     && !HeaderInternal->HasLUT())
@@ -681,7 +684,11 @@ void File::SetWriteToRaw()
    }
 }
 
-void File::SetWriteToRGB()
+
+/**
+ * \brief   
+ */ 
+void FileHelper::SetWriteToRGB()
 {
    if(HeaderInternal->GetNumberOfScalarComponents()==3)
    {
@@ -751,7 +758,10 @@ void File::SetWriteToRGB()
    }
 }
 
-void File::RestoreWrite()
+/**
+ * \brief   
+ */ 
+void FileHelper::RestoreWrite()
 {
    Archive->Restore(0x0028,0x0002);
    Archive->Restore(0x0028,0x0004);
@@ -772,12 +782,18 @@ void File::RestoreWrite()
    Archive->Restore(0x0028,0x1203);
 }
 
-void File::SetWriteFileTypeToACR()
+/**
+ * \brief   
+ */ 
+void FileHelper::SetWriteFileTypeToACR()
 {
    Archive->Push(0x0002,0x0010);
 }
 
-void File::SetWriteFileTypeToExplicitVR()
+/**
+ * \brief   
+ */ 
+void FileHelper::SetWriteFileTypeToExplicitVR()
 {
    std::string ts = Util::DicomString( 
       Global::GetTS()->GetSpecialTransferSyntax(TS::ExplicitVRLittleEndian) );
@@ -788,7 +804,10 @@ void File::SetWriteFileTypeToExplicitVR()
    Archive->Push(tss);
 }
 
-void File::SetWriteFileTypeToImplicitVR()
+/**
+ * \brief   
+ */ 
+void FileHelper::SetWriteFileTypeToImplicitVR()
 {
    std::string ts = Util::DicomString(
       Global::GetTS()->GetSpecialTransferSyntax(TS::ImplicitVRLittleEndian) );
@@ -799,12 +818,16 @@ void File::SetWriteFileTypeToImplicitVR()
    Archive->Push(tss);
 }
 
-void File::RestoreWriteFileType()
+
+/**
+ * \brief   
+ */ 
+void FileHelper::RestoreWriteFileType()
 {
    Archive->Restore(0x0002,0x0010);
 }
 
-void File::SetWriteToLibido()
+void FileHelper::SetWriteToLibido()
 {
    ValEntry *oldRow = dynamic_cast<ValEntry *>
                 (HeaderInternal->GetDocEntry(0x0028, 0x0010));
@@ -833,7 +856,10 @@ void File::SetWriteToLibido()
    Archive->Push(libidoCode);
 }
 
-void File::SetWriteToNoLibido()
+/**
+ * \brief   
+ */ 
+void FileHelper::SetWriteToNoLibido()
 {
    ValEntry *recCode = dynamic_cast<ValEntry *>
                 (HeaderInternal->GetDocEntry(0x0008,0x0010));
@@ -848,14 +874,17 @@ void File::SetWriteToNoLibido()
    }
 }
 
-void File::RestoreWriteOfLibido()
+/**
+ * \brief   
+ */ 
+void FileHelper::RestoreWriteOfLibido()
 {
    Archive->Restore(0x0028,0x0010);
    Archive->Restore(0x0028,0x0011);
    Archive->Restore(0x0008,0x0010);
 }
 
-ValEntry *File::CopyValEntry(uint16_t group,uint16_t elem)
+ValEntry *FileHelper::CopyValEntry(uint16_t group,uint16_t elem)
 {
    DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
    ValEntry *newE;
@@ -873,7 +902,16 @@ ValEntry *File::CopyValEntry(uint16_t group,uint16_t elem)
    return newE;
 }
 
-BinEntry *File::CopyBinEntry(uint16_t group,uint16_t elem)
+/**
+ * \brief   Modifies the value of a given Bin Entry (Dicom Element)
+ *          when it exists. Create it with the given value when unexistant.
+ * @param   content (string) Value to be set
+ * @param   group   Group number of the Entry 
+ * @param   elem  Element number of the Entry
+ * \return  pointer to the modified/created Bin Entry (NULL when creation
+ *          failed).
+ */ 
+BinEntry *FileHelper::CopyBinEntry(uint16_t group,uint16_t elem)
 {
    DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
    BinEntry *newE;
@@ -896,7 +934,7 @@ BinEntry *File::CopyBinEntry(uint16_t group,uint16_t elem)
 /**
  * \brief Factorization for various forms of constructors.
  */
-void File::Initialise()
+void FileHelper::Initialise()
 {
    WriteMode = WMODE_RAW;
    WriteType = ExplicitVR;
@@ -911,7 +949,10 @@ void File::Initialise()
    }
 }
 
-uint8_t *File::GetRaw()
+/**
+ * \brief   
+ */ 
+uint8_t *FileHelper::GetRaw()
 {
    uint8_t *raw = PixelReadConverter->GetRaw();
    if ( ! raw )
index c26b83278d31f58035cd2bb8c3d828724b52292c..423f79e78dd7804dff93ba2721726f7af48b9dad 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 11:39:49 $
-  Version:   $Revision: 1.95 $
+  Date:      $Date: 2005/01/20 16:17:00 $
+  Version:   $Revision: 1.96 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -36,7 +36,7 @@ class DocEntryArchive;
  * for accessing the image/volume content. One can also use it to
  * write Dicom/ACR-NEMA/RAW files.
  */
-class GDCM_EXPORT File : public Base
+class GDCM_EXPORT FileHelper : public Base
 {
 public:
    enum FileMode
@@ -46,11 +46,11 @@ public:
    };
      
 public:
-   File( );
-   File( Header *header );
-   File( std::string const &filename );
+   FileHelper( );
+   FileHelper( Header *header );
+   FileHelper( std::string const &filename );
  
-   virtual ~File();
+   virtual ~FileHelper();
 
    void Print(std::ostream &os = std::cout, std::string const & indent = ""); 
 
index 7540e6dbb774493721715c09f602f859a45c15ee..928049fc6e8a895c434ca1e9e79625511b7e6f53 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJPEGFragment.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 04:01:09 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/01/20 16:17:00 $
+  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
@@ -54,7 +54,7 @@ private:
    long    Length;
 
 friend class Document;
-friend class File;
+friend class FileHelper;
 friend class PixelReadConvert;
 friend class JPEGFragmentsInfo;
 };
index 399d8130da256b90d28babbd8d4b3262aa716383..b416f1612969da589741007d1d760cd3781060df 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJPEGFragmentsInfo.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 03:05:55 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/01/20 16:17:00 $
+  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
@@ -52,7 +52,7 @@ private:
    JPEGFragmentsList Fragments;
 
 friend class Document;
-friend class File;
+friend class FileHelper;
 friend class PixelReadConvert;
 };
 } // end namespace gdcm
index fb35513e592ebaa89a723cf53a5873c893381d7c..a83be408858de092dd3138cda949fcbeb696fbb1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmRLEFramesInfo.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:42 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/20 16:17:00 $
+  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
@@ -45,7 +45,7 @@ class GDCM_EXPORT RLEFramesInfo
 {
    typedef std::list< RLEFrame* > RLEFrameList;
 friend class Document;
-friend class File;
+friend class FileHelper;
 friend class PixelReadConvert;
    RLEFrameList Frames;
 public:
index 91556c82e9803f3999f1f3decf2ee05f470c3d8e..e6346dfcbf7f3dde284c3dbec9302185b15cf1b7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcmReader.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/09 10:59:59 $
-  Version:   $Revision: 1.64 $
+  Date:      $Date: 2005/01/20 16:17:01 $
+  Version:   $Revision: 1.65 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -65,7 +65,7 @@
 // time...
 // //////////////////////////////////////////////////////////////
 
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
 #include "gdcmHeader.h"
 #include "vtkGdcmReader.h"
 
@@ -75,7 +75,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.64 $");
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.65 $");
 vtkStandardNewMacro(vtkGdcmReader);
 
 //-----------------------------------------------------------------------------
@@ -629,7 +629,7 @@ size_t vtkGdcmReader::LoadImageInMemory(
              unsigned long & updateProgressCount)
 {
    vtkDebugMacro(<< "Copying to memory image [" << fileName.c_str() << "]");
-   gdcm::File file( fileName.c_str() );
+   gdcm::FileHelper file( fileName.c_str() );
    size_t size;
 
    // If the data structure of vtk for image/volume representation
index f121408fadb2576e3aff2851f61bad9411db898a..c516e01a3614c3cf4f1f33ea770dca20d27f6157 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcmWriter.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 18:24:07 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/01/20 16:17:01 $
+  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
@@ -26,7 +26,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.10 $");
+vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.11 $");
 vtkStandardNewMacro(vtkGdcmWriter);
 
 //-----------------------------------------------------------------------------
@@ -120,7 +120,7 @@ size_t ReverseData(vtkImageData *image,unsigned char **data)
 /**
  * Set the datas informations in the file
  */
-void SetImageInformation(gdcm::File *file,vtkImageData *image)
+void SetImageInformation(gdcm::FileHelper *file,vtkImageData *image)
 {
    std::ostringstream str;
 
@@ -312,7 +312,7 @@ void vtkGdcmWriter::RecursiveWrite(int axis, vtkImageData *cache,
 void vtkGdcmWriter::WriteDcmFile(char *fileName,vtkImageData *image)
 {
    // From here, the write of the file begins
-   gdcm::File *dcmFile = new gdcm::File();
+   gdcm::FileHelper *dcmFile = new gdcm::FileHelper();
 
    // Set the image informations
    SetImageInformation(dcmFile,image);