Reading (Group / Element) that should contain multiple values

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
todor_petkov
Posts: 5
Joined: Wed, 2005-01-26, 09:25

Reading (Group / Element) that should contain multiple values

#1 Post by todor_petkov »

Hello, I was wandering how to access the CT Pixel Spacing through
DcmDataset.

What I did for single valued tags was for example :
/***********************************************/
/* for slice thickness */
DcmTagKey *tag = new DcmTagKey();
double slice_thickness = 0.0;
tag->setGroup(0x0018);
tag->setElement(0x0050);
cond = dataset->findAndGetFloat64(*tag, slice_thickness);
/*************************************************/

But I cannot understand how to get multiple values. Can someone post
a piece of code for this or give some advice?!
Thanks in advance,
Todor

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

First of all, you do not need to create the DcmTagKey since all standard attributes are already defined in "dcmdata/include/dcdeftag.h", in your case it's DCM_SliceThickness.

Then to your question: findAndGetFloat64() has an optional parameter "pos" which is the index of the value in case of multi-valued elements (0..vm-1). See documentation for details.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest