X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmHeaderEntrySet.cxx;h=7bea7efa3c1307702a4e5e1e4192b47d94e9eeb5;hb=e3a31fcb86b0e19229473ad24788e5e9df423faa;hp=b49582d222d5c2498631dadbb534d87433d638fc;hpb=54ce6e928bccc91bb12601c782b92c833678de40;p=gdcm.git diff --git a/src/gdcmHeaderEntrySet.cxx b/src/gdcmHeaderEntrySet.cxx index b49582d2..7bea7efa 100644 --- a/src/gdcmHeaderEntrySet.cxx +++ b/src/gdcmHeaderEntrySet.cxx @@ -10,6 +10,8 @@ # include #endif +#include //la bibli qui va bien + //----------------------------------------------------------------------------- // Constructor / Destructor /** @@ -44,8 +46,6 @@ void gdcmHeaderEntrySet::Print(std::ostream & os) { gdcmTS * ts = gdcmGlobal::GetTS(); std::ostringstream s; - - s << "------------- using tagHT ---------------------" << std::endl; // Tag HT s << "------------- using tagHT ---------------------" << std::endl; @@ -78,14 +78,15 @@ void gdcmHeaderEntrySet::Print(std::ostream & os) { } s << std::endl; } + os<GetOffset(); sprintf(greltag,"%04x|%04x",g,e); d2 = _CreateCleanString(v); // replace non printable characters by '.' - s << greltag << ": lgth : "; - lgth = (*i)->GetReadLength(); - if ( lgth == 0xffffffff) - s << std::hex << lgth << std::dec ; - else - s << lgth; - s << ",\t Offset : " << o; - s << " x(" << std::hex << o << std::dec << ") "; - s << "\t[" << (*i)->GetVR() << "]"; - s << "\t[" << (*i)->GetName() << "]"; - s << "\t[" << d2 << "]"; - - // Display the UID value (instead of displaying the rough code) + cout << greltag << " lg : "; + lgth = (*i)->GetReadLength(); + sprintf(st,"x(%x)",lgth); + std::cout.setf(ios::left); + std::cout << setw(10-strlen(st)) << " "; + std::cout << st << " "; + std::cout.setf(ios::left); + std::cout << setw(8) << lgth; + std::cout << " Off.: "; + sprintf(st,"x(%x)",o); + std::cout << setw(10-strlen(st)) << " "; + std::cout << st << " "; + std::cout << setw(8) << o; + std::cout << "[" << (*i)->GetVR() << "] "; + std::cout.setf(ios::left); + std::cout << setw(66-(*i)->GetName().length()) << " "; + std::cout << "[" << (*i)->GetName()<< "] "; + std::cout << "[" << d2 << "]"; + // Display the UID value (instead of displaying the rough code) if (g == 0x0002) { // Any more to be displayed ? if ( (e == 0x0010) || (e == 0x0002) ) - s << " ==>\t[" << ts->GetValue(v) << "]"; + std::cout << " ==>\t[" << ts->GetValue(v) << "]"; } else { if (g == 0x0008) { if ( (e == 0x0016) || (e == 0x1150) ) - s << " ==>\t[" << ts->GetValue(v) << "]"; + std::cout << " ==>\t[" << ts->GetValue(v) << "]"; } - } - s << std::endl; - } - os<