]> Creatis software - gdcm.git/commitdiff
2005-01-11 Jean-Pierre Roux <jpr@creatis.univ-lyon1.fr>
authorjpr <jpr>
Tue, 11 Jan 2005 11:37:12 +0000 (11:37 +0000)
committerjpr <jpr>
Tue, 11 Jan 2005 11:37:12 +0000 (11:37 +0000)
   * Replace confusing name SwitchSwapToBigEndian name by SwitchByteSwapCode
   * Add the Document::HandleOutOfGroup0002(uint16_t group) method
    to swap the Swap Code, at parsing time, when we come out of group 0002
 and Transfer Syntax is Big Endian
 We should be able to read now 'true DICOM' Big Endian coded images
 * Add optional run time SetDebugOn (last param) for PrintHeader, PrintFile
 * Replace the french 'Transfert Syntax' by the english 'Transfer Syntax'

14 files changed:
ChangeLog
Dicts/dicomTS.dic
Example/PrintDicomDir.cxx
Example/PrintFile.cxx
Example/PrintHeader.cxx
Example/TestWrite.cxx
Example/Write.cxx
src/gdcmDocument.cxx
src/gdcmDocument.h
src/gdcmFile.cxx
src/gdcmGlobal.cxx
src/gdcmHeader.cxx
src/gdcmHeader.h
src/gdcmTS.h

index c92d2b5a5f0ec4acdc0d8d368a67a87d72451856..5b240ed012c292b4c5127f9cdf45901f86d5a744 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,23 @@
+2005-01-11 Jean-Pierre Roux <jpr@creatis.univ-lyon1.fr>
+   * Replace confusing name SwitchSwapToBigEndian name by SwitchByteSwapCode
+   * Add the Document::HandleOutOfGroup0002(uint16_t group) method
+           to swap the Swap Code, at parsing time, when we come out of group 0002
+                and Transfer Syntax is Big Endian
+                We should be able to read now 'true DICOM" Big Endian coded images
+        * Add optional run time SetDebugOn (last param) for PrintHeader, PrintFile
+        * Replace the french 'Transfert Syntax' by the english 'Transfer Syntax'
+
 2005-01-10 Mathieu Malaterre  <Mathieu.Malaterre@creatis.insa-lyon.fr>
    * Hopefully fix the bug on MacOSX and static global initialization. 
    This is the only -minor- patch I found that both please MacOSX and VS6. 
    Other patch would be to declare a const std::string & GDCM_UNFOUND() instead, 
-   but this would require a lot of change. Another approach wqould be that Global 
+   but this would require a lot of change. Another approach would be that Global 
    create those string and GDCM_UNFOUND becomes a pointer to a string (which 
    gdcm::Global would destroy at exit).
 
 2005-01-08 Mathieu Malaterre  <Mathieu.Malaterre@creatis.insa-lyon.fr>
-   * Fix bug on MacOSX with static initialization in a multui threaded
-        environement. static const string in a header file used to be ill
+   * Fix bug on MacOSX with static initialization in a multy threaded
+        environment. static const string in a header file used to be ill
         initialized provoquing the freeze of any tests. patch should solve this
         issue.
 
   images, without the need of the Cornwell lib, but we do read them properly now
   * To reduce code (well to avoid code duplication), I defined a common place
   for jpeg read/write: gdcmJpeg.cxx. Now gdcmJpeg[8,12 16] include this file and
-  redefine symbols. This is not prefect but this the best solution I found for a
+  redefine symbols. This is not perfect but this the best solution I found for a
   compilation time jpeg option.
 
 2004-10-13 Mathieu Malaterre  <Mathieu.Malaterre@creatis.insa-lyon.fr>
index 3f94b06741fe7cfb4d75c78fc8b54284bf6b1b19..eeba7029d0970e16cd1e8c7e8c0af2aad2c54226 100644 (file)
@@ -26,6 +26,7 @@
 1.2.840.10008.1.2.4.91   JPEG 2000 Image Compression
 1.2.840.10008.1.2.4.100  MPEG2 Main Profile @ Main Level
 1.2.840.10008.1.2.5      RLE Lossless
+1.2.840.113619.5.2       Implicit VR - Big Endian (G.E Private)
 
 1.2.840.10008.1.3.10              Media Storage Directory Storage
 1.2.840.10008.1.4.1.1             Talairach Brain Atlas Frame of Reference
index b8c948df29dc5fc070fd1e39d452d4931c51addc..58000a16bedb76a306216177375aeb200da4289b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/11 11:37:12 $
+  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
@@ -23,6 +23,7 @@
 #include "gdcmDicomDirSerie.h"
 #include "gdcmDicomDirImage.h"
 #include "gdcmTS.h"
+#include "gdcmDebug.h"
 
 #include <fstream>
 #include <iostream>
@@ -45,6 +46,9 @@ int main(int argc, char* argv[])
       file += "/DICOMDIR";
    }
 
+   if (argc > 3)
+      gdcm::Debug::SetDebugOn();
+
    e1 = new gdcm::DicomDir( file );
 
    if (argc > 2) {
index f36257e61659071e1bc3b8701af45daf903f936b..45bc35f33b2211077bcfeca1fb4786b79adadb0f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2005/01/11 11:37:13 $
+  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
@@ -16,6 +16,7 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
+#include "gdcmDebug.h"
 #include "gdcmFile.h"
 
 #include <iostream>
@@ -39,12 +40,18 @@ int main(int argc, char* argv[])
       fileName += GDCM_DATA_ROOT;
       fileName += "/test.acr";
    }
+
+   if (argc > 3)
+      gdcm::Debug::SetDebugOn();
    
    e1= new gdcm::Header( fileName.c_str() );
    f1 = new gdcm::File(e1);
 
-   f1->SetPrintLevel(2);
-   f1->Print();
+   if (argc > 2) 
+   {
+      int level = atoi(argv[2]);   
+      e1->SetPrintLevel(level);
+   }
 
    std::cout << "\n\n" << std::endl; 
 
@@ -79,13 +86,13 @@ int main(int argc, char* argv[])
   
    if ( e1->GetEntry(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) 
    {
-      std::cout << "Transfert Syntax not loaded. " << std::endl
+      std::cout << "Transfer Syntax not loaded. " << std::endl
                 << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE"
                 << std::endl;
       return 0;
    }
   
-   std::string transferSyntaxName = e1->GetTransfertSyntaxName();
+   std::string transferSyntaxName = e1->GetTransferSyntaxName();
    std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" << std::endl;
    
    if(e1->IsReadable())
index 74305de60f4419165ed248f68bc09498e0043fd6..8392540abbcb84af3815073264aa97d5c7cfe536 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: PrintHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/01/11 11:37:13 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -16,6 +16,8 @@
                                                                                 
 =========================================================================*/
 #include "gdcmHeader.h"
+#include "gdcmDebug.h"
+
 #include <iostream>
 
 int main(int argc, char* argv[])
@@ -24,7 +26,7 @@ int main(int argc, char* argv[])
 
    if (argc == 1)
    {
-      std::cout << argv[0] << " fileName" << std::endl;
+      std::cout << argv[0] << " fileName printLevel" << std::endl;
    }
 
    if (argc > 1)
@@ -37,6 +39,9 @@ int main(int argc, char* argv[])
       fileName += "/test.acr";
    }
 
+   if (argc > 3)
+      gdcm::Debug::SetDebugOn();
+
    gdcm::Header *e1 = new gdcm::Header( fileName.c_str() );  
 
    if (argc > 2) 
@@ -51,13 +56,13 @@ int main(int argc, char* argv[])
 
    if ( e1->GetEntry(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) 
    {
-      std::cout << "Transfert Syntax not loaded. " << std::endl
+      std::cout << "Transfer Syntax not loaded. " << std::endl
                 << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE"
                 << std::endl;
       return 0;
    }
 
-   std::string transferSyntaxName = e1->GetTransfertSyntaxName();
+   std::string transferSyntaxName = e1->GetTransferSyntaxName();
    std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" << std::endl;
 
    if(e1->IsReadable())
index 38c25b71c37868b3a68d0947982b4ff0aa76d51c..9243880c49dd772084faa7ccfde89627f758658e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWrite.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/01/11 11:37:13 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
 
    int numberOfScalarComponents=e1->GetNumberOfScalarComponents();
    std::cout << "NumberOfScalarComponents " << numberOfScalarComponents <<std::endl;
-   transferSyntaxName = e1->GetTransfertSyntaxName();
+   transferSyntaxName = e1->GetTransferSyntaxName();
    std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" << std::endl;
    
 /*   if (  transferSyntaxName != "Implicit VR - Little Endian"
index 3756a2c2be7b149f95f8433e10fd2157b1d21e67..0d1d32bc06a0591d3a21d0abff51a6d72de406ea 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: Write.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:57 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/01/11 11:37:13 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -94,7 +94,7 @@ int main(int argc, char* argv[])
 
    int numberOfScalarComponents=e1->GetNumberOfScalarComponents();
    std::cout << "NumberOfScalarComponents " << numberOfScalarComponents <<std::endl;
-   transferSyntaxName = e1->GetTransfertSyntaxName();
+   transferSyntaxName = e1->GetTransferSyntaxName();
    std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" << std::endl;
    
 /*   if (  transferSyntaxName != "Implicit VR - Little Endian"
index 8937fa3ea97638ab36e1d647d066bc983c8867fd..2bb417caf6d661b48c81fee68038ecf4138f3326 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 00:21:48 $
-  Version:   $Revision: 1.172 $
+  Date:      $Date: 2005/01/11 11:37:13 $
+  Version:   $Revision: 1.173 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -106,8 +106,10 @@ Document::Document( std::string const &filename ) : ElementSet(-1)
       return;
    }
 
+   Group0002Parsed = false;
+
    gdcmVerboseMacro( "Starting parsing of file: " << Filename.c_str());
-   Fp->seekg( 0,  std::ios::beg);
+  // Fp->seekg( 0,  std::ios::beg);
    
    Fp->seekg(0,  std::ios::end);
    long lgt = Fp->tellg();
@@ -195,6 +197,7 @@ Document::Document() : ElementSet(-1)
    Initialise();
    SwapCode = 0;
    Filetype = ExplicitVR;
+   Group0002Parsed = false;
 }
 
 /**
@@ -391,7 +394,7 @@ bool Document::IsEncapsulate()
  */
 bool Document::IsDicomV3()
 {
-   // Checking if Transfert Syntax exists is enough
+   // Checking if Transfer Syntax exists is enough
    // Anyway, it's to late check if the 'Preamble' was found ...
    // And ... would it be a rich idea to check ?
    // (some 'no Preamble' DICOM images exist !)
@@ -415,6 +418,8 @@ FileType Document::GetFileType()
  */
 std::ifstream *Document::OpenFile()
 {
+
+   HasDCMPreamble = false;
    if (Filename.length() == 0) 
    {
       return 0;
@@ -422,7 +427,7 @@ std::ifstream *Document::OpenFile()
 
    if(Fp)
    {
-      gdcmVerboseMacro( "Is already opened when opening: " << Filename.c_str());
+      gdcmVerboseMacro( "File already open: " << Filename.c_str());
    }
 
    Fp = new std::ifstream(Filename.c_str(), std::ios::in | std::ios::binary);
@@ -466,6 +471,7 @@ std::ifstream *Document::OpenFile()
    }
    if( memcmp(dicm, "DICM", 4) == 0 )
    {
+      HasDCMPreamble = true;
       return Fp;
    }
  
@@ -1671,7 +1677,7 @@ void Document::FindDocEntryLength( DocEntry *entry )
             return;
          }
          length16 = 4;
-         SwitchSwapToBigEndian();
+         SwitchByteSwapCode();
 
          // Restore the unproperly loaded values i.e. the group, the element
          // and the dictionary entry depending on them.
@@ -2222,7 +2228,7 @@ bool Document::CheckSwap()
      
       // FIXME : FIXME:
       // Sometimes (see : gdcmData/icone.dcm) group 0x0002 *is* Explicit VR,
-      // but elem 0002,0010 (Transfert Syntax) tells us the file is
+      // but elem 0002,0010 (Transfer Syntax) tells us the file is
       // *Implicit* VR.  -and it is !- 
       
       if( memcmp(entCur, "UL", (size_t)2) == 0 ||
@@ -2355,12 +2361,11 @@ bool Document::CheckSwap()
 
 
 /**
- * \brief Restore the unproperly loaded values i.e. the group, the element
- *        and the dictionary entry depending on them. 
+ * \brief Change the Byte Swap code. 
  */
-void Document::SwitchSwapToBigEndian() 
+void Document::SwitchByteSwapCode() 
 {
-   gdcmVerboseMacro( "Switching to BigEndian mode.");
+   gdcmVerboseMacro( "Switching Byte Swap code.");
    if ( SwapCode == 0    ) 
    {
       SwapCode = 4321;
@@ -2435,7 +2440,7 @@ void Document::HandleBrokenEndian(uint16_t group, uint16_t elem)
    {
      // start endian swap mark for group found
      reversedEndian++;
-     SwitchSwapToBigEndian();
+     SwitchByteSwapCode();
      // fix the tag
      group = 0xfffe;
      elem = 0xe000;
@@ -2444,14 +2449,47 @@ void Document::HandleBrokenEndian(uint16_t group, uint16_t elem)
    {
      // end of reversed endian group
      reversedEndian--;
-     SwitchSwapToBigEndian();
+     SwitchByteSwapCode();
+   }
+}
+
+/**
+ * \brief   Group 0002 is always coded Little Endian
+ *          whatever Transfer Syntax is
+ * @return  no return
+ */
+void Document::HandleOutOfGroup0002(uint16_t group)
+{
+   // Endian reversion. Some files contain groups of tags with reversed endianess.
+   if ( !Group0002Parsed && group != 0x0002)
+   {
+      Group0002Parsed = true;
+     // we just came out of group 0002
+     // if Transfer syntax is Big Endian we have to change CheckSwap
+
+      TagKey key = DictEntry::TranslateToKey(0x0002, 0x0010);
+      if ( !TagHT.count(key))
+      {
+         gdcmVerboseMacro("True DICOM File, with NO Tansfer Syntax ?!?");
+         return;
+      }
+
+   // FIXME Strangely, this works with 
+   //'Implicit VR Transfer Syntax (GE Private)
+
+       if ( ((ValEntry *)TagHT.find(key)->second)->GetValue()
+               == "Explicit VR - Big Endian" )
+       {
+          gdcmVerboseMacro("Tansfer Syntax = Explicit VR - Big Endian");
+          SwitchByteSwapCode();
+        }
    }
 }
 
 /**
  * \brief   Read the next tag but WITHOUT loading it's value
  *          (read the 'Group Number', the 'Element Number',
- *           gets the Dict Entry
+ *          gets the Dict Entry
  *          gets the VR, gets the length, gets the offset value)
  * @return  On succes the newly created DocEntry, NULL on failure.      
  */
@@ -2473,7 +2511,13 @@ DocEntry *Document::ReadNextDocEntry()
       return 0;
    }
 
+   // Sometimes file contains groups of tags with reversed endianess.
    HandleBrokenEndian(group, elem);
+
+// In 'true DICOM' files Group 0002 is allways little endian
+   if ( HasDCMPreamble )
+      HandleOutOfGroup0002(group);
    std::string vr = FindDocEntryVR();
    std::string realVR = vr;
 
@@ -2583,7 +2627,10 @@ bool Document::ReadTag(uint16_t testGroup, uint16_t testElement)
        << "   but instead we encountered tag ("
        << std::hex << itemTagGroup << "," << itemTagElement << ")"
        << std::dec
-       << "  at address: " << (unsigned int)currentPosition );
+       << "  at address: " << (unsigned int)currentPosition 
+       << std::hex 
+       << "  0x(" << (unsigned int)currentPosition  << ")" 
+       ) ;
       Fp->seekg(positionOnEntry, std::ios::beg);
 
       return false;
index dbef76f490e6c35e4e4b3884438d17dffdab5c2f..d237d0d24c1047311c73236750662cb2eb4226e5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/08 15:03:59 $
-  Version:   $Revision: 1.78 $
+  Date:      $Date: 2005/01/11 11:37:13 $
+  Version:   $Revision: 1.79 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -174,6 +174,12 @@ protected:
    /// what is written on disc.
    int SwapCode;
 
+   ///\brief whether we already parsed group 0002
+   bool Group0002Parsed;
+
+   ///\brief whether file has a DCM Preamble
+   bool HasDCMPreamble;
+
    /// File Pointer, opened during Header parsing.
    std::ifstream *Fp;
 
@@ -230,7 +236,7 @@ private:
 
    void Initialise();
    bool CheckSwap();
-   void SwitchSwapToBigEndian();
+   void SwitchByteSwapCode();
    void SetMaxSizeLoadEntry(long);
    void SetMaxSizePrintEntry(long);
 
@@ -242,6 +248,7 @@ private:
                                    DocEntrySet* set );
 
    void HandleBrokenEndian(uint16_t  group, uint16_t  elem);
+   void HandleOutOfGroup0002(uint16_t group);
 
 // Variables
    /// Public dictionary used to parse this header
index d83dd3f50e4c3aed3f35fcaced7d045fae811ea9..c6638963c2eb66e21c57280699165230af740886 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 00:21:48 $
-  Version:   $Revision: 1.188 $
+  Date:      $Date: 2005/01/11 11:37:13 $
+  Version:   $Revision: 1.189 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -528,12 +528,12 @@ bool File::Write(std::string const &fileName)
  *          the given value.
  * @param   content new value (string) to substitute with
  * @param   group     group number of the Dicom Element to modify
- * @param   element element number of the Dicom Element to modify
+ * @param   elem element number of the Dicom Element to modify
  */
 bool File::SetEntry(std::string const &content,
-                    uint16_t group, uint16_t element)
+                    uint16_t group, uint16_t elem)
 { 
-   return HeaderInternal->SetEntry(content,group,element);
+   return HeaderInternal->SetEntry(content,group,elem);
 }
 
 
@@ -544,12 +544,12 @@ bool File::SetEntry(std::string const &content,
  * @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   element element number of the Dicom Element to modify
+ * @param   elem element number of the Dicom Element to modify
  */
 bool File::SetEntry(uint8_t *content, int lgth,
-                    uint16_t group, uint16_t element)
+                    uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->SetEntry(content,lgth,group,element);
+   return HeaderInternal->SetEntry(content,lgth,group,elem);
 }
 
 /**
@@ -557,14 +557,14 @@ bool File::SetEntry(uint8_t *content, int lgth,
  *          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   element  Element number of the Entry
+ * @param   elem  Element number of the Entry
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */ 
 bool File::ReplaceOrCreate(std::string const &content,
-                           uint16_t group, uint16_t element)
+                           uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->ReplaceOrCreate(content,group,element) != NULL;
+   return HeaderInternal->ReplaceOrCreate(content,group,elem) != NULL;
 }
 
 /*
@@ -573,14 +573,14 @@ bool File::ReplaceOrCreate(std::string const &content,
  *          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   element  Element number of the Entry
+ * @param   elem  Element number of the Entry
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */
 bool File::ReplaceOrCreate(uint8_t *binArea, int lgth,
-                           uint16_t group, uint16_t element)
+                           uint16_t group, uint16_t elem)
 {
-   return HeaderInternal->ReplaceOrCreate(binArea,lgth,group,element) != NULL;
+   return HeaderInternal->ReplaceOrCreate(binArea,lgth,group,elem) != NULL;
 }
 
 /**
@@ -852,9 +852,9 @@ void File::RestoreWriteOfLibido()
    Archive->Restore(0x0008,0x0010);
 }
 
-ValEntry *File::CopyValEntry(uint16_t group,uint16_t element)
+ValEntry *File::CopyValEntry(uint16_t group,uint16_t elem)
 {
-   DocEntry *oldE = HeaderInternal->GetDocEntry(group, element);
+   DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
    ValEntry *newE;
 
    if(oldE)
@@ -864,15 +864,15 @@ ValEntry *File::CopyValEntry(uint16_t group,uint16_t element)
    }
    else
    {
-      newE = GetHeader()->NewValEntry(group,element);
+      newE = GetHeader()->NewValEntry(group,elem);
    }
 
    return newE;
 }
 
-BinEntry *File::CopyBinEntry(uint16_t group,uint16_t element)
+BinEntry *File::CopyBinEntry(uint16_t group,uint16_t elem)
 {
-   DocEntry *oldE = HeaderInternal->GetDocEntry(group, element);
+   DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
    BinEntry *newE;
 
    if(oldE)
@@ -882,7 +882,7 @@ BinEntry *File::CopyBinEntry(uint16_t group,uint16_t element)
    }
    else
    {
-      newE = GetHeader()->NewBinEntry(group,element);
+      newE = GetHeader()->NewBinEntry(group,elem);
    }
 
    return newE;
index 6231e2a29b0a74a4ce502f6aeeccc579c35dad69..4120c2a60b996730a2a5a321e69b4d732c517e36 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmGlobal.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/10 20:52:39 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2005/01/11 11:37:14 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -108,7 +108,7 @@ VR *Global::GetVR()
 }
 /**
  * \ingroup Global
- * \brief   returns a pointer to the 'Transfert Syntax Table' 
+ * \brief   returns a pointer to the 'Transfer Syntax Table' 
  */
 TS *Global::GetTS()
 {
index 9eadf2c706b8eb4e8710de6255e92516a1f0a4c8..c560a82a9407b2b913d508788a0136c6512c369e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/10 17:09:49 $
-  Version:   $Revision: 1.228 $
+  Date:      $Date: 2005/01/11 11:37:14 $
+  Version:   $Revision: 1.229 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1164,34 +1164,34 @@ int Header::GetLUTNbits()
 }
 
 /**
- * \brief Accesses the info from 0002,0010 : Transfert Syntax and TS
+ * \brief Accesses the info from 0002,0010 : Transfer Syntax and TS
  *        else 1.
- * @return The full Transfert Syntax Name (as opposed to Transfert Syntax UID)
+ * @return The full Transfer Syntax Name (as opposed to Transfer Syntax UID)
  */
-std::string Header::GetTransfertSyntaxName()
+std::string Header::GetTransferSyntaxName()
 {
-   // use the TS (TS : Transfert Syntax)
-   std::string transfertSyntax = GetEntry(0x0002,0x0010);
+   // use the TS (TS : Transfer Syntax)
+   std::string transferSyntax = GetEntry(0x0002,0x0010);
 
-   if ( transfertSyntax == GDCM_NOTLOADED )
+   if ( transferSyntax == GDCM_NOTLOADED )
    {
-      gdcmVerboseMacro( "Transfert Syntax not loaded. " << std::endl
+      gdcmVerboseMacro( "Transfer Syntax not loaded. " << std::endl
                << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE" );
       return "Uncompressed ACR-NEMA";
    }
-   if ( transfertSyntax == GDCM_UNFOUND )
+   if ( transferSyntax == GDCM_UNFOUND )
    {
-      gdcmVerboseMacro( "Unfound Transfert Syntax (0002,0010)");
+      gdcmVerboseMacro( "Unfound Transfer Syntax (0002,0010)");
       return "Uncompressed ACR-NEMA";
    }
 
-   while ( ! isdigit((unsigned char)transfertSyntax[transfertSyntax.length()-1]) )
+   while ( ! isdigit((unsigned char)transferSyntax[transferSyntax.length()-1]) )
    {
-      transfertSyntax.erase(transfertSyntax.length()-1, 1);
+      transferSyntax.erase(transferSyntax.length()-1, 1);
    }
    // we do it only when we need it
    TS* ts         = Global::GetTS();
-   std::string tsName = ts->GetValue( transfertSyntax );
+   std::string tsName = ts->GetValue( transferSyntax );
 
    //delete ts; /// \todo Seg Fault when deleted ?!
    return tsName;
index 8c56bdd042384a8229ab3c85044aadb161288eea..d7669250fb59ae0b782031c361de2ee4aa81448b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:28 $
-  Version:   $Revision: 1.97 $
+  Date:      $Date: 2005/01/11 11:37:14 $
+  Version:   $Revision: 1.98 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -160,7 +160,7 @@ public:
    int    GetLUTNbits();
 
    /// Return the Transfer Syntax as a string
-   std::string GetTransfertSyntaxName();
+   std::string GetTransferSyntaxName();
 
    /// Accessor to \ref Header::GrPixel
    uint16_t GetGrPixel()  { return GrPixel; }
index a4e82fe418f561dd85a1f59c1fbe6e481c54e8f1..7d222a573565acca6415c55853eb7497155ebcf5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmTS.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/11 00:37:42 $
-  Version:   $Revision: 1.14 $
+  Date:      $Date: 2005/01/11 11:37:14 $
+  Version:   $Revision: 1.15 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -30,11 +30,11 @@ namespace gdcm
 //-----------------------------------------------------------------------------
 typedef std::string TSKey;
 typedef std::string TSAtr;
-typedef std::map<TSKey, TSAtr> TSHT;    // Transfert Syntax Hash Table
+typedef std::map<TSKey, TSAtr> TSHT;    // Transfer Syntax Hash Table
 
 //-----------------------------------------------------------------------------
 /*
- * Container for dicom Transfert Syntax Hash Table
+ * Container for dicom Transfer Syntax Hash Table
  * \note   This is a singleton
  */
 class GDCM_EXPORT TS