]> Creatis software - gdcm.git/commitdiff
gdcmParser : allows "DICM" files, with NO group '0002'
authorjpr <jpr>
Tue, 3 Feb 2004 15:09:35 +0000 (15:09 +0000)
committerjpr <jpr>
Tue, 3 Feb 2004 15:09:35 +0000 (15:09 +0000)
src/gdcmParser.cxx

index 4570e8226cc24c665ca4b0744061f3c962c0e571..22a77c21648c8c535dd19eeca3107fb3dd088d26 100644 (file)
@@ -224,10 +224,12 @@ bool gdcmParser::SetShaDict(DictKey dictName){
  *         false otherwise. 
  */
 bool gdcmParser::IsReadable(void) { 
-   if(filetype==Unknown)
+   if(filetype==Unknown) {
       return(false);
-   if(listEntries.size()<=0)
+   }
+   if(listEntries.size()<=0) {    
       return(false);
+   }
 
    return(true);
 }
@@ -2034,7 +2036,10 @@ bool gdcmParser::CheckSwap() {
       
       if( (memcmp(entCur, "UL", (size_t)2) == 0) ||
          (memcmp(entCur, "OB", (size_t)2) == 0) ||
-         (memcmp(entCur, "UI", (size_t)2) == 0) )   
+         (memcmp(entCur, "UI", (size_t)2) == 0) ||       
+         (memcmp(entCur, "CS", (size_t)2) == 0) )  // CS, to remove later
+                                                   // when Write DCM *adds*
+                                                   // group 0000  
       {
          filetype = ExplicitVR;
          dbg.Verbose(1, "gdcmParser::CheckSwap:",
@@ -2046,6 +2051,7 @@ bool gdcmParser::CheckSwap() {
          dbg.Verbose(1, "gdcmParser::CheckSwap:",
                      "not an explicit Value Representation");
       }
+      
       if (net2host) 
       {
          sw = 4321;