]> Creatis software - gdcm.git/commitdiff
* Fix some compilation warnings
authorregrain <regrain>
Thu, 20 Oct 2005 08:58:15 +0000 (08:58 +0000)
committerregrain <regrain>
Thu, 20 Oct 2005 08:58:15 +0000 (08:58 +0000)
   * Amelioration of Test's output
   -- BeNours

Testing/TestDataEntry.cxx
Testing/TestFileAccessors.cxx
Testing/TestWriteSimple.cxx
gdcmPython/gdcm.i
src/gdcmDicomDir.cxx
src/gdcmDicomEntry.cxx
src/gdcmDict.h
src/gdcmVR.cxx
src/gdcmVR.h

index b4013207e2917803edb2f15354652e9c383e9eb2..d57dd7324f08845b55c4da73c7f3b759c12793e7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestDataEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/19 15:43:58 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/10/20 08:58:15 $
+  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
@@ -53,7 +53,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != 1 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: 1" << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -66,7 +68,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != 2 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: 2" << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -79,7 +83,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: 0" << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -102,7 +108,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetLength() != strlen(data) + strlen(data)%2 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Size of string is incorrect" << std::endl;
+                << "   Size of string is incorrect" << std::endl
+                << "   Found: " << entry->GetLength() 
+                << " - Must be: " << strlen(data) + strlen(data)%2 << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -110,7 +118,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -126,7 +136,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),data,entry->GetLength()) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str()
+                << " - Must be: " << data << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -137,7 +149,8 @@ int TestDataEntry(int , char *[])
       {
          std::cout << "   Failed" << std::endl
                    << "   Content of entry's values is incorrect : id " << i << std::endl
-                   << "   Found " << entry->GetValue(i) << " - Must be " << svalue[i] << std::endl;
+                   << "   Found " << entry->GetValue(i)
+                   << " - Must be " << svalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
@@ -162,7 +175,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetLength() != nbvalue*sizeof(uint16_t) )
    {
       std::cout << "   Failed" << std::endl
-                << "   BinArea length is incorrect" << std::endl;
+                << "   BinArea length is incorrect" << std::endl
+                << "   Found: " << entry->GetLength()
+                << " - Must be: " << nbvalue*sizeof(uint16_t) << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -170,7 +185,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),data,strlen(data)) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str()
+                << " - Must be: " << data << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -178,7 +195,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount()
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -188,7 +207,9 @@ int TestDataEntry(int , char *[])
       if( entry->GetValue(i) != svalue[i] )
       {
          std::cout << "   Failed" << std::endl
-                   << "   Content of entry's values is incorrect : id " << i << std::endl;
+                   << "   Content of entry's values is incorrect : id " << i << std::endl
+                   << "   Found: " << entry->GetValue(i)
+                   << " - Must be: " << svalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
@@ -204,7 +225,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),data,strlen(data)) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str()
+                << " - Must be: " << data << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -212,7 +235,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -222,7 +247,9 @@ int TestDataEntry(int , char *[])
       if( entry->GetValue(i) != svalue[i] )
       {
          std::cout << "   Failed" << std::endl
-                   << "   Content of entry's values is incorrect : id " << i << std::endl;
+                   << "   Content of entry's values is incorrect : id " << i << std::endl
+                   << "   Found: " << entry->GetValue(i)
+                   << " - Must be: " << svalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
@@ -247,7 +274,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetLength() != nbvalue*sizeof(uint32_t) )
    {
       std::cout << "   Failed" << std::endl
-                << "   BinArea length is incorrect" << std::endl;
+                << "   BinArea length is incorrect" << std::endl
+                << "   Found: " << entry->GetLength()
+                << " - Must be: " << nbvalue*sizeof(uint32_t) << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -255,8 +284,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),data,strlen(data)) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
-      std::cout<<"#"<<entry->GetString()<<"#"<<" / "<<"#"<<data<<"#"<<std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str()
+                << " - Must be: " << data << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -264,7 +294,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -274,7 +306,9 @@ int TestDataEntry(int , char *[])
       if( entry->GetValue(i) != lvalue[i] )
       {
          std::cout << "   Failed" << std::endl
-                   << "   Content of entry's values is incorrect : id " << i << std::endl;
+                   << "   Content of entry's values is incorrect : id " << i << std::endl
+                   << "   Found: " << entry->GetValue(i)
+                   << " - Must be: " << lvalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
@@ -290,7 +324,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),data,strlen(data)) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str() 
+                << " - Must be: " << data << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -298,7 +334,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -308,7 +346,9 @@ int TestDataEntry(int , char *[])
       if( entry->GetValue(i) != lvalue[i] )
       {
          std::cout << "   Failed" << std::endl
-                   << "   Content of entry's values is incorrect : id " << i << std::endl;
+                   << "   Content of entry's values is incorrect : id " << i << std::endl
+                   << "   Found: " << entry->GetValue(i)
+                   << " - Must be: " << lvalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
@@ -333,7 +373,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetLength() != nbvalue*sizeof(float) )
    {
       std::cout << "   Failed" << std::endl
-                << "   BinArea length is incorrect" << std::endl;
+                << "   BinArea length is incorrect" << std::endl
+                << "   Found: " << entry->GetLength() 
+                << " - Must be: " << nbvalue*sizeof(float) << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -341,7 +383,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),fdata,strlen(fdata)) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str()
+                << " - Must be: " << fdata << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -349,7 +393,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -359,7 +405,9 @@ int TestDataEntry(int , char *[])
       if( entry->GetValue(i) != fvalue[i] )
       {
          std::cout << "   Failed" << std::endl
-                   << "   Content of entry's values is incorrect : id " << i << std::endl;
+                   << "   Content of entry's values is incorrect : id " << i << std::endl
+                   << "   Found: " << entry->GetValue(i)
+                   << " - Must be: " << fvalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
@@ -375,7 +423,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),fdata,strlen(fdata)) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str()
+                << " - Must be: " << fdata << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -383,7 +433,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -393,7 +445,9 @@ int TestDataEntry(int , char *[])
       if( entry->GetValue(i) != fvalue[i] )
       {
          std::cout << "   Failed" << std::endl
-                   << "   Content of entry's values is incorrect : id " << i << std::endl;
+                   << "   Content of entry's values is incorrect : id " << i << std::endl
+                   << "   Found: " << entry->GetValue(i)
+                   << " - Must be: " << fvalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
@@ -418,7 +472,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetLength() != nbvalue*sizeof(double) )
    {
       std::cout << "   Failed" << std::endl
-                << "   BinArea length is incorrect" << std::endl;
+                << "   BinArea length is incorrect" << std::endl
+                << "   Found: " << entry->GetLength()
+                << " - Must be: " << nbvalue*sizeof(double) << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -426,7 +482,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),fdata,strlen(fdata)) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str()
+                << " - Must be: " << fdata << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -434,7 +492,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -444,7 +504,9 @@ int TestDataEntry(int , char *[])
       if( entry->GetValue(i) != dvalue[i] )
       {
          std::cout << "   Failed" << std::endl
-                   << "   Content of entry's values is incorrect : id " << i << std::endl;
+                   << "   Content of entry's values is incorrect : id " << i << std::endl
+                   << "   Found: " << entry->GetValue(i)
+                   << " - Must be: " << dvalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
@@ -460,7 +522,9 @@ int TestDataEntry(int , char *[])
    if( memcmp(entry->GetString().c_str(),fdata,strlen(fdata)) != 0 )
    {
       std::cout << "   Failed" << std::endl
-                << "   Content of string is incorrect" << std::endl;
+                << "   Content of string is incorrect" << std::endl
+                << "   Found: " << entry->GetString().c_str()
+                << " - Must be: " << fdata << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -468,7 +532,9 @@ int TestDataEntry(int , char *[])
    if( entry->GetValueCount() != nbvalue )
    {
       std::cout << "   Failed" << std::endl
-                << "   Number of content values is incorrect" << std::endl;
+                << "   Number of content values is incorrect" << std::endl
+                << "   Found: " << entry->GetValueCount() 
+                << " - Must be: " << nbvalue << std::endl;
       delete dict;
       delete entry;
       return(1);
@@ -478,7 +544,9 @@ int TestDataEntry(int , char *[])
       if( entry->GetValue(i) != dvalue[i] )
       {
          std::cout << "   Failed" << std::endl
-                   << "   Content of entry's values is incorrect : id " << i << std::endl;
+                   << "   Content of entry's values is incorrect : id " << i << std::endl
+                   << "   Found: " << entry->GetValue(i)
+                   << " - Must be: " << dvalue[i] << std::endl;
          delete dict;
          delete entry;
          return(1);
index a6251ca5327d3c25ba3ac946ae66bee690be40ea..ff1ea02b56c25caff1782a85139d8b313976e619 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestFileAccessors.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/18 08:35:46 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2005/10/20 08:58:15 $
+  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
@@ -111,13 +111,13 @@ int TestFileAccessors(int, char *[])
       TestMethodMacro(std::dec,f,GetFileName)
 
       f->GetImageOrientationPatient( iop );
+      std::cout << "   Orientation:" << std::endl;
       for (int j=0; j<6; j++)
-         std::cout << "iop[" << j << "] = " << iop[j] << std::endl;
+         std::cout << "      iop[" << j << "] = " << iop[j] << std::endl;
 
       if( f->IsReadable() )
       {
-         std::cout <<filename   << " is Readable" 
-                   << std::endl << std::endl;
+         std::cout << "   " << filename << " is Readable" << std::endl;
 
          gdcm::FileHelper *fh= new gdcm::FileHelper( f );   
 
index 1b508c76feeab679c9b7155040a60d0129e45ad0..45a1769bba9a2e6a6fbdd619d5778dfc8481ac33 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/18 08:35:46 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2005/10/20 08:58:15 $
+  Version:   $Revision: 1.40 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -336,7 +336,7 @@ int WriteSimple(Image &img)
       std::cout << "        list of the first " << MAX_NUMBER_OF_DIFFERENCE
                   << " pixels differing (pos : test - ref) :" 
                   << std::endl;
-      int i;
+      unsigned int i;
       unsigned int j;
       for(i=0, j=0;i<dataSizeWritten && j<MAX_NUMBER_OF_DIFFERENCE;i++)
       {
index 84dede0205e73127e1f880904aee55fdc4432778..1849a9a01462b9e0e6dee3652ec3bf0f1d06c20d 100644 (file)
@@ -5,7 +5,10 @@
 
 #include "gdcmCommon.h"
 #include "gdcmBase.h"
+#include "gdcmTagKey.h"
+#include "gdcmVRKey.h"
 #include "gdcmDict.h"
+#include "gdcmDicomEntry.h"
 #include "gdcmDictEntry.h"
 #include "gdcmDictSet.h"
 #include "gdcmDicomDir.h"
@@ -201,6 +204,16 @@ typedef unsigned long long uint64_t;
 %ignore gdcm::binary_write(std::ostream &,uint32_t const &);
 %ignore gdcm::binary_write(std::ostream &,uint16_t const &);
 
+%ignore gdcm::VRKey::operator=(const VRKey &_val);
+%ignore gdcm::VRKey::operator=(const std::string &_val);
+%ignore gdcm::VRKey::operator=(const char *_val);
+%ignore gdcm::VRKey::operator[](const unsigned int &_id) const;
+%ignore gdcm::VRKey::operator[](const unsigned int &_id);
+
+%ignore gdcm::TagKey::operator=(const TagKey &_val);
+%ignore gdcm::TagKey::operator[](const unsigned int &_id) const;
+%ignore gdcm::TagKey::operator[](const unsigned int &_id);
+
 %ignore gdcm::DicomDir::SetStartMethod(DicomDir::Method *method,void *arg = NULL);
 %ignore gdcm::DicomDir::SetProgressMethod(DicomDir::Method *method,void *arg = NULL);
 %ignore gdcm::DicomDir::SetEndMethod(DicomDir::Method *method,void *arg = NULL);
@@ -229,6 +242,9 @@ typedef unsigned long long uint64_t;
 // Warning: Order matters !
 %include "gdcmCommon.h"
 %include "gdcmBase.h"
+%include "gdcmTagKey.h"
+%include "gdcmVRKey.h"
+%include "gdcmDicomEntry.h"
 %include "gdcmDictEntry.h"
 %include "gdcmDict.h"
 %include "gdcmDictSet.h"
index fd8158c7dff8a4d34f9a959541536e842316752f..775ab82be7a8365ee3fc135d6b3869d4cbbbff6c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/19 13:15:38 $
-  Version:   $Revision: 1.161 $
+  Date:      $Date: 2005/10/20 08:58:17 $
+  Version:   $Revision: 1.162 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -199,8 +199,7 @@ bool DicomDir::Load( )
  */
 bool DicomDir::Load(std::string const &fileName ) 
 {
-   // We should clean out anything that already exists.
-   Initialize();  // sets all private fields to NULL
+   SetFileName(fileName);
    return Load();
 }
 
index 785b941c9cb9767d6be8dd9e1cec6966d678e2f5..9a3923c34956db1585c01ddd09e4488df1176c89 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/19 13:17:05 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2005/10/20 08:58:17 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -83,10 +83,8 @@ TagKey DicomEntry::TranslateToKey(uint16_t group, uint16_t elem)
  */
 void DicomEntry::Print(std::ostream &os, std::string const & )
 {
-   std::ostringstream s;
-
-   s << GetKey(); 
-   s << " [" << VR  << "] ";
+   os << GetKey(); 
+   os << " [" << VR  << "] ";
 }
 
 //-----------------------------------------------------------------------------
index 316f7ccdea9867e8fe03e9f616a5a53cf847d5c3..06b78f3e655b56a03840421e0faef8469dcce59f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.h,v $
   Language:  C++
-  Date:      $Date: 2005/09/03 18:24:10 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2005/10/20 08:58:18 $
+  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
@@ -33,6 +33,7 @@ namespace gdcm
 //-----------------------------------------------------------------------------
 typedef std::string DictKey;
 typedef std::map<TagKey, DictEntry>  TagKeyHT;
+
 //-----------------------------------------------------------------------------
 /**
  * \brief    Dict acts a memory representation of a dicom dictionary i.e.
index 77bbf2313bea542f05c03e027f7fcb9587f2307e..617f374c3ba9d9324663e19ebe1aa5ff44be0b1b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmVR.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/18 08:35:51 $
-  Version:   $Revision: 1.41 $
+  Date:      $Date: 2005/10/20 08:58:18 $
+  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
@@ -144,22 +144,22 @@ bool VR::IsVROfStringRepresentable(VRKey const &tested)
 */
 }
 
-unsigned short VR::GetAtomicElementLength(VRKey const &vr)
+unsigned short VR::GetAtomicElementLength(VRKey const &tested)
 {
    // Unsigned & signed short
-   if( vr == "US" || vr == "SS" )
+   if( tested == "US" || tested == "SS" )
       return 2;
    // Unsigned & signed long
-   if( vr == "UL" || vr == "SL" )
+   if( tested == "UL" || tested == "SL" )
       return 4;
    // Float
-   if( vr == "FL" )
+   if( tested == "FL" )
       return 4;
    // Double
-   if( vr == "FD" )
+   if( tested == "FD" )
       return 8;
    // Word string
-   if( vr == "OW" )
+   if( tested == "OW" )
       return 2;
    return 1;
 }
index f3fca668413ae4f1569a2f28dea52421791ed4de..c7c466d49dd068b9c3a6b82d153d1be92bd102e6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmVR.h,v $
   Language:  C++
-  Date:      $Date: 2005/10/18 12:58:29 $
-  Version:   $Revision: 1.21 $
+  Date:      $Date: 2005/10/20 08:58:18 $
+  Version:   $Revision: 1.22 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -59,7 +59,7 @@ public:
 
    bool IsValidVR(VRKey const &key) { return vr.find(key) != vr.end(); }
 
-   unsigned short GetAtomicElementLength(VRKey const &vr);
+   unsigned short GetAtomicElementLength(VRKey const &tested);
 
 private:
    VRHT vr;