X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmParser.cxx;h=22a77c21648c8c535dd19eeca3107fb3dd088d26;hb=2e69e985f9e76d83fcdacfc3d7e30d9c08bd6e0e;hp=f20135a53bb57f7acfee3dbaa149bc971dc8477a;hpb=27c61aa23c3f02def28d44dca855e54d9adb25a1;p=gdcm.git diff --git a/src/gdcmParser.cxx b/src/gdcmParser.cxx index f20135a5..22a77c21 100644 --- a/src/gdcmParser.cxx +++ b/src/gdcmParser.cxx @@ -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); } @@ -1749,7 +1751,7 @@ void gdcmParser::FixHeaderEntryFoundLength(gdcmHeaderEntry *Entry, guint32 Found if (FoundLength%2) { std::cout << "Warning : Tag with uneven length " << FoundLength - << "in x(" << hex << gr << "," << el <<")" << std::endl; + << "in x(" << std::hex << gr << "," << el <<")" << std::endl; } // Sorry for the patch! @@ -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;