+2004-01-19 Benoit Regrain
+ * Add the use of shadow dictionaries
+ * bug fix and coding style
+
2004-01-19 Benoit Regrain
* src/gdcmFile.cxx : bug fix concerning the close of file
* src/gdcmParser.[h|cxx] : remove obvious Pub informations
else
vr=(*it)->GetVR();
+ (*it)->SetValue(GetHeaderEntryUnvalue(*it));
if(entry)
{
// Set the new entry and the new value
else
{
// Remove precedent value transformation
- (*it)->SetValue(GetHeaderEntryUnvalue(*it));
(*it)->SetDictEntry(NewVirtualDictEntry((*it)->GetGroup(),(*it)->GetElement(),vr));
}
}
}
// We need an additional byte for storing \0 that is not on disk
- char* NewValue = (char*)malloc(length+1);
- if( !NewValue)
- {
- dbg.Verbose(1, "LoadElementValue: Failed to allocate NewValue");
- return;
- }
- NewValue[length]= 0;
-
- item_read = fread(NewValue, (size_t)length, (size_t)1, fp);
+ std::string NewValue(length,0);
+ item_read = fread(&(NewValue[0]), (size_t)length, (size_t)1, fp);
if ( item_read != 1 )
{
- free(NewValue);
dbg.Verbose(1, "gdcmParser::LoadElementValue","unread element value");
Entry->SetValue("gdcm::UnRead");
return;
}
Entry->SetValue(NewValue);
- free(NewValue);
}
/**