Trouble using DcmDecimalString

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Rich in Soquel
Posts: 15
Joined: Mon, 2009-08-17, 21:40
Location: California

Trouble using DcmDecimalString

#1 Post by Rich in Soquel »

dcmtk 3.6.4, Windows 10, Microsoft Visual Studio 2010:

switch(VRe)
{
case EVR_DS:
DcmDecimalString ds(DcmTag(TagGroup, TagElement), 0); // (0018,2005) SliceLocationVector
char *str = NULL;

element->getString(str, len);
// Here str == "3.25\3.25\3.25\3.270833\3.270833\3.291667\..." len==22580
ds.putString(str);
OFVector<Float64> doubleVals;
status = ds.getFloat64Vector(doubleVals);
//doubleVals look correct (double version of each DS item, length is correct), status is good

return ERR_NO_ERROR; // Don’t do anything else

On executing the return:
Run Time Check Failure #2 - Stack around the variable 'ds' was corrupted.

What am I doing wrong? Thanks for any help!

J. Riesmeier
DCMTK Developer
Posts: 2504
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Trouble using DcmDecimalString

#2 Post by J. Riesmeier »

Your code is not complete, so it is hard to help you in this regard.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 1 guest