findAndGetUint16

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
qs5d
Posts: 6
Joined: Thu, 2005-04-28, 14:53

findAndGetUint16

#1 Post by qs5d »

I want to change the value of DCM_InstanceNumber, ie. the number of the image by using the following:
Uint16 value;
findAndGetUint16 (Dcm_InstanceNumber, value);

But I couldn't get the value I want. Could you please give me an example? Thank you.

Thomas Wilkens
DCMTK Developer
Posts: 117
Joined: Tue, 2004-11-02, 17:21
Location: Oldenburg, Germany
Contact:

#2 Post by Thomas Wilkens »

According to part 6 of the DICOM standard, attribute InstanceNumber has a datatype/value representation of IS (integer string).

Function findAndGetUint16(...) is applicable to OW and US attributes only (see comment in dcmdata/include/dcitem.h).

You should use findAndGetOFString(...), which is applicable to AE, AS, AT, CS, DA, DS, DT, FL, FD, ___IS___, LO, LT, OB, OF, OW, PN, SH, SL, SS, ST, TM, UI, UL, US and UT, instead. See comment in dcmdata/include/dcitem.h for more information.

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

#3 Post by Jörg Riesmeier »

You can also use findAndGetSint32().

Post Reply

Who is online

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