]> Creatis software - gdcm.git/commitdiff
Stage 2 of names normalization :
authorjpr <jpr>
Fri, 21 Jan 2005 11:40:52 +0000 (11:40 +0000)
committerjpr <jpr>
Fri, 21 Jan 2005 11:40:52 +0000 (11:40 +0000)
- A gdcm::Document is now either a gdcm::DicomDir or a gdcm::File
     (easy to understand ...)
- gdcm::FileHelper replaces old class gdcm::File

45 files changed:
Example/FindTags.cxx
Example/FlatHashTablePrint.cxx
Example/PrintDocument.cxx
Example/PrintFile.cxx
Example/PrintHeader.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/TestAllEntryVerify.cxx
Testing/TestAllReadCompareDicom.cxx
Testing/TestBug.cxx
Testing/TestCopyDicom.cxx
Testing/TestCopyRescaleDicom.cxx
Testing/TestReadWriteReadCompare.cxx
Testing/TestWriteSimple.cxx
gdcmPython/testSuite.py
src/CMakeLists.txt
src/gdcm.h
src/gdcmBase.h
src/gdcmBinEntry.h
src/gdcmDicomDir.cxx
src/gdcmDocEntry.h
src/gdcmDocEntryArchive.cxx
src/gdcmDocEntryArchive.h
src/gdcmDocument.h
src/gdcmFileHelper.cxx
src/gdcmFileHelper.h
src/gdcmPixelReadConvert.cxx
src/gdcmPixelReadConvert.h
src/gdcmSerieHeader.cxx
src/gdcmSerieHeader.h
src/gdcmUtil.cxx
src/gdcmValEntry.h
vtk/vtkGdcmReader.cxx
vtk/vtkGdcmWriter.cxx

index 4cbba5e01b2fcb2620bcdb9c1c09d461048b769b..59b0048138621e8ee2914bc9873ffd6364d18bf7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: FindTags.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmFileHelper.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmUtil.h"
 
 #include <iostream>
@@ -51,7 +51,7 @@ int main(int argc, char* argv[])
    f1->SetEntry(ManufacturerName ,0x0008,0x0070);
 
 // ImagePositionPatient
-   ImagePositionPatient = f1->GetHeader()->GetEntry(0x0020,0x0032);
+   ImagePositionPatient = f1->GetFile()->GetEntry(0x0020,0x0032);
 
 // Image Position (RET)
    f1->SetEntry(ImagePositionPatient, 0x0020,0x0030);
@@ -79,25 +79,25 @@ int main(int argc, char* argv[])
 // SetEntryLength is private now.
 //TO DO : see is the pb goes on...
 
-//f1->GetHeader()->SetEntryLength(strlen(Location.c_str())-1, 0x0020,0x0050);
+//f1->GetFile()->SetEntryLength(strlen(Location.c_str())-1, 0x0020,0x0050);
 
 // Image Location 
 
    zizi = gdcm::Util::Format("%d",0x7FE0);
    ImageLocation = gdcm::Util::DicomString(zizi.c_str());
 //f1->SetEntry(Location, 0x0028,0x0200);
-//f1->GetHeader()->SetEntryLength(strlen(ImageLocation.c_str())-1, 0x0020,0x0050); // prudence !
+//f1->GetFile()->SetEntryLength(strlen(ImageLocation.c_str())-1, 0x0020,0x0050); // prudence !
 
 // void* imageData= f1->GetImageData();
 
-// ecriture d'un fichier ACR à partir d'un dcmHeader correct.
+// ecriture d'un fichier ACR à partir d'un dcmFile correct.
 
    std::cout << "----------------avant PrintEntry---------------------" << std::endl;
-   f1->GetHeader()->Print();
+   f1->GetFile()->Print();
    std::cout << "----------------avant WriteDcm---------------------" << std::endl;
 
 
-// ecriture d'un fichier ACR à partir d'un dcmHeader correct.
+// ecriture d'un fichier ACR à partir d'un dcmFile correct.
 
    zozo = toto + ".acr";
    std::cout << "WriteACR" << std::endl;
index e7e806cc618281edf36ce9fd9561cfb53d56480d..fd134640c5e3f1309a580a001afc6b78d3e8a2d7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: FlatHashTablePrint.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/14 17:31:34 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmDocEntry.h"
 
 // Iterate on all the Dicom entries encountered in the gdcmFile (given
@@ -31,7 +31,7 @@ int main(int , char* [])
       return 1;
    }
 
-   gdcm::Header* header = new gdcm::Header( argv[1] );
+   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 02f2b33e5d373ac6679d7b3844f3fbbd28e409e2..8d7a0aadd2f46021f7627861abda286951998f88 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:55 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 
 #include <iostream>
 
 int main(int argc, char* argv[])
 {
  
-   gdcm::Header *e1;
+   gdcm::File *e1;
    std::string fileName;   
 
    if (argc != 2) {
@@ -39,7 +39,7 @@ int main(int argc, char* argv[])
       fileName += "/test.acr";
    }
    
-   e1= new gdcm::Header( fileName.c_str() );
+   e1= new gdcm::File( fileName.c_str() );
 
    e1->SetPrintLevel(2);
    
index 4d6a65fe6d628d588da57cfae29fc1d2d75a7e89..de95dc454d9398711c06f37b44d6b45f7b7bf000 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmDebug.h"
 #include "gdcmFileHelper.h"
 
@@ -23,7 +23,7 @@
 
 int main(int argc, char* argv[])
 {
-   gdcm::Header *e1;
+   gdcm::File *e1;
    gdcm::FileHelper   *f1;
    std::string fileName;   
    if (argc != 2) 
@@ -45,7 +45,7 @@ int main(int argc, char* argv[])
    if (argc > 3)
       gdcm::Debug::SetDebugOn();
    
-   e1= new gdcm::Header( fileName.c_str() );
+   e1= new gdcm::File( fileName.c_str() );
    f1 = new gdcm::FileHelper(e1);
 
    if (argc > 2) 
index 2112f0925a1e961ef9093446b52c48d760c08ad4..23c462b3b9a532583eba3b1aa9dd98991c07cd9b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/12 11:40:50 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmDebug.h"
 
 #include <iostream>
@@ -42,7 +42,7 @@ int main(int argc, char* argv[])
    if (argc > 3)
       gdcm::Debug::SetDebugOn();
 
-   gdcm::Header *e1 = new gdcm::Header( fileName.c_str() );  
+   gdcm::File *e1 = new gdcm::File( fileName.c_str() );  
 
    if (argc > 2) 
    {
index 6baada033ddfd82cf96e61edd57c2c0f4df5f892..c2d4b4d992cb772f39ddaf180c83e4f89f7ec2d5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestChangeHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 // This examples read two images (could be the same). Try to modify
@@ -31,20 +31,20 @@ int main(int argc, char* argv[])
        return 1;
     }
 
-    gdcm::Header *h1 = new gdcm::Header( argv[1] );
+    gdcm::File *h1 = new gdcm::File( argv[1] );
     gdcm::FileHelper  *f1 = new gdcm::FileHelper( h1 );
     gdcm::FileHelper  *f2 = new gdcm::FileHelper( argv[2] );
 
     // 0018 1310 US ACQ Acquisition Matrix
     gdcm::DictEntry *dictEntry =
-       f2->GetHeader()->GetPubDict()->GetDictEntry( 0x0018, 1310 );
+       f2->GetFile()->GetPubDict()->GetDictEntry( 0x0018, 1310 );
     std::cerr << std::hex << dictEntry->GetGroup() << "," << dictEntry->GetElement() << std::endl;
 
-    std::string matrix = f2->GetHeader()->GetEntry(0x0018, 0x1310);
+    std::string matrix = f2->GetFile()->GetEntry(0x0018, 0x1310);
     if(matrix != "gdcm::Unfound")
     {
        std::cerr << "Aquisition Matrix:" << matrix << std::endl;
-       f1->GetHeader()->ReplaceOrCreate( matrix, 0x0018, 0x1310);
+       f1->GetFile()->ReplaceOrCreate( matrix, 0x0018, 0x1310);
     }
 
     f1->GetImageData();
index 93b7a227d757fd15ae0682b3758e380503f9b5f7..c69b525588d816f65e12406c8861e8a88769534c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:31:42 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 #include "gdcmDocument.h"
 #include "gdcmValEntry.h"
@@ -83,7 +83,7 @@ int main(int argc, char* argv[])
       gdcm::FileHelper *original = new gdcm::FileHelper( filename );
    
       std::cout << "--- Original ----------------------" << std::endl;
-      //original->GetHeader()->Print();
+      //original->GetFile()->Print();
    
       gdcm::FileHelper *copy = new gdcm::FileHelper( output );
 
@@ -96,15 +96,15 @@ int main(int argc, char* argv[])
   
       // 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 Header !)
+      // (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->GetHeader()->GetFirstEntry();
+      gdcm::DocEntry* d=original->GetFile()->GetFirstEntry();
       while(d)
       {
          if ( gdcm::BinEntry* b = dynamic_cast<gdcm::BinEntry*>(d) )
          {              
-            copy->GetHeader()->ReplaceOrCreate( 
+            copy->GetFile()->ReplaceOrCreate( 
                                  b->GetBinArea(),
                                  b->GetLength(),
                                  b->GetGroup(), 
@@ -113,7 +113,7 @@ int main(int argc, char* argv[])
          }
          else if ( gdcm::ValEntry* v = dynamic_cast<gdcm::ValEntry*>(d) )
          {   
-            copy->GetHeader()->ReplaceOrCreate( 
+            copy->GetFile()->ReplaceOrCreate( 
                                  v->GetValue(),
                                  v->GetGroup(), 
                                  v->GetElement(),
@@ -128,7 +128,7 @@ int main(int argc, char* argv[])
           //  << std::endl;    
          }
 
-         d=original->GetHeader()->GetNextEntry();
+         d=original->GetFile()->GetNextEntry();
       }
 
       //copy->GetImageData();
@@ -136,7 +136,7 @@ int main(int argc, char* argv[])
 
       std::cout << "--- Copy ----------------------" << std::endl;
       std::cout <<std::endl << "DO NOT care about Offset"  <<std::endl<<std::endl;; 
-      copy->GetHeader()->Print();
+      copy->GetFile()->Print();
       std::cout << "--- ---- ----------------------" << std::endl;
    
       copy->WriteDcmExplVR( output );
index 6204412f1a5bcd7c490d637576e188817af86c97..f16e9ef90e627bbaf79dbfaabd73d86e72ce2730 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDcm2Acr.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:31:42 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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 "gdcmFileHelper.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 
 #include <iostream>
 
@@ -44,29 +44,29 @@ int main(int argc, char* argv[])
    std::cout << " Sortie gdcmFileHelper()" << std::endl;
 
    //e1.PrintPubDict(std::cout);
-   f1->GetHeader()->Print();
+   f1->GetFile()->Print();
 
    //cle = gdcmDictEntry::TranslateToKey(0x0028,0x0008);
 
    int dataSize = f1->GetImageDataSize();
    std::cout << "dataSize:" << dataSize << std::endl;
 
-   // void* imageData= f1->GetHeader()->GetImageData();
+   // void* imageData= f1->GetFile()->GetImageData();
 
    // Ecriture d'un Raw File, a afficher avec affim filein= dim= nbit= signe=
    //f1->WriteRawData("image.raw");
 
-   // ecriture d'un fichier DICOM à partir d'un dcmHeader correct.
+   // ecriture d'un fichier DICOM à partir d'un dcmFile correct.
 
    //f1->WriteDcmImplVR("image.dcm");
 
-   // ecriture d'un fichier ACR à partir d'un dcmHeader correct.
+   // ecriture d'un fichier ACR à partir d'un dcmFile correct.
 
    zozo = toto + ".nema";
    f1->WriteAcr(zozo);
    std::cout << "\n\n---------------------------------------\n\n" << std::endl;
 
-   f1->GetHeader()->Print();
+   f1->GetFile()->Print();
    
    return 0;
 }
index f80dfc55cdd5d1935797f85ac2ed00ecf01d410d..b11919ccbc587d8d62120d1110cf02ad7bf25dbb 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestFromScratch.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:31:42 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 #include "gdcmDictEntry.h"
 #include "gdcmDocEntry.h"
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
 
    std::string filename = argv[1];
    gdcm::FileHelper *f1 = new gdcm::FileHelper( filename );
-   gdcm::Header *h1 = f1->GetHeader();
+   gdcm::File *h1 = f1->GetFile();
 
    int dataSize = f1->GetImageDataSize();
    std::cout << "DataSize:      " << dataSize << std::endl;
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
    uint8_t* imageData = f1->GetImageData();
  
    // Hopefully default to something
-   gdcm::Header *h2 = new gdcm::Header();
+   gdcm::File *h2 = new gdcm::File();
 
    // Copy of the header content
    gdcm::DocEntry* d = h1->GetFirstEntry();
index 9f99e31a26200d1f40d4b50a0e760b8437547544..63ae5e048e17f88c145f60fa2e3b477253390149 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestPapyrus.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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 "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 #include "gdcmDocument.h"
 #include "gdcmValEntry.h"
@@ -61,7 +61,7 @@ bool RemoveFile(const char* source)
 }
 
 // ----------------------------------------------------------------------
-// Here we load a supposed to be Papyrus File (gdcm::Header compliant)
+// Here we load a supposed to be Papyrus File (gdcm::File compliant)
 // and then try to get the pixels, using low-level SeqEntry accessors.
 // Since it's not a general purpose Papyrus related program
 // (just a light example) we suppose *everything* is clean
@@ -92,7 +92,7 @@ int main(int argc, char* argv[])
       }
    }
    gdcm::FileHelper *original = new gdcm::FileHelper( filename );
-   gdcm::Header *h = original->GetHeader();
+   gdcm::File *h = original->GetFile();
 
    // Look for private Papyrus Sequence
    gdcm::SeqEntry *seqPapyrus= h->GetSeqEntry(0x0041, 0x1050);
@@ -224,8 +224,8 @@ int main(int argc, char* argv[])
 
    std::string NumberOfFrames = gdcm::Util::Format("%d", nbImages); 
 
-   gdcm::Header *n = new gdcm::Header();
-   n->InitializeDefaultHeader();
+   gdcm::File *n = new gdcm::File();
+   n->InitializeDefaultFile();
 
    n->ReplaceOrCreate(MediaStSOPinstUID,  0x0002,0x0002);
   // Whe keep default gdcm Transfer Syntax (Explicit VR Little Endian)
index 5441c7a7fd7a1528ecf92cd08afaf0c9a50fd7ff..79679194318e08cb80129b1f2802628401f7f70b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestReadWriteReadCompare.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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 "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 //Generated file:
@@ -33,7 +33,7 @@ int main(int argc, char* argv[])
    std::cout << "   For all images in gdcmData (and not blacklisted in "
                 "Test/CMakeLists.txt)" << std::endl;
    std::cout << "   apply the following multistep test: " << std::endl;
-   std::cout << "   step 1: parse the image (as gdcmHeader) and call"
+   std::cout << "   step 1: parse the image (as gdcmFile) and call"
              << " IsReadable(). " << std::endl;
    std::cout << "   step 2: write the corresponding image in DICOM V3 "
              << "with explicit" << std::endl
@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
 
       //////////////// Step 1 (see above description): 
 
-      gdcm::Header *header = new gdcm::Header( filename );
+      gdcm::File *header = new gdcm::File( filename );
       if( !header->IsReadable() )
       {
          std::cerr << "Test::TestReadWriteReadCompare: Image not gdcm compatible:"
@@ -100,7 +100,7 @@ int main(int argc, char* argv[])
       //////////////// Step 3:
 
       gdcm::FileHelper *reread = new gdcm::FileHelper( "TestReadWriteReadCompare.dcm" );
-      if( !reread->GetHeader()->IsReadable() )
+      if( !reread->GetFile()->IsReadable() )
       {
         std::cerr << "Test::TestReadWriteReadCompare: Could not reread image "
                   << "written:" << filename << std::endl;
index 4c4607c9d4d3533b96ed776f0924e113fe4bdd61..a34d618c8a7b6e66b020739e9d27b23659508bef 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWrite.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2005/01/21 11:40:52 $
+  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
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 #include <iostream>
@@ -24,7 +24,7 @@ int main(int argc, char *argv[])
 {  
    std::string zozo;
 
-   gdcm::Header *e1;
+   gdcm::File *e1;
    gdcm::FileHelper *f1;
 
    void* imageData;
@@ -44,13 +44,13 @@ int main(int argc, char *argv[])
    }
 /*
    if (0) {  // Just to keep the code for further use
-      std::cout <<std::endl << "-------- Test gdcmHeader ------" <<std::endl;
-      e1 = new gdcmHeaderHelper(argv[1]);
-      if (!f1->GetHeader()->IsReadable()) {
+      std::cout <<std::endl << "-------- Test gdcmFile ------" <<std::endl;
+      e1 = new gdcmFileHelper(argv[1]);
+      if (!f1->GetFile()->IsReadable()) {
          std::cout << "Sorry, not a DICOM / ACR File"  <<std::endl;
          exit(0);
       }
-      std::cout << std::endl << "----------------------> after new gdcmHeader"
+      std::cout << std::endl << "----------------------> after new gdcmFile"
                 << std::endl;
       e1->PrintEntry();
       std::cout <<std::endl <<"---------------------------------------" 
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
    std::string toto = argv[1]; 
    std::string mode = argv[2];
 
-   e1 = new gdcm::Header( toto.c_str() );
+   e1 = new gdcm::File( toto.c_str() );
    if (!e1->IsReadable())
    {
        std::cerr << "Sorry, not a Readable DICOM / ACR File"  <<std::endl;
@@ -118,7 +118,7 @@ int main(int argc, char *argv[])
    {
    case 'a' :
             // ecriture d'un fichier ACR 
-            // à partir d'un dcmHeader correct.
+            // à partir d'un dcmFile correct.
 
       zozo = toto + ".ACR";
       std::cout << "WriteACR" << std::endl;
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
    case 'd' :  // Not document in the 'usage', because the method is knowed to be bugged. 
 
            // ecriture d'un fichier DICOM Implicit VR 
-           // à partir d'un dcmHeader correct.
+           // à partir d'un dcmFile correct.
 
       zozo = toto + ".DCM";
       std::cout << "WriteDCM Implicit VR" << std::endl;
@@ -137,7 +137,7 @@ int main(int argc, char *argv[])
 
    case 'x' :
               // ecriture d'un fichier DICOM Explicit VR 
-              // à partir d'un dcmHeader correct.
+              // à partir d'un dcmFile correct.
 
       zozo = toto + ".XDCM";
       std::cout << "WriteDCM Explicit VR" << std::endl;
@@ -155,7 +155,7 @@ int main(int argc, char *argv[])
 
    case 'v' :
 
-     if ( f1->GetHeader()->GetBitsAllocated() == 8)
+     if ( f1->GetFile()->GetBitsAllocated() == 8)
      {
         std::cout << "videoinv for 8 bits" << std::endl;
         for (int i=0; i<dataSize; i++) 
index 12d111d066f2efd5d9f95fed5146fe4a9f1d6a0d..2e60574c6cec38ae54161575ad270b42be047f8a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:31:42 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/01/21 11:40:53 $
+  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 "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 int main(int argc, char* argv[])
@@ -24,14 +24,14 @@ int main(int argc, char* argv[])
   if (argc < 3) 
     {
     std::cerr << "Usage :" << std::endl << argv[0] << 
-      " InputHeader OutputDicom" << std::endl;
+      " InputFile OutputDicom" << std::endl;
     return 0;
     }
 
   std::string header = argv[1];
   const char *output = argv[2];
 
-  gdcm::Header       *f1 = new gdcm::Header( header );
+  gdcm::File       *f1 = new gdcm::File( header );
   gdcm::FileHelper   *f2 = new gdcm::FileHelper( f1 );
 
   // If the following call is important, then the API sucks. Why is it
index a4721fff2563c5e3cf5abca43a28292b5fa4da9e..98bd8dc35769e2eb58fc68ab244251960c6f33c0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Volume2Dicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/01/21 11:40:53 $
+  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
@@ -23,7 +23,7 @@
  * It's aim is to show people how to write their data volume into DICOM slices
  */
 
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmDocEntry.h"
 #include "gdcmBinEntry.h"
 #include "gdcmFileHelper.h"
@@ -99,7 +99,7 @@ int main( int argc, char * argv[] )
     ////////////////////////////////////////////////////////////
     // Create a new dicom header and fill in some info        //
     ////////////////////////////////////////////////////////////
-    gdcm::Header *h1 = new gdcm::Header();
+    gdcm::File *h1 = new gdcm::File();
 
     //h1->SetDateAndTime(filedate, filetime);
     //h1->SetModality("CT");
index 023b54dd638728a643a110a24fe67f149cb34793..7fcf5b337bf1e447d606d464d774559a24fed93e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Write.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:31:42 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/01/21 11:40:53 $
+  Version:   $Revision: 1.17 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 #include <iostream>
@@ -24,7 +24,7 @@ int main(int argc, char* argv[])
 {  
    std::string zozo;
 
-   gdcm::Header* e1;
+   gdcm::File* e1;
    gdcm::FileHelper  * f1;
 
    //gdcmDocument * d;  //not used
@@ -42,13 +42,13 @@ int main(int argc, char* argv[])
    }
 /*
    if (0) {  // Just to keep the code for further use
-      std::cout <<std::endl << "-------- Test gdcmHeader ------" <<std::endl;
-      e1 = new gdcmHeaderHelper(argv[1]);
-      if (!f1->GetHeader()->IsReadable()) {
+      std::cout <<std::endl << "-------- Test gdcmFile ------" <<std::endl;
+      e1 = new gdcmFileHelper(argv[1]);
+      if (!f1->GetFile()->IsReadable()) {
          std::cout << "Sorry, not a DICOM / ACR File"  <<std::endl;
          exit(0);
       }
-      std::cout << std::endl << "----------------------> after new gdcmHeader"
+      std::cout << std::endl << "----------------------> after new gdcmFile"
                 << std::endl;
       e1->PrintEntry();
       std::cout <<std::endl <<"---------------------------------------" 
@@ -62,7 +62,7 @@ int main(int argc, char* argv[])
      
    std::string toto = argv[1]; 
 
-   e1 = new gdcm::Header( toto.c_str() );
+   e1 = new gdcm::File( toto.c_str() );
    if (!e1->IsReadable()) {
        std::cerr << "Sorry, not a Readable DICOM / ACR File"  <<std::endl;
        return 0;
@@ -115,7 +115,7 @@ int main(int argc, char* argv[])
    {
    case 'a' :
             // ecriture d'un fichier ACR 
-            // à partir d'un dcmHeader correct.
+            // à partir d'un dcmFile correct.
 
       zozo = toto + ".ACR";
       std::cout << "WriteACR" << std::endl;
@@ -124,7 +124,7 @@ int main(int argc, char* argv[])
 
    case 'd' :
            // ecriture d'un fichier DICOM Implicit VR 
-           // à partir d'un dcmHeader correct.
+           // à partir d'un dcmFile correct.
 
       zozo = toto + ".DCM";
       std::cout << "WriteDCM Implicit VR" << std::endl;
@@ -133,7 +133,7 @@ int main(int argc, char* argv[])
 
    case 'x' :
               // ecriture d'un fichier DICOM Explicit VR 
-              // à partir d'un dcmHeader correct.
+              // à partir d'un dcmFile correct.
 
       zozo = toto + ".DCM";
       std::cout << "WriteDCM Implicit VR" << std::endl;
index 684d6213db70848c63c086223bb3a05b4e9fde54..1ca973429d1be157dfdb475524c4a099b8e82a70 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/01/21 11:40:53 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 // Writting of a DICOM file based on a correct dicom header
@@ -39,15 +39,15 @@ int main(int argc, char* argv[])
  
    // We assume that DICOM fields of second file actually exists :
  
-   std::string nbFrames = f2->GetHeader()->GetEntry(0x0028, 0x0008);
+   std::string nbFrames = f2->GetFile()->GetEntry(0x0028, 0x0008);
    if(nbFrames != "gdcm::Unfound") {
-       f1->GetHeader()->ReplaceOrCreate( nbFrames, 0x0028, 0x0008);
+       f1->GetFile()->ReplaceOrCreate( nbFrames, 0x0028, 0x0008);
    }
           
-   f1->GetHeader()->ReplaceOrCreate(
-     f2->GetHeader()->GetEntry(0x0028, 0x0010), 0x0028, 0x0010); // nbLig
-   f1->GetHeader()->ReplaceOrCreate( 
-     f2->GetHeader()->GetEntry(0x0028, 0x0011), 0x0028, 0x0011); // nbCol
+   f1->GetFile()->ReplaceOrCreate(
+     f2->GetFile()->GetEntry(0x0028, 0x0010), 0x0028, 0x0010); // nbLig
+   f1->GetFile()->ReplaceOrCreate( 
+     f2->GetFile()->GetEntry(0x0028, 0x0011), 0x0028, 0x0011); // nbCol
  
    // Some other tags should be updated:
  
@@ -63,10 +63,10 @@ int main(int argc, char* argv[])
    // TODO : Shouldn't we merge those two functions ?
    f1->SetImageData( imageData, dataSize);
  
-   f1->GetHeader()->Print();
+   f1->GetFile()->Print();
  
-   std::string s0  = f2->GetHeader()->GetEntry(0x7fe0, 0x0000);
-   std::string s10 = f2->GetHeader()->GetEntry(0x7fe0, 0x0010);
+   std::string s0  = f2->GetFile()->GetEntry(0x7fe0, 0x0000);
+   std::string s10 = f2->GetFile()->GetEntry(0x7fe0, 0x0010);
  
    std::cout << "lgr 7fe0, 0000 " << s0  << std::endl;
    std::cout << "lgr 7fe0, 0010 " << s10 << std::endl;
index 19f8a9c818560a8dda99c4febeeb8f3edc6d2891..97bfe6dc14c8a6ee3802ba56b8134ae28c190d41 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicomSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:58 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/01/21 11:40:53 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -22,7 +22,7 @@
  * The image content is a horizontal grayscale from 
  * 
  */
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 #include <iostream>
@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
 
 
 // Step 1 : Create the header of the image
-   gdcm::Header *header = new gdcm::Header();
+   gdcm::File *header = new gdcm::File();
    std::ostringstream str;
 
    // Set the image size
index 526edfbbdf02ef0836af34b87174a6a1621d2b31..b5a5a9415f5e0f8820d7af6018a34c11b536cac2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteRead.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:31:42 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/01/21 11:40:53 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 #include <iostream>
@@ -24,7 +24,7 @@ int main(int argc, char* argv[])
 {  
    std::string zozo;
 
-   gdcm::Header* e1, *e2;
+   gdcm::File* e1, *e2;
    gdcm::FileHelper  * f1, *f2;
 
    uint8_t* imageData, *imageData2;
@@ -42,7 +42,7 @@ int main(int argc, char* argv[])
 
    std::cout << argv[1] << std::endl;
 
-   e1 = new gdcm::Header( toto );
+   e1 = new gdcm::File( toto );
    if (!e1->IsReadable()) {
        std::cerr << "Sorry, " << toto <<"  not a Readable DICOM / ACR File"
                  <<std::endl;
@@ -61,7 +61,7 @@ int main(int argc, char* argv[])
 
 // --------------------- we read the written image
       
-   e2 = new gdcm::Header( zozo );
+   e2 = new gdcm::File( zozo );
    if (!e2->IsReadable()) {
        std::cerr << "Sorry, " << zozo << " not a Readable DICOM / ACR File"  
                  <<std::endl;
index 4d47772525ecf2230f661be9eac86a198369df7b..6a02d988000bdf26c36c98ff36461b3de07e1362 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllEntryVerify.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 23:18:30 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2005/01/21 11:40:53 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 
 #include <map>
 #include <list>
@@ -207,7 +207,7 @@ bool ReferenceFileParser::Check( MapFileValuesType::iterator &fileIt )
 {
    std::string fileName = DataPath + fileIt->first;
    std::cout << Indent << "FileName: " << fileName << std::endl;
-   gdcm::Header* tested = new gdcm::Header( fileName.c_str() );
+   gdcm::File* tested = new gdcm::File( fileName.c_str() );
    if( !tested->IsReadable() )
    {
      std::cerr << Indent << "Failed\n"
index aba924629643210b6c633898e0368204df8b3c90..24e59c982b5bfcdfd23f2650757099e20a12bfc4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllReadCompareDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:59 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2005/01/21 11:40:53 $
+  Version:   $Revision: 1.25 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 #include <iostream>
@@ -32,7 +32,7 @@ int InternalTest(std::string const & filename,
       ////// Step 1:
       std::cout << "      1...";
       gdcm::FileHelper* tested = new gdcm::FileHelper( filename );
-      if( !tested->GetHeader()->IsReadable() )
+      if( !tested->GetFile()->IsReadable() )
       {
         std::cout << " Failed" << std::endl
                    << "      Image not gdcm compatible:"
@@ -66,7 +66,7 @@ int InternalTest(std::string const & filename,
       std::cout << "3a...";
 
       gdcm::FileHelper* reference = new gdcm::FileHelper( referenceFileName );
-      if( !reference->GetHeader()->IsReadable() )
+      if( !reference->GetFile()->IsReadable() )
       {
          std::cout << " Failed" << std::endl
                    << "              reference image " 
@@ -77,7 +77,7 @@ int InternalTest(std::string const & filename,
          return 1;
       }
 
-      std::string PixelType = reference->GetHeader()->GetPixelType();
+      std::string PixelType = reference->GetFile()->GetPixelType();
 
       ////// Step 3b:
       std::cout << "3b...";
@@ -88,18 +88,18 @@ int InternalTest(std::string const & filename,
       uint8_t* referenceImageData = reference->GetImageData();
 
       // Test the image size
-      if (tested->GetHeader()->GetXSize() != reference->GetHeader()->GetXSize() ||
-          tested->GetHeader()->GetYSize() != reference->GetHeader()->GetYSize() ||
-          tested->GetHeader()->GetZSize() != reference->GetHeader()->GetZSize())
+      if (tested->GetFile()->GetXSize() != reference->GetFile()->GetXSize() ||
+          tested->GetFile()->GetYSize() != reference->GetFile()->GetYSize() ||
+          tested->GetFile()->GetZSize() != reference->GetFile()->GetZSize())
       {
          std::cout << "Failed" << std::endl
             << "        Size differs: "
-            << "X: " << tested->GetHeader()->GetXSize() << " # " 
-                     << reference->GetHeader()->GetXSize() << " | "
-            << "Y: " << tested->GetHeader()->GetYSize() << " # " 
-                     << reference->GetHeader()->GetYSize() << " | "
-            << "Z: " << tested->GetHeader()->GetZSize() << " # " 
-                     << reference->GetHeader()->GetZSize() << std::endl;
+            << "X: " << tested->GetFile()->GetXSize() << " # " 
+                     << reference->GetFile()->GetXSize() << " | "
+            << "Y: " << tested->GetFile()->GetYSize() << " # " 
+                     << reference->GetFile()->GetYSize() << " | "
+            << "Z: " << tested->GetFile()->GetZSize() << " # " 
+                     << reference->GetFile()->GetZSize() << std::endl;
          delete reference;
          delete tested;
          return 1;
@@ -170,7 +170,7 @@ int TestAllReadCompareDicom(int argc, char* argv[])
              << std::endl;
    std::cout << "   apply the following to each filename.xxx: "
              << std::endl;
-   std::cout << "   step 1: parse the image (as gdcmHeader) and call"
+   std::cout << "   step 1: parse the image (as gdcmFile) and call"
              << " IsReadable(). "
              << std::endl;
    std::cout << "   step 2: find in GDCM_DATA_ROOT/BaselineDicom/filename.dcm"
index ed7cdc6592b90df4bdaa85d8cdae8382c4f9d631..4f918c73443817df78a3bf81a337338a7a6bdc57 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestBug.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:58 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2005/01/21 11:40:54 $
+  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
 // We have to be carefull when the code both use cout + printf VC++ gets
 // confused, thus make sure we use only one kind of iostream
 
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 
 int TestBug(int argc, char* argv[])
 {  
-  gdcm::Header* e1;
+  gdcm::File* e1;
 
    if (argc > 1)
-      e1 = new gdcm::Header( argv[1] );
+      e1 = new gdcm::File( argv[1] );
    else {
       std::string filename = GDCM_DATA_ROOT;
       filename += "/test.acr";
-      e1 = new gdcm::Header( filename.c_str() );
+      e1 = new gdcm::File( filename.c_str() );
    }
    //e1->PrintPubDict();
    //e1->GetPubDict()->GetEntriesByKey();
index d012050af58816cf462a84ba60e9a39045a5cbe4..c64f88c8e2d8a3dadf39ae8ebef4f41611afe6d7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:59 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2005/01/21 11:40:54 $
+  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
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 #include "gdcmValEntry.h"
 #include "gdcmBinEntry.h"
@@ -71,8 +71,8 @@ int CopyDicom(std::string const & filename,
 
       //////////////// Step 1:
       std::cout << "      1...";
-      gdcm::Header *originalH = new gdcm::Header( filename );
-      gdcm::Header *copyH     = new gdcm::Header( );
+      gdcm::File *originalH = new gdcm::File( filename );
+      gdcm::File *copyH     = new gdcm::File( );
 
       //First of all copy the header field by field
   
@@ -143,7 +143,7 @@ int CopyDicom(std::string const & filename,
       copy = new gdcm::FileHelper( output );
 
       //Is the file written still gdcm parsable ?
-      if ( !copy->GetHeader()->IsReadable() )
+      if ( !copy->GetFile()->IsReadable() )
       { 
          std::cout << " Failed" << std::endl
                    << "        " << output << " not readable" << std::endl;
@@ -223,7 +223,7 @@ int TestCopyDicom(int argc, char* argv[])
              << std::endl;
    std::cout << "   apply the following to each filename.xxx: "
              << std::endl;
-   std::cout << "   step 1: parse the image (as gdcmHeader) and call"
+   std::cout << "   step 1: parse the image (as gdcmFile) and call"
              << " IsReadable(). After that, call GetImageData() and "
              << "GetImageDataSize() "
              << std::endl;
index 6616afa17340987ce594af802f771f2a3686c5f5..275c532776cb1f2b0ba862abede8ee210cde0c61 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyRescaleDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:59 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/01/21 11:40:54 $
+  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
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 #include "gdcmValEntry.h"
 #include "gdcmBinEntry.h"
@@ -43,14 +43,14 @@ int CopyRescaleDicom(std::string const & filename,
 
    //////////////// Step 1:
    std::cout << "      1...";
-   gdcm::Header *originalH = new gdcm::Header( filename );
-   gdcm::Header *copyH     = new gdcm::Header( );
+   gdcm::File *originalH = new gdcm::File( filename );
+   gdcm::File *copyH     = new gdcm::File( );
 
    //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 Header !)
+   // (the user does NOT have to know the way we implemented the File !)
    // Waiting for a 'clean' solution, I keep the method ...JPRx
 
 
@@ -147,7 +147,7 @@ int CopyRescaleDicom(std::string const & filename,
    copy = new gdcm::FileHelper( output );
 
    //Is the file written still gdcm parsable ?
-   if ( !copy->GetHeader()->IsReadable() )
+   if ( !copy->GetFile()->IsReadable() )
    { 
       std::cout << " Failed" << std::endl
                 << "        " << output << " not readable" << std::endl;
@@ -164,18 +164,18 @@ int CopyRescaleDicom(std::string const & filename,
    size_t    dataSizeWritten = copy->GetImageDataSize();
    uint8_t* imageDataWritten = copy->GetImageData();
 
-   if (originalH->GetXSize() != copy->GetHeader()->GetXSize() ||
-       originalH->GetYSize() != copy->GetHeader()->GetYSize() ||
-       originalH->GetZSize() != copy->GetHeader()->GetZSize())
+   if (originalH->GetXSize() != copy->GetFile()->GetXSize() ||
+       originalH->GetYSize() != copy->GetFile()->GetYSize() ||
+       originalH->GetZSize() != copy->GetFile()->GetZSize())
    {
       std::cout << "Failed" << std::endl
          << "        X Size differs: "
          << "X: " << originalH->GetXSize() << " # " 
-                  << copy->GetHeader()->GetXSize() << " | "
+                  << copy->GetFile()->GetXSize() << " | "
          << "Y: " << originalH->GetYSize() << " # " 
-                  << copy->GetHeader()->GetYSize() << " | "
+                  << copy->GetFile()->GetYSize() << " | "
          << "Z: " << originalH->GetZSize() << " # " 
-                  << copy->GetHeader()->GetZSize() << std::endl;
+                  << copy->GetFile()->GetZSize() << std::endl;
       delete original;
       delete copy;
       delete originalH;
@@ -251,7 +251,7 @@ int TestCopyRescaleDicom(int argc, char* argv[])
              << std::endl;
    std::cout << "   apply the following to each filename.xxx: "
              << std::endl;
-   std::cout << "   step 1: parse the image (as gdcmHeader) and call"
+   std::cout << "   step 1: parse the image (as gdcmFile) and call"
              << " IsReadable(). After that, call GetImageData() and "
              << "GetImageDataSize() "
              << std::endl;
index 83d7cf29f4b92cf24cad325e49c98d4533457db4..468b8721840febb9fa0087fc72fb81cc8d511422 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestReadWriteReadCompare.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:31:42 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2005/01/21 11:40:54 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -15,7 +15,7 @@
      PURPOSE.  See the above copyright notices for more information.
                                                                                 
 =========================================================================*/
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 //Generated file:
@@ -27,7 +27,7 @@ int CompareInternal(std::string const & filename, std::string const & output)
 
    //////////////// Step 1 (see above description):
 
-   gdcm::Header *header = new gdcm::Header( filename );
+   gdcm::File *header = new gdcm::File( filename );
    if( !header->IsReadable() )
    {
       std::cerr << "Test::TestReadWriteReadCompare: Image not gdcm compatible:"
@@ -71,7 +71,7 @@ int CompareInternal(std::string const & filename, std::string const & output)
    //////////////// Step 3:
 
    gdcm::FileHelper* reread = new gdcm::FileHelper( output );
-   if( !reread->GetHeader()->IsReadable() )
+   if( !reread->GetFile()->IsReadable() )
    {
      std::cerr << "Failed" << std::endl
                << "Test::TestReadWriteReadCompare: Could not reread image "
@@ -88,18 +88,18 @@ int CompareInternal(std::string const & filename, std::string const & output)
 
    //////////////// Step 4:
    // Test the image size
-   if (header->GetXSize() != reread->GetHeader()->GetXSize() ||
-       header->GetYSize() != reread->GetHeader()->GetYSize() ||
-       header->GetZSize() != reread->GetHeader()->GetZSize())
+   if (header->GetXSize() != reread->GetFile()->GetXSize() ||
+       header->GetYSize() != reread->GetFile()->GetYSize() ||
+       header->GetZSize() != reread->GetFile()->GetZSize())
    {
       std::cout << "Failed" << std::endl
          << "        X Size differs: "
          << "X: " << header->GetXSize() << " # " 
-                  << reread->GetHeader()->GetXSize() << " | "
+                  << reread->GetFile()->GetXSize() << " | "
          << "Y: " << header->GetYSize() << " # " 
-                  << reread->GetHeader()->GetYSize() << " | "
+                  << reread->GetFile()->GetYSize() << " | "
          << "Z: " << header->GetZSize() << " # " 
-                  << reread->GetHeader()->GetZSize() << std::endl;
+                  << reread->GetFile()->GetZSize() << std::endl;
       delete header;
       delete file;
       delete reread;
@@ -158,7 +158,7 @@ int TestReadWriteReadCompare(int argc, char* argv[])
       std::cout << "   For all images in gdcmData (and not blacklisted in "
                    "Test/CMakeLists.txt)" << std::endl;
       std::cout << "   apply the following multistep test: " << std::endl;
-      std::cout << "   step 1: parse the image (as gdcmHeader) and call"
+      std::cout << "   step 1: parse the image (as gdcmFile) and call"
                 << " IsReadable(). " << std::endl;
       std::cout << "   step 2: write the corresponding image in DICOM V3 "
                 << "with explicit" << std::endl
index 2280d76ca4e235077b7cf693b275a7af86bea64a..1399e339c3c95d5d42cd075a144b7d385cc6be72 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:59 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/01/21 11:40:54 $
+  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
@@ -22,7 +22,7 @@
  * The image content is a horizontal grayscale from 
  * 
  */
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 
 #include <iostream>
@@ -71,7 +71,7 @@ int WriteSimple(Image &img)
 
 // Step 1 : Create the header of the image
    std::cout << "        1...";
-   gdcm::Header *header = new gdcm::Header();
+   gdcm::File *header = new gdcm::File();
    std::ostringstream str;
 
    // Set the image size
@@ -200,7 +200,7 @@ int WriteSimple(Image &img)
 // Step 5 : Read the written image
    std::cout << "5...";
    gdcm::FileHelper* reread = new gdcm::FileHelper( fileName );
-   if( !reread->GetHeader()->IsReadable() )
+   if( !reread->GetFile()->IsReadable() )
    {
      std::cerr << "Failed" << std::endl
                << "Test::TestReadWriteReadCompare: Could not reread image "
@@ -217,18 +217,18 @@ int WriteSimple(Image &img)
    uint8_t* imageDataWritten = reread->GetImageData();
 
    // Test the image size
-   if (header->GetXSize() != reread->GetHeader()->GetXSize() ||
-       header->GetYSize() != reread->GetHeader()->GetYSize() ||
-       header->GetZSize() != reread->GetHeader()->GetZSize())
+   if (header->GetXSize() != reread->GetFile()->GetXSize() ||
+       header->GetYSize() != reread->GetFile()->GetYSize() ||
+       header->GetZSize() != reread->GetFile()->GetZSize())
    {
       std::cout << "Failed" << std::endl
          << "        X Size differs: "
          << "X: " << header->GetXSize() << " # " 
-                  << reread->GetHeader()->GetXSize() << " | "
+                  << reread->GetFile()->GetXSize() << " | "
          << "Y: " << header->GetYSize() << " # " 
-                  << reread->GetHeader()->GetYSize() << " | "
+                  << reread->GetFile()->GetYSize() << " | "
          << "Z: " << header->GetZSize() << " # " 
-                  << reread->GetHeader()->GetZSize() << std::endl;
+                  << reread->GetFile()->GetZSize() << std::endl;
       delete header;
       delete file;
       delete reread;
index d10c35bb9d53cd20cbccc161b728ac297e8144cc..06f3e53e3ac673e1762cada284737b5ece2881ce 100644 (file)
@@ -38,9 +38,9 @@ class gdcmTestCase(unittest.TestCase):
    def _BaseTest(self, FileSet):
       for entry in FileSet:
          fileName = os.path.join(GDCM_TEST_DATA_PATH, entry[0])
-         reader = gdcmHeader(fileName)
+         reader = gdcmFile(fileName)
          assert reader.IsReadable(),\
-                "File '%s' is not readable by gdcmHeader" % fileName
+                "File '%s' is not readable by gdcmFile" % fileName
 
          valDict = reader.GetEntry()
          for subEntry in entry[1]:
index e4b6e30a4342ccf150835fc2d80d49c89003306f..bf8086287519c1f38bc114a129ca0e098abc574b 100644 (file)
@@ -36,7 +36,7 @@ SET(libgdcm_la_SOURCES
    gdcmException.cxx
    gdcmFileHelper.cxx
    gdcmGlobal.cxx
-   gdcmHeader.cxx
+   gdcmFile.cxx
    gdcmJPEGFragment.cxx
    gdcmJPEGFragmentsInfo.cxx
    gdcmJpeg8.cxx
index 8408d4f8a275de16a1ffd10d6d316f4cd9b42f39..e572d605b42fd8c8b4706aa41857e2f5631e2ec5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcm.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/26 10:55:04 $
-  Version:   $Revision: 1.50 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  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
@@ -30,9 +30,9 @@
 #include "gdcmDictSet.h"
 
 #include "gdcmDocument.h"
-#include "gdcmHeader.h"
-#include "gdcmSerieHeader.h"
 #include "gdcmFile.h"
+#include "gdcmFileHelper.h"
+#include "gdcmSerieHeader.h"
 
 #include "gdcmUtil.h"
 
index 35198eb9f2127c197015bc3fd7b45128737a7e9c..9304052d264b78241cb6940be52c92bb934e4fce 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBase.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:40 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  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
@@ -44,11 +44,11 @@ public:
    /// \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
    void SetPrintLevel(int level) { PrintLevel = level; };
 
-   /// \brief Gets the print level for the Dicom Header Elements
+   /// \brief Gets the print level for the Dicom Entries
    int GetPrintLevel() { return PrintLevel; };
 
 protected:
-   /// \brief Amount of printed details for each Header Entry (Dicom Element):
+   /// \brief Amount of printed details for each Dicom Entries :
    /// 0 : stands for the least detail level.
    int PrintLevel;
 };
index e1f3c045d8671863b78d41ca13165feb4734b7ff..7ff241cb1c557fa5e24bc06cb9bb405a7c28242c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:41 $
-  Version:   $Revision: 1.31 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  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
@@ -27,7 +27,7 @@ namespace gdcm
 
 //-----------------------------------------------------------------------------
 /**
- * \brief   Any Dicom Document (File Header or DicomDir) contains 
+ * \brief   Any Dicom Document (File or DicomDir) contains 
  *           a set of DocEntry entries 
  *          (when successfuly parsed against a given Dicom dictionary)
  *          BinEntry is a specialisation of ValEntry (for non std::string
@@ -45,12 +45,12 @@ public:
    void Print( std::ostream &os = std::cout, std::string const & indent = "" );
    void WriteContent( std::ofstream *fp, FileType ft);
 
-   /// \brief Returns the area value of the current Dicom Header Entry
+   /// \brief Returns the area value of the current Dicom Entry
    ///  when it's not string-translatable (e.g : a LUT table)         
    uint8_t *GetBinArea()  { return BinArea; }
    void  SetBinArea( uint8_t *area, bool self = true );
 
-   /// Sets the value (string) of the current Dicom Document Entry
+   /// Sets the value (string) of the current Dicom Entry
    virtual void SetValue(std::string const &val) { SetValueOnly(val); };
 private:
    /// \brief unsecure memory area to hold 'non string' values 
index 95b2800473904fd4475a761adc1f98b6e140d38e..481ed229b2a7e0a38a6c9cd1075f8a6d2f6360e7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:16:41 $
-  Version:   $Revision: 1.111 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  Version:   $Revision: 1.112 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -27,7 +27,7 @@
 #include "gdcmUtil.h"
 #include "gdcmDebug.h"
 #include "gdcmGlobal.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmSeqEntry.h"
 #include "gdcmSQItem.h"
 #include "gdcmValEntry.h"
@@ -182,7 +182,7 @@ void DicomDir::Print(std::ostream &os, std::string const & )
 // Public
 /**
  * \brief  This predicate, based on hopefully reasonable heuristics,
- *         decides whether or not the current header was properly parsed
+ *         decides whether or not the current document was properly parsed
  *         and contains the mandatory information for being considered as
  *         a well formed and usable DicomDir.
  * @return true when Document is the one of a reasonable DicomDir,
@@ -412,7 +412,7 @@ void DicomDir::CreateDicomDirChainedList(std::string const & path)
    DirList dirList(path,1); // gets recursively the file list
    unsigned int count = 0;
    VectDocument list;
-   Header *header;
+   File *header;
 
    DirListType fileList = dirList.GetFilenames();
 
@@ -427,16 +427,16 @@ void DicomDir::CreateDicomDirChainedList(std::string const & path)
          break;
       }
 
-      header = new Header( it->c_str() );
+      header = new File( it->c_str() );
       if( !header )
       {
-         gdcmVerboseMacro( "Failure in new Header " << it->c_str() );
+         gdcmVerboseMacro( "Failure in new gdcm::File " << it->c_str() );
          continue;
       }
       
       if( header->IsReadable() )
       {
-         // Add the file header to the chained list:
+         // Add the file to the chained list:
          list.push_back(header);
          gdcmVerboseMacro( "Readable " << it->c_str() );
        }
@@ -450,7 +450,7 @@ void DicomDir::CreateDicomDirChainedList(std::string const & path)
    std::sort(list.begin(), list.end(), DicomDir::HeaderLessThan );
    
    std::string tmp = dirList.GetDirName();      
-   //for each Header of the chained list, add/update the Patient/Study/Serie/Image info
+   //for each File of the chained list, add/update the Patient/Study/Serie/Image info
    SetElements(tmp, list);
    CallEndMethod();
 
@@ -458,7 +458,7 @@ void DicomDir::CreateDicomDirChainedList(std::string const & path)
        itDoc!=list.end();
        ++itDoc)
    {
-      delete dynamic_cast<Header *>(*itDoc);
+      delete dynamic_cast<File *>(*itDoc);
    }
 }
 
index 5dd19d657bef8ae1e5d8f1c410c8afef3bb8ecf1..2a5ddc89617bd25a2dae2064a0f417463c8f3d20 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/19 15:58:00 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  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
@@ -27,7 +27,7 @@
 
 namespace gdcm 
 {
-class Header;
+class File;
 class ValEntry;
 class BinEntry;
 class SeqEntry;
@@ -43,16 +43,16 @@ public:
    DocEntry(DictEntry*);
    virtual ~DocEntry() {};
 
-   /// Returns the Dicom Group number of the current Dicom Header Entry
+   /// Returns the Dicom Group number of the current Dicom entry
    uint16_t      GetGroup()     { return DicomDict->GetGroup();  };
 
-   /// Returns the Dicom Element number of the current Dicom Header Entry
+   /// Returns the Dicom Element number of the current Dicom entry
    uint16_t      GetElement()   { return DicomDict->GetElement();};
 
-   /// Returns the 'key' of the current Dicom Header Entry
+   /// Returns the 'key' of the current Dicom entry
    void  SetKey( TagKey const &key ) { Key = key; }
 
-   /// Returns the 'key' of the current Dicom Header Entry
+   /// Returns the 'key' of the current Dicom entry
    std::string const &GetKey() const { return Key; }
 
    /// \brief Returns the 'Name' '(e.g. "Patient's Name") found in the Dicom
@@ -60,68 +60,68 @@ public:
    std::string const &GetName() const { return DicomDict->GetName(); };
 
    /// \brief Returns the 'Value Representation' (e.g. "PN" : Person Name,
-   /// "SL" : Signed Long), found in the Dicom Header or in the Dicom
-   /// Dictionnary, of the current Dicom Header Entry
+   /// "SL" : Signed Long), found in the Dicom header or in the Dicom
+   /// Dictionnary, of the current Dicom entry
    std::string const &GetVR() const { return DicomDict->GetVR(); };
 
    /// \brief Returns the 'Value Multiplicity' (e.g. "1", "1-n", "6"),
-   /// found in the Dicom Header or in the Dicom Dictionnary
-   /// of the current Dicom Header Entry
+   /// found in the Dicom entry or in the Dicom Dictionnary
+   /// of the current Dicom entry
    std::string const &GetVM() const { return DicomDict->GetVM(); };
 
-   /// Sets the 'Value Multiplicity' of the current Dicom Header Entry
+   /// Sets the 'Value Multiplicity' of the current Dicom entry
    void SetVM( TagName const &v) { DicomDict->SetVM(v); }; 
 
    /// \brief Returns offset (since the beginning of the file, including
-   /// the File Preamble, if any) of the value of the current Dicom HeaderEntry
-   /// \warning offset of the *value*, not of the Dicom Header Entry
+   /// the File Preamble, if any) of the value of the current Dicom entry
+   /// \warning offset of the *value*, not of the Dicom entry
    size_t GetOffset() { return Offset; };
 
 
    /// \brief Sets only 'Read Length' (*not* 'Usable Length') of the current
-   /// Dicom Header Entry
+   /// Dicom entry
    void SetReadLength(uint32_t l) { ReadLength = l; };
 
-   /// \brief Returns the 'read length' of the current Dicom Header Entry
-   /// \warning this value is the one stored in the Dicom Header but not
+   /// \brief Returns the 'read length' of the current Dicom entry
+   /// \warning this value is the one stored in the Dicom header but not
    ///          mandatoryly the one thats's used (in case on SQ, or delimiters,
    ///          the usable length is set to zero)
    uint32_t GetReadLength() { return ReadLength; };
 
    /// \brief Sets both 'Read Length' and 'Usable Length' of the current
-   /// Dicom Header Entry
+   /// Dicom entry
    void SetLength(uint32_t l) { Length = l; };
       
-   /// \brief Returns the actual value length of the current Dicom Header Entry
-   /// \warning this value is not *always* the one stored in the Dicom Header
+   /// \brief Returns the actual value length of the current Dicom entry
+   /// \warning this value is not *always* the one stored in the Dicom header
    ///          in case of well knowned bugs
    uint32_t GetLength() { return Length; };
     
 
    // The following 3 members, for internal use only ! 
    
-   /// \brief   Sets the offset of the Dicom Element
+   /// \brief   Sets the offset of the Dicom entry
    /// \warning use with caution !
    /// @param   of offset to be set
    void SetOffset(size_t of) { Offset = of; };
 
-   /// Sets to TRUE the ImplicitVr flag of the current Dicom Element
+   /// Sets to TRUE the ImplicitVr flag of the current Dicom entry
    void SetImplicitVR() { ImplicitVR = true; };
  
-   /// \brief Tells us if the current Dicom Element was checked as ImplicitVr
-   /// @return true if the current Dicom Element was checked as ImplicitVr
+   /// \brief Tells us if the current Dicom entry was checked as ImplicitVr
+   /// @return true if the current Dicom entry was checked as ImplicitVr
    bool IsImplicitVR() { return ImplicitVR; };
 
-   /// \brief Tells us if the VR of the current Dicom Element is Unknown
+   /// \brief Tells us if the VR of the current Dicom entry is Unknown
    /// @return true if the VR is unknown
    bool IsVRUnknown() { return DicomDict->IsVRUnknown(); };
 
-   /// \brief Tells us if the VM of the current Dicom Element is Unknown
+   /// \brief Tells us if the VM of the current Dicom entry is Unknown
    /// @return true if the VM is unknown
    bool IsVMUnknown() { return DicomDict->IsVMUnknown(); };
 
-   /// \brief  Gets the DicEntry of the current Dicom Element
-   /// @return The DicEntry of the current Dicom Element
+   /// \brief  Gets the DicEntry of the current Dicom entry
+   /// @return The DicEntry of the current Dicom entry
    DictEntry * GetDictEntry() { return DicomDict; }; 
    
    virtual void WriteContent(std::ofstream *fp, FileType filetype);
@@ -136,8 +136,8 @@ public:
    virtual void Print (std::ostream &os = std::cout, std::string const & indent = ""); 
 
 protected:
-   /// \brief   Sets the DicEntry of the current Dicom Element
-   /// \remarks Used only by the Header !!! (possible because of a friend 
+   /// \brief   Sets the DicEntry of the current Dicom entry
+   /// \remarks Used only by the gdcm::File !!! (possible because of a friend 
    ///          link between them)
    /// @param   newEntry pointer to the DictEntry
    void SetDictEntry(DictEntry *newEntry) { DicomDict = newEntry; };
@@ -146,11 +146,11 @@ protected:
    /// \brief pointer to the underlying Dicom dictionary element
    DictEntry *DicomDict;
    
-   /// \brief Correspond to the real length of the datas
+   /// \brief Correspond to the real length of the data
    /// This length might always be even
    uint32_t Length; 
   
-   /// \brief Length to read in the file to obtain datas.
+   /// \brief Length to read in the file to obtain data
    uint32_t ReadLength;
 
    /// \brief Even when reading explicit vr files, some elements happen to
@@ -167,8 +167,8 @@ protected:
 
 private:
    // FIXME: In fact we should be more specific and use :
-   // friend DocEntry * Header::ReadNextElement(void);
-   friend class Header;    
+   // friend DocEntry *File::ReadNextElement(void);
+   friend class File;    
 };
 } // end namespace gdcm
 //-----------------------------------------------------------------------------
index 60e0f2d90b7e3c8edeec0cffd20db7ab8035963b..6d74f9155cec0625ac0ad526b7f58447c107001d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntryArchive.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 11:13:21 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  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
@@ -28,7 +28,7 @@ namespace gdcm
 /**
  * \brief Constructor
  */
-DocEntryArchive::DocEntryArchive(Header *header):
+DocEntryArchive::DocEntryArchive(File *header):
    HeaderHT(header->TagHT)
 {
 }
index bc67747688c1a090952ca3a0eb9e69901f31fdac..1c6b4c58d1ecb17f8aae5ee903d2e8301f904318 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntryArchive.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 11:39:49 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,7 +19,7 @@
 #ifndef GDCMDOCENTRYARCHIVE_H
 #define GDCMDOCENTRYARCHIVE_H
 
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 
 namespace gdcm 
 {
@@ -27,17 +27,17 @@ namespace gdcm
 //-----------------------------------------------------------------------------
 /**
  * \brief Container 
- * It's goal is to change the Header correctly. At this time, the change is 
+ * It's goal is to change the File header correctly. At this time, the change is 
  * only made for the first level of the Document. In the future, it might 
  * consider Dicom Sequences (SeqEntry, within any SQItem).
  * The change is made by replacing a DocEntry by an other that is created
- * outside the class. The old value is kept. When we restore the Header
+ * outside the class. The old value is kept. When we restore the File
  * status, the added DocEntry is deleted and replaced by the old value.
  */
 class GDCM_EXPORT DocEntryArchive 
 {
 public:
-   DocEntryArchive(Header *header);
+   DocEntryArchive(File *f);
    ~DocEntryArchive();
 
    void Print(std::ostream &os = std::cout);
@@ -49,7 +49,7 @@ public:
    void ClearArchive(void);
 
 private:
-   TagDocEntryHT &HeaderHT;
+   TagDocEntryHT &HeaderHT;  // we keep the name HeaderHT
    TagDocEntryHT Archive;
 };
 } // end namespace gdcm
index a1c445f729b2b9181e24eeffe3747cd556b13b2e..6ebc79c9fb5041e30ebca1054c4655f49b5cfd73 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:17:00 $
-  Version:   $Revision: 1.95 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  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
@@ -38,12 +38,12 @@ class JPEGFragmentsInfo;
 
 //-----------------------------------------------------------------------------
 /**
- * \brief Derived by both Header and DicomDir
+ * \brief Derived by both gdcm::File and gdcm::DicomDir
  */
 class GDCM_EXPORT Document : public ElementSet
 {
 public:
-// Informations contained in the parser
+// Informations contained in the gdcm::Document
    virtual bool IsReadable();
    FileType GetFileType();
 
@@ -130,8 +130,8 @@ public:
 protected:
 // Methods
    // Constructor and destructor are protected to forbid end user 
-   // to instanciate from this class Document (only Header and
-   // DicomDir are meaningfull).
+   // to instanciate from this class Document (only gdcm::File and
+   // gdcm::DicomDir are meaningfull).
    Document();
    Document( std::string const &filename );
    virtual ~Document();
@@ -161,13 +161,13 @@ protected:
    /// the well known 'Bad Big Endian' and 'Bad Little Endian' codes
    int SwapCode;
 
-   ///\brief whether we already parsed group 0002
+   ///\brief whether we already parsed group 0002 (Meta Elements)
    bool Group0002Parsed;
 
    ///\brief whether file has a DCM Preamble
    bool HasDCMPreamble;
 
-   /// File Pointer, opened during Header parsing.
+   /// File Pointer, opened during Document parsing.
    std::ifstream *Fp;
 
    /// ACR, ACR_LIBIDO, ExplicitVR, ImplicitVR, Unknown
index cec029642f569a7e365e50325ed3e5d49c4782d1..43f6b89be5063d15293831715ba23f98d0256b1e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:22:52 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -23,7 +23,7 @@
 #include "gdcmDebug.h"
 #include "gdcmUtil.h"
 #include "gdcmBinEntry.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmPixelReadConvert.h"
 #include "gdcmPixelWriteConvert.h"
 #include "gdcmDocEntryArchive.h"
@@ -38,11 +38,10 @@ typedef std::pair<TagDocEntryHT::iterator,TagDocEntryHT::iterator> IterHT;
 // Constructor / Destructor
 /**
  * \brief Constructor dedicated to deal with the *pixels* area of a ACR/DICOMV3
- *        file (Header only deals with the ... header)
+ *        file (gdcm::File only deals with the ... header)
  *        Opens (in read only and when possible) an existing file and checks
  *        for DICOM compliance. Returns NULL on failure.
  *        It will be up to the user to load the pixels into memory
- *        (see GetImageData, GetImageDataRaw)
  * \note  the in-memory representation of all available tags found in
  *        the DICOM header is post-poned to first header information access.
  *        This avoid a double parsing of public part of the header when
@@ -51,18 +50,17 @@ typedef std::pair<TagDocEntryHT::iterator,TagDocEntryHT::iterator> IterHT;
  */
 FileHelper::FileHelper( )
 {
-   HeaderInternal = new Header( );
+   FileInternal = new File( );
    SelfHeader = true;
-   Initialise();
+   Initialize();
 }
 
 /**
  * \brief Constructor dedicated to deal with the *pixels* area of a ACR/DICOMV3
- *        file (Header only deals with the ... header)
+ *        file (File only deals with the ... header)
  *        Opens (in read only and when possible) an existing file and checks
  *        for DICOM compliance. Returns NULL on failure.
  *        It will be up to the user to load the pixels into memory
- *        (see GetImageData, GetImageDataRaw)
  * \note  the in-memory representation of all available tags found in
  *        the DICOM header is post-poned to first header information access.
  *        This avoid a double parsing of public part of the header when
@@ -70,20 +68,19 @@ FileHelper::FileHelper( )
  *        seen as a side effect).   
  * @param header already built Header
  */
-FileHelper::FileHelper(Header *header)
+FileHelper::FileHelper(File *header)
 {
-   HeaderInternal = header;
+   FileInternal = header;
    SelfHeader = false;
-   Initialise();
+   Initialize();
 }
 
 /**
  * \brief Constructor dedicated to deal with the *pixels* area of a ACR/DICOMV3
- *        file (Header only deals with the ... header)
+ *        file (gdcm::File only deals with the ... header)
  *        Opens (in read only and when possible) an existing file and checks
  *        for DICOM compliance. Returns NULL on failure.
  *        It will be up to the user to load the pixels into memory
- *        (see GetImageData, GetImageDataRaw)
  * \note  the in-memory representation of all available tags found in
  *        the DICOM header is post-poned to first header information access.
  *        This avoid a double parsing of public part of the header when
@@ -93,9 +90,9 @@ FileHelper::FileHelper(Header *header)
  */
 FileHelper::FileHelper(std::string const & filename )
 {
-   HeaderInternal = new Header( filename );
+   FileInternal = new File( filename );
    SelfHeader = true;
-   Initialise();
+   Initialize();
 }
 
 /**
@@ -120,17 +117,17 @@ FileHelper::~FileHelper()
 
    if( SelfHeader )
    {
-      delete HeaderInternal;
+      delete FileInternal;
    }
-   HeaderInternal = 0;
+   FileInternal = 0;
 }
 
 //-----------------------------------------------------------------------------
 // Print
 void FileHelper::Print(std::ostream &os, std::string const &)
 {
-   HeaderInternal->SetPrintLevel(PrintLevel);
-   HeaderInternal->Print(os);
+   FileInternal->SetPrintLevel(PrintLevel);
+   FileInternal->Print(os);
 
    PixelReadConverter->SetPrintLevel(PrintLevel);
    PixelReadConverter->Print(os);
@@ -196,7 +193,7 @@ uint8_t *FileHelper::GetImageData()
       return 0;
    }
 
-   if ( HeaderInternal->HasLUT() && PixelReadConverter->BuildRGBImage() )
+   if ( FileInternal->HasLUT() && PixelReadConverter->BuildRGBImage() )
    {
       return PixelReadConverter->GetRGB();
    }
@@ -254,7 +251,7 @@ size_t FileHelper::GetImageDataIntoVector (void *destination, size_t maxSize)
       return 0;
    }
 
-   if ( HeaderInternal->HasLUT() && PixelReadConverter->BuildRGBImage() )
+   if ( FileInternal->HasLUT() && PixelReadConverter->BuildRGBImage() )
    {
       if ( PixelReadConverter->GetRGBSize() > maxSize )
       {
@@ -508,7 +505,7 @@ bool FileHelper::Write(std::string const &fileName)
    bool check = CheckWriteIntegrity();
    if(check)
    {
-      check = HeaderInternal->Write(fileName,WriteType);
+      check = FileInternal->Write(fileName,WriteType);
    }
 
    RestoreWrite();
@@ -517,7 +514,7 @@ bool FileHelper::Write(std::string const &fileName)
    // --------------------------------------------------------------
    // Special Patch to allow gdcm to re-write ACR-LibIDO formated images
    // 
-   // ...and we restore the Header to be Dicom Compliant again 
+   // ...and we restore the header to be Dicom Compliant again 
    // just after writting
    RestoreWriteOfLibido();
    // ----------------- End of Special Patch ----------------
@@ -536,7 +533,7 @@ bool FileHelper::Write(std::string const &fileName)
 bool FileHelper::SetEntry(std::string const &content,
                     uint16_t group, uint16_t elem)
 { 
-   return HeaderInternal->SetEntry(content,group,elem);
+   return FileInternal->SetEntry(content,group,elem);
 }
 
 
@@ -552,38 +549,38 @@ bool FileHelper::SetEntry(std::string const &content,
 bool FileHelper::SetEntry(uint8_t *content, int lgth,
                     uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->SetEntry(content,lgth,group,elem);
+   return FileInternal->SetEntry(content,lgth,group,elem);
 }
 
 /**
- * \brief   Modifies the value of a given Doc Entry (Dicom Element)
+ * \brief   Modifies the value of a given DocEntry (Dicom entry)
  *          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 Header Entry (NULL when creation
+ * \return  pointer to the modified/created Dicom entry (NULL when creation
  *          failed).
  */ 
 bool FileHelper::ReplaceOrCreate(std::string const &content,
                            uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->ReplaceOrCreate(content,group,elem) != NULL;
+   return FileInternal->ReplaceOrCreate(content,group,elem) != NULL;
 }
 
 /*
- * \brief   Modifies the value of a given Header Entry (Dicom Element)
+ * \brief   Modifies the value of a given DocEntry (Dicom entry)
  *          when it exists. Create it with the given value when unexistant.
  *          A copy of the binArea is made to be kept in the Document.
  * @param   binArea (binary) value to be set
  * @param   group   Group number of the Entry 
  * @param   elem  Element number of the Entry
- * \return  pointer to the modified/created Header Entry (NULL when creation
+ * \return  pointer to the modified/created Dicom entry (NULL when creation
  *          failed).
  */
 bool FileHelper::ReplaceOrCreate(uint8_t *binArea, int lgth,
                            uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->ReplaceOrCreate(binArea,lgth,group,elem) != NULL;
+   return FileInternal->ReplaceOrCreate(binArea,lgth,group,elem) != NULL;
 }
 
 /**
@@ -609,19 +606,19 @@ bool FileHelper::CheckWriteIntegrity()
 {
    if(PixelWriteConverter->GetUserData())
    {
-      int numberBitsAllocated = HeaderInternal->GetBitsAllocated();
+      int numberBitsAllocated = FileInternal->GetBitsAllocated();
       if ( numberBitsAllocated == 0 || numberBitsAllocated == 12 )
       {
          numberBitsAllocated = 16;
       }
 
-      size_t decSize = HeaderInternal->GetXSize()
-                    * HeaderInternal->GetYSize() 
-                    * HeaderInternal->GetZSize()
+      size_t decSize = FileInternal->GetXSize()
+                    * FileInternal->GetYSize() 
+                    * FileInternal->GetZSize()
                     * ( numberBitsAllocated / 8 )
-                    * HeaderInternal->GetSamplesPerPixel();
+                    * FileInternal->GetSamplesPerPixel();
       size_t rgbSize = decSize;
-      if( HeaderInternal->HasLUT() )
+      if( FileInternal->HasLUT() )
          rgbSize = decSize * 3;
 
       switch(WriteMode)
@@ -653,15 +650,15 @@ bool FileHelper::CheckWriteIntegrity()
  */ 
 void FileHelper::SetWriteToRaw()
 {
-   if( HeaderInternal->GetNumberOfScalarComponents() == 3 
-    && !HeaderInternal->HasLUT())
+   if( FileInternal->GetNumberOfScalarComponents() == 3 
+    && !FileInternal->HasLUT())
    {
       SetWriteToRGB();
    } 
    else
    {
       ValEntry *photInt = CopyValEntry(0x0028,0x0004);
-      if(HeaderInternal->HasLUT())
+      if(FileInternal->HasLUT())
       {
          photInt->SetValue("PALETTE COLOR ");
       }
@@ -674,7 +671,7 @@ void FileHelper::SetWriteToRaw()
                                        PixelReadConverter->GetRawSize());
 
       BinEntry *pixel = 
-         CopyBinEntry(GetHeader()->GetGrPixel(),GetHeader()->GetNumPixel());
+         CopyBinEntry(GetFile()->GetGrPixel(),GetFile()->GetNumPixel());
       pixel->SetValue(GDCM_BINLOADED);
       pixel->SetBinArea(PixelWriteConverter->GetData(),false);
       pixel->SetLength(PixelWriteConverter->GetDataSize());
@@ -684,13 +681,12 @@ void FileHelper::SetWriteToRaw()
    }
 }
 
-
 /**
  * \brief   
  */ 
 void FileHelper::SetWriteToRGB()
 {
-   if(HeaderInternal->GetNumberOfScalarComponents()==3)
+   if(FileInternal->GetNumberOfScalarComponents()==3)
    {
       PixelReadConverter->BuildRGBImage();
       
@@ -715,7 +711,7 @@ void FileHelper::SetWriteToRGB()
       }
 
       BinEntry *pixel = 
-         CopyBinEntry(GetHeader()->GetGrPixel(),GetHeader()->GetNumPixel());
+         CopyBinEntry(GetFile()->GetGrPixel(),GetFile()->GetNumPixel());
       pixel->SetValue(GDCM_BINLOADED);
       pixel->SetBinArea(PixelWriteConverter->GetData(),false);
       pixel->SetLength(PixelWriteConverter->GetDataSize());
@@ -736,7 +732,7 @@ void FileHelper::SetWriteToRGB()
       // For old ACR-NEMA
       // Thus, we have a RGB image and the bits allocated = 24 and 
       // samples per pixels = 1 (in the read file)
-      if(HeaderInternal->GetBitsAllocated()==24) 
+      if(FileInternal->GetBitsAllocated()==24) 
       {
          ValEntry *bitsAlloc = CopyValEntry(0x0028,0x0100);
          bitsAlloc->SetValue("8 ");
@@ -766,7 +762,7 @@ void FileHelper::RestoreWrite()
    Archive->Restore(0x0028,0x0002);
    Archive->Restore(0x0028,0x0004);
    Archive->Restore(0x0028,0x0006);
-   Archive->Restore(GetHeader()->GetGrPixel(),GetHeader()->GetNumPixel());
+   Archive->Restore(GetFile()->GetGrPixel(),GetFile()->GetNumPixel());
 
    // For old ACR-NEMA (24 bits problem)
    Archive->Restore(0x0028,0x0100);
@@ -830,9 +826,9 @@ void FileHelper::RestoreWriteFileType()
 void FileHelper::SetWriteToLibido()
 {
    ValEntry *oldRow = dynamic_cast<ValEntry *>
-                (HeaderInternal->GetDocEntry(0x0028, 0x0010));
+                (FileInternal->GetDocEntry(0x0028, 0x0010));
    ValEntry *oldCol = dynamic_cast<ValEntry *>
-                (HeaderInternal->GetDocEntry(0x0028, 0x0011));
+                (FileInternal->GetDocEntry(0x0028, 0x0011));
    
    if( oldRow && oldCol )
    {
@@ -862,7 +858,7 @@ void FileHelper::SetWriteToLibido()
 void FileHelper::SetWriteToNoLibido()
 {
    ValEntry *recCode = dynamic_cast<ValEntry *>
-                (HeaderInternal->GetDocEntry(0x0008,0x0010));
+                (FileInternal->GetDocEntry(0x0008,0x0010));
    if( recCode )
    {
       if( recCode->GetValue() == "ACRNEMA_LIBIDO_1.1" )
@@ -886,7 +882,7 @@ void FileHelper::RestoreWriteOfLibido()
 
 ValEntry *FileHelper::CopyValEntry(uint16_t group,uint16_t elem)
 {
-   DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
+   DocEntry *oldE = FileInternal->GetDocEntry(group, elem);
    ValEntry *newE;
 
    if(oldE)
@@ -896,7 +892,7 @@ ValEntry *FileHelper::CopyValEntry(uint16_t group,uint16_t elem)
    }
    else
    {
-      newE = GetHeader()->NewValEntry(group,elem);
+      newE = GetFile()->NewValEntry(group,elem);
    }
 
    return newE;
@@ -913,7 +909,7 @@ ValEntry *FileHelper::CopyValEntry(uint16_t group,uint16_t elem)
  */ 
 BinEntry *FileHelper::CopyBinEntry(uint16_t group,uint16_t elem)
 {
-   DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
+   DocEntry *oldE = FileInternal->GetDocEntry(group, elem);
    BinEntry *newE;
 
    if(oldE)
@@ -923,7 +919,7 @@ BinEntry *FileHelper::CopyBinEntry(uint16_t group,uint16_t elem)
    }
    else
    {
-      newE = GetHeader()->NewBinEntry(group,elem);
+      newE = GetFile()->NewBinEntry(group,elem);
    }
 
    return newE;
@@ -934,18 +930,18 @@ BinEntry *FileHelper::CopyBinEntry(uint16_t group,uint16_t elem)
 /**
  * \brief Factorization for various forms of constructors.
  */
-void FileHelper::Initialise()
+void FileHelper::Initialize()
 {
    WriteMode = WMODE_RAW;
    WriteType = ExplicitVR;
 
    PixelReadConverter = new PixelReadConvert;
    PixelWriteConverter = new PixelWriteConvert;
-   Archive = new DocEntryArchive( HeaderInternal );
+   Archive = new DocEntryArchive( FileInternal );
 
-   if ( HeaderInternal->IsReadable() )
+   if ( FileInternal->IsReadable() )
    {
-      PixelReadConverter->GrabInformationsFromHeader( HeaderInternal );
+      PixelReadConverter->GrabInformationsFromHeader( FileInternal );
    }
 }
 
@@ -958,10 +954,10 @@ uint8_t *FileHelper::GetRaw()
    if ( ! raw )
    {
       // The Raw image migth not be loaded yet:
-      std::ifstream *fp = HeaderInternal->OpenFile();
+      std::ifstream *fp = FileInternal->OpenFile();
       PixelReadConverter->ReadAndDecompressPixelData( fp );
       if(fp) 
-         HeaderInternal->CloseFile();
+         FileInternal->CloseFile();
 
       raw = PixelReadConverter->GetRaw();
       if ( ! raw )
index efbc1375e158017760a7971983b9c83959c2dc94..13134d77e95819fd47f36a419811dad8f8f1f5b6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:35:10 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  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
@@ -24,7 +24,7 @@
 
 namespace gdcm 
 {
-class Header;
+class File;
 class ValEntry;
 class BinEntry;
 class PixelReadConvert;
@@ -32,7 +32,7 @@ class PixelWriteConvert;
 class DocEntryArchive;
 //-----------------------------------------------------------------------------
 /**
- * \brief In addition to Dicom Header exploration, this class is designed
+ * \brief In addition to Dicom header exploration, this class is designed
  * for accessing the image/volume content. One can also use it to
  * write Dicom/ACR-NEMA/RAW files.
  */
@@ -47,15 +47,15 @@ public:
      
 public:
    FileHelper( );
-   FileHelper( Header *header );
+   FileHelper( File *header );
    FileHelper( std::string const &filename );
  
    virtual ~FileHelper();
 
    void Print(std::ostream &os = std::cout, std::string const & indent = ""); 
 
-   /// Accessor to \ref Header
-   Header *GetHeader() { return HeaderInternal; }
+   /// Accessor to \ref File
+   File *GetFile() { return FileInternal; }
 
    size_t GetImageDataSize();
    size_t GetImageDataRawSize();
@@ -131,13 +131,13 @@ protected:
    BinEntry *CopyBinEntry(uint16_t group,uint16_t elem);
 
 private:
-   void Initialise();
+   void Initialize();
 
    uint8_t *GetRaw();
 
 // members variables:
-   /// Header to use to load the file
-   Header *HeaderInternal;
+   /// gdcm::File to use to load the file
+   File *FileInternal;
 
    /// \brief Whether the underlying \ref Header was loaded by
    ///  the constructor or passed to the constructor. When false
index 8048fbab973366e52aa6191c59c46c40dc4c158d..281eb6967d3886712cbce3cdca6d7ff6e05fabfd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/17 03:05:55 $
-  Version:   $Revision: 1.30 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  Version:   $Revision: 1.31 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
                                                                                 
 =========================================================================*/
 
-//////////////////   TEMPORARY NOTE
-// look for "fixMem" and convert that to a member of this class
-// Removing the prefix fixMem and dealing with allocations should do the trick
-//
-// grep PixelReadConvert everywhere and clean up !
-
 #include "gdcmDebug.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmGlobal.h"
 #include "gdcmTS.h"
 #include "gdcmPixelReadConvert.h"
@@ -837,7 +831,7 @@ void PixelReadConvert::ComputeRawAndRGBSizes()
    }
 }
 
-void PixelReadConvert::GrabInformationsFromHeader( Header *header )
+void PixelReadConvert::GrabInformationsFromHeader( File *header )
 {
    // Number of Bits Allocated for storing a Pixel is defaulted to 16
    // when absent from the header.
@@ -895,7 +889,7 @@ void PixelReadConvert::GrabInformationsFromHeader( Header *header )
    HasLUT = header->HasLUT();
    if ( HasLUT )
    {
-      // Just in case some access to a Header element requires disk access.
+      // Just in case some access to a File element requires disk access.
       LutRedDescriptor   = header->GetEntry( 0x0028, 0x1101 );
       LutGreenDescriptor = header->GetEntry( 0x0028, 0x1102 );
       LutBlueDescriptor  = header->GetEntry( 0x0028, 0x1103 );
@@ -904,8 +898,8 @@ void PixelReadConvert::GrabInformationsFromHeader( Header *header )
       // [ refer to invocation of Document::SetMaxSizeLoadEntry() in
       // Document::Document() ], the loading of the value (content) of a
       // [Bin|Val]Entry occurence migth have been hindered (read simply NOT
-      // loaded). Hence, we first try to obtain the LUTs data from the header
-      // and when this fails we read the LUTs data directely from disk.
+      // loaded). Hence, we first try to obtain the LUTs data from the file
+      // and when this fails we read the LUTs data directly from disk.
       /// \TODO Reading a [Bin|Val]Entry directly from disk is a kludge.
       ///       We should NOT bypass the [Bin|Val]Entry class. Instead
       ///       an access to an UNLOADED content of a [Bin|Val]Entry occurence
@@ -943,7 +937,7 @@ void PixelReadConvert::GrabInformationsFromHeader( Header *header )
 }
 
 /**
- * \brief Build Red/Green/Blue/Alpha LUT from Header
+ * \brief Build Red/Green/Blue/Alpha LUT from File
  *         when (0028,0004),Photometric Interpretation = [PALETTE COLOR ]
  *          and (0028,1101),(0028,1102),(0028,1102)
  *            - xxx Palette Color Lookup Table Descriptor - are found
index 1372220154dbff8bb686a8cc16c668a835eb1d68..8aceec490fed5604079a64c77ba498bd44d90349 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:42 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -26,7 +26,7 @@
 
 namespace gdcm
 {
-class Header;
+class File;
 class RLEFramesInfo;
 class JPEGFragmentsInfo;
 
@@ -53,7 +53,7 @@ public:
    void Print( std::ostream &os = std::cout, std::string const & indent = "" );
 
 // In progress
-   void GrabInformationsFromHeader( Header *header );
+   void GrabInformationsFromHeader( File *f );
    bool ReadAndDecompressPixelData( std::ifstream *fp );
    void Squeeze();
    bool BuildRGBImage();
index 3349af5882b6840d76ee2e4bdea726267a56dfda..2bee2ffae739369ed6c40e325887fe01fd377410 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 11:56:52 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/01/21 11:40:55 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -18,7 +18,7 @@
 
 #include "gdcmSerieHeader.h"
 #include "gdcmDirList.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmDebug.h"
 
 #include <math.h>
@@ -28,7 +28,7 @@
 namespace gdcm 
 {
 
-typedef std::vector<Header* > GdcmHeaderVector;
+typedef std::vector<File* > GdcmFileVector;
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
 SerieHeader::SerieHeader()
@@ -41,7 +41,7 @@ SerieHeader::SerieHeader()
 SerieHeader::~SerieHeader()
 {
    /// \todo
-   for ( GdcmHeaderList::const_iterator it = CoherentGdcmFileList.begin();
+   for ( GdcmFileList::const_iterator it = CoherentGdcmFileList.begin();
          it != CoherentGdcmFileList.end(); ++it)
    {
       delete *it;
@@ -61,7 +61,7 @@ SerieHeader::~SerieHeader()
 void SerieHeader::AddFileName(std::string const &filename)
 {
    //directly use string and not const char*:
-   Header *header = new Header( filename ); 
+   File *header = new File( filename ); 
    if( header->IsReadable() )
    {
       // 0020 000e UI REL Series Instance UID
@@ -156,7 +156,7 @@ bool SerieHeader::ImagePositionPatientOrdering()
    std::vector<float> distlist;
 
    //!\todo rewrite this for loop.
-   for ( GdcmHeaderList::const_iterator 
+   for ( GdcmFileList::const_iterator 
          it = CoherentGdcmFileList.begin();
          it != CoherentGdcmFileList.end(); ++it )
    {
@@ -220,7 +220,7 @@ bool SerieHeader::ImagePositionPatientOrdering()
    // Then I order the slices according to the value "dist". Finally, once
    // I've read in all the slices, I calculate the z-spacing as the difference
    // between the "dist" values for the first two slices.
-   GdcmHeaderVector CoherentGdcmFileVector(n);
+   GdcmFileVector CoherentGdcmFileVector(n);
    // CoherentGdcmFileVector.reserve( n );
    CoherentGdcmFileVector.resize( n );
    // gdcmAssertMacro( CoherentGdcmFileVector.capacity() >= n );
@@ -230,7 +230,7 @@ bool SerieHeader::ImagePositionPatientOrdering()
    n = 0;
     
    //VC++ don't understand what scope is !! it -> it2
-   for (GdcmHeaderList::const_iterator it2  = CoherentGdcmFileList.begin();
+   for (GdcmFileList::const_iterator it2  = CoherentGdcmFileList.begin();
         it2 != CoherentGdcmFileList.end(); ++it2, ++n)
    {
       //2*n sort algo !!
@@ -250,7 +250,7 @@ bool SerieHeader::ImagePositionPatientOrdering()
    CoherentGdcmFileList.clear();  //this doesn't delete list's element, node only
   
    //VC++ don't understand what scope is !! it -> it3
-   for (GdcmHeaderVector::const_iterator it3  = CoherentGdcmFileVector.begin();
+   for (GdcmFileVector::const_iterator it3  = CoherentGdcmFileVector.begin();
         it3 != CoherentGdcmFileVector.end(); ++it3)
    {
       CoherentGdcmFileList.push_back( *it3 );
@@ -273,7 +273,7 @@ bool SerieHeader::ImageNumberOrdering()
    int n = 0;//CoherentGdcmFileList.size() is a O(N) operation
    unsigned char *partition;
   
-   GdcmHeaderList::const_iterator it = CoherentGdcmFileList.begin();
+   GdcmFileList::const_iterator it = CoherentGdcmFileList.begin();
    min = max = (*it)->GetImageNumber();
 
    for (; it != CoherentGdcmFileList.end(); ++it, ++n)
@@ -292,10 +292,10 @@ bool SerieHeader::ImageNumberOrdering()
    partition = new unsigned char[n];
    memset(partition, 0, n);
 
-   GdcmHeaderVector CoherentGdcmFileVector(n);
+   GdcmFileVector CoherentGdcmFileVector(n);
 
    //VC++ don't understand what scope is !! it -> it2
-   for (GdcmHeaderList::const_iterator it2 = CoherentGdcmFileList.begin();
+   for (GdcmFileList::const_iterator it2 = CoherentGdcmFileList.begin();
         it2 != CoherentGdcmFileList.end(); ++it2)
    {
       pos = (*it2)->GetImageNumber();
@@ -311,7 +311,7 @@ bool SerieHeader::ImageNumberOrdering()
 
    //VC++ don't understand what scope is !! it -> it3
    CoherentGdcmFileList.clear();  //this doesn't delete list's element, node only
-   for ( GdcmHeaderVector::const_iterator it3 = CoherentGdcmFileVector.begin();
+   for ( GdcmFileVector::const_iterator it3 = CoherentGdcmFileVector.begin();
          it3 != CoherentGdcmFileVector.end(); ++it3 )
    {
       CoherentGdcmFileList.push_back( *it3 );
index b6a8a76da083d6e308a6452055b68c6027611e10..99b325cd20c60f5c168ffeafc3e2437f966ddaff 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHeader.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/14 21:30:53 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/01/21 11:40:56 $
+  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
 
 namespace gdcm 
 {
-class Header;
+class File;
 //-----------------------------------------------------------------------------
 /**
- * \ingroup SerieHeader
  * \brief  
  * - This class should be used for a stack of 2D dicom images.
- * - For a multiframe dicom image better use directly SerieHeader
-*/
+ */
 class GDCM_EXPORT SerieHeader 
 {
 public:
-   typedef std::list<Header* > GdcmHeaderList;
+   typedef std::list<File* > GdcmFileList;
 
     SerieHeader();
     ~SerieHeader();
@@ -48,14 +46,14 @@ public:
    /// \brief Gets the *coherent* File List
    /// @return the *coherent* File List
    /// Caller must call OrderGdcmFileList first
-   const GdcmHeaderList &GetGdcmFileList() { return CoherentGdcmFileList; }
+   const GdcmFileList &GetGdcmFileList() { return CoherentGdcmFileList; }
 
 private:
    bool ImagePositionPatientOrdering();
    bool ImageNumberOrdering();
    bool FileNameOrdering();
    
-   GdcmHeaderList CoherentGdcmFileList;
+   GdcmFileList CoherentGdcmFileList;
    /// Ref to the current Serie Instance UID to avoid mixing two series
    /// within the same directory
    std::string    CurrentSerieUID;
index 9d121654eb6bc22c389de5b7d03bcd1c122574c6..39d0ba7bdd4fe3f58db869a123ceb3458537dee7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 16:19:57 $
-  Version:   $Revision: 1.112 $
+  Date:      $Date: 2005/01/21 11:40:56 $
+  Version:   $Revision: 1.113 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -670,7 +670,7 @@ std::string Util::GetIPAddress()
    // In this case we should maybe check the string was not truncated.
    // But I don't known how to check that...
 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__)
-   // with WinSock DLL we need to initialise the WinSock before using gethostname
+   // with WinSock DLL we need to initialize the WinSock before using gethostname
    WORD wVersionRequested = MAKEWORD(1,0);
    WSADATA WSAData;
    int err = WSAStartup(wVersionRequested,&WSAData);
index a7ea3f5c5579d4a8e3e60279f4235da92fc80d14..34275c6d2b7c8e755bc2c62ddb652a1adaade31c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:42 $
-  Version:   $Revision: 1.36 $
+  Date:      $Date: 2005/01/21 11:40:56 $
+  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
@@ -27,8 +27,8 @@ namespace gdcm
 {
 //-----------------------------------------------------------------------------
 /**
- * \brief   Any Dicom Document (File Header or DicomDir) contains 
- *           a set of DocEntry entries 
+ * \brief   Any Dicom Document (File header or DicomDir) contains 
+ *           a set of DocEntry  - Dicom entries -
  *          (when successfuly parsed against a given Dicom dictionary)
  *          ValEntry is an elementary DocEntry (as opposed to SeqEntry)
  */
@@ -40,11 +40,11 @@ public:
    ~ValEntry();
 
    /// \brief Returns the 'Value' (e.g. "Dupond Marcel") converted into a
-   /// 'string', event if it's stored as an integer in the header of the
-   /// current Dicom Document Entry
+   /// 'string', event if it's physically stored as an integer in the header of the
+   /// current Document (File or DicomDir)
    std::string const &GetValue() const { return Value; };
     
-   /// Sets the value (string) of the current Dicom Document Entry.
+   /// Sets the value (string) of the current Dicom entry.
    /// The size is updated
    virtual void SetValue(std::string const &val);
 
@@ -53,13 +53,13 @@ public:
    virtual void WriteContent(std::ofstream *fp, FileType filetype);
 
 protected:
-   /// Sets the value (string) of the current Dicom Document Entry
+   /// Sets the value (string) of the current Dicom entry
    void SetValueOnly(std::string const &val) { Value = val; }; 
    
 private:
 // Members :
   
-   /// \brief Document Entry value, internaly represented as a std::string
+   /// \brief Dicom entry value, internaly represented as a std::string.
    ///        The Value Representation (\ref VR) is independently used
    ///        in order to interpret (decode) this field.
    std::string Value;
index e6346dfcbf7f3dde284c3dbec9302185b15cf1b7..6db14bad8d58cf810a6740d8d0a34b4e337357e9 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcmReader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:17:01 $
-  Version:   $Revision: 1.65 $
+  Date:      $Date: 2005/01/21 11:40:56 $
+  Version:   $Revision: 1.66 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 //      is compared to this new value to find a modification in the class
 //      parameters
 //  2b/ the core of ExecuteData then needs gdcmFile (which in turns
-//      initialises gdcmHeader in the constructor) in order to access
+//      initialises gdcmFile in the constructor) in order to access
 //      the data-image.
 //
 // Possible solution:
 // maintain a list of gdcmFiles (created by say ExecuteInformation) created
-// once and for all accross the life of vtkGdcmHeader (it would only load
+// once and for all accross the life of vtkGdcmFile (it would only load
 // new gdcmFile if the user changes the list). ExecuteData would then use 
 // those gdcmFile and hence avoid calling the construtor:
 //  - advantage: the header of the files would only be parser once.
 //  - drawback: once execute information is called (i.e. on creation of
-//              a vtkGdcmHeader) the gdcmFile structure is loaded in memory.
-//              The average size of a gdcmHeader being of 100Ko, is one
+//              a vtkGdcmFile) the gdcmFile structure is loaded in memory.
+//              The average size of a gdcmFile being of 100Ko, is one
 //              loads 10 stacks of images with say 200 images each, you
 //              end-up with a loss of 200Mo...
 //
@@ -66,7 +66,7 @@
 // //////////////////////////////////////////////////////////////
 
 #include "gdcmFileHelper.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "vtkGdcmReader.h"
 
 //#include <stdio.h>
@@ -75,7 +75,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.65 $");
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.66 $");
 vtkStandardNewMacro(vtkGdcmReader);
 
 //-----------------------------------------------------------------------------
@@ -461,8 +461,8 @@ int vtkGdcmReader::CheckFileCoherence()
       fclose(fp);
 
       // Stage 1.2: check for Gdcm parsability
-      gdcm::Header GdcmHeader(filename->c_str() );
-      if (!GdcmHeader.IsReadable())
+      gdcm::File GdcmFile(filename->c_str() );
+      if (!GdcmFile.IsReadable())
       {
          vtkErrorMacro(<< "Gdcm cannot parse file " << filename->c_str());
          vtkErrorMacro(<< "Removing this file from readed files "
@@ -472,7 +472,7 @@ int vtkGdcmReader::CheckFileCoherence()
       }
 
       // Stage 1.3: further gdcm compatibility on PixelType
-      std::string type = GdcmHeader.GetPixelType();
+      std::string type = GdcmFile.GetPixelType();
       if (   (type !=  "8U") && (type !=  "8S")
           && (type != "16U") && (type != "16S")
           && (type != "32U") && (type != "32S") )
@@ -486,9 +486,9 @@ int vtkGdcmReader::CheckFileCoherence()
       }
 
       // Stage 2: check coherence of the set of files
-      int NX = GdcmHeader.GetXSize();
-      int NY = GdcmHeader.GetYSize();
-      int NZ = GdcmHeader.GetZSize();
+      int NX = GdcmFile.GetXSize();
+      int NY = GdcmFile.GetYSize();
+      int NZ = GdcmFile.GetZSize();
       if (FoundReferenceFile) 
       {
          // Stage 2.1: mandatory coherence stage:
@@ -547,27 +547,27 @@ int vtkGdcmReader::CheckFileCoherence()
          ReferenceNZ      = NZ;
          ReturnedTotalNumberOfPlanes += NZ - 1; // First plane already added
          this->ImageType = type;
-         this->PixelSize = GdcmHeader.GetPixelSize();
+         this->PixelSize = GdcmFile.GetPixelSize();
 
-         if( GdcmHeader.HasLUT() && this->AllowLookupTable )
+         if( GdcmFile.HasLUT() && this->AllowLookupTable )
          {
             // I could raise an error is AllowLookupTable is on and HasLUT() off
-            this->NumComponents = GdcmHeader.GetNumberOfScalarComponentsRaw();
+            this->NumComponents = GdcmFile.GetNumberOfScalarComponentsRaw();
          }
          else
          {
-            this->NumComponents = GdcmHeader.GetNumberOfScalarComponents(); //rgb or mono
+            this->NumComponents = GdcmFile.GetNumberOfScalarComponents(); //rgb or mono
          }
        
          //Set image spacing
-         this->DataSpacing[0] = GdcmHeader.GetXSpacing();
-         this->DataSpacing[1] = GdcmHeader.GetYSpacing();
-         this->DataSpacing[2] = GdcmHeader.GetZSpacing();
+         this->DataSpacing[0] = GdcmFile.GetXSpacing();
+         this->DataSpacing[1] = GdcmFile.GetYSpacing();
+         this->DataSpacing[2] = GdcmFile.GetZSpacing();
 
          //Set image origin
-         //this->DataOrigin[0] = GdcmHeader.GetXOrigin();
-         //this->DataOrigin[1] = GdcmHeader.GetYOrigin();
-         //this->DataOrigin[2] = GdcmHeader.GetZOrigin();
+         //this->DataOrigin[0] = GdcmFile.GetXOrigin();
+         //this->DataOrigin[1] = GdcmFile.GetYOrigin();
+         //this->DataOrigin[2] = GdcmFile.GetZOrigin();
 
       }
    } // End of loop on filename
@@ -639,15 +639,15 @@ size_t vtkGdcmReader::LoadImageInMemory(
    // line comes first (for some axis related reasons?). Hence we need
    // to load the image line by line, starting from the end.
 
-   int numColumns = file.GetHeader()->GetXSize();
-   int numLines   = file.GetHeader()->GetYSize();
-   int numPlanes  = file.GetHeader()->GetZSize();
-   int lineSize   = NumComponents * numColumns * file.GetHeader()->GetPixelSize();
+   int numColumns = file.GetFile()->GetXSize();
+   int numLines   = file.GetFile()->GetYSize();
+   int numPlanes  = file.GetFile()->GetZSize();
+   int lineSize   = NumComponents * numColumns * file.GetFile()->GetPixelSize();
    int planeSize  = lineSize * numLines;
 
    unsigned char *src;
    
-   if( file.GetHeader()->HasLUT() && AllowLookupTable )
+   if( file.GetFile()->HasLUT() && AllowLookupTable )
    {
       size               = file.GetImageDataSize();
       src                = (unsigned char*) file.GetImageDataRaw();
index 9a1b14b171591bc608006fc5ec778c6d4b664be8..e60ee26763f0d1d25905d9b91fbd242ae636f248 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: vtkGdcmWriter.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 16:31:43 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/01/21 11:40:56 $
+  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
@@ -16,7 +16,7 @@
                                                                                 
 =========================================================================*/
                                                                                 
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmFileHelper.h"
 #include "gdcmDebug.h"
 #include "vtkGdcmWriter.h"
@@ -26,7 +26,7 @@
 #include <vtkPointData.h>
 #include <vtkLookupTable.h>
 
-vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.12 $");
+vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.13 $");
 vtkStandardNewMacro(vtkGdcmWriter);
 
 //-----------------------------------------------------------------------------