Program: gdcm
Module: $RCSfile: gdcmHeader.cxx,v $
Language: C++
- Date: $Date: 2004/09/29 17:33:17 $
- Version: $Revision: 1.190 $
+ Date: $Date: 2004/10/10 00:42:54 $
+ Version: $Revision: 1.192 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if (i_lgPix != -2)
{
// no (GrPixel, NumPixel) element
- char* dumm = new char[20];
- sprintf(dumm ,"%d", i_lgPix+12);
- std::string s_lgPix = dumm;
- delete[] dumm;
+ std::string s_lgPix;
+ s_lgPix = gdcmUtil::Format("%d", i_lgPix+12);
ReplaceOrCreateByNumber(s_lgPix,GrPixel, 0x0000);
}
}
tokens.clear(); // clean any previous value
- Tokenize ( lutDescription, tokens, "\\" );
+ gdcmUtil::Tokenize ( lutDescription, tokens, "\\" );
//LutLength=atoi(tokens[0].c_str());
//LutDepth=atoi(tokens[1].c_str());
*/
void gdcmHeader::SetImageDataSize(size_t ImageDataSize)
{
- char car[20];
- sprintf(car,"%d",ImageDataSize);
+ ///FIXME I don't understand this code wh ydo we set two times 'car' ?
+ std::string car = gdcmUtil::Format("%d", ImageDataSize);
gdcmDocEntry *a = GetDocEntryByNumber(GrPixel, NumPixel);
a->SetLength(ImageDataSize);
ImageDataSize += 8;
- sprintf(car,"%d",ImageDataSize);
+ car = gdcmUtil::Format("%d", ImageDataSize);
- const std::string content1 = car;
- SetEntryByNumber(content1, GrPixel, NumPixel);
+ SetEntryByNumber(car, GrPixel, NumPixel);
}
//-----------------------------------------------------------------------------