]> Creatis software - gdcm.git/commitdiff
Stage 3 of normalization :
authorjpr <jpr>
Mon, 24 Jan 2005 16:10:49 +0000 (16:10 +0000)
committerjpr <jpr>
Mon, 24 Jan 2005 16:10:49 +0000 (16:10 +0000)
in order to avoid any missunderstanding while reading method names :
- All the methods xxxEntry now deal with dicom Entries
- Methods GetEntry splitted into
   GetEntryValue
GetEntryBinArea
 - Method SetEntry renamed as SetEntryValue
 - Method SetEntryBinArea let as it was

35 files changed:
Doc/Website/News.html
Example/BuildUpDicomDir.cxx
Example/FindTags.cxx
Example/PrintDicomDir.cxx
Example/PrintFile.cxx
Example/PrintHeader.cxx
Example/TestChangeHeader.cxx
Example/TestPapyrus.cxx
Example/TestWrite.cxx
Example/Write.cxx
Example/WriteDicom.cxx
Testing/TestAllEntryVerify.cxx
Testing/TestChangeHeader.cxx
Testing/TestCopyDicom.cxx
Testing/TestCopyRescaleDicom.cxx
Testing/TestDicomDir.cxx
gdcmPython/testSuite.py
src/gdcmBinEntry.cxx
src/gdcmDicomDir.cxx
src/gdcmDicomDirMeta.cxx
src/gdcmDocEntry.cxx
src/gdcmDocEntrySet.h
src/gdcmDocument.cxx
src/gdcmDocument.h
src/gdcmElementSet.cxx
src/gdcmElementSet.h
src/gdcmFile.cxx
src/gdcmFileHelper.cxx
src/gdcmFileHelper.h
src/gdcmRLEFramesInfo.cxx
src/gdcmSQItem.cxx
src/gdcmSQItem.h
src/gdcmSeqEntry.cxx
src/gdcmSerieHeader.cxx
src/gdcmValEntry.cxx

index b71265da255dd21d80f4edadcb2a373166f2f2b1..084ba4c6f062c8d3eb8781647556cf8f8f3b847d 100644 (file)
       <B></B></A>
 </H2>
 <UL>
-   <LI> Final check of the jpeg sub-library: all kinds of jpeg
-        compressed Dicom files (but jpeg2000) can be read
+   <LI> Final check of the jpeg sub-library: all 'classical' jpeg
+        compressed Dicom files can be read<br>
+        All the previously gdcm-breaker images are now readable<br>
+        gdcm doesn't read yet JPEG-LS and JPEG2000 encoded files.
    <LI> Use of <TT> namespace</TT> : all the methods formerly called
        <TT>className::gdcmXxx()</TT> are now called <TT>className::Xxx()</TT>
    <LI> Removal of accessors <TT>GetXxxByname</TT>, <TT>SetXxxByname</TT> 
         and <TT>GetXxxByNumber</TT>, <TT>SetXxxByNumber</TT> 
-        replaced by <TT>GetXxx</TT>, <TT>SetXxx</TT> 
+        replaced by <TT>GetXxx</TT>, <TT>SetXxx</TT>
+   <LI> a gdcm::Document is now specialized in gdcm::DicomDir and gdcm::File
    <LI> A huge number of memory leaks removed
-   <LI> All the previously gdcm-breaker images are now readable
    <LI> Improvement of write process  
 </UL>
 
@@ -40,7 +42,7 @@
 </H2>
 <UL>
    This version will be used by Insight Tool Kit 
-   (<a href="http://www.itk.org">ITK</a> 2.0) at the beginning of 2005.<br>
+   (<a href="http://www.itk.org">ITK</a> 1.10) at the beginning of 2005.<br>
     It's not yet packaged ...<br><br>
    <LI> The new <TT>gdcmDocument</TT> class is a parent class of 
        <TT>gdcmHeader</TT> class and <TT>gdcmDicomDir</TT> class.
index 66df934f9988ce4ca09418175f0036397e92bbff..a56fa9f8ab66a7ac01fe03f5422336609bf9f044 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: BuildUpDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  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
@@ -50,25 +50,25 @@ int main(int argc, char* argv[])
    ((gdcm::Document *)dcmdir)->Print();
 
    gdcm::DicomDirPatient *p1=dcmdir->NewPatient();
-   p1->SetEntry("patientONE",0x0010, 0x0010);
+   p1->SetEntryValue("patientONE",0x0010, 0x0010);
 
      
    gdcm::DicomDirPatient *p2=dcmdir->NewPatient();
-   p2->SetEntry("patientTWO",0x0010, 0x0010);     
+   p2->SetEntryValue("patientTWO",0x0010, 0x0010);     
    gdcm::DicomDirStudy *s21=p2->NewStudy();  
-       s21->SetEntry("StudyDescrTwo.One",0x0008, 0x1030);        
+       s21->SetEntryValue("StudyDescrTwo.One",0x0008, 0x1030);        
    gdcm::DicomDirSerie *s211=s21->NewSerie();   
    gdcm::DicomDirImage *s2111=s211->NewImage();
    (void)s2111; //not used
 
    gdcm::DicomDirStudy *s11=p1->NewStudy();  
-   s11->SetEntry("StudyDescrOne.One",0x0008, 0x1030);
+   s11->SetEntryValue("StudyDescrOne.One",0x0008, 0x1030);
    // Name of the physician reading study
    // Header Entry to be created
-   s11->SetEntry("Dr Mabuse",0x0008, 0x1060);
+   s11->SetEntryValue("Dr Mabuse",0x0008, 0x1060);
 
    gdcm::DicomDirPatient *p3 = dcmdir->NewPatient();
-   p3->SetEntry("patientTHREE",0x0010, 0x0010);
+   p3->SetEntryValue("patientTHREE",0x0010, 0x0010);
 
    std::cout << "\n------- BuildUpDicomDir: Test Print of Patient ONE -----\n";
    p1->Print();
index 59b0048138621e8ee2914bc9873ffd6364d18bf7..705a881093a466624053d0473089fbe958226bc1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: FindTags.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:52 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -47,14 +47,14 @@ int main(int argc, char* argv[])
    int dataSize = f1->GetImageDataSize();
    std::cout << "---> pourFindTaggs : dataSize " << dataSize << std::endl;
 
-   f1->SetEntry(RecCode ,0x0008,0x0010);
-   f1->SetEntry(ManufacturerName ,0x0008,0x0070);
+   f1->SetEntryValue(RecCode ,0x0008,0x0010);
+   f1->SetEntryValue(ManufacturerName ,0x0008,0x0070);
 
 // ImagePositionPatient
-   ImagePositionPatient = f1->GetFile()->GetEntry(0x0020,0x0032);
+   ImagePositionPatient = f1->GetFile()->GetEntryValue(0x0020,0x0032);
 
 // Image Position (RET)
-   f1->SetEntry(ImagePositionPatient, 0x0020,0x0030);
+   f1->SetEntryValue(ImagePositionPatient, 0x0020,0x0030);
 
    sscanf(ImagePositionPatient.c_str(), "%f%c%f%c%f", &x,&c,&y,&c,&z);
 
@@ -70,7 +70,7 @@ int main(int argc, char* argv[])
 // Location
    std::string zizi = gdcm::Util::Format("%f",l);
    Location = gdcm::Util::DicomString(zizi.c_str());
-   f1->SetEntry(Location, 0x0020,0x0050);
+   f1->SetEntryValue(Location, 0x0020,0x0050);
 
 // sinon, la longueur du champ est erronĂ©e (?!?) 
 // Probable sac de noeud entre strlen(xxx.c_str()) et xxx.length()
@@ -85,7 +85,7 @@ int main(int argc, char* argv[])
 
    zizi = gdcm::Util::Format("%d",0x7FE0);
    ImageLocation = gdcm::Util::DicomString(zizi.c_str());
-//f1->SetEntry(Location, 0x0028,0x0200);
+//f1->SetEntryValue(Location, 0x0028,0x0200);
 //f1->GetFile()->SetEntryLength(strlen(ImageLocation.c_str())-1, 0x0020,0x0050); // prudence !
 
 // void* imageData= f1->GetImageData();
index cc8c9a7f869f594729b7db1d44b681a7edca2fbc..5eda61450c910441ceec9151250e1add063c4dc6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 11:09:21 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  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
@@ -94,7 +94,7 @@ int main(int argc, char* argv[])
       pa = e1->GetFirstPatient();
       while (pa) 
       {
-         std::cout << pa->GetEntry(0x0010, 0x0010) << std::endl; // Patient's Name   
+         std::cout << pa->GetEntryValue(0x0010, 0x0010) << std::endl; // Patient's Name   
          pa = e1->GetNextPatient();    
       }
       break;
@@ -107,11 +107,11 @@ int main(int argc, char* argv[])
       pa = e1->GetFirstPatient();
       while ( pa ) // on degouline les PATIENT de ce DICOMDIR
       {  
-         std::cout << pa->GetEntry(0x0010, 0x0010) << std::endl; // Patient's Name 
+         std::cout << pa->GetEntryValue(0x0010, 0x0010) << std::endl; // Patient's Name 
 
          st = pa->GetFirstStudy();
          while ( st ) { // on degouline les STUDY de ce patient
-            std::cout << "--- "<< st->GetEntry(0x0008, 0x1030) << std::endl; // Study Description
+            std::cout << "--- "<< st->GetEntryValue(0x0008, 0x1030) << std::endl; // Study Description
             st = pa->GetNextStudy();
          }
          pa = e1->GetNextPatient();    
@@ -127,21 +127,21 @@ int main(int argc, char* argv[])
       while ( pa )   // on degouline les PATIENT de ce DICOMDIR
       {
        // Patient's Name, Patient ID 
-         std::cout << "Pat.Name:[" << pa->GetEntry(0x0010, 0x0010) <<"]"; // Patient's Name
+         std::cout << "Pat.Name:[" << pa->GetEntryValue(0x0010, 0x0010) <<"]"; // Patient's Name
          std::cout << " Pat.ID:[";
-         std::cout << pa->GetEntry(0x0010, 0x0020) << "]" << std::endl; // Patient ID
+         std::cout << pa->GetEntryValue(0x0010, 0x0020) << "]" << std::endl; // Patient ID
 
          st = pa->GetFirstStudy();
          while ( st ) { // on degouline les STUDY de ce patient
-            std::cout << "--- Stud.descr:["    << st->GetEntry(0x0008, 0x1030) << "]";// Study Description 
-            std::cout << " Stud.ID:["          << st->GetEntry(0x0020, 0x0010);       // Study ID
+            std::cout << "--- Stud.descr:["    << st->GetEntryValue(0x0008, 0x1030) << "]";// Study Description 
+            std::cout << " Stud.ID:["          << st->GetEntryValue(0x0020, 0x0010);       // Study ID
             std::cout << "]" << std::endl;
 
             se = st->GetFirstSerie();
             while ( se ) { // on degouline les SERIES de cette study
-               std::cout << "--- --- Ser.Descr:["<< se->GetEntry(0x0008, 0x103e)<< "]";  // Series Description
-               std::cout << " Ser.nb:["         <<  se->GetEntry(0x0020, 0x0011);        // Series number
-               std::cout << "] Mod.:["          <<  se->GetEntry(0x0008, 0x0060) << "]"; // Modality
+               std::cout << "--- --- Ser.Descr:["<< se->GetEntryValue(0x0008, 0x103e)<< "]";  // Series Description
+               std::cout << " Ser.nb:["         <<  se->GetEntryValue(0x0020, 0x0011);        // Series number
+               std::cout << "] Mod.:["          <<  se->GetEntryValue(0x0008, 0x0060) << "]"; // Modality
                std::cout << std::endl;    
                se = st->GetNextSerie();   
             }
@@ -158,22 +158,22 @@ int main(int argc, char* argv[])
  
       pa = e1->GetFirstPatient(); 
       while ( pa ) {  // les PATIENT de ce DICOMDIR
-         std::cout << pa->GetEntry(0x0010, 0x0010) << std::endl; // Patient's Name
+         std::cout << pa->GetEntryValue(0x0010, 0x0010) << std::endl; // Patient's Name
 
          st = pa->GetFirstStudy();
          while ( st ) { // on degouline les STUDY de ce patient
-            std::cout << "--- "<< st->GetEntry(0x0008, 0x1030) << std::endl;    // Study Description
-            std::cout << " Stud.ID:["          << st->GetEntry(0x0020, 0x0010); // Study ID
+            std::cout << "--- "<< st->GetEntryValue(0x0008, 0x1030) << std::endl;    // Study Description
+            std::cout << " Stud.ID:["          << st->GetEntryValue(0x0020, 0x0010); // Study ID
 
             se = st->GetFirstSerie();
             while ( se ) { // on degouline les SERIES de cette study
-               std::cout << "--- --- "<< se->GetEntry(0x0008, 0x103e) << std::endl;      // Serie Description
-               std::cout << " Ser.nb:["         <<  se->GetEntry(0x0020, 0x0011);        // Series number
-               std::cout << "] Mod.:["          <<  se->GetEntry(0x0008, 0x0060) << "]"; // Modality
+               std::cout << "--- --- "<< se->GetEntryValue(0x0008, 0x103e) << std::endl;      // Serie Description
+               std::cout << " Ser.nb:["         <<  se->GetEntryValue(0x0020, 0x0011);        // Series number
+               std::cout << "] Mod.:["          <<  se->GetEntryValue(0x0008, 0x0060) << "]"; // Modality
 
                im = se->GetFirstImage();
                while ( im ) { // on degouline les Images de cette serie
-                  std::cout << "--- --- --- "<< im->GetEntry(0x0004, 0x1500) << std::endl; // File name
+                  std::cout << "--- --- --- "<< im->GetEntryValue(0x0004, 0x1500) << std::endl; // File name
                   im = se->GetNextImage();   
                }
                se = st->GetNextSerie();   
@@ -208,16 +208,16 @@ int main(int argc, char* argv[])
  
    itPatient = e1->GetDicomDirPatients().begin();
    while ( itPatient != e1->GetDicomDirPatients().end() ) {  // on degouline les PATIENT de ce DICOMDIR
-      std::cout << (*itPatient)->GetEntry(0x0010, 0x0010) << std::endl; // Patient's Name
+      std::cout << (*itPatient)->GetEntryValue(0x0010, 0x0010) << std::endl; // Patient's Name
       itStudy = ((*itPatient)->GetDicomDirStudies()).begin();
       while (itStudy != (*itPatient)->GetDicomDirStudies().end() ) { // on degouline les STUDY de ce patient
-         std::cout << "--- "<< (*itStudy)->GetEntry(0x0008, 0x1030) << std::endl; // Study Description
+         std::cout << "--- "<< (*itStudy)->GetEntryValue(0x0008, 0x1030) << std::endl; // Study Description
          itSerie = ((*itStudy)->GetDicomDirSeries()).begin();
          while (itSerie != (*itStudy)->GetDicomDirSeries().end() ) { // on degouline les SERIES de cette study
-            std::cout << "--- --- "<< (*itSerie)->GetEntry(0x0008, 0x103e) << std::endl; // Serie Description
+            std::cout << "--- --- "<< (*itSerie)->GetEntryValue(0x0008, 0x103e) << std::endl; // Serie Description
             itImage = ((*itSerie)->GetDicomDirImages()).begin();
             while (itImage != (*itSerie)->GetDicomDirImages().end() ) { // on degouline les IMAGES de cette serie
-               std::cout << "--- --- --- "<< (*itImage)->GetEntry(0x0004, 0x1500) << std::endl; // File name
+               std::cout << "--- --- --- "<< (*itImage)->GetEntryValue(0x0004, 0x1500) << std::endl; // File name
                ++itImage;   
             }
             ++itSerie;   
index c88731761bdef8e10f33e7c8e43d4093fd0c0e87..c7e882c6be2460e344f17e710b9540a3c2d4316b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:31 $
-  Version:   $Revision: 1.25 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  Version:   $Revision: 1.26 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -78,7 +78,7 @@ int main(int argc, char* argv[])
              << "] PlanarConfiguration= [" << planarConfig 
              << "] "<< std::endl 
              << " PhotometricInterpretation= [" 
-                                << e1->GetEntry(0x0028,0x0004)
+                                << e1->GetEntryValue(0x0028,0x0004)
              << "] "<< std::endl;
 
    int numberOfScalarComponents=e1->GetNumberOfScalarComponents();
@@ -87,7 +87,7 @@ int main(int argc, char* argv[])
              << std::endl;
 
   
-   if ( e1->GetEntry(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) 
+   if ( e1->GetEntryValue(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) 
    {
       std::cout << "Transfer Syntax not loaded. " << std::endl
                 << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE"
index 23c462b3b9a532583eba3b1aa9dd98991c07cd9b..bab02d2ca4a9d330ba62fc22ea174a62c6197ecf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:52 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  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
@@ -54,7 +54,7 @@ int main(int argc, char* argv[])
 
    std::cout << "\n\n" << std::endl; 
 
-   if ( e1->GetEntry(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) 
+   if ( e1->GetEntryValue(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) 
    {
       std::cout << "Transfer Syntax not loaded. " << std::endl
                 << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE"
index a35f143234437696fc9b6e5f7a576b43e8bfe0b5..50c73775f2f57b77ead3c8dc2f6e3de8d0959b12 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestChangeHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 14:14:08 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  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
@@ -40,7 +40,7 @@ int main(int argc, char* argv[])
        f2->GetFile()->GetPubDict()->GetEntry( 0x0018, 1310 );
     std::cerr << std::hex << dictEntry->GetGroup() << "," << dictEntry->GetElement() << std::endl;
 
-    std::string matrix = f2->GetFile()->GetEntry(0x0018, 0x1310);
+    std::string matrix = f2->GetFile()->GetEntryValue(0x0018, 0x1310);
     if(matrix != "gdcm::Unfound")
     {
        std::cerr << "Aquisition Matrix:" << matrix << std::endl;
index 9d918d18cf906460a1587bb9f6912a23d43c09e5..31d0e274c8bac98e252c810b15e21c93aa62ed51 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestPapyrus.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:32 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  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
@@ -123,12 +123,12 @@ int main(int argc, char* argv[])
 //  Modality, Transfer Syntax, Study Date, Study Time
 // Patient Name, Media Storage SOP Instance UID, etc
 
-   MediaStSOPinstUID   =   h->GetEntry(0x0002,0x0002);
-   TransferSyntax      =   h->GetEntry(0x0002,0x0010);
-   StudyDate           = sqi->GetEntry(0x0008,0x0020);
-   StudyTime           = sqi->GetEntry(0x0008,0x0030);
-   Modality            = sqi->GetEntry(0x0008,0x0060);
-   PatientName         = sqi->GetEntry(0x0010,0x0010);
+   MediaStSOPinstUID   =   h->GetEntryValue(0x0002,0x0002);
+   TransferSyntax      =   h->GetEntryValue(0x0002,0x0010);
+   StudyDate           = sqi->GetEntryValue(0x0008,0x0020);
+   StudyTime           = sqi->GetEntryValue(0x0008,0x0030);
+   Modality            = sqi->GetEntryValue(0x0008,0x0060);
+   PatientName         = sqi->GetEntryValue(0x0010,0x0010);
 
    std::cout << "TransferSyntax " << TransferSyntax << std::endl;
 
@@ -143,18 +143,18 @@ int main(int argc, char* argv[])
 
    // we brutally suppose all the images within a Papyrus file
    // have the same caracteristics.
-   // if you're aware they have not, just move the GetEntry
+   // if you're aware they have not, just move the GetEntryValue
    // inside the loop
 
    // Get caracteristics of the first image
 
-   SamplesPerPixel     = sqi->GetEntry(0x0028,0x0002);
-   Rows                = sqi->GetEntry(0x0028,0x0010);
-   Columns             = sqi->GetEntry(0x0028,0x0011);
-   BitsAllocated       = sqi->GetEntry(0x0028,0x0100);
-   BitsStored          = sqi->GetEntry(0x0028,0x0101);
-   HighBit             = sqi->GetEntry(0x0028,0x0102);
-   PixelRepresentation = sqi->GetEntry(0x0028,0x0102);
+   SamplesPerPixel     = sqi->GetEntryValue(0x0028,0x0002);
+   Rows                = sqi->GetEntryValue(0x0028,0x0010);
+   Columns             = sqi->GetEntryValue(0x0028,0x0011);
+   BitsAllocated       = sqi->GetEntryValue(0x0028,0x0100);
+   BitsStored          = sqi->GetEntryValue(0x0028,0x0101);
+   HighBit             = sqi->GetEntryValue(0x0028,0x0102);
+   PixelRepresentation = sqi->GetEntryValue(0x0028,0x0102);
 
    // just convert those needed to compute PixelArea length
    int iRows            = (uint32_t) atoi( Rows.c_str() );
@@ -203,7 +203,7 @@ int main(int argc, char* argv[])
    while (sqi)
    {
       std::cout << "One more image read. Keep waiting" << std::endl;
-      Rows = sqi->GetEntry(0x0028,0x0010);
+      Rows = sqi->GetEntryValue(0x0028,0x0010);
       // minimum integrity check
       if (Rows != previousRows)
       {
index a34d618c8a7b6e66b020739e9d27b23659508bef..8fce916bd8c3f2f342a1f84a062fb49a58ea538f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWrite.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:52 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  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
@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
              << " SampleserPixel="      << sPP
              << " PlanarConfiguration=" << planarConfig 
              << " PhotometricInterpretation=" 
-                                << e1->GetEntry(0x0028,0x0004) 
+                                << e1->GetEntryValue(0x0028,0x0004) 
              << std::endl;
 
    int numberOfScalarComponents=e1->GetNumberOfScalarComponents();
index 7fcf5b337bf1e447d606d464d774559a24fed93e..d2b6ca10c2d4b67dbe9e17b83335346c86a18cfe 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Write.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:53 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  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
@@ -89,7 +89,7 @@ int main(int argc, char* argv[])
              << " SampleserPixel="      << sPP
              << " PlanarConfiguration=" << planarConfig 
              << " PhotometricInterpretation=" 
-                                << e1->GetEntry(0x0028,0x0004) 
+                                << e1->GetEntryValue(0x0028,0x0004) 
              << std::endl;
 
    int numberOfScalarComponents=e1->GetNumberOfScalarComponents();
index 1ca973429d1be157dfdb475524c4a099b8e82a70..f71e03d1c957e9d4a1829b49a559d85cf60f79dc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: WriteDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:53 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/01/24 16:10:49 $
+  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
@@ -39,15 +39,15 @@ int main(int argc, char* argv[])
  
    // We assume that DICOM fields of second file actually exists :
  
-   std::string nbFrames = f2->GetFile()->GetEntry(0x0028, 0x0008);
+   std::string nbFrames = f2->GetFile()->GetEntryValue(0x0028, 0x0008);
    if(nbFrames != "gdcm::Unfound") {
        f1->GetFile()->ReplaceOrCreate( nbFrames, 0x0028, 0x0008);
    }
           
    f1->GetFile()->ReplaceOrCreate(
-     f2->GetFile()->GetEntry(0x0028, 0x0010), 0x0028, 0x0010); // nbLig
+     f2->GetFile()->GetEntryValue(0x0028, 0x0010), 0x0028, 0x0010); // nbLig
    f1->GetFile()->ReplaceOrCreate( 
-     f2->GetFile()->GetEntry(0x0028, 0x0011), 0x0028, 0x0011); // nbCol
+     f2->GetFile()->GetEntryValue(0x0028, 0x0011), 0x0028, 0x0011); // nbCol
  
    // Some other tags should be updated:
  
@@ -65,8 +65,8 @@ int main(int argc, char* argv[])
  
    f1->GetFile()->Print();
  
-   std::string s0  = f2->GetFile()->GetEntry(0x7fe0, 0x0000);
-   std::string s10 = f2->GetFile()->GetEntry(0x7fe0, 0x0010);
+   std::string s0  = f2->GetFile()->GetEntryValue(0x7fe0, 0x0000);
+   std::string s10 = f2->GetFile()->GetEntryValue(0x7fe0, 0x0010);
  
    std::cout << "lgr 7fe0, 0000 " << s0  << std::endl;
    std::cout << "lgr 7fe0, 0010 " << s10 << std::endl;
index 6a02d988000bdf26c36c98ff36461b3de07e1362..7eb124e7410ee7c99163308060c5c4f07e6252f4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestAllEntryVerify.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:53 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2005/01/24 16:10:50 $
+  Version:   $Revision: 1.21 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -230,7 +230,7 @@ bool ReferenceFileParser::Check( MapFileValuesType::iterator &fileIt )
       uint16_t group   = axtoi( &(groupString[0]) );
       uint16_t element = axtoi( &(groupElement[0]) );
 
-      std::string testedValue = tested->GetEntry(group, element);
+      std::string testedValue = tested->GetEntryValue(group, element);
       if ( testedValue != j->second )
       {
          // Oops make sure this is only the \0 that differ
index 7f330020ca481da8eeca750c770d89a5ea7df775..3528375aaaef5a06ec7d7910790d527b820d3383 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestChangeHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:58 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2005/01/24 16:10:50 $
+  Version:   $Revision: 1.30 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,7 +41,7 @@ int TestChangeHeader(int argc, char* argv[])
 
    // We suppose the DICOM Entries of the second file *do* exist !
 
-   std::string nbFrames = f2->GetHeader()->GetEntry(0x0028, 0x0008);
+   std::string nbFrames = f2->GetHeader()->GetEntryValue(0x0028, 0x0008);
    if(nbFrames != "gdcm::Unfound")
    {
       f1->GetHeader()->ReplaceOrCreate( nbFrames, 0x0028, 0x0008);
@@ -58,17 +58,17 @@ int TestChangeHeader(int argc, char* argv[])
 // provided to 'transform' an image 'Siemens MRI New version' into an image 'Siemens MRI old version'
          
    f1->GetHeader()->ReplaceOrCreate(
-      f2->GetHeader()->GetEntry(0x0028, 0x0010), 0x0028, 0x0010);// nbLig
+      f2->GetHeader()->GetEntryValue(0x0028, 0x0010), 0x0028, 0x0010);// nbLig
    f1->GetHeader()->ReplaceOrCreate( 
-      f2->GetHeader()->GetEntry(0x0028, 0x0011), 0x0028, 0x0011);// nbCol
+      f2->GetHeader()->GetEntryValue(0x0028, 0x0011), 0x0028, 0x0011);// nbCol
    f1->GetHeader()->ReplaceOrCreate( 
-      f2->GetHeader()->GetEntry(0x0028, 0x0100), 0x0028, 0x0100);// BitsAllocated
+      f2->GetHeader()->GetEntryValue(0x0028, 0x0100), 0x0028, 0x0100);// BitsAllocated
    f1->GetHeader()->ReplaceOrCreate( 
-      f2->GetHeader()->GetEntry(0x0028, 0x0101), 0x0028, 0x0101);// BitsStored
+      f2->GetHeader()->GetEntryValue(0x0028, 0x0101), 0x0028, 0x0101);// BitsStored
    f1->GetHeader()->ReplaceOrCreate( 
-      f2->GetHeader()->GetEntry(0x0028, 0x0102), 0x0028, 0x0102);// HighBit
+      f2->GetHeader()->GetEntryValue(0x0028, 0x0102), 0x0028, 0x0102);// HighBit
    f1->GetHeader()->ReplaceOrCreate( 
-      f2->GetHeader()->GetEntry(0x0028, 0x0103), 0x0028, 0x0103);// Pixel Representation
+      f2->GetHeader()->GetEntryValue(0x0028, 0x0103), 0x0028, 0x0103);// Pixel Representation
 // Probabely some more to update (?)
 
 // TODO : add a default value
@@ -85,8 +85,8 @@ int TestChangeHeader(int argc, char* argv[])
 
    f1->GetHeader()->Print();
 
-   std::string s0 =f2->GetHeader()->GetEntry(0x7fe0, 0x0000);
-   std::string s10=f2->GetHeader()->GetEntry(0x7fe0, 0x0010);
+   std::string s0 =f2->GetHeader()->GetEntryValue(0x7fe0, 0x0000);
+   std::string s10=f2->GetHeader()->GetEntryValue(0x7fe0, 0x0010);
    printf("lgr 7fe0, 0000 %s\n",s0.c_str());
    printf("lgr 7fe0, 0010 %s\n",s10.c_str());
 
index c64f88c8e2d8a3dadf39ae8ebef4f41611afe6d7..6d60f60994079acb17ef896b287c0e4fea81475b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:54 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2005/01/24 16:10:50 $
+  Version:   $Revision: 1.34 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -75,9 +75,6 @@ int CopyDicom(std::string const & 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
 
       //////////////// Step 2:
       std::cout << "2...";
index 275c532776cb1f2b0ba862abede8ee210cde0c61..961ea797c15cd22600efc007f3720f32755a38dd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestCopyRescaleDicom.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:54 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/01/24 16:10:50 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -48,12 +48,6 @@ int CopyRescaleDicom(std::string const & filename,
 
    //First of all copy the header field by field
 
-   // Warning :Accessor gdcmElementSet::GetEntry() should not exist 
-   // It was commented out by Mathieu, that was a *good* idea
-   // (the user does NOT have to know the way we implemented the File !)
-   // Waiting for a 'clean' solution, I keep the method ...JPRx
-
-
    //////////////// Step 2:
    std::cout << "2...";
    // Copy of the header content
@@ -93,7 +87,7 @@ int CopyRescaleDicom(std::string const & filename,
    size_t rescaleSize;
    uint8_t *rescaleImage;
 
-   const std::string & bitsStored    = originalH->GetEntry(0x0028,0x0101);
+   const std::string & bitsStored    = originalH->GetEntryValue(0x0028,0x0101);
    if( bitsStored == "16" )
    {
       std::cout << "Rescale...";
index abcf31faf5869f42bebd88c7665f2b7fb2dec368..ea6b686eeaa598395a1c46dc1ff1a424078f1887 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 11:09:22 $
-  Version:   $Revision: 1.31 $
+  Date:      $Date: 2005/01/24 16:10:50 $
+  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
@@ -88,24 +88,24 @@ int TestDicomDir(int argc, char* argv[])
    pa = e1->GetFirstPatient(); 
    while ( pa ) 
    {  // we process all the PATIENT of this DICOMDIR 
-      std::cout << pa->GetEntry(0x0010, 0x0010) << std::endl; // Patient's Name
+      std::cout << pa->GetEntryValue(0x0010, 0x0010) << std::endl; // Patient's Name
 
       st = pa->GetFirstStudy();
       while ( st ) 
       { // we process all the STUDY of this patient
-         std::cout << "--- "<< st->GetEntry(0x0008, 0x1030) << std::endl;    // Study Description
-         std::cout << " Stud.ID:["          << st->GetEntry(0x0020, 0x0010); // Study ID
+         std::cout << "--- "<< st->GetEntryValue(0x0008, 0x1030) << std::endl;    // Study Description
+         std::cout << " Stud.ID:["          << st->GetEntryValue(0x0020, 0x0010); // Study ID
 
          se = st->GetFirstSerie();
          while ( se ) 
          { // we process all the SERIES of this study
-            std::cout << "--- --- "<< se->GetEntry(0x0008, 0x103e) << std::endl;      // Serie Description
-            std::cout << " Ser.nb:["         <<  se->GetEntry(0x0020, 0x0011);        // Series number
-            std::cout << "] Mod.:["          <<  se->GetEntry(0x0008, 0x0060) << "]"; // Modality
+            std::cout << "--- --- "<< se->GetEntryValue(0x0008, 0x103e) << std::endl;      // Serie Description
+            std::cout << " Ser.nb:["         <<  se->GetEntryValue(0x0020, 0x0011);        // Series number
+            std::cout << "] Mod.:["          <<  se->GetEntryValue(0x0008, 0x0060) << "]"; // Modality
 
             im = se->GetFirstImage();
             while ( im ) { // we process all the IMAGE of this serie
-               std::cout << "--- --- --- "<< im->GetEntry(0x0004, 0x1500) << std::endl; // File name
+               std::cout << "--- --- --- "<< im->GetEntryValue(0x0004, 0x1500) << std::endl; // File name
                im = se->GetNextImage();   
             }
             se = st->GetNextSerie();   
index 06f3e53e3ac673e1762cada284737b5ece2881ce..2dce730f507d45e1080c2563802550ed4d47b7fa 100644 (file)
@@ -32,7 +32,7 @@ class gdcmTestCase(unittest.TestCase):
            ["Manufacturer's Model Name", "Gyroscan Intera"],
            ["Sequence Variant", "OTHER"],
            ["Pixel Data", "gdcm::NotLoaded. Address:6584 Length:131072 x(20000)"]
-                         ] ],
+          ] ],
    ]
 
    def _BaseTest(self, FileSet):
@@ -42,7 +42,7 @@ class gdcmTestCase(unittest.TestCase):
          assert reader.IsReadable(),\
                 "File '%s' is not readable by gdcmFile" % fileName
 
-         valDict = reader.GetEntry()
+         valDict = reader.GetEntryValue()
          for subEntry in entry[1]:
             element = subEntry[0]
             value   = subEntry[1]
index 194ca5ff93846551a3f2e58b06aeee434105ef91..2650076b02014ab595eed0ccaf9435260b03d41d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:32 $
-  Version:   $Revision: 1.55 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.56 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -100,7 +100,7 @@ void BinEntry::Print(std::ostream &os, std::string const & )
 /*
  * \brief   canonical Writer
  * @param fp already open file pointer
- * @param filetype type of the file to be written
+ * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
 */
 void BinEntry::WriteContent(std::ofstream *fp, FileType filetype)
 { 
index 568c07b74dd830b003937528daa4c3e14e20e02c..568223b8adf19c62672d876485625e13b1f0eaf0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 14:14:10 $
-  Version:   $Revision: 1.115 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.116 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -606,7 +606,7 @@ void DicomDir::SetElement(std::string const &path, DicomDirType type,
       {
          // NULL when we Build Up (ex nihilo) a DICOMDIR
          //   or when we add the META elems
-         val = header->GetEntry(tmpGr, tmpEl);
+         val = header->GetEntryValue(tmpGr, tmpEl);
       }
       else
       {
@@ -937,12 +937,12 @@ void DicomDir::SetElements(std::string const & path, VectDocument const &list)
                                      it != list.end(); ++it )
    {
       // get the current file characteristics
-      patCurName         = (*it)->GetEntry(0x0010,0x0010);
-      patCurID           = (*it)->GetEntry(0x0010,0x0011);
-      studCurInstanceUID = (*it)->GetEntry(0x0020,0x000d);
-      studCurID          = (*it)->GetEntry(0x0020,0x0010);
-      serCurInstanceUID  = (*it)->GetEntry(0x0020,0x000e);
-      serCurID           = (*it)->GetEntry(0x0020,0x0011);
+      patCurName         = (*it)->GetEntryValue(0x0010,0x0010);
+      patCurID           = (*it)->GetEntryValue(0x0010,0x0011);
+      studCurInstanceUID = (*it)->GetEntryValue(0x0020,0x000d);
+      studCurID          = (*it)->GetEntryValue(0x0020,0x0010);
+      serCurInstanceUID  = (*it)->GetEntryValue(0x0020,0x000e);
+      serCurID           = (*it)->GetEntryValue(0x0020,0x0011);
 
       if( patCurName != patPrevName || patCurID != patPrevID || first )
       {
index b008d0e54be55337ac555d9b4fcdb2bc85289e38..11602a6659824365deb59109a39c39d97e2e4307 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirMeta.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:33 $
-  Version:   $Revision: 1.25 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.26 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -77,16 +77,16 @@ void DicomDirMeta::Print(std::ostream &os, std::string const & )
 /**
  * \brief   Writes the Meta Elements
  * @param fp ofstream to write to
- * @param t File Type 
+ * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
  * @return
  */ 
-void DicomDirMeta::WriteContent(std::ofstream *fp, FileType t)
+void DicomDirMeta::WriteContent(std::ofstream *fp, FileType filetype)
 {   
    for (ListDocEntry::iterator i = DocEntries.begin();  
                               i != DocEntries.end();
                               ++i)
    {
-      (*i)->WriteContent(fp, t);
+      (*i)->WriteContent(fp, filetype);
    }
 }
 
index e82e2100c8dd2c6ad8d2e94884ca3ebcccb681d9..8dd098b0f2b55a53a116d5ced99db80ea3974572 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:33 $
-  Version:   $Revision: 1.45 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.46 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -117,7 +117,7 @@ void DocEntry::Print(std::ostream &os, std::string const & )
 /**
  * \brief   Writes the common part of any ValEntry, BinEntry, SeqEntry
  * @param fp already open ofstream pointer
- * @param filetype type of the file to be written
+ * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
  */
 void DocEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
index c2fb51a474d2e7a21363958404504a482cd0111e..16cc0e9954b7c4e4286c652abe0004eb592d1475 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 14:14:11 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.42 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -94,7 +94,7 @@ public:
 
    /// \brief Gets the 'string value' of a ValEntry
    ///        identified by its (group,elem) - Sorry for the name !...-
-   virtual std::string GetEntry(uint16_t group, uint16_t elem) = 0;
+   virtual std::string GetEntryValue(uint16_t group, uint16_t elem) = 0;
 
    DictEntry *NewVirtualDictEntry(uint16_t group, 
                                   uint16_t elem,
index d6f1cbb1e0a1f9d4c3e29fa99822fbf35da9f334..3caa02abdc6e5a42c3804067b81afc6bca99b761 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 14:14:11 $
-  Version:   $Revision: 1.205 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.206 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -95,7 +95,7 @@ Document::Document( std::string const &filename ) : ElementSet(-1)
    
    // Load 'non string' values
       
-   std::string PhotometricInterpretation = GetEntry(0x0028,0x0004);   
+   std::string PhotometricInterpretation = GetEntryValue(0x0028,0x0004);   
    if( PhotometricInterpretation == "PALETTE COLOR " )
    {
       LoadEntryBinArea(0x0028,0x1200);  // gray LUT   
@@ -141,16 +141,16 @@ Document::Document( std::string const &filename ) : ElementSet(-1)
    // we switch lineNumber and columnNumber
    //
    std::string RecCode;
-   RecCode = GetEntry(0x0008, 0x0010); // recognition code (RET)
+   RecCode = GetEntryValue(0x0008, 0x0010); // recognition code (RET)
    if (RecCode == "ACRNEMA_LIBIDO_1.1" ||
        RecCode == "CANRME_AILIBOD1_1." )  // for brain-damaged softwares
                                           // with "little-endian strings"
    {
          Filetype = ACR_LIBIDO; 
-         std::string rows    = GetEntry(0x0028, 0x0010);
-         std::string columns = GetEntry(0x0028, 0x0011);
-         SetEntry(columns, 0x0028, 0x0010);
-         SetEntry(rows   , 0x0028, 0x0011);
+         std::string rows    = GetEntryValue(0x0028, 0x0010);
+         std::string columns = GetEntryValue(0x0028, 0x0011);
+         SetEntryValue(columns, 0x0028, 0x0010);
+         SetEntryValue(rows   , 0x0028, 0x0011);
    }
    // ----------------- End of ACR-LibIDO kludge ------------------ 
 }
@@ -529,7 +529,7 @@ ValEntry *Document::ReplaceOrCreate(std::string const &value,
    }
 
    // Set the binEntry value
-   SetEntry(value, valEntry);
+   SetEntryValue(value, valEntry); // The std::string value
    return valEntry;
 }   
 
@@ -600,7 +600,7 @@ BinEntry *Document::ReplaceOrCreate(uint8_t *binArea,
    {
       tmpArea = 0;
    }
-   if (!SetEntry(tmpArea,lgth,binEntry))
+   if (!SetEntryBinArea(tmpArea,lgth,binEntry))
    {
       if (tmpArea)
       {
@@ -672,7 +672,7 @@ SeqEntry *Document::ReplaceOrCreate( uint16_t group, uint16_t elem)
 bool Document::ReplaceIfExist(std::string const &value, 
                               uint16_t group, uint16_t elem ) 
 {
-   SetEntry(value, group, elem);
+   SetEntryValue(value, group, elem);
 
    return true;
 } 
@@ -729,7 +729,7 @@ int Document::GetEntryLength(uint16_t group, uint16_t elem)
  * @param   group  group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool Document::SetEntry(std::string const& content, 
+bool Document::SetEntryValue(std::string const& content, 
                         uint16_t group, uint16_t elem) 
 {
    ValEntry *entry = GetValEntry(group, elem);
@@ -738,9 +738,8 @@ bool Document::SetEntry(std::string const& content,
       gdcmVerboseMacro( "No corresponding ValEntry (try promotion first).");
       return false;
    }
-   return SetEntry(content,entry);
+   return SetEntryValue(content,entry);
 } 
-
 /**
  * \brief   Accesses an existing DocEntry (i.e. a Dicom Element)
  *          through it's (group, element) and modifies it's content with
@@ -750,7 +749,7 @@ bool Document::SetEntry(std::string const& content,
  * @param   group  group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool Document::SetEntry(uint8_t*content, int lgth, 
+bool Document::SetEntryBinArea(uint8_t*content, int lgth, 
                         uint16_t group, uint16_t elem) 
 {
    BinEntry *entry = GetBinEntry(group, elem);
@@ -760,7 +759,7 @@ bool Document::SetEntry(uint8_t*content, int lgth,
       return false;
    }
 
-   return SetEntry(content,lgth,entry);
+   return SetEntryBinArea(content,lgth,entry);
 } 
 
 /**
@@ -769,7 +768,7 @@ bool Document::SetEntry(uint8_t*content, int lgth,
  * @param  content new value (string) to substitute with
  * @param  entry Entry to be modified
  */
-bool Document::SetEntry(std::string const &content, ValEntry *entry)
+bool Document::SetEntryValue(std::string const &content, ValEntry *entry)
 {
    if(entry)
    {
@@ -786,7 +785,7 @@ bool Document::SetEntry(std::string const &content, ValEntry *entry)
  * @param  entry Entry to be modified 
  * @param  lgth new value length
  */
-bool Document::SetEntry(uint8_t *content, int lgth, BinEntry *entry)
+bool Document::SetEntryBinArea(uint8_t *content, int lgth, BinEntry *entry)
 {
    if(entry)
    {
@@ -2315,7 +2314,7 @@ void Document::HandleBrokenEndian(uint16_t &group, uint16_t &elem)
 std::string Document::GetTransferSyntaxName()
 {
    // use the TS (TS : Transfer Syntax)
-   std::string transferSyntax = GetEntry(0x0002,0x0010);
+   std::string transferSyntax = GetEntryValue(0x0002,0x0010);
 
    if ( (transferSyntax.find(GDCM_NOTLOADED) < transferSyntax.length()) )
    {
@@ -2836,8 +2835,8 @@ void Document::ComputeJPEGFragmentInfo()
 bool Document::operator<(Document &document)
 {
    // Patient Name
-   std::string s1 = GetEntry(0x0010,0x0010);
-   std::string s2 = document.GetEntry(0x0010,0x0010);
+   std::string s1 = GetEntryValue(0x0010,0x0010);
+   std::string s2 = document.GetEntryValue(0x0010,0x0010);
    if(s1 < s2)
    {
       return true;
@@ -2849,8 +2848,8 @@ bool Document::operator<(Document &document)
    else
    {
       // Patient ID
-      s1 = GetEntry(0x0010,0x0020);
-      s2 = document.GetEntry(0x0010,0x0020);
+      s1 = GetEntryValue(0x0010,0x0020);
+      s2 = document.GetEntryValue(0x0010,0x0020);
       if ( s1 < s2 )
       {
          return true;
@@ -2862,8 +2861,8 @@ bool Document::operator<(Document &document)
       else
       {
          // Study Instance UID
-         s1 = GetEntry(0x0020,0x000d);
-         s2 = document.GetEntry(0x0020,0x000d);
+         s1 = GetEntryValue(0x0020,0x000d);
+         s2 = document.GetEntryValue(0x0020,0x000d);
          if ( s1 < s2 )
          {
             return true;
@@ -2875,8 +2874,8 @@ bool Document::operator<(Document &document)
          else
          {
             // Serie Instance UID
-            s1 = GetEntry(0x0020,0x000e);
-            s2 = document.GetEntry(0x0020,0x000e);    
+            s1 = GetEntryValue(0x0020,0x000e);
+            s2 = document.GetEntryValue(0x0020,0x000e);    
             if ( s1 < s2 )
             {
                return true;
index aaa8dacb53f87810497c97d66aa7ee13e03957e8..11cd6f5c9e0e31b8b974cb85c27a7abb16a9e8c0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 14:14:11 $
-  Version:   $Revision: 1.98 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.99 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -92,12 +92,12 @@ public:
 // 4 methods with same name and different parameters ...
 // Only C++ is aware!
 
-   virtual bool SetEntry(std::string const &content,
+   virtual bool SetEntryValue(std::string const &content,
                          uint16_t group, uint16_t elem);
-   virtual bool SetEntry(uint8_t *content, int lgth,
+   virtual bool SetEntryBinArea(uint8_t *content, int lgth,
                          uint16_t group, uint16_t elem);
-   virtual bool SetEntry(std::string const &content, ValEntry *entry);
-   virtual bool SetEntry(uint8_t *content, int lgth, BinEntry *entry);
+   virtual bool SetEntryValue(std::string const &content, ValEntry *entry);
+   virtual bool SetEntryBinArea(uint8_t *content, int lgth, BinEntry *entry);
 
    virtual void *GetEntryBinArea(uint16_t group, uint16_t elem);   
 
index 317c108f9b6df7f08104eaf262e6ee1e5e65866f..f419aed920cb10b58b2738a4ccf1c2dee929d59e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:33 $
-  Version:   $Revision: 1.48 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.49 $
                                                                                 
   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
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
 /**
- * \brief   Constructor from a given ElementSet
+ * \brief   Constructor for a given ElementSet
  */
 //BOZ depthLevel is not usefull anymore
 ElementSet::ElementSet(int depthLevel) 
@@ -55,8 +55,7 @@ ElementSet::~ElementSet()
 //-----------------------------------------------------------------------------
 // Print
 /**
-  * \brief   Prints the Header Entries (Dicom Elements)
-  *          from the H Table
+  * \brief   Prints the Header Entries (Dicom Elements) from the H Table
   * @param os ostream to write to  
   * @param indent Indentation string to be prepended during printing
   */ 
@@ -201,15 +200,13 @@ bool ElementSet::CheckIfEntryExist(uint16_t group, uint16_t elem )
 }
 
 /**
- * \brief   Searches within Header Entries (Dicom Elements) parsed with 
- *          the public and private dictionaries 
- *          for the element value representation of a given tag.
+ * \brief   Get the (std::string representable) value of the Dicom entry
  * @param   group  Group number of the searched tag.
  * @param   elem Element number of the searched tag.
- * @return  Corresponding element value representation when it exists,
+ * @return  Corresponding element value when it exists,
  *          and the string GDCM_UNFOUND ("gdcm::Unfound") otherwise.
  */
-std::string ElementSet::GetEntry(uint16_t group, uint16_t elem)
+std::string ElementSet::GetEntryValue(uint16_t group, uint16_t elem)
 {
    TagKey key = DictEntry::TranslateToKey(group, elem);
    if ( !TagHT.count(key))
index 09499ad6f7cad8f345dfdbe94a77b3f918fa9a80..0bb3ac648593bea967e49265da2f237c6047c321 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:34 $
-  Version:   $Revision: 1.35 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.36 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -67,7 +67,13 @@ public:
 
    bool IsEmpty() { return TagHT.empty(); };
    bool CheckIfEntryExist(uint16_t group, uint16_t elem);
-   std::string GetEntry(uint16_t group, uint16_t elem);
+
+   std::string GetEntryValue(uint16_t group, uint16_t elem);
+   int GetEntryLength(uint16_t group, uint16_t elem);
+   std::string GetEntryVR(uint16_t group, uint16_t elem);
+
+   bool SetEntryValue(std::string const& content, 
+                      uint16_t group, uint16_t elem);
 
 protected:
 
index c3500c8b0d4ad29a2030e1236dc5d6bae246c3b6..5e6941c16c0074e2c96b13307dc17f4c9ec33dc1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:34 $
-  Version:   $Revision: 1.197 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  Version:   $Revision: 1.198 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -49,7 +49,7 @@ File::File( std::string const &filename ):
    // Note: this IS the right place for the code
  
    // Image Location
-   const std::string &imgLocation = GetEntry(0x0028, 0x0200);
+   const std::string &imgLocation = GetEntryValue(0x0028, 0x0200);
    if ( imgLocation == GDCM_UNFOUND )
    {
       // default value
@@ -125,7 +125,7 @@ File::~File ()
  *       then writes in a file all the (Dicom Elements) included the Pixels 
  * @param fileName file name to write to
  * @param filetype Type of the File to be written 
- *          (ACR-NEMA, ExplicitVR, ImplicitVR)
+ *          (ACR, ExplicitVR, ImplicitVR)
  */
 bool File::Write(std::string fileName, FileType filetype)
 {
@@ -138,9 +138,9 @@ bool File::Write(std::string fileName, FileType filetype)
    }
 
    // Bits Allocated
-   if ( GetEntry(0x0028,0x0100) ==  "12")
+   if ( GetEntryValue(0x0028,0x0100) ==  "12")
    {
-      SetEntry("16", 0x0028,0x0100);
+      SetEntryValue("16", 0x0028,0x0100);
    }
 
   /// \todo correct 'Pixel group' Length if necessary
@@ -159,7 +159,7 @@ bool File::Write(std::string fileName, FileType filetype)
 
    // Drop Palette Color, if necessary
    
-   if ( GetEntry(0x0028,0x0002).c_str()[0] == '3' )
+   if ( GetEntryValue(0x0028,0x0002).c_str()[0] == '3' )
    {
       // if SamplesPerPixel = 3, sure we don't need any LUT !   
       // Drop 0028|1101, 0028|1102, 0028|1103
@@ -259,7 +259,7 @@ bool File::IsReadable()
       return false;
    }
 
-   const std::string &res = GetEntry(0x0028, 0x0005);
+   const std::string &res = GetEntryValue(0x0028, 0x0005);
    if ( res != GDCM_UNFOUND && atoi(res.c_str()) > 4 )
    {
       return false; // Image Dimensions
@@ -291,7 +291,7 @@ bool File::IsReadable()
  */
 int File::GetXSize()
 {
-   const std::string &strSize = GetEntry(0x0028,0x0011);
+   const std::string &strSize = GetEntryValue(0x0028,0x0011);
    if ( strSize == GDCM_UNFOUND )
    {
       return 0;
@@ -308,7 +308,7 @@ int File::GetXSize()
  */
 int File::GetYSize()
 {
-   const std::string &strSize = GetEntry(0x0028,0x0010);
+   const std::string &strSize = GetEntryValue(0x0028,0x0010);
    if ( strSize != GDCM_UNFOUND )
    {
       return atoi( strSize.c_str() );
@@ -335,14 +335,14 @@ int File::GetZSize()
 {
    // Both  DicomV3 and ACR/Nema consider the "Number of Frames"
    // as the third dimension.
-   const std::string &strSize = GetEntry(0x0028,0x0008);
+   const std::string &strSize = GetEntryValue(0x0028,0x0008);
    if ( strSize != GDCM_UNFOUND )
    {
       return atoi( strSize.c_str() );
    }
 
    // We then consider the "Planes" entry as the third dimension 
-   const std::string &strSize2 = GetEntry(0x0028,0x0012);
+   const std::string &strSize2 = GetEntryValue(0x0028,0x0012);
    if ( strSize2 != GDCM_UNFOUND )
    {
       return atoi( strSize2.c_str() );
@@ -359,7 +359,7 @@ int File::GetZSize()
 float File::GetXSpacing()
 {
    float xspacing, yspacing;
-   const std::string &strSpacing = GetEntry(0x0028,0x0030);
+   const std::string &strSpacing = GetEntryValue(0x0028,0x0030);
 
    if ( strSpacing == GDCM_UNFOUND )
    {
@@ -407,7 +407,7 @@ float File::GetXSpacing()
 float File::GetYSpacing()
 {
    float yspacing = 1.;
-   std::string strSpacing = GetEntry(0x0028,0x0030);
+   std::string strSpacing = GetEntryValue(0x0028,0x0030);
   
    if ( strSpacing == GDCM_UNFOUND )
    {
@@ -442,12 +442,12 @@ float File::GetZSpacing()
    //   Si le Spacing Between Slices est Missing, 
    //   on suppose que les coupes sont jointives
    
-   const std::string &strSpacingBSlices = GetEntry(0x0018,0x0088);
+   const std::string &strSpacingBSlices = GetEntryValue(0x0018,0x0088);
 
    if ( strSpacingBSlices == GDCM_UNFOUND )
    {
       gdcmVerboseMacro("Unfound Spacing Between Slices (0018,0088)");
-      const std::string &strSliceThickness = GetEntry(0x0018,0x0050);       
+      const std::string &strSliceThickness = GetEntryValue(0x0018,0x0050);       
       if ( strSliceThickness == GDCM_UNFOUND )
       {
          gdcmVerboseMacro("Unfound Slice Thickness (0018,0050)");
@@ -474,7 +474,7 @@ float File::GetRescaleIntercept()
 {
    float resInter = 0.;
    /// 0028 1052 DS IMG Rescale Intercept
-   const std::string &strRescInter = GetEntry(0x0028,0x1052);
+   const std::string &strRescInter = GetEntryValue(0x0028,0x1052);
    if ( strRescInter != GDCM_UNFOUND )
    {
       if( sscanf( strRescInter.c_str(), "%f", &resInter) != 1 )
@@ -495,7 +495,7 @@ float File::GetRescaleSlope()
 {
    float resSlope = 1.;
    //0028 1053 DS IMG Rescale Slope
-   std::string strRescSlope = GetEntry(0x0028,0x1053);
+   std::string strRescSlope = GetEntryValue(0x0028,0x1053);
    if ( strRescSlope != GDCM_UNFOUND )
    {
       if( sscanf( strRescSlope.c_str(), "%f", &resSlope) != 1)
@@ -524,12 +524,12 @@ int File::GetNumberOfScalarComponents()
       
    // 0028 0100 US IMG Bits Allocated
    // (in order no to be messed up by old RGB images)
-   if ( GetEntry(0x0028,0x0100) == "24" )
+   if ( GetEntryValue(0x0028,0x0100) == "24" )
    {
       return 3;
    }
        
-   std::string strPhotometricInterpretation = GetEntry(0x0028,0x0004);
+   std::string strPhotometricInterpretation = GetEntryValue(0x0028,0x0004);
 
    if ( ( strPhotometricInterpretation == "PALETTE COLOR ") )
    {
@@ -569,7 +569,7 @@ int File::GetNumberOfScalarComponentsRaw()
 {
    // 0028 0100 US IMG Bits Allocated
    // (in order no to be messed up by old RGB images)
-   if ( File::GetEntry(0x0028,0x0100) == "24" )
+   if ( File::GetEntryValue(0x0028,0x0100) == "24" )
    {
       return 3;
    }
@@ -603,12 +603,12 @@ int File::GetNumberOfScalarComponentsRaw()
 float File::GetXOrigin()
 {
    float xImPos, yImPos, zImPos;  
-   std::string strImPos = GetEntry(0x0020,0x0032);
+   std::string strImPos = GetEntryValue(0x0020,0x0032);
 
    if ( strImPos == GDCM_UNFOUND )
    {
       gdcmVerboseMacro( "Unfound Image Position Patient (0020,0032)");
-      strImPos = GetEntry(0x0020,0x0030); // For ACR-NEMA images
+      strImPos = GetEntryValue(0x0020,0x0030); // For ACR-NEMA images
       if ( strImPos == GDCM_UNFOUND )
       {
          gdcmVerboseMacro( "Unfound Image Position (RET) (0020,0030)");
@@ -634,12 +634,12 @@ float File::GetXOrigin()
 float File::GetYOrigin()
 {
    float xImPos, yImPos, zImPos;
-   std::string strImPos = GetEntry(0x0020,0x0032);
+   std::string strImPos = GetEntryValue(0x0020,0x0032);
 
    if ( strImPos == GDCM_UNFOUND)
    {
       gdcmVerboseMacro( "Unfound Image Position Patient (0020,0032)");
-      strImPos = GetEntry(0x0020,0x0030); // For ACR-NEMA images
+      strImPos = GetEntryValue(0x0020,0x0030); // For ACR-NEMA images
       if ( strImPos == GDCM_UNFOUND )
       {
          gdcmVerboseMacro( "Unfound Image Position (RET) (0020,0030)");
@@ -667,7 +667,7 @@ float File::GetYOrigin()
 float File::GetZOrigin()
 {
    float xImPos, yImPos, zImPos; 
-   std::string strImPos = GetEntry(0x0020,0x0032);
+   std::string strImPos = GetEntryValue(0x0020,0x0032);
 
    if ( strImPos != GDCM_UNFOUND )
    {
@@ -682,7 +682,7 @@ float File::GetZOrigin()
       }
    }
 
-   strImPos = GetEntry(0x0020,0x0030); // For ACR-NEMA images
+   strImPos = GetEntryValue(0x0020,0x0030); // For ACR-NEMA images
    if ( strImPos != GDCM_UNFOUND )
    {
       if( sscanf( strImPos.c_str(), 
@@ -697,7 +697,7 @@ float File::GetZOrigin()
       }
    }
 
-   std::string strSliceLocation = GetEntry(0x0020,0x1041); // for *very* old ACR-NEMA images
+   std::string strSliceLocation = GetEntryValue(0x0020,0x1041); // for *very* old ACR-NEMA images
    if ( strSliceLocation != GDCM_UNFOUND )
    {
       if( sscanf( strSliceLocation.c_str(), "%f", &zImPos) != 1)
@@ -712,7 +712,7 @@ float File::GetZOrigin()
    }
    gdcmVerboseMacro( "Unfound Slice Location (0020,1041)");
 
-   std::string strLocation = GetEntry(0x0020,0x0050);
+   std::string strLocation = GetEntryValue(0x0020,0x0050);
    if ( strLocation != GDCM_UNFOUND )
    {
       if( sscanf( strLocation.c_str(), "%f", &zImPos) != 1)
@@ -743,7 +743,7 @@ int File::GetImageNumber()
    // faster function. sscanf() can do all possible conversions whereas
    // atoi() can only do single decimal integer conversions.
    //0020 0013 IS REL Image Number
-   std::string strImNumber = GetEntry(0x0020,0x0013);
+   std::string strImNumber = GetEntryValue(0x0020,0x0013);
    if ( strImNumber != GDCM_UNFOUND )
    {
       return atoi( strImNumber.c_str() );
@@ -758,7 +758,7 @@ int File::GetImageNumber()
 ModalityType File::GetModality()
 {
    // 0008 0060 CS ID Modality
-   std::string strModality = GetEntry(0x0008,0x0060);
+   std::string strModality = GetEntryValue(0x0008,0x0060);
    if ( strModality != GDCM_UNFOUND )
    {
            if ( strModality.find("AU") < strModality.length()) return AU;
@@ -821,7 +821,7 @@ ModalityType File::GetModality()
  */
 int File::GetBitsStored()
 {
-   std::string strSize = GetEntry( 0x0028, 0x0101 );
+   std::string strSize = GetEntryValue( 0x0028, 0x0101 );
    if ( strSize == GDCM_UNFOUND )
    {
       gdcmVerboseMacro("(0028,0101) is supposed to be mandatory");
@@ -839,7 +839,7 @@ int File::GetBitsStored()
  */
 int File::GetHighBitPosition()
 {
-   std::string strSize = GetEntry( 0x0028, 0x0102 );
+   std::string strSize = GetEntryValue( 0x0028, 0x0102 );
    if ( strSize == GDCM_UNFOUND )
    {
       gdcmVerboseMacro( "(0028,0102) is supposed to be mandatory");
@@ -856,7 +856,7 @@ int File::GetHighBitPosition()
  */
 bool File::IsSignedPixelData()
 {
-   std::string strSize = GetEntry( 0x0028, 0x0103 );
+   std::string strSize = GetEntryValue( 0x0028, 0x0103 );
    if ( strSize == GDCM_UNFOUND )
    {
       gdcmVerboseMacro( "(0028,0103) is supposed to be mandatory");
@@ -878,7 +878,7 @@ bool File::IsSignedPixelData()
  */
 int File::GetBitsAllocated()
 {
-   std::string strSize = GetEntry(0x0028,0x0100);
+   std::string strSize = GetEntryValue(0x0028,0x0100);
    if ( strSize == GDCM_UNFOUND )
    {
       gdcmVerboseMacro( "(0028,0100) is supposed to be mandatory");
@@ -896,7 +896,7 @@ int File::GetBitsAllocated()
  */
 int File::GetSamplesPerPixel()
 {
-   const std::string& strSize = GetEntry(0x0028,0x0002);
+   const std::string& strSize = GetEntryValue(0x0028,0x0002);
    if ( strSize == GDCM_UNFOUND )
    {
       gdcmVerboseMacro( "(0028,0002) is supposed to be mandatory");
@@ -913,7 +913,7 @@ int File::GetSamplesPerPixel()
  */
 bool File::IsMonochrome()
 {
-   const std::string& PhotometricInterp = GetEntry( 0x0028, 0x0004 );
+   const std::string& PhotometricInterp = GetEntryValue( 0x0028, 0x0004 );
    if (  Util::DicomStringEqual(PhotometricInterp, "MONOCHROME1")
       || Util::DicomStringEqual(PhotometricInterp, "MONOCHROME2") )
    {
@@ -933,7 +933,7 @@ bool File::IsMonochrome()
  */
 bool File::IsPaletteColor()
 {
-   std::string PhotometricInterp = GetEntry( 0x0028, 0x0004 );
+   std::string PhotometricInterp = GetEntryValue( 0x0028, 0x0004 );
    if (   PhotometricInterp == "PALETTE COLOR " )
    {
       return true;
@@ -952,7 +952,7 @@ bool File::IsPaletteColor()
  */
 bool File::IsYBRFull()
 {
-   std::string PhotometricInterp = GetEntry( 0x0028, 0x0004 );
+   std::string PhotometricInterp = GetEntryValue( 0x0028, 0x0004 );
    if (   PhotometricInterp == "YBR_FULL" )
    {
       return true;
@@ -971,7 +971,7 @@ bool File::IsYBRFull()
  */
 int File::GetPlanarConfiguration()
 {
-   std::string strSize = GetEntry(0x0028,0x0006);
+   std::string strSize = GetEntryValue(0x0028,0x0006);
    if ( strSize == GDCM_UNFOUND )
    {
       gdcmVerboseMacro( "Not found : Planar Configuration (0028,0006)");
@@ -989,7 +989,7 @@ int File::GetPixelSize()
 {
    // 0028 0100 US IMG Bits Allocated
    // (in order no to be messed up by old RGB images)
-   //   if (File::GetEntry(0x0028,0x0100) == "24")
+   //   if (File::GetEntryValue(0x0028,0x0100) == "24")
    //      return 3;
 
    std::string pixelType = GetPixelType();
@@ -1029,7 +1029,7 @@ int File::GetPixelSize()
  */
 std::string File::GetPixelType()
 {
-   std::string bitsAlloc = GetEntry(0x0028, 0x0100); // Bits Allocated
+   std::string bitsAlloc = GetEntryValue(0x0028, 0x0100); // Bits Allocated
    if ( bitsAlloc == GDCM_UNFOUND )
    {
       gdcmVerboseMacro( "Missing  Bits Allocated (0028,0100)");
@@ -1051,7 +1051,7 @@ std::string File::GetPixelType()
       bitsAlloc = "8";  // by old RGB images)
    }
 
-   std::string sign = GetEntry(0x0028, 0x0103);//"Pixel Representation"
+   std::string sign = GetEntryValue(0x0028, 0x0103);//"Pixel Representation"
 
    if (sign == GDCM_UNFOUND )
    {
@@ -1181,7 +1181,7 @@ int File::GetLUTNbits()
    //Just hope Lookup Table Desc-Red = Lookup Table Desc-Red
    //                                = Lookup Table Desc-Blue
    // Consistency already checked in GetLUTLength
-   std::string lutDescription = GetEntry(0x0028,0x1101);
+   std::string lutDescription = GetEntryValue(0x0028,0x1101);
    if ( lutDescription == GDCM_UNFOUND )
    {
       return 0;
@@ -1209,15 +1209,15 @@ int File::GetLUTNbits()
 bool File::AnonymizeFile()
 {
    // If exist, replace by spaces
-   SetEntry ("  ",0x0010, 0x2154); // Telephone   
-   SetEntry ("  ",0x0010, 0x1040); // Adress
-   SetEntry ("  ",0x0010, 0x0020); // Patient ID
+   SetEntryValue ("  ",0x0010, 0x2154); // Telephone   
+   SetEntryValue ("  ",0x0010, 0x1040); // Adress
+   SetEntryValue ("  ",0x0010, 0x0020); // Patient ID
 
    DocEntry* patientNameHE = GetDocEntry (0x0010, 0x0010);
   
    if ( patientNameHE ) // we replace it by Study Instance UID (why not)
    {
-      std::string studyInstanceUID =  GetEntry (0x0020, 0x000d);
+      std::string studyInstanceUID =  GetEntryValue (0x0020, 0x000d);
       if ( studyInstanceUID != GDCM_UNFOUND )
       {
          ReplaceOrCreate(studyInstanceUID, 0x0010, 0x0010);
@@ -1296,7 +1296,7 @@ void File::GetImageOrientationPatient( float iop[6] )
    iop[0] = iop[1] = iop[2] = iop[3] = iop[4] = iop[5] = 0.;
 
    // 0020 0037 DS REL Image Orientation (Patient)
-   if ( (strImOriPat = GetEntry(0x0020,0x0037)) != GDCM_UNFOUND )
+   if ( (strImOriPat = GetEntryValue(0x0020,0x0037)) != GDCM_UNFOUND )
    {
       if( sscanf( strImOriPat.c_str(), "%f\\%f\\%f\\%f\\%f\\%f", 
           &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 )
@@ -1306,7 +1306,7 @@ void File::GetImageOrientationPatient( float iop[6] )
    }
    //For ACR-NEMA
    // 0020 0035 DS REL Image Orientation (RET)
-   else if ( (strImOriPat = GetEntry(0x0020,0x0035)) != GDCM_UNFOUND )
+   else if ( (strImOriPat = GetEntryValue(0x0020,0x0035)) != GDCM_UNFOUND )
    {
       if( sscanf( strImOriPat.c_str(), "%f\\%f\\%f\\%f\\%f\\%f", 
           &iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 )
index 4c6595a3eaee3fa1b08a1ba2e8a3f75f303ac35e..30a191f796c1fbb83c707c24f7ba374abc991173 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:34 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/01/24 16:10:52 $
+  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
@@ -282,7 +282,7 @@ size_t FileHelper::GetImageDataIntoVector (void *destination, size_t maxSize)
  *          'image' Pixels are presented as C-like 2D arrays : line per line.
  *          'volume'Pixels are presented as C-like 3D arrays : plane per plane 
  * \warning Since the pixels are not copied, it is the caller's responsability
- *          not to deallocate it's data before gdcm uses them (e.g. with
+ *          not to deallocate its data before gdcm uses them (e.g. with
  *          the Write() method.
  * @param inData user supplied pixel area
  * @param expectedSize total image size, in Bytes
@@ -295,8 +295,8 @@ void FileHelper::SetImageData(uint8_t *inData, size_t expectedSize)
 }
 
 /**
- * \brief   Set the image datas defined by the user
- * \warning When writting the file, this datas are get as default datas to write
+ * \brief   Set the image data defined by the user
+ * \warning When writting the file, this data are get as default data to write
  */
 void FileHelper::SetUserData(uint8_t *data, size_t expectedSize)
 {
@@ -304,8 +304,8 @@ void FileHelper::SetUserData(uint8_t *data, size_t expectedSize)
 }
 
 /**
- * \brief   Get the image datas defined by the user
- * \warning When writting the file, this datas are get as default data to write
+ * \brief   Get the image data defined by the user
+ * \warning When writting the file, this data are get as default data to write
  */
 uint8_t *FileHelper::GetUserData()
 {
@@ -314,7 +314,7 @@ uint8_t *FileHelper::GetUserData()
 
 /**
  * \brief   Get the image data size defined by the user
- * \warning When writting the file, this datas are get as default data to write
+ * \warning When writting the file, this data are get as default data to write
  */
 size_t FileHelper::GetUserDataSize()
 {
@@ -322,7 +322,7 @@ size_t FileHelper::GetUserDataSize()
 }
 
 /**
- * \brief   Get the image datas from the file.
+ * \brief   Get the image data from the file.
  *          If a LUT is found, the data are expanded to be RGB
  */
 uint8_t *FileHelper::GetRGBData()
@@ -340,8 +340,8 @@ size_t FileHelper::GetRGBDataSize()
 }
 
 /**
- * \brief   Get the image datas from the file.
- *          If a LUT is found, the datas are not expanded !
+ * \brief   Get the image data from the file.
+ *          If a LUT is found, the data are not expanded !
  */
 uint8_t *FileHelper::GetRawData()
 {
@@ -530,10 +530,10 @@ bool FileHelper::Write(std::string const &fileName)
  * @param   group     group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool FileHelper::SetEntry(std::string const &content,
+bool FileHelper::SetEntryValue(std::string const &content,
                     uint16_t group, uint16_t elem)
 { 
-   return FileInternal->SetEntry(content,group,elem);
+   return FileInternal->SetEntryValue(content,group,elem);
 }
 
 
@@ -543,13 +543,13 @@ bool FileHelper::SetEntry(std::string const &content,
  *          the given value.
  * @param   content new value (void*  -> uint8_t*) to substitute with
  * @param   lgth new value length
- * @param   group     group number of the Dicom Element to modify
+ * @param   group  group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool FileHelper::SetEntry(uint8_t *content, int lgth,
+bool FileHelper::SetEntryBinArea(uint8_t *content, int lgth,
                     uint16_t group, uint16_t elem)
 {
-   return FileInternal->SetEntry(content,lgth,group,elem);
+   return FileInternal->SetEntryBinArea(content,lgth,group,elem);
 }
 
 /**
@@ -600,7 +600,7 @@ uint8_t* FileHelper::GetLutRGBA()
  * The tests made are :
  *  - verify the size of the image to write with the possible write
  *    when the user set an image data
- * @return true if the check successfulls
+ * @return true if check is successfull
  */
 bool FileHelper::CheckWriteIntegrity()
 {
index 1906e485c9be7985c9a21f1d58656a0738f59b67..5eae1d58c972d6699dbe64d5c7c99f45fd0f347b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFileHelper.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:34 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/01/24 16:10: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
@@ -66,14 +66,14 @@ public:
 
    void SetImageData(uint8_t *data, size_t expectedSize);
 
-   // User datas
+   // User data
    void SetUserData(uint8_t *data, size_t expectedSize);
    uint8_t* GetUserData();
    size_t GetUserDataSize();
-   // RBG datas (from file
+   // RBG data (from file
    uint8_t* GetRGBData();
    size_t GetRGBDataSize();
-   // RAW datas (from file
+   // RAW data (from file
    uint8_t* GetRawData();
    size_t GetRawDataSize();
 
@@ -86,9 +86,9 @@ public:
    bool WriteAcr      (std::string const &fileName);
    bool Write         (std::string const &fileName);
 
-   bool SetEntry(std::string const &content,
+   bool SetEntryValue(std::string const &content,
                  uint16_t group, uint16_t elem);
-   bool SetEntry(uint8_t *content, int lgth,
+   bool SetEntryBinArea(uint8_t *content, int lgth,
                  uint16_t group, uint16_t elem);
    bool ReplaceOrCreate(std::string const &content,
                         uint16_t group, uint16_t elem);
index 55241b812c62183918f22d5748eb3c1090943306..361f451aa1f1c208da259e29f59a5afe6feb4279 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmRLEFramesInfo.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/16 04:50:42 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/01/24 16:10: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
@@ -37,6 +37,7 @@ RLEFramesInfo::~RLEFramesInfo()
  */
 void RLEFramesInfo::Print( std::ostream &os, std::string indent )
 {
+   os << std::endl;
    os << indent
       << "----------------- RLE frames --------------------------------"
       << std::endl;
index 600ce145316b8d10577cb98e740abf94e2aee9ea..7ca6d20260f73dd09e72b3fce3ca809c2cc6585b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/24 14:14:11 $
-  Version:   $Revision: 1.56 $
+  Date:      $Date: 2005/01/24 16:10:53 $
+  Version:   $Revision: 1.57 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -96,6 +96,8 @@ void SQItem::Print(std::ostream &os, std::string const &)
 
 /*
  * \brief   canonical Writer
+ * @param fp     file pointer to an already open file. 
+ * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
  */
 void SQItem::WriteContent(std::ofstream *fp, FileType filetype)
 {
@@ -145,6 +147,7 @@ void SQItem::WriteContent(std::ofstream *fp, FileType filetype)
 // Public
 /**
  * \brief   adds any Entry (Dicom Element) to the Sequence Item
+ * @param entry Entry to add
  */
 bool SQItem::AddEntry(DocEntry *entry)
 {
@@ -161,12 +164,12 @@ bool SQItem::AddEntry(DocEntry *entry)
  * \warning we suppose, right now, the element belongs to a Public Group
  *          (NOT a shadow one)       
  * @param   val string value to set
- * @param   group Group number of the searched tag.
+ * @param   group  Group number of the searched tag.
  * @param   elem Element number of the searched tag.
  * @return  true if element was found or created successfully
  */
 
-bool SQItem::SetEntry(std::string const &val, uint16_t group, 
+bool SQItem::SetEntryValue(std::string const &val, uint16_t group, 
                       uint16_t elem)
 {
    for(ListDocEntry::iterator i = DocEntries.begin(); 
@@ -223,8 +226,6 @@ bool SQItem::SetEntry(std::string const &val, uint16_t group,
 /**
  * \brief   Clear the std::list from given entry AND delete the entry.
  * @param   entryToRemove Entry to remove AND delete.
- * \warning Some problems when using under Windows... prefer the use of
- *          Initialize / GetNext methods
  * @return true if the entry was found and removed; false otherwise
  */
 bool SQItem::RemoveEntry( DocEntry* entryToRemove)
@@ -270,7 +271,7 @@ bool SQItem::RemoveEntryNoDestroy(DocEntry* entryToRemove)
 }
                                                                                 
 /**
- * \brief   Get the first entry while visiting the SQItem
+ * \brief   Get the first Dicom entry while visiting the SQItem
  * \return  The first DocEntry if found, otherwhise 0
  */
 DocEntry * SQItem::GetFirstEntry()
@@ -282,7 +283,7 @@ DocEntry * SQItem::GetFirstEntry()
 }
                                                                                 
 /**
- * \brief   Get the next entry while visiting the chained list
+ * \brief   Get the next Dicom entry while visiting the chained list
  * \return  The next DocEntry if found, otherwhise NULL
  */
 DocEntry *SQItem::GetNextEntry()
@@ -300,7 +301,7 @@ DocEntry *SQItem::GetNextEntry()
 // Protected
 /**
  * \brief   Gets a Dicom Element inside a SQ Item Entry
- * @param   group   Group number of the Entry
+ * @param   group Group number of the Entry
  * @param   elem  Element number of the Entry
  * @return Entry whose (group,elem) was passed. 0 if not found
  */
@@ -319,7 +320,7 @@ DocEntry *SQItem::GetDocEntry(uint16_t group, uint16_t elem)
 
 /**
  * \brief   Gets a Dicom Element inside a SQ Item Entry
- * @param   group   Group number of the Entry
+ * @param   group Group number of the Entry
  * @param   elem  Element number of the Entry
  * @return Entry whose (group,elem) was passed. 0 if not found
  */
@@ -370,7 +371,7 @@ SeqEntry* SQItem::GetSeqEntry(uint16_t group, uint16_t elem)
  *           GDCM_UNFOUND if not found
  */ 
 
-std::string SQItem::GetEntry(uint16_t group, uint16_t elem)
+std::string SQItem::GetEntryValue(uint16_t group, uint16_t elem)
 {
 
 /*
index e7c230ac00f0d029061a3c019847d191d0662f16..ea09143edec01bc99ea30a4d3d8671fdae5f2118 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 11:39:49 $
-  Version:   $Revision: 1.34 $
+  Date:      $Date: 2005/01/24 16:10:53 $
+  Version:   $Revision: 1.35 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -60,10 +60,10 @@ public:
    BinEntry *GetBinEntry(uint16_t group, uint16_t elem); 
    SeqEntry *GetSeqEntry(uint16_t group, uint16_t elem); 
    
-   bool SetEntry(std::string const &val, uint16_t group, 
+   bool SetEntryValue(std::string const &val, uint16_t group, 
                                          uint16_t elem);
     
-   std::string GetEntry(uint16_t group, uint16_t elem);
+   std::string GetEntryValue(uint16_t group, uint16_t elem);
 
    /// \brief   returns the ordinal position of a given SQItem
    int GetSQItemNumber() { return SQItemNumber; };
index d5683fdf6ea9194fe6129a980b5acf23ac0f055d..78911b138de921deae81b062e55830db0d8a54f0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:34 $
-  Version:   $Revision: 1.49 $
+  Date:      $Date: 2005/01/24 16:10:53 $
+  Version:   $Revision: 1.50 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -125,6 +125,8 @@ void SeqEntry::Print( std::ostream &os, std::string const & )
 // Public
 /*
  * \brief   canonical Writer
+ * @param fp pointer to an already open file
+ * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
  */
 void SeqEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
index 2bee2ffae739369ed6c40e325887fe01fd377410..f5b5af890a73b23e3f2d66cfa14450faabec1443 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSerieHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:55 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2005/01/24 16:10:53 $
+  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
@@ -65,7 +65,7 @@ void SerieHeader::AddFileName(std::string const &filename)
    if( header->IsReadable() )
    {
       // 0020 000e UI REL Series Instance UID
-      std::string uid =  header->GetEntry (0x0020, 0x000e);
+      std::string uid =  header->GetEntryValue (0x0020, 0x000e);
       // if uid == GDCM_UNFOUND then consistenly we should find GDCM_UNFOUND
       // no need here to do anything special
       if( CurrentSerieUID == "" )
index 2c589539a2026cf74977910f46d389c32378933b..40a36a6d7479a6975ab2f7085fffe682cc26f290 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/23 10:12:34 $
-  Version:   $Revision: 1.49 $
+  Date:      $Date: 2005/01/24 16:10:53 $
+  Version:   $Revision: 1.50 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -78,7 +78,7 @@ void ValEntry::Print(std::ostream &os, std::string const &)
    os << "V ";
    DocEntry::Print(os); 
 
-   if (g == 0xfffe)
+   if (g == 0xfffe) // delimiters have NO value
    {
       // just to avoid identing all the remaining code     
       return;
@@ -224,7 +224,7 @@ void ValEntry::SetValue(std::string const &val)
 /**
  * \brief   Writes the std::string representable' value of a ValEntry
  * @param fp already open ofstream pointer
- * @param filetype type of the file to be written
+ * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
  */
 void ValEntry::WriteContent(std::ofstream *fp, FileType filetype)
 {
@@ -237,11 +237,9 @@ void ValEntry::WriteContent(std::ofstream *fp, FileType filetype)
 
    const VRKey &vr = GetVR();
    unsigned int lgr = GetLength();
-   //std::cout<<std::hex<<GetGroup()<<"|"<<GetElement()
-   //         <<std::dec<<" : "<<GetReadLength()<<" / "<<GetLength()<<"\n";
    if (vr == "US" || vr == "SS")
    {
-      // some 'Short integer' fields may be mulivaluated
+      // some 'Short integer' fields may be multivaluated
       // each single value is separated from the next one by '\'
       // we split the string and write each value as a short int
       std::vector<std::string> tokens;
@@ -258,7 +256,7 @@ void ValEntry::WriteContent(std::ofstream *fp, FileType filetype)
    if (vr == "UL" || vr == "SL")
    {
       // Some 'Integer' fields may be multivaluated (multiple instances 
-      // of integers). But each single integer value is separated from the
+      // of integer). But each single integer value is separated from the
       // next one by '\' (backslash character). Hence we split the string
       // along the '\' and write each value as an int:
       std::vector<std::string> tokens;