[DICOMDIR]ReferencedFileID and OFString

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Tsunamis
Posts: 31
Joined: Wed, 2005-05-04, 17:07

[DICOMDIR]ReferencedFileID and OFString

#1 Post by Tsunamis »

Hi, Just to mention a little problem, and its solution :

PB :
When I try to make a findAndGetOFString on the referencedFileID in my dicomdir, it only gets me the left part of the string (until the character '\')
My first part is 8 char long, and the second too, and none contains any invalid chars.

Solution :
All happens correctly when using findAndGetString.
dcmDump successfully dumps the dicomdir so the print method works also fine.

Bye :D
________
buy iolite vaporizer
________
vaporizer shop
Last edited by Tsunamis on Tue, 2011-02-01, 14:39, edited 2 times in total.

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

the character "\" denotes, that this field holds not only one value, but has a Value Multiplicity greater than 1. The method findAndGetOFString takes as a second parameter the position of the value, you want to get (default: first = 0). If you want to get all values together (separated through "\", like the dcmdump output) concatenated in a string, use findAndGetOFStringArray(...). Look into the documentation of DcmItem for API explanations.

Regards,
Michael

Tsunamis
Posts: 31
Joined: Wed, 2005-05-04, 17:07

#3 Post by Tsunamis »

Interesting indeed,
I didn't see that the string i passed was treated as separate tokens.

Thanks for the explanation.
________
Yamaha Y8950 history

Post Reply

Who is online

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