- converted = atof(s.c_str());
- // probabely something much more complicated is possible,
- // using C++ features
- /// \todo check the behaviour when there are >0 and <0 numbers
- sprintf(charConverted, "%016.6f",converted);
- s = charConverted;
+ if ( s != GDCM_UNFOUND) // Don't convert unfound fields !
+ {
+ converted = atof(s.c_str());
+ // probabely something much more complicated is possible,
+ // using C++ features
+ /// \todo check the behaviour when there are >0 and <0 numbers
+ sprintf(charConverted, "%016.6f",converted);
+ s = charConverted;
+ }