]> Creatis software - gdcm.git/blobdiff - src/gdcmParser.cxx
gdcmParser : allows "DICM" files, with NO group '0002'
[gdcm.git] / src / gdcmParser.cxx
index ffbe647e827bcf3770a5b38cd492f42847ce4cfb..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);
 }
@@ -1835,7 +1837,9 @@ bool gdcmParser::IsHeaderEntryAnInteger(gdcmHeaderEntry *Entry) {
        // For *regular* headers, the test is useless..
        // lets's print a warning message and go on, 
        // instead of giving up with an error message
-       std::cout << s.str().c_str() << std::endl;
+       
+       //std::cout << s.str().c_str() << std::endl;
+       
         // dbg.Error("gdcmParser::IsHeaderEntryAnInteger",
         //    s.str().c_str());     
       }
@@ -2032,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:",
@@ -2044,6 +2051,7 @@ bool gdcmParser::CheckSwap() {
          dbg.Verbose(1, "gdcmParser::CheckSwap:",
                      "not an explicit Value Representation");
       }
+      
       if (net2host) 
       {
          sw = 4321;