]> Creatis software - gdcm.git/commitdiff
FIX : comparison between GDCM_NOTLOADED and Transfer Syntax
authorjpr <jpr>
Wed, 12 Jan 2005 17:10:15 +0000 (17:10 +0000)
committerjpr <jpr>
Wed, 12 Jan 2005 17:10:15 +0000 (17:10 +0000)
      (related pb not yet solved)

src/gdcmDocument.cxx
src/gdcmValEntry.cxx

index c2c6da575100fd1e1b70183a08e6dd1c59923e9c..60b3e5a98b389d1c7ed8bebbe6046bfd11eb3171 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/12 15:22:23 $
-  Version:   $Revision: 1.183 $
+  Date:      $Date: 2005/01/12 17:10:15 $
+  Version:   $Revision: 1.184 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -2131,7 +2131,7 @@ bool Document::CheckSwap()
       gdcmVerboseMacro( "Looks like DICOM Version3 (preamble + DCM)" );
       
       // Group 0002 should always be VR, and the first element 0000
-      // Let's be carefull (so many wrong hedaers ...)
+      // Let's be carefull (so many wrong headers ...)
       // and determine the value representation (VR) : 
       // Let's skip to the first element (0002,0000) and check there if we find
       // "UL"  - or "OB" if the 1st one is (0002,0001) -,
@@ -2147,7 +2147,7 @@ bool Document::CheckSwap()
       entCur = deb + 136;
      
       // group 0x0002 *is always* Explicit VR Sometimes ,
-      // even elem 0002,0010 (Transfer Syntax) tells us the file is
+      // even if elem 0002,0010 (Transfer Syntax) tells us the file is
       // *Implicit* VR  (see former 'gdcmData/icone.dcm')
       
       if( memcmp(entCur, "UL", (size_t)2) == 0 ||
@@ -2377,7 +2377,7 @@ std::string Document::GetTransferSyntaxName()
    // use the TS (TS : Transfer Syntax)
    std::string transferSyntax = GetEntry(0x0002,0x0010);
 
-   if ( transferSyntax == GDCM_NOTLOADED )
+   if ( (transferSyntax.find(GDCM_NOTLOADED) < transferSyntax.length()) )
    {
       gdcmErrorMacro( "Transfer Syntax not loaded. " << std::endl
                << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE" );
index 7b2543a7accdf9110b2f9ff7e48839fdaeab2761..0ffc80910084d99d343c6216c4564c289c400f96 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmValEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/07 22:19:48 $
-  Version:   $Revision: 1.44 $
+  Date:      $Date: 2005/01/12 17:10:15 $
+  Version:   $Revision: 1.45 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -92,7 +92,6 @@ void ValEntry::Print(std::ostream &os)
    v  = GetValue();  // not applicable for SQ ...     
    d2 = Util::CreateCleanString(v);  // replace non printable characters by '.'            
    if( (GetLength()<=MAX_SIZE_PRINT_ELEMENT_VALUE) || 
-       //(PrintLevel>=3)  || (d2.find("gdcm::NotLoaded.") < d2.length()) )
        (PrintLevel>=3)  || (d2.find(GDCM_NOTLOADED) < d2.length()) )
    {
       s << " [" << d2 << "]";