X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmHeaderEntry.cxx;h=b3dd2ef2254b2a9e3aae7f5488c96686300e0973;hb=36065b288af82c4259a56523a3bd5fb4a529d7b5;hp=34424cc558af85db02f9a1b2353e856ef43c645f;hpb=45bf98d79625d7efdb227b07c8746a918b49568b;p=gdcm.git diff --git a/src/gdcmHeaderEntry.cxx b/src/gdcmHeaderEntry.cxx index 34424cc5..b3dd2ef2 100644 --- a/src/gdcmHeaderEntry.cxx +++ b/src/gdcmHeaderEntry.cxx @@ -25,11 +25,16 @@ */ gdcmHeaderEntry::gdcmHeaderEntry(gdcmDictEntry* in) { ImplicitVR = false; + voidArea = NULL; // unsecure memory area to hold 'non string' values entry = in; } //----------------------------------------------------------------------------- // Print +/** + * \ingroup gdcmHeaderEntry + * \brief canonical Printer + */ void gdcmHeaderEntry::Print(std::ostream & os) { size_t o; unsigned short int g, e; @@ -40,6 +45,7 @@ void gdcmHeaderEntry::Print(std::ostream & os) { std::ostringstream s; guint32 lgth; char greltag[10]; //group element tag + g = GetGroup(); e = GetElement(); v = GetValue(); @@ -51,7 +57,7 @@ void gdcmHeaderEntry::Print(std::ostream & os) { d2 = _CreateCleanString(v); // replace non printable characters by '.' if (printLevel>=2) { s << "lg : "; - lgth = GetReadLength(); + lgth = GetReadLength(); // ReadLength, as opposed to UsableLength if (lgth == 0xffffffff) { sprintf(st,"x(ffff)"); // I said : "x(ffff)" ! s.setf(std::ios::left); @@ -83,15 +89,20 @@ void gdcmHeaderEntry::Print(std::ostream & os) { s << "[" << GetName()<< "]"; - - - if( (GetLength()=3) || - (d2.find("gdcm::NotLoaded.") < d2.length()) ) - s << " [" << d2 << "]"; - else - s << " [ gdcm::too long for print (" << GetLength() << ") ]"; - + if (voidArea != NULL) { + s << " [gdcm::Non String Data Loaded in Unsecure Area (" + << GetLength() << ") ]"; + } + + else { + if( (GetLength()=3) || + (d2.find("gdcm::NotLoaded.") < d2.length()) ) + s << " [" << d2 << "]"; + else + s << " [gdcm::too long for print (" << GetLength() << ") ]"; + } + // Display the UID value (instead of displaying the rough code) if (g == 0x0002) { // Any more to be displayed ? if ( (e == 0x0010) || (e == 0x0002) )