Actions
Feature #575
openDcmIntegerString has no putSint32() method
Status:
New
Priority:
Normal
Assignee:
-
Category:
Library
Target version:
-
Start date:
2013-10-29
Due date:
% Done:
0%
Estimated time:
Module:
dcmdata, dcmsr and other?
Operating System:
Compiler:
Description
The class DcmIntegerString has a getSint32() but no putSint32() method. This also applies to various other VR classes (e.g. DcmDecimalString) and to other (still missing) putXXX() methods.
As a result of these missing methods, one has to write its own code for this puspose as in DSRImageFrameList::write() in the "dcmsr" module.
/* fill integer string with values from list */
OFString tmpString;
char buffer[16];
const OFListConstIterator(Sint32) endPos = ItemList.end();
OFListConstIterator(Sint32) iterator = ItemList.begin();
while (iterator != endPos)
{
if (!tmpString.empty())
tmpString += '\\';
#if SIZEOF_LONG == 8
sprintf(buffer, "%d", *iterator);
#else
sprintf(buffer, "%ld", *iterator);
#endif
tmpString += buffer;
iterator++;
}
/* set integer string */
DcmIntegerString delem(DCM_ReferencedFrameNumber);
result = delem.putOFStringArray(tmpString);
Updated by Jörg Riesmeier about 12 years ago
- Module changed from dcmdata to dcmdata, dcmsr and other?
Actions