}
//-----------------------------------------------------------------------------
-gdcmVR * gdcmGlobal::VR = (gdcmVR*)0;
-gdcmTS * gdcmGlobal::TS = (gdcmTS*)0;
-gdcmDictSet * gdcmGlobal::Dicts = (gdcmDictSet*)0;
+gdcmVR *gdcmGlobal::VR = (gdcmVR *)0;
+gdcmTS *gdcmGlobal::TS = (gdcmTS *)0;
+gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0;
gdcmGlobal gdcmGlob;
gdcmGlobal::gdcmGlobal(void) {
delete Dicts;
}
-gdcmVR * gdcmGlobal::GetVR(void) {
+gdcmVR *gdcmGlobal::GetVR(void) {
return VR;
}
-gdcmTS * gdcmGlobal::GetTS(void) {
+gdcmTS *gdcmGlobal::GetTS(void) {
return TS;
}
-gdcmDictSet * gdcmGlobal::GetDicts(void) {
+gdcmDictSet *gdcmGlobal::GetDicts(void) {
return Dicts;
}
///////////////////////////////////////////////////////////////////////////
// to prevent a flashing screen when non-printable character
-char * _cleanString(char *v) {
+char *_cleanString(char *v) {
char *d;
int i, l;
l = strlen(v);
// to prevent a flashing screen when non-printable character
std::string _CreateCleanString(std::string s) {
std::string str=s;
- for(int i=0;i<str.size();i++)
+ int n = str.size();
+ for(int i=0;i<n-1;i++)
{
if(!isprint(str[i]))
str[i]='.';
}
-
+ if(!isprint(str[n])) { // to avoid trouble with odd length fields
+ // padded with zeo to become even
+
+ if (str[n] == '\0')
+ str[n] = ' ';
+ else
+ str[n] = '.';
+ }
return(str);
}