DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Wed, 2018-08-15, 21:54

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Tue, 2004-11-09, 16:39 
Offline

Joined: Fri, 2004-11-05, 18:20
Posts: 52
Location: Houston, Texas, USA
I need to add private tags to the data dictionary.

As I'm using the windows precompiled binaries, will I need to recompile the binaries after adding the entries, specifically dcm2xml.exe, or will this binary read from the external text files?

I read in one of the help documents that the binaries can either have the data dictionaries compiled into the application, read from the external files, or both.

I tried adding an entry into private.dic for a known private tag, but when converting to xml, the VR still equals ?? and the name still equals "Unknown Tag & Data" .

Thanks very much.

dave

:?


Top
 Profile  
 
PostPosted: Tue, 2004-11-09, 19:01 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Dave,

dave wrote:
I read in one of the help documents that the binaries can either have the data dictionaries compiled into the application, read from the external files, or both.

this is correct. Did you check that the environment variable DCMDICTPATH really points to your private dictionary?

Jörg


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 19:33 
Offline

Joined: Fri, 2004-11-05, 18:20
Posts: 52
Location: Houston, Texas, USA
I will create the DCMDICTPATH environmental variable with the correct value, i.e., it will point to the private.dic file included with the download and where I have added new entries.

So without this variable set, were the windows binaries using compiled in data dictionaries?

Thanks for you help, Jörg.


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 19:45 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Dave,

under Windows the default is to have a built-in data dictionary, i.e. usually it is not required to set the environment variable. But if you set the variable the built-in dictionary is still used and the entries from the external dictionary file are added to it when the application starts.

Details can be found in the text document "datadict.txt" (apparently a little out-dated but most of the text is still correct).

Jörg


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 20:20 
Offline

Joined: Fri, 2004-11-05, 18:20
Posts: 52
Location: Houston, Texas, USA
Not having much luck here. But perhaps I'm making some faulty assumptions.

This is a tag from the dicom file I converted using dcm2xml.exe:

<element tag="300b,1001" vr="??" vm="1" len="2" name="Unknown Tag &amp; Data" binary="yes">31\30</element>

and this is the tab separated entry I added to private.dic (the VR and NAME are bogus values...)

(300b,"MDACC",1001) PN TestElement 1

I've added the DCMDICTPATH env variable including the file name.

I've restarted the computer, but still no changes to the above tag information.

Anything obvious that I've missed?


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 20:36 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
dave wrote:
(300b,"MDACC",1001) PN TestElement 1

Hmm, does your test file contain the private creator element (300b,0010) with a value of "MDACC" :?:

Jörg


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 20:50 
Offline

Joined: Fri, 2004-11-05, 18:20
Posts: 52
Location: Houston, Texas, USA
Nope. So I just took it out.

Now the data dictionary entry looks like this:

(300b,1001) DS TestElement 1

( the VR for this tag actually is "DS", I just checked )


and the XML output looks like this:


<element tag="300b,1001" vr="DS" vm="1" len="2" name="Unknown Tag &amp; Data">10</element>

So some progress has been made in that the env var is set up correctly and the application is reading it. :)

I'm curious as to the change in the value '31\30' to '10' . This is the value associated with the element, isn't it? Any idea why this might have changed.

BTW, thanks so much, Jörg, for engaging an obvious newbie to DICOM like myself.

dave


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 21:10 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Dave,

but without private creator element the private tag (300b,1001) is not properly reserved according to part 5 of the DICOM standard :!:

dave wrote:
I'm curious as to the change in the value '31\30' to '10' . This is the value associated with the element, isn't it? Any idea why this might have changed.

If the VR is unknown DCMTK uses OB (Other Byte) for the output, i.e. a sequence of bytes. DS (Decimal String) is the string representation of a decimal number. In your case the number 10 is stored as the string "10". The binary representation of this string is 0x31 0x30 - voilà :)

Jörg


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 21:50 
Offline

Joined: Fri, 2004-11-05, 18:20
Posts: 52
Location: Houston, Texas, USA
Quote:
but without private creator element the private tag (300b,1001) is not properly reserved according to part 5 of the DICOM standard


Would this be a concern for me? I am just converting the DICOM file with dcm2xml.exe to xml for web display. Wouldn't this be more important for the Application Entities that are actually creating the objects?

In this entry from private.dic included with the download:

(7003,"SIEMENS MED",10) LT Header 1

isn't "SIEMENS MED" assigned to this tag by whatever AE created the object?

dave


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 22:08 
Offline

Joined: Fri, 2004-11-05, 18:20
Posts: 52
Location: Houston, Texas, USA
Jörg,

A better question would have been "what do you mean by private creator element"?

(7003,"SIEMENS MED",10) LT Header 1

Is that what "SIEMENS MED" is?

dave


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 23:33 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1682
Location: Oldenburg, Germany
Hi David,

every private tag you use in your dicom file must have a reservation context. This reservation tag looks like gggg,00xx, where gggg is a private (=odd) group number and 10<xx<FF. The tag gggg,00xx then reserves a range of private tags from gggg,xx00-gggg,xxFF for the private creator, that you set with the value of the reservation tag.

In your case:

Your tag (300b,1001) is a private tag and therefore it needs a reservation. Following the rule above, the related reservation tag number is (300b,0010).

(300b,0010)="MDACC" reserves for private creator "MDACC" the tag range 300b,1000-300b,10FF. The reservation tag needs to be found in the dicom file, not in the dictionary.

E.g: This line from private.dic means:
(0027,"GEMS_IMAG_01",06) SL ImageArchiveFlag 1
0027,xx06 is a valid tag, if in the same file there is a reservation 0027,00xx="GEMS_IMAG_01"

When DCMTK sees a private tag in your file it looks for the related reservation tag. If it can be found, it reads the private creator name, that is set there. Next, it looks at your dictionary for private tags and checks all matching tags (same group/element numbers), whether it can find one with the same private creator name. If so, searching was successful.

Please read section 7.8 in part 5 of the DICOM standard (only 1 page).

Best Regards
Michael Onken :D


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2004-11-09, 23:57 
Offline

Joined: Fri, 2004-11-05, 18:20
Posts: 52
Location: Houston, Texas, USA
Thank you very much, Michael, for you detailed response. Reading the standard is always good advice :idea: as is interacting with the experts.

Thanks,

dave


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

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