Program: gdcm
Module: $RCSfile: gdcmValEntry.cxx,v $
Language: C++
- Date: $Date: 2004/11/03 20:52:13 $
- Version: $Revision: 1.32 $
+ Date: $Date: 2004/11/24 16:39:19 $
+ Version: $Revision: 1.37 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
TSKey v;
std::string d2;
+ os << "V ";
DocEntry::Print(os);
if (g == 0xfffe)
{
if ( v.length() != 0 ) // for brain damaged headers
{
- if ( ! isdigit(v[v.length()-1]) )
+ if ( ! isdigit((unsigned char)v[v.length()-1]) )
{
v.erase(v.length()-1, 1);
}
{
if ( v.length() != 0 ) // for brain damaged headers
{
- if ( ! isdigit(v[v.length()-1]) )
+ if ( ! isdigit((unsigned char)v[v.length()-1]) )
{
v.erase(v.length()-1, 1);
}
{
if ( v.length() != 0 ) // for brain damaged headers
{
- if ( ! isdigit(v[v.length()-1]) )
+ if ( ! isdigit((unsigned char)v[v.length()-1]) )
{
v.erase(v.length()-1, 1);
}
}
std::string vr = GetVR();
- int lgr = GetReadLength();
+ unsigned int lgr = GetReadLength();
if (vr == "US" || vr == "SS")
{
// some 'Short integer' fields may be mulivaluated
tokens.clear();
return;
}
-
- fp->write (GetValue().c_str(), (size_t)lgr ); // Elem value
-// assert( lgr == GetValue().size() ); // FIXME ?????
-// dbg.Assert(2, lgr == strlen(GetValue().c_str()), "Should be equal" );
+
+ assert( lgr == GetValue().size() );
+ binary_write(*fp, GetValue());
}
//-----------------------------------------------------------------------------