DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Tue, 2017-04-25, 13:31

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed, 2012-09-05, 22:16 
Offline

Joined: Mon, 2012-05-21, 08:37
Posts: 9
Is it possible to use DcmItem::findAndGetString() and related functions with a private tag (declared with a DcmTag object) that is defined with the upper byte left as empty in the data dictionary?

E.g., its entry in private.dic looks like:
(2005,"Philips MR Imaging DD 001",0a)

In the dicom data the creator and data tags could look like:
(2005,0010) "Philips MR Imaging DD 001"
(2005,100a) "data!"

or
(2005,0014) "Philips MR Imaging DD 001"
(2005,140a) "data!"

What I've gleaned from other posts and the how-to doc, here's what I've got:

Code:
{
 DcmDataDictionary &dict = dcmDataDict.wrlock();
 dict.addEntry(new DcmDictEntry(0x2005, 0x0d, EVR_FL, "InvertedRescaleIntercept, 1, 1, "private", OFTrue, "Philips MR Imaging 001");
 dcmDataDict.unlock();
}
...
DcmTag my_tag(0x2005, 0x0d, "Philips MR Imaging 001");
DcmDataset *ds = ...
const char *my_string;
ds->findAndGetString(my_tag, my_string);


This does not work: it simply cannot find the tag.
As a potentially related problem looking at my_tag in the above example, the dictionary look-up fails, so, my_tag doesn't have a VR associated with it.

So is this designed to work this way, or do I have to examine the dataset, looking for the creator codes for the private tag groups and create the my_tag object above dynamically based on which tag element number is used for the creator code?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group