//-----------------------------------------------------------------------------
// Print
-
void gdcmHeaderEntry::Print(std::ostream & os) {
size_t o;
unsigned short int g, e;
v = GetValue();
o = GetOffset();
sprintf(greltag,"%04x|%04x ",g,e);
- d2 = _CreateCleanString(v); // replace non printable characters by '.'
s << greltag ;
+ d2 = _CreateCleanString(v); // replace non printable characters by '.'
if (printLevel>=2) {
s << "lg : ";
lgth = GetReadLength();
if (lgth == 0xffffffff) {
- sprintf(st,"x(ff)"); // I said : "x(ff)" !
+ sprintf(st,"x(ffff)"); // I said : "x(ffff)" !
s.setf(std::ios::left);
s << std::setw(10-strlen(st)) << " ";
s << st << " ";
}
s << " Off.: ";
sprintf(st,"x(%x)",o);
- s << std::setw(10-strlen(st)) << " ";
+ s << std::setw(10-strlen(st)) << " ";
s << st << " ";
s << std::setw(8) << o;
}
s << "[" << GetName()<< "]";
s << " [" << d2 << "]";
- // Display the UID value (instead of displaying the rough code)
+
+ // 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) << "]";
+ if ( (e == 0x0010) || (e == 0x0002) )
+ s << " ==>\t[" << ts->GetValue(v) << "]";
} else {
if (g == 0x0008) {
- if ( (e == 0x0016) || (e == 0x1150) )
- s << " ==>\t[" << ts->GetValue(v) << "]";
+ if ( (e == 0x0016) || (e == 0x1150) )
+ s << " ==>\t[" << ts->GetValue(v) << "]";
}
- }
+ }
if (e == 0x0000) { // elem 0x0000 --> group length
if (v == "4294967295") // to avoid troubles in convertion
sprintf (st," x(ffffffff)");
else
sprintf(st," x(%08x)",atoi(v.c_str()));
s << st;
- }
+ }
s << std::endl;
os << s.str();
}